Sequences in IDL

2 posts / 0 new
Last post
Offline
Last seen: 3 years 9 months ago
Joined: 02/04/2021
Posts: 1
Sequences in IDL

Given the following example of a typedef sequence in IDL:  (this is not actual IDL, just an example)

module data {

typedef sequence <MyData, 10> MyDataSequence;

struct MyStruct {

MyDataSequence  field;

};

};

module message {

valuetype ThisMessage {

public MyDataSequence data;

};

};

So, not to clutter this up...the "object" pointed to in order to begin this is...ThisMessage.

My question is regarding how to access the sequence data?

I have seen the following, but I did not understand it:  data.el.field

I have also seen the following :  data.field

Neither appear to be correct to me.

Help/suggestions appreciated.

Organization:
Howard's picture
Offline
Last seen: 3 hours 47 min ago
Joined: 11/29/2012
Posts: 605

So, you probably should use a real idl or fix up your example.  If you take a look at what you wrote, it doesn't make sense.

message::ThisMessage

contains a data::MyDataSequence element with name "data"

Each element of MyDataSequence is of type "MyData" which is not defined in the example IDL.

And data::MyStruct is never used...and could not be redefined as MyData as it would define a circular reference.