[omniORB] problems sending float values
Jürgen Eckel
juergen.eckel at gmx.net
Mon May 29 18:26:58 BST 2006
hi,
I've got a problem sending floating point values to an corba server.
With other datatyes like short or string it works fine.
I am currently working on a debian-testing system, with the omniorb 4.0.6-2 version.
So having this idl file :
module Example{
interface User{
void setV( in float x );
};
interface Target{
void getV( out short x);
};
};
I just receive zero ( -2.58265845332e-05) by sending an float to
another client with the above interface.
the client :
**********************************************************
import sys
from omniORB import CORBA
import _omnipy
import Example, CosNaming
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
ior = sys.argv[1]
obj = orb.string_to_object(ior)
us = obj._narrow( Example.User )
if us is None:
print "blabla"
sys.exit(1)
us.setV( 5.0 )
**********************************************************
the server :
**********************************************************
import sys
from omniORB import CORBA, PortableServer
import CosNaming, Example, Example__POA
class User_i( Example__POA.User ):
def setV( self, x ):
print x
print type(x)
y = float(x)
print y
print type(y)
class Target_i( Example__POA.Target ):
def getV( self ):
return 5
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
us = User_i()
tg = Target_i()
uo = us._this()
to = tg._this()
print orb.object_to_string(uo)
print
print orb.object_to_string(to)
poaManager = poa._get_the_POAManager()
poaManager.activate()
orb.run()
**********************************************************
does anyone have an answer to that kind of problem?
I mean, it just like sending short values, or strings.
--
Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer
More information about the omniORB-list
mailing list