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
108
109
110
111
|
// $Id$
#ifndef TAO_RTEC_EVENTCOMM_IDL
#define TAO_RTEC_EVENTCOMM_IDL
#include "CosTimeBase.idl"
// Remove the prefix definition...
// @@ TODO Is this the "Right Thing"? AFAIK the spec does not mention
// if pragmas should survive the file scope...
#pragma prefix ""
module RtecEventComm
{
// = TITLE
// User defined Event Data.
//
// = DESCRIPTION
// The Event payload is defined by this type.
// Users wanting maximum flexibility can use an Any,
// users that only have one type of event may use structures,
// other users may preffer union, trying to strike a balance
// between performance and flexibility.
// Users willing to implement their own marshalling may use a
// sequence of octet.
typedef sequence<octet> EventPayload;
struct EventData
{
long x;
long y;
double pad0;
long pad1;
// This two objects ensure that the encapsulated stream below is
// properly aligned; this makes the decoding of the payload more
// efficient because we can use the usual demarshalling code
// (without making extra copies).
EventPayload payload;
#if !defined (TAO_LACKS_EVENT_CHANNEL_ANY)
any any_value;
#endif /* TAO_LACKS_EVENT_CHANNEL_ANY */
};
typedef TimeBase::TimeT Time;
typedef long EventSourceID;
typedef long EventType;
struct EventHeader
{
// = TITLE
// The Event Header
//
// = DESCRIPTION
// Each event carries some information to do filtering,
// correlation, etc.
EventType type;
// The event type.
// This may be different from the discriminator in the EventData
// union above, the motivation is to allow filtering by data
// contents: different event types are assigned to different data
// contents though they use the same discriminator.
EventSourceID source;
// Some way to identify the supplier.
long ttl;
// The "Time To Live" count, each time an EC process the event it
// decreases the TTL field, when it gets to zero the message is no
// longer forwarded.
Time creation_time;
Time ec_recv_time;
Time ec_send_time;
// Some timestamps, they actually belong in the payload, for some
// kind of measument event.
};
struct Event
{
// = TITLE
// The Event structure.
//
// = DESCRIPTION
// Events are represented by this structure, it is simply a
// header,data pair.
//
EventHeader header;
EventData data;
// The event payload.
};
typedef sequence<Event> EventSet;
interface PushConsumer
{
oneway void push (in EventSet data);
void disconnect_push_consumer ();
};
interface PushSupplier
{
void disconnect_push_supplier ();
};
};
#endif /* TAO_RTEC_EVENTCOMM_IDL */
|