summaryrefslogtreecommitdiff
path: root/common/OpString.idl
blob: 89320eef0971bf7acc80681fe2aa7069ade11b5c (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
#ifndef OPERATIONAL_STRING_IDL
#define OPERATIONAL_STRING_IDL

#include "ciao/Deployment_Data.idl"

module CIAO
{
  module RACE
    {

      const long UNDEFINED_TIME_ENTRY = -1;

      struct TimeValue
      {
        // Seconds since Jan. 1, 1970
        long    sec;
        //and microseconds
        long    usec;
      };

      // A time window is a range between an earliest and latest time value.
      struct TimeWindow
      {
        // Beginning of time window.
        CIAO::RACE::TimeValue Earliest;

        // End of time window.
        CIAO::RACE::TimeValue Latest;
      };

      // A task instance in an opstring.
      struct InstanceDescription
      {
        // Universally unique ID of opstring.
        // (Should correspond to goal UUID).
        string UUID;

        // Human-readable name (for debugging, not identification).
        string name;

        // Node to which instance is deployed.
        string node;

        // ID of task performed by instance (in Task Network).
        string taskId;

        // Supported type ID of task (in Repository Manager).
        string taskTypeId;

        // Specific type ID of suggested component (in Repository Manager).
        string suggestedImpl;

        // Initial values of component configuration parameters.
        ::Deployment::Properties configProperty;

        // Expected time range of instance start.
        TimeWindow startWindow;

        // Expected time range of instance finish.
        TimeWindow endWindow;
      };

      typedef sequence <InstanceDescription> InstanceDescriptions;

      typedef ::Deployment::PlanConnectionDescriptions DataLinkDescriptions;

      // Type of an ordering link in opstring (data links handled separately).
      // CAUSAL: causal link; must be obeyed for correct functionality.
      // SCHEDULING: scheduling link introduced during scheduling to prevent
      //             potential resource violations; can be ignored if
      //             additional scheduling is done.
      // THREAT: threat link, introduced to avoid a causal link threat;
      //         must be obeyed for correct functionality.
      enum ConnectionType
      {
        CAUSAL,
        SCHEDULING,
        THREAT
      };

      // A link specifying an ordering between two instances (the endpoints).
      struct OrderLinkDescription
      {
        // Human-readable name (for debugging, not identification).
        string name;

        // Type of link.
        ConnectionType type;

        // Identifies ports of task instances external to this operational
        // string as an endpoint of this link.
        ::Deployment::ComponentExternalPortEndpoints externalEndpoint;

        // Identifies ports of task instances within this operational
        // string as an endpoint of this link.
        ::Deployment::PlanSubcomponentPortEndpoints internalEndpoint;

        // Identifies a location outside the operational string as an
        // endpoint of the link.
        ::Deployment::ExternalReferenceEndpoints externalReference;

      };

      typedef sequence <OrderLinkDescription> OrderLinkDescriptions;


      // Kind of comparison for a QoS specification.
      enum QoSComparator
      {
        LESS_THAN,
        GREATER_THAN,
        EQUAL,
        LESS_THAN_EQUAL,
        GREATER_THAN_EQUAL,
        NOT_EQUAL
      };

      // Type of QoS specification.
      enum QoSType
      {
        DEADLINE,
        OTHERS
      };


      struct QoSSpecification
      {
        // Human-readable name (for debugging, not identification).
        string name;

        // Type of QoS.
        QoSType type;

        // Specific type ID of component that monitors this QoS.
        string MonitorID;

        // Comparison used for this QoS specification.
        QoSComparator comparator;

        // Value to compare actual QoS to (using comparator).
        any value;
      };

      typedef sequence <QoSSpecification> QoSSpecifications;

      struct GoalCondition
      {
        // ID of condition (in Task Network).
        long condID;

        // Utility value (specifying importance of this goal condition).
        long utility;
      };

      typedef sequence <GoalCondition> GoalConditions;

      struct TimeConstraint
      {
        // ID of condition (in Task Network).
        long condID;

        // Start-by (end-by) time for this data (non-data) condition.
        TimeValue constraint;
      };

      typedef sequence <TimeConstraint> TimeConstraints;

      struct GoalStructure
      {
        // Universally unique ID of goal.
        string UUID;

        // Human-readable name (for debugging, not identification).
        string name;

        // Goal conditions with utility values.
        GoalConditions goalConds;

        // Start-by and end-by constraints on conditions, in relative time
        // (relative to start of opstring to achieve this goal).
        TimeConstraints relativeTimeConstraints;

        // Start-by and end-by constraints on conditions, in clock time.
        TimeConstraints absoluteTimeConstraintns;

        // QoS requirements.
        QoSSpecifications QoSRequirements;

        // Expected time range for start of opstring (for achieving this goal)
        // execution.
        TimeWindow startWindow;
      };

      struct OperationalString
      {
        // Universally unique ID of opstring.
        // (Should correspond to goal UUID).
        string UUID;

        // Human-readable name (for debugging, not identification).
        string name;

        // Goal achieved by this opstring.
        GoalStructure goal;

        // Task instances in opstring.
        InstanceDescriptions instances;

        // Data links (between task instances) in opstring.
        DataLinkDescriptions dataLinks;

        // Ordering links (between task instances) in opstring.
        OrderLinkDescriptions orderLinks;

        // Priority of this opstring.
        // (Should be derived from expected utility of goal).
        long priority;

        // QoS requirements.
        QoSSpecifications QoSRequirements;

        // Expected time range for start of opstring execution.
        TimeWindow startWindow;

        // Expected time range for end of opstring execution.
        TimeWindow endWindow;

        // Properties for deployment of opstring.
        ::Deployment::Properties properties;
      };

  };
};

#endif /* OPERATIONAL_STRING_IDL */