Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / performance-tests / RTEvent / lib / Federated_Test.idl
blobbef53580cc17cd1e639bdc60768dbf9361df2f4c
1 /**
2 * @file Federated_Test.idl
4 * @author Carlos O'Ryan <coryan@uci.edu>
5 */
7 #include "tao/ULongLongSeq.pidl"
9 module Federated_Test
11 interface Peer;
13 interface Loopback;
15 /**
16 * @interface Coordinator
18 * @brief Controls a federated test.
20 * Implementations of the Control interface:
22 * -# wait for all the peers to join
23 * -# connecting the peers to each other
24 * -# run different experiments on each peer
25 * -# collect the results and print them
28 interface Control
30 /// Join a new peer into the simulation.
31 /**
32 * Implementations of this interface arbitrarly decide when there
33 * are "enough" peers to run the test.
35 void join (in Peer the_peer);
38 /// The results of a single experiment
39 typedef CORBA::ULongLongSeq Experiment_Results;
41 /**
42 * @interface Peer
44 * @brief A member of a federated test
46 * Peers define the required interface to participate in a federated
47 * test.
49 interface Peer
51 /// Shutdown the peer
52 void shutdown ();
54 /// Setup an Consumer/Supplier loopback pair
55 /**
56 * Some experiments require one or more peers to setup a
57 * "loopback" through their event channel, i.e. a
58 * Consumer/Supplier pair that simply "loop" every event they
59 * receive through the event channel.
61 * @param experiment_id Each experiment receives a unique ID to
62 * separate resources.
64 * @param base_event_type The type the Consumer part of the
65 * loopback should subscribe to, the supplier generate events of
66 * type base_event_type + 1
68 * @return The returned object can be used to disconnect and
69 * destroy the loopback elements.
71 Loopback setup_loopback (in long experiment_id,
72 in long base_event_type);
74 /// Run a single experiment
75 /**
76 * @param experiment_id Each experiment is assigned a different ID
77 * by the Control object.
78 * @param iterations How many iterations of the experiment should
79 * be run.
81 * @return All the samples captured in the experiment, the samples
82 * are returned in microseconds.
84 Experiment_Results run_experiment (in long experiment_id,
85 in long iterations);
87 /// Return the event channel in this peer
88 readonly attribute Object channel;
90 /// Connect to a remote peer
91 void connect (in Peer remote_peer);
94 /**
95 * @interface Loopback
97 * @brief Control the elements on a Consumer/Supplier loopback pair.
99 interface Loopback
101 /// Disconnect and destroy the loopback elements
102 void disconnect ();