OnixS C++ CME MDP Streamlined Market Data Handler  1.2.0
API Documentation
Fields.h
Go to the documentation of this file.
1 // Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2 //
3 // This software owned by Onix Solutions Limited [OnixS] and is
4 // protected by copyright law and international copyright treaties.
5 //
6 // Access to and use of the software is governed by the terms of the applicable
7 // OnixS Software Services Agreement (the Agreement) and Customer end user license
8 // agreements granting a non-assignable, non-transferable and non-exclusive license
9 // to use the software for it's own data processing purposes under the terms defined
10 // in the Agreement.
11 //
12 // Except as otherwise granted within the terms of the Agreement, copying or
13 // reproduction of any part of this source code or associated reference material
14 // to any other location for further reproduction or redistribution, and any
15 // amendments to this copyright notice, are expressly prohibited.
16 //
17 // Any reproduction or redistribution for sale or hiring of the Software not in
18 // accordance with the terms of the Agreement is a violation of copyright law.
19 //
20 
21 #pragma once
22 
26 
28 ONIXS_CMESTREAMLINEDMDH_DATA_PACKING_BEGIN(1)
29 
30 /// char.
31 typedef Char CHAR;
32 
33 
34 /// Currency.
35 ///
36 /// FIX type: Currency.
37 typedef Char Currency[3];
38 
39 
40 /// Eris User Defined Instrument.
41 ///
42 /// FIX type: char.
43 typedef Char ErisUDI;
44 
45 
46 /// int32.
47 typedef Int32 Int32;
48 
49 
50 /// int8.
51 typedef Int8 Int8;
52 
53 
54 /// Constant value sent from clearing for legs.
55 typedef
58 
59 
60 /// LocalMktDate type.
61 ///
62 /// FIX type: LocalMktDate.
64 
65 
66 /// MDEntryTypeTrade.
67 typedef
68 IntegralConstant<Char, '2'>
70 
71 
72 /// MDUpdateActionNew.
73 typedef
74 IntegralConstant<Int8, 0>
76 
77 
78 /// SecurityExchange type.
79 ///
80 /// FIX type: Exchange.
81 typedef Char SecurityExchange[4];
82 
83 
84 /// String length 100.
85 ///
86 /// FIX type: String.
87 typedef Char String100[100];
88 
89 
90 /// StringLength12.
91 ///
92 /// FIX type: String.
93 typedef Char String12[12];
94 
95 
96 /// String Length 30.
97 ///
98 /// FIX type: String.
99 typedef Char String30[30];
100 
101 
102 /// StringLength4.
103 ///
104 /// FIX type: String.
105 typedef Char String4[4];
106 
107 
108 /// Optional string with length of 5.
109 ///
110 /// FIX type: String.
111 typedef Char String5[5];
112 
113 
114 /// String length 8.
115 ///
116 /// FIX type: String.
117 typedef Char String8[8];
118 
119 
120 /// Optional string with length of 3.
121 ///
122 /// FIX type: String.
123 typedef Char StringLen3[3];
124 
125 
126 /// Optional string with length of 17.
127 ///
128 /// FIX type: String.
129 typedef Char StringLength17[17];
130 
131 
132 /// StringLength of 2 characters.
133 ///
134 /// FIX type: String.
135 typedef Char StringLength2[2];
136 
137 
138 /// Optional string with length of 26.
139 ///
140 /// FIX type: String.
141 typedef Char StringLength26[26];
142 
143 
144 /// String With Length 50 Characters .
145 ///
146 /// FIX type: String.
147 typedef Char StringLength50[50];
148 
149 
150 /// String with Length 500.
151 typedef Char StringLength500[500];
152 
153 
154 /// StringLength6.
155 ///
156 /// FIX type: String.
157 typedef Char StringLength6[6];
158 
159 
160 /// String With Length 9 Characters.
161 ///
162 /// FIX type: String.
163 typedef Char StringLength9[9];
164 
165 
166 /// Text.
167 ///
168 /// FIX type: String.
169 typedef Char Text[180];
170 
171 
172 /// Char with a null value.
173 ///
174 /// FIX type: char.
175 typedef Char CharNULL;
176 
177 
178 /// uInt16.
179 typedef UInt16 UInt16;
180 
181 
182 /// uInt32.
183 typedef UInt32 UInt32;
184 
185 
186 /// uInt64.
187 typedef UInt64 UInt64;
188 
189 
190 /// uInt8.
191 typedef UInt8 UInt8;
192 
193 
194 /// AggressorSide type.
196 {
197  typedef UInt8 Base;
198 
199  enum Enum
200  {
201  /// No Aggressor.
202  NoAggressor = 0,
203 
204  /// Buy.
205  Buy = 1,
206 
207  /// Sell.
208  Sell = 2
209  };
210 };
211 
212 /// EventTypeIndices type.
214 {
215  typedef UInt8 Base;
216 
217  enum Enum
218  {
219  /// Activation.
220  Activation = 5,
221 
222  /// Deletion.
223  Deletion = 6,
224 
225  /// Modification.
226  Modification = 120
227  };
228 };
229 
230 /// MDEntryCode type.
232 {
233  typedef UInt8 Base;
234 
235  enum Enum
236  {
237  /// Indicative.
238  Indicative = 1,
239 
240  /// PreMarket.
241  PreMarket = 2,
242 
243  /// PreliminaryClose.
244  PreliminaryClose = 3,
245 
246  /// SessionClose.
247  SessionClose = 4,
248 
249  /// Close.
250  Close = 5
251  };
252 };
253 
254 /// MDEntryTypeIndices type.
256 {
257  typedef CHAR Base;
258 
259  enum Enum
260  {
261  /// Bid.
262  Bid = '0',
263 
264  /// Offer.
265  Offer = '1',
266 
267  /// Trade.
268  Trade = '2',
269 
270  /// Index Value.
271  IndexValue = '3',
272 
273  /// Opening Value.
274  OpeningValue = '4',
275 
276  /// Closing Price.
277  ClosingPrice = '5',
278 
279  /// Settlement Price.
280  SettlementPrice = '6',
281 
282  /// Session High Price.
283  SessionHighPrice = '7',
284 
285  /// Session Low Price.
286  SessionLowPrice = '8',
287 
288  /// Trade Volume.
289  TradeVolume = 'e'
290  };
291 };
292 
293 /// MDUpdateAction type.
295 {
296  typedef UInt8 Base;
297 
298  enum Enum
299  {
300  /// New.
301  New = 0,
302 
303  /// Change.
304  Change = 1,
305 
306  /// Delete.
307  Delete = 2,
308 
309  /// Delete Thru.
310  DeleteThru = 3,
311 
312  /// Delete From.
313  DeleteFrom = 4,
314 
315  /// Overlay.
316  Overlay = 5
317  };
318 };
319 
320 /// SecurityUpdateAction type.
322 {
323  typedef CHAR Base;
324 
325  enum Enum
326  {
327  /// Add.
328  Add = 'A',
329 
330  /// Delete.
331  Delete = 'D',
332 
333  /// Modify.
334  Modify = 'M'
335  };
336 };
337 
338 /// MatchEventIndicator type.
340 {
341 public:
342  /// Aliases integral type whose bits
343  /// are used to indicate flag presence.
344  typedef UInt8 Bits;
345 
346  /// Indicates whether LastTradeMsg bit is set.
347  bool lastTradeMsg() const
348  {
349  return 0 != (bits_ & 0x1);
350  }
351 
352  /// Indicates whether LastVolumeMsg bit is set.
353  bool lastVolumeMsg() const
354  {
355  return 0 != (bits_ & 0x2);
356  }
357 
358  /// Indicates whether LastQuoteMsg bit is set.
359  bool lastQuoteMsg() const
360  {
361  return 0 != (bits_ & 0x4);
362  }
363 
364  /// Indicates whether LastStatsMsg bit is set.
365  bool lastStatsMsg() const
366  {
367  return 0 != (bits_ & 0x8);
368  }
369 
370  /// Indicates whether LastImpliedMsg bit is set.
371  bool lastImpliedMsg() const
372  {
373  return 0 != (bits_ & 0x10);
374  }
375 
376  /// Indicates whether RecoveryMsg bit is set.
377  bool recoveryMsg() const
378  {
379  return 0 != (bits_ & 0x20);
380  }
381 
382  /// Indicates whether Reserved bit is set.
383  bool reserved() const
384  {
385  return 0 != (bits_ & 0x40);
386  }
387 
388  /// Indicates whether EndOfEvent bit is set.
389  bool endOfEvent() const
390  {
391  return 0 != (bits_ & 0x80);
392  }
393 
394  /// Returns elements as they packed in the set.
395  inline Bits bits() const
396  {
397  return bits_;
398  }
399 
400  MatchEventIndicator(Bits bits = 0)
401  : bits_(bits)
402  {
403  }
404 
405 private:
406  Bits bits_;
407 };
408 
409 /// SettlPriceType type.
411 {
412 public:
413  /// Aliases integral type whose bits
414  /// are used to indicate flag presence.
415  typedef UInt8 Bits;
416 
417  /// Indicates whether FinalDaily bit is set.
418  bool finalDaily() const
419  {
420  return 0 != (bits_ & 0x1);
421  }
422 
423  /// Indicates whether Actual bit is set.
424  bool actual() const
425  {
426  return 0 != (bits_ & 0x2);
427  }
428 
429  /// Indicates whether Rounded bit is set.
430  bool rounded() const
431  {
432  return 0 != (bits_ & 0x4);
433  }
434 
435  /// Indicates whether ReservedBits bit is set.
436  bool reservedBits() const
437  {
438  return 0 != (bits_ & 0x8);
439  }
440 
441  /// Indicates whether NullValue bit is set.
442  bool nullValue() const
443  {
444  return 0 != (bits_ & 0x80);
445  }
446 
447  /// Returns elements as they packed in the set.
448  inline Bits bits() const
449  {
450  return bits_;
451  }
452 
453  SettlPriceType(Bits bits = 0)
454  : bits_(bits)
455  {
456  }
457 
458 private:
459  Bits bits_;
460 };
461 
462 
463 /// Null value for optional ErisUDI field.
464 typedef
467 
468 
469 /// Null value for optional Int32 field.
470 typedef
473 
474 
475 /// Null value for optional Int8 field.
476 typedef
479 
480 
481 /// Null value for optional LocalMktDate field.
482 typedef
485 
486 
487 /// Null value for optional CharNULL field.
488 typedef
491 
492 
493 /// Null value for optional UInt16 field.
494 typedef
497 
498 
499 /// Null value for optional UInt32 field.
500 typedef
503 
504 
505 /// Null value for optional UInt64 field.
506 typedef
509 
510 
511 /// Null value for optional UInt8 field.
512 typedef
515 
516 
517 
518 /// Converts days since epoch to Timestamp value.
519 inline
520 Timestamp
522 {
523  return Timestamp(TimeSpan(days, 0, 0, 0, 0).ticks());
524 }
525 
526 ONIXS_CMESTREAMLINEDMDH_DATA_PACKING_END
bool lastImpliedMsg() const
Indicates whether LastImpliedMsg bit is set.
Definition: Fields.h:371
Represents time point without time-zone information.
Definition: Time.h:447
bool rounded() const
Indicates whether Rounded bit is set.
Definition: Fields.h:430
IntegralConstant< UInt64, 18446744073709551615ULL > NullUInt64
Null value for optional UInt64 field.
Definition: Fields.h:508
UInt64 UInt64
uInt64.
Definition: Fields.h:187
Char StringLen3[3]
Optional string with length of 3.
Definition: Fields.h:123
Char StringLength6[6]
StringLength6.
Definition: Fields.h:157
Char String30[30]
String Length 30.
Definition: Fields.h:99
Char StringLength17[17]
Optional string with length of 17.
Definition: Fields.h:129
UInt8 Bits
Aliases integral type whose bits are used to indicate flag presence.
Definition: Fields.h:344
Timestamp localMktDateToTimestamp(LocalMktDate days)
Converts days since epoch to Timestamp value.
Definition: Fields.h:521
IntegralConstant< Int8, 127 > NullInt8
Null value for optional Int8 field.
Definition: Fields.h:478
Char String4[4]
StringLength4.
Definition: Fields.h:105
Char String100[100]
String length 100.
Definition: Fields.h:87
UInt16 UInt16
uInt16.
Definition: Fields.h:179
IntegralConstant< UInt8, 255 > NullUInt8
Null value for optional UInt8 field.
Definition: Fields.h:514
UInt16 LocalMktDate
LocalMktDate type.
Definition: Fields.h:63
bool lastQuoteMsg() const
Indicates whether LastQuoteMsg bit is set.
Definition: Fields.h:359
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition: Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
Definition: Bootstrap.h:111
char Char
Character type alias.
Definition: String.h:36
bool reservedBits() const
Indicates whether ReservedBits bit is set.
Definition: Fields.h:436
IntegralConstant< UInt16, 65535 > NullUInt16
Null value for optional UInt16 field.
Definition: Fields.h:496
bool finalDaily() const
Indicates whether FinalDaily bit is set.
Definition: Fields.h:418
IntegralConstant< UInt32, 4294967295 > NullUInt32
Null value for optional UInt32 field.
Definition: Fields.h:502
bool actual() const
Indicates whether Actual bit is set.
Definition: Fields.h:424
bool reserved() const
Indicates whether Reserved bit is set.
Definition: Fields.h:383
Char CharNULL
Char with a null value.
Definition: Fields.h:175
Char StringLength2[2]
StringLength of 2 characters.
Definition: Fields.h:135
bool lastTradeMsg() const
Indicates whether LastTradeMsg bit is set.
Definition: Fields.h:347
bool nullValue() const
Indicates whether NullValue bit is set.
Definition: Fields.h:442
Char String5[5]
Optional string with length of 5.
Definition: Fields.h:111
Char String12[12]
StringLength12.
Definition: Fields.h:93
IntegralConstant< Char, '\x0'> NullErisUDI
Null value for optional ErisUDI field.
Definition: Fields.h:466
bool recoveryMsg() const
Indicates whether RecoveryMsg bit is set.
Definition: Fields.h:377
UInt8 Bits
Aliases integral type whose bits are used to indicate flag presence.
Definition: Fields.h:415
bool lastStatsMsg() const
Indicates whether LastStatsMsg bit is set.
Definition: Fields.h:365
Char StringLength500[500]
String with Length 500.
Definition: Fields.h:151
Char StringLength26[26]
Optional string with length of 26.
Definition: Fields.h:141
Char StringLength50[50]
String With Length 50 Characters .
Definition: Fields.h:147
Bits bits() const
Returns elements as they packed in the set.
Definition: Fields.h:395
IntegralConstant< Int32, 2147483647 > NullInt32
Null value for optional Int32 field.
Definition: Fields.h:472
Char String8[8]
String length 8.
Definition: Fields.h:117
IntegralConstant< UInt16, 65535 > NullLocalMktDate
Null value for optional LocalMktDate field.
Definition: Fields.h:484
Char Text[180]
Text.
Definition: Fields.h:169
IntegralConstant< Char, '0'> NullCharNULL
Null value for optional CharNULL field.
Definition: Fields.h:490
Represents time interval.
Definition: Time.h:104
Char StringLength9[9]
String With Length 9 Characters.
Definition: Fields.h:163
Bits bits() const
Returns elements as they packed in the set.
Definition: Fields.h:448
bool lastVolumeMsg() const
Indicates whether LastVolumeMsg bit is set.
Definition: Fields.h:353
Char SecurityExchange[4]
SecurityExchange type.
Definition: Fields.h:81
Char Currency[3]
Currency.
Definition: Fields.h:37
#define ONIXS_CMESTREAMLINEDMDH_LTWT_STRUCT
Definition: Bootstrap.h:115
bool endOfEvent() const
Indicates whether EndOfEvent bit is set.
Definition: Fields.h:389
Char ErisUDI
Eris User Defined Instrument.
Definition: Fields.h:43
UInt32 UInt32
uInt32.
Definition: Fields.h:183
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:169