OnixS C++ Euronext Optiq MDG Handler 1.3.3
API documentation
Loading...
Searching...
No Matches
Defines.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
24
25#include <string>
26#include <ostream>
27#include <memory>
28#include <set>
29
30namespace OnixS
31{
32 namespace Euronext
33 {
34 namespace MarketData
35 {
36 namespace OptiqMdg
37 {
38 typedef char Char;
39
42
45
47 struct ONIXS_EURONEXT_OPTIQMDG_API DataSource
48 {
51
52 enum Origin
53 {
55 Replay = 1,
56 Spin = 2
57 };
58
61
64
67
70
73
75 bool cached;
76
77 std::string toString () const;
78 };
79
80 ONIXS_EURONEXT_OPTIQMDG_API std::ostream& operator << (std::ostream& stream, const DataSource& ds);
81
83 typedef size_t CpuIndex;
84
86 class ONIXS_EURONEXT_OPTIQMDG_API ThreadAffinity
87 {
88 typedef std::set<CpuIndex> CpuIndexes;
89
90 public:
93
96
99
101 bool empty() const;
102
104 void copyTo(CpuIndexes&) const;
105
107 bool insert(CpuIndex index);
108
110 bool erase(CpuIndex index);
111
113 void clear();
114
116 ThreadAffinity& operator = (const ThreadAffinity&);
117
119 std::string toString() const;
120
121 private:
122
124 CpuIndexes* indices_;
125 };
126 }
127 }
128 }
129}
std::string toString() const
Returns the string representation.
ThreadAffinity(const ThreadAffinity &)
Initializes as copy of other set.
bool empty() const
Indicates whether is empty.
bool erase(CpuIndex index)
Removes CPU index from the set.
bool insert(CpuIndex index)
Adds CPU index into set.
void copyTo(CpuIndexes &) const
Copies set into another set.
Represents time point without time-zone information.
Definition Time.h:483
ONIXS_EURONEXT_OPTIQMDG_API std::ostream & operator<<(std::ostream &stream, const ServiceDescriptor &descriptor)
size_t CpuIndex
Zero-based index of CPU.
Definition Defines.h:83
UInt64 PacketSequenceNumber
Alias for Packet Sequence Number type (PSN).
Definition Defines.h:41
UInt64 MessageSequenceNumber
Alias for Message Sequence Number type (Market Data Sequence Number, MDSN).
Definition Defines.h:44
PacketSequenceNumber psn
Packet Sequence Number.
Definition Defines.h:66
UInt8 packetMessageNumber
Number of message in packet.
Definition Defines.h:69
bool cached
The packet was cached due to incorrect sequence.
Definition Defines.h:75
UInt64 sendingTime
Exchange sending time (number of nanoseconds since 01/01/1970 UTC).
Definition Defines.h:63
Timestamp packetReceptionTime
Time when the packet was received by Handler from UDP, in system ticks,.
Definition Defines.h:60