Simulink DDS Blockset: problem with sequence <string> in topic

Hello,
I need a Simulink model to subscribe to a DDS topic with a data type which contains a vector of strings (sequence <string> in the idl file).
The data type representation in DDS library from the .sldd file is shown here:
I created a topic with this data type and then tried to compile a minimal simulink model with it:
This gave me the compile error "Non-scalar string signals are not supported".
To exclude other sources of error, I tried the same thing after deleting the string array from the data type definition. With that, the model compiled, additionally a drop down menu showing the sub-elements of the data type appeard in the properties editor.
Is there a workaround for this? Or does this mean that a simulink application with DDS Blockset simply can't subscribe to a DDS topic containing a sequence of strings (which would certainly be a bug)?
I would be very grateful if this could be clarified.

 採用された回答

Mark McBroom
Mark McBroom 2023 年 10 月 21 日

1 投票

Sequences ( i.e. variable length vectors) are not currently supported by the DDS Blockset for any Simulink data type. In addition, fixed length arrays are not supported for strings. All other Simulink data types support fixed length vectors.

3 件のコメント

Andreas
Andreas 2023 年 10 月 22 日
Thank you for the answer, Mark. Then I have one further question. Is there a way to avoid this compatibility problem by subscribing to the topic and then excluding a part of the data from the simulink model? I don't even need the string array in the model, but it just happens to be part of the DDS topic from which I need the other data.
Best regards,
Andreas
Mark McBroom
Mark McBroom 2023 年 10 月 23 日
If you are using RTI DDS, you can set up a routing service to convert topics that contain the array of strings to a topic that does not have an array of strings. This link shows a similar example. rticonnextdds-gateway/plugins/transformations/sequence2array at master · rticommunity/rticonnextdds-gateway (github.com)
Alternately, you could build your own DDS application by writing the code by hand to do a similar transformation. My email is mmcbroom@mathworks.com if you'd like to discuss further.
Thanks.
Mark.
Andreas
Andreas 2023 年 10 月 23 日
Hello Mark,
Thanks again for your very quick answer, this is great customer service. At this point I will use different tools instead, but the idea of solving this with an additional DDS routing service or application might become relevant later on, so thank you for offering further support by email.
Best regards,
Andreas

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with DDS Blockset についてさらに検索

製品

リリース

R2023b

タグ

質問済み:

2023 年 10 月 20 日

コメント済み:

2023 年 10 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by