summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/DevGuideExamples/EventServices/RTEC_Federated/README
blob: 081b978498b9cdf08bfe25143953ea681b267954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
$Id$

Real-Time Event Service


File: DevGuideExamples/EventServices/RTEC_Federated/README


This directory contains an example that shows how to create and
federate real-time event channels.

-------------------------------------------------------------------------

Note: To test this, you must first run the Naming Service, e.g.:

  $TAO_ROOT/orbsvcs/Naming_Service/Naming_Service -o ns.ior&

After running the naming service, start a couple of suppliers:

  ./EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname name1 -gateway name2
  ./EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname name2 -gateway name1

Now start some consumers:

  ./EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname name1
  ./EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname name2

It may be easiest to start these in separate windows.  You should
see events from both suppliers on both event channels.

-------------------------------------------------------------------------

EchoEventSupplerMain.cpp

  Main program for a PushSupplier.

    EchoEventSupplier -ORBInitRef NameService=file://ns.ior -ORBSvcConf supplier.conf -ecname <name> -gateway <rname> -iorfile <file>

  This will create a local RTEC event channel and bind it under
  the root context of the naming service with the name <name>.
  It will also create a gateway that links from the remote event
  channel bound under <rname> to the locally created event channel.
  After initializing the local event channel, it will idle until
  it locates the remote event channel, initialize the gateway,
  and then publish an event to the local event channel every 10
  milliseconds.  This event will contain the string <name> in the
  any_value field. When the gateway is initialized, you'll see a
  message stating "Gateway initialized".  If you pass the -iorfile
  parameter, this server also writes the EC's IOR to <file> when
  the gateway is initialized.

  Use Control-C to kill the process.

-------------------------------------------------------------------------

EchoEventConsumerMain.cpp

  Main program for a PushConsumer.

  To run it:

    EchoEventConsumer -ORBInitRef NameService=file://ns.ior -ecname <name>

  This will look for an event channel bound to <name> in the Root context
  of the Naming Service.  It will consume events from this channel and
  print the type, source, and string contents contained in any_value.

  Use Control-C to kill the process.

-------------------------------------------------------------------------

EchoEventConsumer_i.{h,cpp}

  Call which implements the RtecEventComm::PushConsumer interface.


Exeuction via Perl Script
-------------------------

A Perl script has been created to automate the steps shown
above.  This script can be run via the following command:

./run_test.pl