How to change the name of topic in DDS

조회 수: 3 (최근 30일)
Jim Zhang
Jim Zhang 2022년 3월 1일
댓글: Mark McBroom 2022년 10월 10일
DDS->Code interface->DDS Libraries->Domains->Topic. Are there any restrictive rules for naming topics?
When I named topic, I found that if there are special symbols in it, it cannot be named.
For a simple example, if the topic of a manipulator in our robot is "RT / SCR / psa1 / jointstate", then I need to define the same name when defining the topic in MATLAB, but I find that when defining the name of the topic, if the name is with "/", it cannot be named.

답변 (1개)

Mark McBroom
Mark McBroom 2022년 10월 10일
You are correct that the DDS Data Dictionary currently does not allow the user to create a Topic with a name that contains a slash. Here is one possible workaround for this:
  1. Create a Topic without a "/"
  2. Generate code
  3. Edit the XML file that is generated. Modify <domain_library> section of the XML file. Change the topic name to include the desired "/"
  4. Close the Simulink model
  5. Delete the .sldd file
  6. Open the Simulink model
  7. Use the DDS quick start to import the new XML file created in step 3.
  8. In the DDS Data Dictionary, you should now see the Topic type defined with "/".
  댓글 수: 1
Mark McBroom
Mark McBroom 2022년 10월 10일
Also, I've made an enhancement request to allow user to enter topic names with special characters in the DDS Data Dictionary.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with DDS Blockset에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by