I'm trying to make the python code work with the RTI Remote Administration interface. Python module requires XML type representation. A regular RTI release comes with the IDL type for the Remote Platform (inside rti_connext_dds-6.0.1/resource/idl/). The ServiceAdmin.idl has these types:
/* CommandRequest */ @appendable struct CommandRequest { @key int32 instance_id; @optional string<BOUNDED_STRING_LENGTH_MAX> application_name; CommandActionKind action; ResourceIdentifier resource_identifier; StringBody string_body; OctetBody octet_body; }; /* CommandReply */ @appendable struct CommandReply { CommandReplyRetcode retcode; int32 native_retcode; StringBody string_body; OctetBody octet_body; };
Converting the IDL to XML produces this:
<module name="RTI" autoid="hash" allowed_data_representation="xcdr2"> <module name="Service"> <module name="Admin"> <const name="COMMAND_REQUEST_TOPIC_NAME" type="string" value=""rti/service/admin/command_request""/> <const name="COMMAND_REPLY_TOPIC_NAME" type="string" value=""rti/service/admin/command_reply""/> <const name="NAME_LENGTH_MAX" type="int32" value="(RTI::Service::BOUNDED_STRING_LENGTH_MAX)"/> <typedef name="EntityName" type="nonBasic" nonBasicTypeName= "RTI::Service::BoundedString"/> <const name="RESOURCE_IDENTIFIER_LENGTH_MAX" type="int32" value="(RTI::Service::RESOURCE_IDENTIFIER_LENGTH_MAX)"/> <typedef name="ResourceIdentifier" type="nonBasic" nonBasicTypeName= "RTI::Service::ResourceId"/> <typedef name="StringBody" stringMaxLength="255" type="string"/> <typedef name="OctetBody" sequenceMaxLength="100" type="byte"/> <enum name="CommandActionKind"> <enumerator name="CREATE_ACTION"/> <enumerator name="GET_ACTION"/> <enumerator name="UPDATE_ACTION"/> <enumerator name="DELETE_ACTION"/> </enum> <enum name="CommandReplyRetcode"> <enumerator name="OK_RETCODE"/> <enumerator name="ERROR_RETCODE"/> </enum> <struct name= "CommandRequest"> <member name="instance_id" type="int32" key="true"/> <member name="application_name" stringMaxLength="RTI::Service::BOUNDED_STRING_LENGTH_MAX" type="string" optional="true"/> <member name="action" type="nonBasic" nonBasicTypeName= "RTI::Service::Admin::CommandActionKind"/> <member name="resource_identifier" type="nonBasic" nonBasicTypeName= "RTI::Service::Admin::ResourceIdentifier"/> <member name="string_body" type="nonBasic" nonBasicTypeName= "RTI::Service::Admin::StringBody"/> <member name="octet_body" type="nonBasic" nonBasicTypeName= "RTI::Service::Admin::OctetBody"/> </struct> <struct name= "CommandReply"> <member name="retcode" type="nonBasic" nonBasicTypeName= "RTI::Service::Admin::CommandReplyRetcode"/> <member name="native_retcode" type="int32"/> <member name="string_body" type="nonBasic" nonBasicTypeName= "RTI::Service::Admin::StringBody"/> <member name="octet_body" type="nonBasic" nonBasicTypeName= "RTI::Service::Admin::OctetBody"/> </struct> </module> </module> </module>
The command works file and the recorder processes and sends replies. But for some reason my python code can't read the reply data. It doesn't even report that there is a publisher for rti/service/admin/command_reply topic.
Anyone had experince with this interface?
To note: the modern C++ example code, specified here, works fine. But I can't use modern C++. Traditional C++ exibits the same probelm.
You'll probably be better off using your RTI support account to get an answer to this question. I doubt that the general community has walked this path before... Since your project has a support contract, you'll likely get an answer faster by submitting to the RTI support team.