Skip to content

Writing data of different type (CON-24) #39

@ilya1725

Description

@ilya1725

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions