3 Real-Time Event Service
6 File: DevGuideExamples/EventServices/RTEC_Federated/README
9 This directory contains an example that shows how to create and
10 federate real-time event channels.
12 -------------------------------------------------------------------------
14 Note: To test this, you must first run the Naming Service, e.g.:
16 $TAO_ROOT/orbsvcs/Naming_Service/Naming_Service -o ns.ior&
18 After running the naming service, start a couple of suppliers:
20 ./EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname name1 -gateway name2
21 ./EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname name2 -gateway name1
23 Now start some consumers:
25 ./EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname name1
26 ./EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname name2
28 It may be easiest to start these in separate windows. You should
29 see events from both suppliers on both event channels.
31 -------------------------------------------------------------------------
33 EchoEventSupplerMain.cpp
35 Main program for a PushSupplier.
37 EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname <name> -gateway <rname> -iorfile <file>
39 This will create a local RTEC event channel and bind it under
40 the root context of the naming service with the name <name>.
41 It will also create a gateway that links from the remote event
42 channel bound under <rname> to the locally created event channel.
43 After initializing the local event channel, it will idle until
44 it locates the remote event channel, initialize the gateway,
45 and then publish an event to the local event channel every 10
46 milliseconds. This event will contain the string <name> in the
47 any_value field. When the gateway is initialized, you'll see a
48 message stating "Gateway initialized". If you pass the -iorfile
49 parameter, this server also writes the EC's IOR to <file> when
50 the gateway is initialized.
52 Use Control-C to kill the process.
54 -------------------------------------------------------------------------
56 EchoEventConsumerMain.cpp
58 Main program for a PushConsumer.
62 EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname <name>
64 This will look for an event channel bound to <name> in the Root context
65 of the Naming Service. It will consume events from this channel and
66 print the type, source, and string contents contained in any_value.
68 Use Control-C to kill the process.
70 -------------------------------------------------------------------------
72 EchoEventConsumer_i.{h,cpp}
74 Call which implements the RtecEventComm::PushConsumer interface.
77 Exeuction via Perl Script
78 -------------------------
80 A Perl script has been created to automate the steps shown
81 above. This script can be run via the following command: