connextpy flat data array writer
hi,
I'm currently using connextpy, and trying to publish a topic that contains both FLAT_DATA language binding and SHMEM_REF transfer mode.
Through RTI Admin Console, I can see that I can write into basic fields of this message ("id" field below), however for some reason, the data I write in the arrays ("attribute.distance" field below) are not showing up.
The IDL file looks like below:
@final
@language_binding(FLAT_DATA)
@transfer_mode(SHMEM_REF)
struct attribute
{
float distance[100]; // [m]
};
@final
@language_binding(FLAT_DATA)
@transfer_mode(SHMEM_REF)
struct myData
{
unsigned short id;
attribute my_attribute;
};
And here's the code snippet where I do the assignment:
out_sample["id"] = 23
out_sample["my_attribute.distance"][0:100] = np.ones((100)),dtype=np.float32)
Am I missing an obvious step here?
Thanks
I would like to add that, making the sample assignment the following way works,