within the overload function on_data_avaliable the example shows how to display the data received. Which works very well. What I am trying to do is to cast the data received to the struct that originally created it so that I can use the data in other functions.
how do I get the actual data received, not the string data, in a pointer format or class format, which inturn I can copy to a struct or another class?
The object is already in the format you are looking for.
C++:
java:
If I've missed the point of your question...restate the question.
Regards, rip
When the IDL was converted to run on the RTI environment the structures are still avaliable witin the xxSupport.h files
along with the class created. If you have a struct foo you also have a function fooStatusReport and fooTypeSupport.
Within the ::on_data_available(DDSDataReader* reader) overload function
example:
fooStatusReport receivedData; //this is the actual structure
for (i = 0; i < data_seq.length(); ++i)
{
if (info_seq[i].valid_data)
{
fooTypeSupport::copy_data(&receivedData,&data_seq[i]);
}
}
receivedData struct will have a complete structure breakdown of the data received.
Thanks for your solution of the shapeType example. That also works very well. Note in the user manual I painfull went through nither your example or the one I found with copydata is documented. Of course there is still a great deal of documents I need to read.
thanks again for your reply.