How to use IDL sequences in Simulink DDS Blockset
조회 수: 3 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Mark McBroom
2021년 10월 13일
편집: Mark McBroom
2021년 10월 13일
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
Mark McBroom
2021년 10월 14일
Feel free to reach out to me directly if you have additional questions on the DDS Blockset. mmcbroom@mathworks.com
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with DDS Blockset에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!