DDS Tutorial -- Part II Hands On - OMG
DDS Tutorial -- Part II Hands On - OMG
DDS Tutorial -- Part II Hands On - OMG
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
How to Get Data? (Listener-Based)// Listener creation and attachmentListener listener = new MyListener();reader->set_listener(listener);// Listener codeMyListener::on_data_available( DataReader reader ){TextSeq received_data;SampleInfoSeq sample_info;TextDataReader reader = TextDataReader::narrow(reader);}treader->take( &received_data, &sample_info, …)// Use received_dataprintf(“Got: %s\n”, received_data[0]->contents);© 2009 Real-Time Innovations, Inc.