[omniORB] RE: A question on omniORBpy 1_4_x86
KANGATHARAN, Bharathi
bharathi.kangatharan@baesystems.com
Tue, 16 Apr 2002 09:49:51 +0930
Thanks Duncan,
I used python lists for sequences but
it seems to be a bit more complicated than that.
The structure I am using is
# Create event type variable.
# First create the disjunction designator element.
event_header_zero = RtecEventComm.EventHeader(9, 0, 100, 0L, 0L, 0L)
event_data_zero = _GlobalIDL.RtecEventData(0, [])
event_element_zero = RtecEventComm.Event(event_header_zero,
event_data_zero)
dependency_element_zero =
RtecEventChannelAdmin.Dependency(event_element_zero, 0L)
# Create the event element.
event_header_one = RtecEventComm.EventHeader(20, 0, 1, 0L, 0L, 0L)
event_data_one = _GlobalIDL.RtecEventData(0, [])
event_element_one = RtecEventComm.Event(event_header_one,
event_data_one)
dependency_element_one =
RtecEventChannelAdmin.Dependency(event_element_one, 0L)
# Create the list of elements.
dependency_seq = [dependency_element_zero, dependency_element_one]
#dependency_seq = []
# Create the QOS object.
qos = RtecEventChannelAdmin.ConsumerQOS(dependency_seq, 0)
The structure RtecEventChannelAdmin.ConsumerQOS that
I am trying to model is defined in
http://doc.ece.uci.edu/Doxygen/Current/html/tao/rtevent/\
structRtecEventChannelAdmin_1_1ConsumerQOS.html
I stripped the any_value in the Event structure on both TAO and python since
this may be an area of potential misalignment.
The error produced is:
proxy_push_supplier <RtecEventChannelAdmin._objref_ProxyPushSupplier
instance a
t 008960B4>
event_consumer <__main__.PushConsumer_servant instance at 0085E65C>
Traceback (most recent call last):
File "event_consumer3_1.py", line 169, in ?
errorvar = proxy_push_supplier.connect_push_consumer(event_object, qos)
File "RtecEventChannelAdmin_idl.py", line 179, in connect_push_consumer
return _omnipy.invoke(self, "connect_push_consumer",
_0_RtecEventChannelAdmi
n.ProxyPushSupplier._d_connect_push_consumer, args)
omniORB.CORBA.BAD_PARAM: Minor: 0, Completed: COMPLETED_NO.
which seems to be coming back from the TAO ORB. Right?
Bharathi
-----Original Message-----
From: Duncan Grisby [mailto:dgrisby@uk.research.att.com]
Sent: Monday, 15 April 2002 22:45
To: KANGATHARAN, Bharathi
Subject: Re: A question on omniORBpy 1_4_x86
>
> This TAO RtecEventComm Server requires a QoS parameter
> which is defined as as sequence:
>
> typedef sequence<Dependency> DependencySet
>
> > I am not sure how you instantiate a 2 element-list in Python for this
> set. The .py generated from the IDL seems to raise a Run-time error
> if the constructor is called.
Just use a Python list. If DependencySet is an integer type, for
example, just say
mysequence = [ 1, 2 ]