Problem in assigning raw data to CORB... PreviousNext
Data Distribution Service (DDS) Forum > DDS Technical Forum >
Next message jeetendra kumar  posted on Monday, July 02, 2012 - 10:33 am
I have an issue while assigning raw(void*) data to CORBA::Sequence<octet> data and vice versa.

#define SAMPLE_SIZE (3)
#define FRAMES_PER_BUFFER (1024)
#define NUM_CHANNELS (2)

I am getting raw data on:
unsigned char* sampleBlock=(char*) malloc(FRAMES_PER_BUFFER * NUM_CHANNELS * SAMPLE_SIZE);

My IDL file is as below:
module Messenger{
struct Message{
CORBA::Sequence<octet> userData

//Initialising the length of corba data:
Messenger::Message message;

//Assigning sampleBlock data to CORBA::sequence<octet> data as below:

for(CORBA::ULong jj=0; jj<FRAMES_PER_BUFFER; ++jj)

But problem is that, I am not getting the same data on this CORBA data. Getting just empty data...

Btw, I used memcpy also to assign data as below:
memcpy(&message.userData, sampleBlock, FRAMES_PER_BUFFER);
but no luck... :-(

Is there any specific way to assign and retrive data from CORBA::sequence<octet> data.

Any help on this will be higly appreciated. Thanks In Advance...

Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message