OnixS BME SENAF Handler C++ library  2.2.0
API documentation
GenericLowPriorityMessage.h
Go to the documentation of this file.
1 /*
2  * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5  * and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8  * Services Agreement (the Agreement) and Customer end user license agreements granting
9  * a non-assignable, non-transferable and non-exclusive license to use the software
10  * for it's own data processing purposes under the terms defined in the Agreement.
11  *
12  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13  * of this source code or associated reference material to any other location for further reproduction
14  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15  *
16  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17  * the terms of the Agreement is a violation of copyright law.
18  */
19 
20 #pragma once
21 
22 #include <OnixS/Senaf/MarketData/Export.h>
25 
26 #include <iosfwd>
27 #include <string>
28 
29 namespace OnixS { namespace Senaf { namespace MarketData {
30 
31 /// Generic Low Priority Message.
32 struct ONIXS_BME_SENAF_EXPORT GenericLowPriorityMessage
33 {
34  /// Message code.
35  enum { code = 100 };
36 
37  /// Default constructor.
39 
40  /// Market.
41  ///
42  /// \note If Market = 0, the message is market independent.
43  unsigned char market;
44 
45  /// Instrument Type. Tabulated for each market.
47 
48  /// Reference.
49  ///
50  /// \note If Reference = 0, the message is reference independent.
51  unsigned short reference;
52 
53  /// Source.
54  unsigned char source;
55 
56  /// Recipient of the message. Server, Terminal, API, F-E,…
57  unsigned char recipient;
58 
59  /// Member.
60  ///
61  /// \note If Member = 0, the message is for all members.
62  unsigned char member;
63 
64  /// Session.
65  ///
66  /// If Session = 0, the message is for all the sessions of a member.
67  unsigned char session;
68 
69  /// User.
70  unsigned char user;
71 
72  /// Subtype.
73  unsigned char subtype;
74 
75  /// General information data.
76  struct Subtype001
77  {
78  /// Constructor.
79  ///
80  /// \param inMessage Message.
81  Subtype001(const std::string& inMessage) : message(inMessage) {}
82 
83  /// Text message.
84  std::string message;
85  };
86 
87  /// Text message. General information data.
89 
90  /// Returns string representation.
91  std::string toString() const;
92 
93 private:
94  friend class MessageDeserializer;
95  GenericLowPriorityMessage(const char* data, size_t dataSize);
96  void deserialize(const char* data, size_t dataSize);
97  void reset();
98 };
99 
100 /// Make it printable using C++ I/O streams.
101 ONIXS_BME_SENAF_EXPORT std::ostream& operator<<(std::ostream&, const GenericLowPriorityMessage&);
102 
103 }}}
InstrumentType::Enum instrumentType
Instrument Type. Tabulated for each market.
Optional< Subtype001 > subtype001
Text message. General information data.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
unsigned char recipient
Recipient of the message. Server, Terminal, API, F-E,…