473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Omniorb event channel question

Hello!

I'm using python 2.3.5 on Linux with omniORB 2.6. I'm trying to create
an object that shall listen on an event channel, but the registration
doesn't work. My code is:

class EventListener(CosEventComm.PushConsumer):

def __init__(self):
pass

def push(self, data):
print data.typecode().kind()
print data.typecode().name()

def disconnect_push_consumer(self):
pass

[... initalize the ORB ...]

channel = orb.getRootInterface(channelname)
chadmin = channel.for_consumers()
supplier = chadmin.obtain_push_supplier()
listener = EventListener()
supplier.connect_push_consumer(listener)

Unfortunately I get the following error at this point:
omniORB.CORBA.BAD_PARAM
Traceback (most recent call last)

test.py
70 supplier = chadmin.obtain_push_supplier()
71 listener = EventListener()
---> 72 supplier.connect_push_consumer(listener)
73
74

CosEventChannelAdmin_idl.py
in connect_push_consumer(self, *args)
122
123 def connect_push_consumer(self, *args):
--> 124 return _omnipy.invoke(self, "connect_push_consumer",
_0_CosEventChannelAdmin.ProxyPushSupplier._d_conne ct_push_consumer, args)
125
126 __methods__ = ["connect_push_consumer"] +
_0_CosEventComm._objref_PushSupplier.__methods__

BAD_PARAM: Minor: BAD_PARAM_WrongPythonType, COMPLETED_NO.

What am I missing? The ORB works otherwise.

Bye,NAR
Jan 31 '06 #1
2 1826
> channel = orb.getRootInterface(channelname)
chadmin = channel.for_consumers()
supplier = chadmin.obtain_push_supplier()
listener = EventListener()
supplier.connect_push_consumer(listener)


Not sure, but I guess you want a

listener._this()

here.

Diez
Jan 31 '06 #2
Diez B. Roggisch <de***@nospam.web.de> wrote:
channel = orb.getRootInterface(channelname)
chadmin = channel.for_consumers()
supplier = chadmin.obtain_push_supplier()
listener = EventListener()
supplier.connect_push_consumer(listener)


Not sure, but I guess you want a

listener._this()

here.


That worked, thanks. However, the event receiving doesn't seem to work.
I've started the ORB with
corba.orb.run()

but the push() method of the EventListener object doesn't get called (or
at least the print() calls in the method are not executed) and the event
sender program is blocked in the push() call. Do I need something else
to set up?
Bye,NAR
Feb 8 '06 #3

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

Similar topics

3
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...
4
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...
3
by: denginere | last post by:
I have a situation where I am embedding python in c++ and calling omniorb within python. c++ -> python -> c++ -> python The python is called using the following // Import the module/script...
0
by: Diez B. Roggisch | last post by:
Hi, I currently try to use omniorb it conjunction with new-style classes. What I want to accomplish is simple: I'd like to associate the authentication-info the user has provided with the...
1
by: Melissa Wallis | last post by:
I have a class with 5 callbacks. Two of the callbacks work fine but the others don't. The main difference is that the callbacks that don't work are composed of a sequence of structs. I noticed a...
3
by: Birgit Rahm | last post by:
Hello newsgroup, I work with omniORB for python and I what to log the calls, does anyone in this group know how I can do this? I use the command to initialize the ORB ORB =...
3
by: gerald.maher | last post by:
Hi, I am trying to excuate the follwong code: I get the following error: Here is my Lib path:
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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,...

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.