How to use IDL sequences in Simulink DDS Blockset

3 visualizaciones (últimos 30 días)
Patrick S
Patrick S el 1 de Oct. de 2021
Comentada: Mark McBroom el 14 de Oct. de 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

Respuestas (1)

Mark McBroom
Mark McBroom el 13 de Oct. de 2021
Editada: Mark McBroom el 13 de Oct. de 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 comentario
Mark McBroom
Mark McBroom el 14 de Oct. de 2021
Feel free to reach out to me directly if you have additional questions on the DDS Blockset. mmcbroom@mathworks.com

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with DDS Blockset en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by