473,549 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

omniorbpy: problems sending float values

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_o bject(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.Us er ):
def setV( self, x ):
print x
print type(x)
y = float(x)
print y
print type(y)
class Target_i( Example__POA.Ta rget ):
def getV( self ):
return 5

orb = CORBA.ORB_init( sys.argv, CORBA.ORB_ID)
poa = orb.resolve_ini tial_references ("RootPOA")
us = User_i()
tg = Target_i()

uo = us._this()
to = tg._this()
print orb.object_to_s tring(uo)
print
print orb.object_to_s tring(to)
poaManager = poa._get_the_PO AManager()
poaManager.acti vate()

orb.run()
*************** *************** *************** *************

does anyone have an answer to that kind of problem?
I mean, it just like sending short values, or strings.

May 29 '06 #1
3 1956
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
May 29 '06 #2
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_o bject(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.Us er ):
def setV( self, x ):
print x
print type(x)
y = float(x)
print y
print type(y)
class Target_i( Example__POA.Ta rget ):
def getV( self ):
return 5

orb = CORBA.ORB_init( sys.argv, CORBA.ORB_ID)
poa = orb.resolve_ini tial_references ("RootPOA")
us = User_i()
tg = Target_i()

uo = us._this()
to = tg._this()
print orb.object_to_s tring(uo)
print
print orb.object_to_s tring(to)
poaManager = poa._get_the_PO AManager()
poaManager.acti vate()

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)
May 29 '06 #3
In article <11************ **********@38g2 000cwa.googlegr oups.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.o rg --
-- http://www.grisby.org --
May 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1592
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 the GNU LGPL. These are mainly bug fix releases. Highlights of the new releases include: - Bug fixes.
4
1945
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 CORBA implementation for C++. omniORBpy is a version for Python. They are open source, available under the terms of the GNU LGPL. As always, the...
2
3544
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 the following problems installing Atlas and NumPy, as I realized that NumPy could be installed using the Mac OSX veclib already built in. If anyone...
0
1213
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:
8
3789
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 got to write them in a bmp file (in which RGB values are limited to 8 bits per channel). so i need to have them scaled down. first of all i find...
1
2103
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 the binary requires that I use Python 2.4). I tried to copy the omniORBpy 3.0 source code to top\src\lib of omniORB 4.1 and then tried to execute...
6
3217
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 http://www.grisby.org/presentations/py10code/adderServer.py It produces the following error:
0
1085
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 download them in source and Windows binary forms from SourceForge: ...
3
1281
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 omniORBpy 3.2 supports the Dynamic Invocation Interface? Thanks.
0
7548
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7472
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7743
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5391
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5114
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3518
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3499
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1083
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.