rticonnextdds-connector icon indicating copy to clipboard operation
rticonnextdds-connector copied to clipboard

Writing data of different type (CON-24)

Open ilya1725 opened this issue 7 years ago • 5 comments

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:

  1. Is it hard requirement that the data types in the dictionary must be exactly as declared in the XML file?
  2. 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.

ilya1725 avatar Jan 04 '17 22:01 ilya1725