CARMA C++
monitorframe.idl
Go to the documentation of this file.
1 #ifndef CARMA_MONITOR_IDL
2 #define CARMA_MONITOR_IDL
3 
5 
33 module carma
34 {
35 
36 module monitor
37 {
38 
39  const string MONITOR_CHANNEL_NAME = "CARMAmonitor";
40 
51  typedef short MonitorValueType;
52  const MonitorValueType MONITOR_VALUE_TYPE_BYTE = 0;
53  const MonitorValueType MONITOR_VALUE_TYPE_SHORT = 1;
54  const MonitorValueType MONITOR_VALUE_TYPE_INTEGER = 2;
55  const MonitorValueType MONITOR_VALUE_TYPE_BOOLEAN = 3;
56  const MonitorValueType MONITOR_VALUE_TYPE_FLOAT = 4;
57  const MonitorValueType MONITOR_VALUE_TYPE_DOUBLE = 5;
58  const MonitorValueType MONITOR_VALUE_TYPE_COMPLEX = 6;
59  const MonitorValueType MONITOR_VALUE_TYPE_STRING = 7;
60  const MonitorValueType MONITOR_VALUE_TYPE_SERIAL_NUMBER = 8;
61 
83  union TransportMonitorValue switch (MonitorValueType)
84  {
85  case MONITOR_VALUE_TYPE_BYTE: char c;
86  case MONITOR_VALUE_TYPE_SHORT: short s;
87  case MONITOR_VALUE_TYPE_INTEGER: long i;
88  case MONITOR_VALUE_TYPE_BOOLEAN: boolean b;
89  case MONITOR_VALUE_TYPE_FLOAT: float f;
90  case MONITOR_VALUE_TYPE_DOUBLE: double d;
91  case MONITOR_VALUE_TYPE_COMPLEX: float complex[2];
92  case MONITOR_VALUE_TYPE_STRING: char str[8];
93  case MONITOR_VALUE_TYPE_SERIAL_NUMBER: long sn;
94  };
95 
96  typedef sequence<TransportMonitorValue> TransportMonitorValueSeq;
97 
98  // A monitor point is a combination of a MonitorHeader and a sequence of
99  // one or more MonitorSampleValues
100 
108  {
109 
115  MonitorValueType dataType;
116 
120  unsigned long sequenceIdx;
121 
127  unsigned short pointID;
128 
134 
140  octet iSample;
141  };
142 
143  struct ComplexFloat
144  {
145  float real;
146  float imag;
147  };
148 
149  typedef sequence<MonitorValueType> MonitorValueTypeSeq;
150  typedef sequence<unsigned short> UShortSeq;
151  typedef sequence<octet> ValidityFlagSeq;
152  typedef sequence<octet> iSampleSeq;
153  typedef sequence<char,8> Char8;
154  typedef sequence<char> CharSeq;
155  typedef sequence<short> ShortSeq;
156  typedef sequence<long> LongSeq;
157  typedef sequence<boolean> BoolSeq;
158  typedef sequence<float> FloatSeq;
159  typedef sequence<double> DoubleSeq;
160  typedef sequence<ComplexFloat> ComplexSeq;
161  typedef sequence<Char8> StringSeq;
162  typedef sequence<long> SerialNumberSeq;
163  typedef sequence<TransportMonitorValueMetadata> MonitorSampleValueMetadataSeq;
164 
165  // For local (subsystem to FSP) transport as well as publishing (FSP to ACC)
166  struct MonitorSampleValues
167  {
168  // Metadata
169  MonitorValueTypeSeq dataType;
170  LongSeq sequenceIdx;
171  UShortSeq pointID;
172  ValidityFlagSeq validityFlags;
173  iSampleSeq iSample;
174 
175  // MonitorSampleValueMetadataSeq metadata;
176  // Values
177  CharSeq charValues;
178  ShortSeq shortValues;
179  LongSeq longValues;
180  BoolSeq boolValues;
181  FloatSeq floatValues;
182  DoubleSeq doubleValues;
183  ComplexSeq complexValues;
184  StringSeq stringValues;
185  SerialNumberSeq serialNumberValues;
186  };
187 
196  {
202  unsigned short numMonitorPoints; // specified as # of monitor points
203 
210  unsigned short numSamples; // specified as # of sample values
211 
216  unsigned short subsystemID; // same as the subsystemID
217 
223  unsigned short statusFlags; // bit flags for bookkeepping
224 
229  unsigned short maxMonitorPoints; // specified as # of monitor points
230 
235  unsigned short maxSamples; // specified as # of sample values
236 
241  unsigned short numSingleSamplePoints; // specified as # of monitor points
242 
248  unsigned long frameCount;
249 
250 
257 
263 
270 
277 
283  double publishTime;
284 
290  double receiveTime;
291 
292  // array of header offsets - once header is accessed, then monitor
293  // point definitions are accessible
294 
302  MonitorSampleValues monitorValues;
303  };
304 
305 
335  interface MonitorPointUpdate
336  {
337  double monitorPointSampleUpdate(
338  in MonitorSampleValues values,
339  in long frameTime,
340  in double writeDelay ) raises( carma::util::UserException );
341  };
342 
343 }; // End module monitor
344 
345 }; // End module carma
346 
347 
348 #endif /* CARMA_MONITOR_IDL */
double scriberWriteTime
Time at which frame was written to local (subsystem) IPQ.
short MonitorValueType
Enumeration of possible types for monitor point values.
unsigned short statusFlags
Bit fields with the state of the subsystem frame - complete, partial, empty, sent, received.
octet iSample
Sample number (that is, if there are n samples in a sampling cycle, then this is the i&#39;th sample of n...
unsigned short pointID
Identifier for the monitor point, represented as a ushort.
double lastWriteTime
Time at which data was last written to ScriberPublisher.
double receiveTime
Time at which frame was received at the ACC, as MJD, obtained from the carma/util/Time class...
Contains sample values from all monitor points in a monitor subsystem.
unsigned short numMonitorPoints
Number of monitor points in the frame, as defined by the number of configured monitor points...
unsigned short maxMonitorPoints
Maximum number of monitor points possible for this subsystem.
Generic Carma variant of CORBA::UserException.
unsigned short maxSamples
Maximum number of monitor sample values in the frame.
MonitorValueType dataType
The data type of the actual value.
octet validityFlags
Bit fields indicating whether sample value is valid.
double publishTime
Time at which frame was published from the subsystem computer, as MJD, obtained from the carma/util/T...
unsigned short numSamples
Total number of monitor sample values in the frame, as defined by the sum of the number of samples fo...
unsigned short subsystemID
Subsystem ID for the monitor subsystem.
double scriberWriteDelay
Offset from half-second at which scriberPublisher is set to write to local (subsystem) IPQ...
Transport monitor value metadata.
CORBA User Exception for carma::util.
unsigned long sequenceIdx
Index into data type specific sequence carrying actual value.
unsigned long frameCount
Timestamp for the frame, measured in half-seconds from the Epoch.
MonitorSampleValues monitorValues
Structure containing monitor sample values.
double lastWriterDelay
Offset from half-second at which writer is set to write to ScriberPublisher.