2 * @file Federated_Test.idl
4 * @author Carlos O'Ryan <coryan@uci.edu>
7 #include
"tao/ULongLongSeq.pidl"
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
30 /// Join a new peer into the simulation.
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
;
44 * @brief A member of a federated test
46 * Peers define the required interface to participate in a federated
54 /// Setup an Consumer/Supplier loopback pair
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
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
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
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
,
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
);
97 * @brief Control the elements on a Consumer/Supplier loopback pair.
101 /// Disconnect and destroy the loopback elements