rticonnextdds-connector
rticonnextdds-connector copied to clipboard
Writing data of different type (CON-24)
I have the following data structure defined in the XML file for commands:
<struct name= "MotorCommand">
<member name="current_A" type="double"/>
</struct>
When I explicitly set the data as double, like this:
{'motor': [{"current_A": 25.0}]}
The command is being set fine. However, if the data is set like this:
{'motor': [{"current_A": 25}]}
it isn't sent. I use the
self._command_writer.instance.setDictionary(command)
self._command_writer.write()
python code to write DDS commands.
I have two questions:
- Is it hard requirement that the data types in the dictionary must be exactly as declared in the XML file?
- Is there a way to get some sort of error status from
self._command_writer.write()
? It is very inconvenient/dangerous for the API to just accept a command and provide no status back.