How to use IDL sequences in Simulink DDS Blockset

3 vues (au cours des 30 derniers jours)
Patrick S
Patrick S le 1 Oct 2021
Commenté : Mark McBroom le 14 Oct 2021
Dear Community,
In my project, I am sending messages via DDS that include sequences. I was wondering how I can handle sequences in Simulink with the DDS Blockset addon.
Consider for example the following IDL file that defines a message type which consists of an array of points.
#ifndef POINTS_IDL
#define POINTS_IDL
struct Point
{
double x;
double y;
};
struct Points
{
sequence<Point> points;
};
#endif
I would now want to access a specific Point in the Points array by index. How can I do that with Simulink blocks?
If it matters: I would prefer to have a variable length sequence in the message.
Kind regards,
Patrick

Réponses (1)

Mark McBroom
Mark McBroom le 13 Oct 2021
Modifié(e) : Mark McBroom le 13 Oct 2021
Unfortunately, the DDS Blockset does not fully support sequences. Simulink will treat a sequence as a fixed length vector. The default size is 100 which you can change in the DDS Data Dictionary. The DDS Take block will only accept sequences up to the fixed length. The DDS Write block will always write the fixed length vector to the sequence.
Thanks.
Mark.
  1 commentaire
Mark McBroom
Mark McBroom le 14 Oct 2021
Feel free to reach out to me directly if you have additional questions on the DDS Blockset. mmcbroom@mathworks.com

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with DDS Blockset dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by