OnixS C++ CME MDP Premium Market Data Handler 5.10.3
Users' manual and API documentation
Loading...
Searching...
No Matches
PacketTraits.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
32
35
37
38
40{
41public:
45 {
46 return messageSize_;
47 }
48
52 {
53 messageSize_ = value;
54 }
55
57 std::string toString() const;
58
59private:
60 Messaging::MessageSize messageSize_;
61};
62
65{
66public:
69 SequenceNumber seqNumber() const noexcept
70 {
71 return seqNumber_;
72 }
73
76 void seqNumber(SequenceNumber value) noexcept
77 {
78 seqNumber_ = value;
79 }
80
84 {
85 return sendingTime_;
86 }
87
90 void sendingTime(Messaging::Timestamp value) noexcept
91 {
92 sendingTime_ = value;
93 }
94
96 std::string toString() const;
97
98private:
99 SequenceNumber seqNumber_;
100 Messaging::Timestamp sendingTime_;
101};
102
104
105
107ONIXS_CMEMDH_EXPORTED void toStr(std::string& str, const MessagePrefix& hdr);
108
110ONIXS_CMEMDH_EXPORTED void toStr(std::string& str, const PacketHeader& hdr);
111
112inline std::string MessagePrefix::toString() const
113{
114 std::string str;
115 toStr(str, *this);
116 return str;
117}
118
119inline std::string PacketHeader::toString() const
120{
121 std::string str;
122 toStr(str, *this);
123 return str;
124}
125
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:54
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:55
#define ONIXS_CMEMDH_DATA_PACKING_END
Definition Compiler.h:176
#define ONIXS_CMEMDH_DATA_PACKING_BEGIN(alignment)
Definition Compiler.h:175
#define ONIXS_CMEMDH_FORCEINLINE
Definition Compiler.h:161
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:148
Messages are prefixed with message header.
Messaging::MessageSize messageSize() const noexcept
std::string toString() const
Serializes into a string.
void messageSize(Messaging::MessageSize value) noexcept
Sets Length of entire message, including binary header in number of bytes.
The time point without the time-zone information.
Definition Time.h:455
std::string toString() const
Serializes into a string.
void sendingTime(Messaging::Timestamp value) noexcept
Sets the Sending Time.
SequenceNumber seqNumber() const noexcept
void seqNumber(SequenceNumber value) noexcept
Sets the Sequence Number.
Messaging::Timestamp sendingTime() const noexcept
std::uint32_t UInt32
uInt32.
Definition Integral.h:35
std::uint16_t UInt16
uInt16.
Definition Integral.h:33
UInt16 MessageSize
Message length type.
Definition Aliases.h:29
Messaging::UInt32 SequenceNumber
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
Messaging::UInt16 PacketSize
Integral type for measuring packets.