OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.17.0
API documentation
MessageInfo.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Onix Solutions Limited. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited 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 "Export.h"
23 #include "Types.h"
24 #include "Time.h"
25 
26 #include <string>
27 
28 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
29 
30 /// Message info.
31 struct ONIXS_ICEMDH_EXPORT MessageInfo
32 {
33  /// Initialize default instance.
34  MessageInfo();
35 
36  /// Feed identifier.
38 
39  /// The session number is used so that a client can easily detect when a new
40  /// session has started after the daily maintenance window or failure on the
41  /// server side. It should stay the same for a given multicast channel until a
42  /// new session has started. It should be noted that the same number can be used
43  /// by different multicast channels.
45 
46  /// Sequence number of message block.
48 
49  /// Number of messages in message block.
51 
52  /// Each message is assigned a sequence number that increases monotonically on the
53  /// server side. To save bandwidth, the sequence number is a field in the block
54  /// header, instead of every message. The sequence number for the first message is
55  /// used in the header, and the client is expected to derive the sequence numbers
56  /// for subsequent messages in the block. In the case of a heartbeat which includes
57  /// only header in the block, the expected next sequence number is used.
59 
60  /// Raw timestamp of when the message block is sent.
61  ///
62  /// It is the number of nanoseconds since Jan 1st, 1970, 00:00:00 GMT.
64 
65  /// Time when the UDP packet was received by the Handler.
66  ///
67  /// When market data is being replayed, this member contains
68  /// time of corresponding log file entry. That's the value
69  /// returned represents the original time when market data
70  /// message was obtained from the network.
72 
73  /// Is message received during snapshot?
75 
76  /// Bundle marker.
77  ///
78  /// This field is true if messages has been received within bundle (see BundleMarker)
79  bool isBundled;
80 
81  /// Returns string representation.
82  std::string toString() const;
83 };
84 
85 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const MessageInfo&);
86 
87 }}}} // namespace MarketData, iMpact, ICE, OnixS
bool isMessageReceivedDuringSnapshot
Is message received during snapshot?
Definition: MessageInfo.h:74
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
int blockSequenceNumber
Sequence number of message block.
Definition: MessageInfo.h:47
Represents timestamp without time-zone information.
Definition: Time.h:414
int numberOfMessages
Number of messages in message block.
Definition: MessageInfo.h:50
int FeedId
Alias for market types.
Definition: Types.h:30
long long DateTime
Represents the number of nanoseconds since Jan 1st, 1970, 00:00:00 GMT.
Definition: Types.h:57