[omniORB] Problems with doubles in a sequence of structs

Corrado Santoro csanto at diit.unict.it
Thu Apr 27 20:53:13 BST 2006


Hi all,

I have a very strage problem that is making me mad and I would 
appreciate a lot anyone could help me!

This is a piece of my idl file:

#define REAL_FLOORS           4
#define REAL_TOWERS           1

// SnapShotMeasureValue
struct SnapShotMeasureValue {
   string tag;
   unsigned short index;
   boolean is_analog;
   double analog_value;
   unsigned long digital_value;
};

//SnapShot
struct SnapShot {
   sequence<SnapShotMeasureValue> floor_data[REAL_TOWERS][REAL_FLOORS];
};


The strange thing is that, on each service that uses the struct 
SnapShot, the value of the field "analog_value" is shifted forward of 
one element; I mean, the value that I should find in 
"floor_data[0][x].analog_value" is instead found in 
"floor_data[0][x+1].analog_value". This does not happen in all the other 
fields.

The same problem occurs each time I have a float or double field in a 
sequence of structures.

I'm working with Debian Linux and omniORB version 4.0.6-2 (I've 
installed the package, so I've not compiled omniORB from scratch).

--Corrado

-- 
======================================================
Eng. Corrado Santoro, Ph.D.

University of Catania - Engineering Faculty
Department of Computer Science and
Telecommunications Engineering
Viale A. Doria, 6 - 95125 CATANIA (ITALY)

Tel: +39 095 7382380
      +39 095 7387035
      +39 095 7382365
      +39 095 7382364

VoIP: sip:7035 at voicegw2.diit.unict.it

Fax: +39 095 7382397

EMail: csanto at diit.unict.it
Personal Home Page:
             http://www.diit.unict.it/users/csanto

NUXI Home Page:
             http://nuxi.diit.unict.it
======================================================




More information about the omniORB-list mailing list