B
Bob Smith
Hello all,
I am having a very difficult time getting something to work. This
involves CORBA, hopefully someone here will be able to answer it, and if not
maybe someone can point me in the right direction to where I can get it
answered. Using ACE/TAO.... Redhat 7.3 using Kdevelop.
OK really I just want to copy a CORBA octet sequence to and array where I
can get a pointer to point to it. The first 0-3 octets in the sequence are
stored in the first int and so forth... so the array of ints would be one
quarter of the size of the octet sequence.
This is what I have and doesn't work:
//corba object already declared.
CORBA::Octet* ptempBuffer;
ptempBuffer =payLoad_var->getBuffer();
char* working_data =(char*)ptempBuffer;
byte_index =0;
for(analog_index = 0; analog_index <16; analog_index++)
{
working_data[byteIndex]=char(analog_data[analog_index]>>8);
working_data[byteIndex+1]=char(analog_data[analog_index]& 0xFF);
working_data[byteIndex+2]=char(0x00);
working_data[byteIndex+3]=char(0x00);
byte_index +=4;
}
This is what i have and it seems to crash!
Can someone be kind and help a poor soul?
thanks
I am having a very difficult time getting something to work. This
involves CORBA, hopefully someone here will be able to answer it, and if not
maybe someone can point me in the right direction to where I can get it
answered. Using ACE/TAO.... Redhat 7.3 using Kdevelop.
OK really I just want to copy a CORBA octet sequence to and array where I
can get a pointer to point to it. The first 0-3 octets in the sequence are
stored in the first int and so forth... so the array of ints would be one
quarter of the size of the octet sequence.
This is what I have and doesn't work:
//corba object already declared.
CORBA::Octet* ptempBuffer;
ptempBuffer =payLoad_var->getBuffer();
char* working_data =(char*)ptempBuffer;
byte_index =0;
for(analog_index = 0; analog_index <16; analog_index++)
{
working_data[byteIndex]=char(analog_data[analog_index]>>8);
working_data[byteIndex+1]=char(analog_data[analog_index]& 0xFF);
working_data[byteIndex+2]=char(0x00);
working_data[byteIndex+3]=char(0x00);
byte_index +=4;
}
This is what i have and it seems to crash!
Can someone be kind and help a poor soul?
thanks