|
Hi everyone !
I am currently working on an Android app where I am trying to send a command with the Tango rest API. Until now, I have sent commands with only 0 or 1 parameters and I didn't experience any problem. However, I now need to send a command which has two parameters (and perhaps more later), and the command isn't received by my device server.
When I send the command, I receive a failure with the following JSON response :
{"errors":[{"reason":"TangoApi_CANNOT_EXECUTE_COMMAND","description":"Cannot execute command SetVoltage on SAGA_NG_001\/Laser_NG\/1","severity":"PANIC","origin":"Connection.command_inout()"},{"reason":"COMMAND_TO_EQUIPMENT_FAILED","description":" - result = 3\n","severity":"ERR","origin":"EquipmentLaser_NG::psSetVoltage"}],"quality":"FAILURE","timestamp":1624269539928} {"reason":"TangoApi_CANNOT_EXECUTE_COMMAND","description":"Cannot execute command SetVoltage on SAGA_NG_001\/Laser_NG\/1","severity":"PANIC","origin":"Connection.command_inout()"} {"reason":"COMMAND_TO_EQUIPMENT_FAILED","description":" - result = 3\n","severity":"ERR","origin":"EquipmentLaser_NG::psSetVoltage"}
I send the command with the following uri : "http://<ipAddress>:8844/tango/rest/rc4/hosts/127.0.0.1/20000/devices/SAGA_NG_001/Laser_NG/1/commands/SetVoltage"
I don't see in the previous JSON response what is the reason for the command to not be able to be executed.
Here are some points that could be importants :
- I am using rest server rc4-0.1. I tried to switch to the rest server 1.22 by replacing the .jar file but I haven't been able to make it work.
- If I send to same commands, but with no or one parameter, they are also not received by the device. I don't understand this behaviour, as I think that the device should receive the command and throw an error while parsing the parameters (because there are some missing parameters). However, when I put no or one parameter, I don't receive the previous JSON response, but instead of that I get a failure with no JSON and the following message : "java.io.EOFException: No content to map to Object due to end of input".
I think that the problem is linked to the commands who take 2 parameters, not to the parameters itself.
Do you have any idea about the reason of my problem ?
Best regards, Nicolas Mienné Thales Group.
|