hi,
I've got a problem sending floating point values to an corba server.
With other datatyes like short or string it works fine.
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. 3 1934
Juergen wrote: hi,
I've got a problem sending floating point values to an corba server. With other datatyes like short or string it works fine.
<snip/>
It works fine for me with floats, too. You'd better ask this on the omniorb
ML, and don't forget to give some more details on the python & omniorb & OS
versions you're using.
Diez
Juergen wrote: hi,
I've got a problem sending floating point values to an corba server. With other datatyes like short or string it works fine.
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.
I never used omniorb and have no clue were's the problem,
but if you don't find a solution just convert float into a string
on one side and back on the other hehe =B)
In article <11**********************@38g2000cwa.googlegroups. com>,
Juergen <ju***********@gmx.net> wrote: I've got a problem sending floating point values to an corba server. With other datatyes like short or string it works fine.
Upgrade to the latest stable release, omniORB 4.0.7 and omniORBpy 2.7.
The problem you are seeing is due to a conflict between some
marshalling code in omniORB 4.0.6 and your compiler's use of strict
aliasing.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- du****@grisby.org --
-- http://www.grisby.org -- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Duncan Grisby |
last post by:
omniORB version 4.0.2 and omniORBpy 2.2 are now available.
omniORB is a robust, high performance CORBA ORB for C++. omniORBpy is
a version for Python. They are freely available under the terms of...
|
by: Duncan Grisby |
last post by:
omniORB 4.0.3 and omniORBpy 2.3 are now available. They are bug fix
releases. Many thanks to all the people who have contributed bug fixes
and features.
omniORB is a robust, high performance...
|
by: Justin Lemkul |
last post by:
Hello all,
I am hoping someone out there will be able to help me. I am trying to install
a program that utilizes NumPy. In installing NumPy, I realized that I was
lacking Atlas. I ran into...
|
by: gerald.maher |
last post by:
Hi, I just want to execute a script that used omniORB, omniORBpy
Python,
Here are the version that I Tried, is this correct ?
omniORBpy 2.5
omniORB 4.0.5
Python 2.4.1
The script is below:
|
by: CAFxX |
last post by:
i'm writing a program that executes some calculations on a bitmap loaded in
memory.
these calculation ends up with pixel wth values far over 255, but i need
them to be between 0 and 255 since i...
|
by: OlafMeding |
last post by:
How do I compile omniORBpy 3.0 on Windows? The readme.txt file seems
to talk only about how to do this on Unix. Unfortenuately, I can not
use the binary because I need to use Python 2.3.5. (and...
|
by: Samuel |
last post by:
Hi,
I am trying to get the files from this tutorial to work:
http://www.grisby.org/presentations/py10code.html
Direct link to the files:
http://www.grisby.org/presentations/py10code/adder.idl...
|
by: Duncan Grisby |
last post by:
I am pleased to announce that omniORB 4.1.1 and omniORBpy 3.1 are now
available. omniORB is a robust, high performance CORBA implementation
for C++; omniORBpy is a version for Python.
You can...
|
by: Ilan |
last post by:
Hello,
My apologies if this is not the correct forum for thses quiestions, by
I'm rather new to python+CORBA
Has anyone used omniORBpy as CORBA implementation? are there any
drawbacks?
Does...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |