473,545 Members | 937 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 1954
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
1590
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
1212
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
2102
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
3216
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
1083
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
1280
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
7401
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...
1
7419
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...
0
5971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5326
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
3450
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
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.