yamcs / yamcs-studio

Desktop TM/TC Client for Yamcs
https://docs.yamcs.org/yamcs-studio/
Eclipse Public License 2.0
27 stars 14 forks source link

Yamcs Studio v1.0.2 - issueCommand() function wrongly interpreting quotes #78

Closed kstruyven closed 5 years ago

kstruyven commented 5 years ago

When sending a command with a display, we use the issueCommand() function that has the complete command as argument (string). When that command has an argument whichs value is a string, that string is not allowed to contain a comma since it will interpret it as a new argument and thus returning a ArrayIndexOutofBoundsException. Adding quotes around the argument is also producing the same error.

fqqb commented 5 years ago

I have committed a change such that you can now also issue a command by passing arguments in a dictionary. For example:

Yamcs.issueCommand('/some/command', { arg1: "a , comma", arg2: 1234})

Will you need a new v1.0.x release? v1.0.2 is very old btw.

fqqb commented 5 years ago

The change is included as of yamcs-studio v1.0.6.

I would recommend to use this new way of issuing commands whenever possible. Sending via a single string remains functional as before, but its implementation is indeed a bit simplistic. I'm not sure yet that I want to work on a fancier string parser, because i think the new way is a better approach. So.. closed for now.