blob: abfb4111577f54e32c1a581a45da99e6e6ca72d6 (
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
/**
* @file Federated_Test.idl
*
* $Id$
*
* @author Carlos O'Ryan <coryan@uci.edu>
*
*/
#include "tao/ULongLongSeq.pidl"
module Federated_Test
{
interface Peer;
interface Loopback;
/**
* @interface Coordinator
*
* @brief Controls a federated test.
*
* Implementations of the Control interface:
*
* -# wait for all the peers to join
* -# connecting the peers to each other
* -# run different experiments on each peer
* -# collect the results and print them
*
*/
interface Control
{
/// Join a new peer into the simulation.
/**
* Implementations of this interface arbitrarly decide when there
* are "enough" peers to run the test.
*/
void join (in Peer the_peer);
};
/// The results of a single experiment
typedef CORBA::ULongLongSeq Experiment_Results;
/**
* @interface Peer
*
* @brief A member of a federated test
*
* Peers define the required interface to participate in a federated
* test.
*/
interface Peer
{
/// Shutdown the peer
void shutdown ();
/// Setup an Consumer/Supplier loopback pair
/**
* Some experiments require one or more peers to setup a
* "loopback" through their event channel, i.e. a
* Consumer/Supplier pair that simply "loop" every event they
* receive through the event channel.
*
* @param experiment_id Each experiment receives a unique ID to
* separate resources.
*
* @param base_event_type The type the Consumer part of the
* loopback should subscribe to, the supplier generate events of
* type base_event_type + 1
*
* @return The returned object can be used to disconnect and
* destroy the loopback elements.
*/
Loopback setup_loopback (in long experiment_id,
in long base_event_type);
/// Run a single experiment
/**
* @param experiment_id Each experiment is assigned a different ID
* by the Control object.
* @param iterations How many iterations of the experiment should
* be run.
*
* @return All the samples captured in the experiment, the samples
* are returned in microseconds.
*/
Experiment_Results run_experiment (in long experiment_id,
in long iterations);
/// Return the event channel in this peer
readonly attribute Object channel;
/// Connect to a remote peer
void connect (in Peer remote_peer);
};
/**
* @interface Loopback
*
* @brief Control the elements on a Consumer/Supplier loopback pair.
*/
interface Loopback
{
/// Disconnect and destroy the loopback elements
void disconnect ();
};
};
|