7 from omniORB
import CORBA
20 orb = CORBA.ORB_init(sys.argv)
32 conin.setObject(naming.resolve(
"ConsoleIn0.rtc"))
35 inobj = conin.getObject()._narrow(RTC.RTObject)
36 pin = inobj.get_ports()
37 pin[0].disconnect_all()
40 eclisti = inobj.get_owned_contexts()
41 eclisti[0].activate_component(inobj)
42 ec0.setObject(eclisti[0])
46 conout.setObject(naming.resolve(
"ConsoleOut0.rtc"))
49 outobj = conout.getObject()._narrow(RTC.RTObject)
50 pout = outobj.get_ports()
51 pout[0].disconnect_all()
54 eclisto = outobj.get_owned_contexts()
55 eclisto[0].activate_component(outobj)
56 ec1.setObject(eclisto[0])
60 conprof = RTC.ConnectorProfile(
"connector0",
"", [pin[0],pout[0]], [])
73 ret = pin[0].connect(conprof)
79 print "0: tick ConsoleIn component" 80 print "1: tick ConsoleOut component" 81 print "2: tick both components" 84 cmd = str(sys.stdin.readline())
100 if __name__ ==
"__main__":
def push_back(seq, elem)
Push the new element back to the CORBA sequence.
CORBA Naming Service helper class.
def newNV(name, value)
Create NameVale.