Files
2019-02-11 17:36:12 +00:00

87 lines
3.4 KiB
C++

/*
* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
*
* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
* and international copyright treaties.
*
* Access to and use of the software is governed by the terms of the applicable OnixS Software
* Services Agreement (the Agreement) and Customer end user license agreements granting
* a non-assignable, non-transferable and non-exclusive license to use the software
* for it's own data processing purposes under the terms defined in the Agreement.
*
* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
* of this source code or associated reference material to any other location for further reproduction
* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
*
* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
* the terms of the Agreement is a violation of copyright law.
*/
#pragma once
#include <string>
#include <OnixS/ICE/iMpact/MarketData/ABI.h>
#include <OnixS/ICE/iMpact/MarketData/Types.h>
#include <OnixS/ICE/iMpact/MarketData/Time.h>
namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
/// Message info.
struct ONIXS_ICE_IMPACT_MD_API MessageInfo
{
/// Initialize default instance.
MessageInfo();
/// Feed identifier.
FeedId feedId;
/// The session number is used so that a client can easily detect when a new
/// session has started after the daily maintenance window or failure on the
/// server side. It should stay the same for a given multicast channel until a
/// new session has started. It should be noted that the same number can be used
/// by different multicast channels.
short sessionNumber;
/// Sequence number of message block.
int blockSequenceNumber;
/// Number of messages in message block.
int numberOfMessages;
/// Each message is assigned a sequence number that increases monotonically on the
/// server side. To save bandwidth, the sequence number is a field in the block
/// header, instead of every message. The sequence number for the first message is
/// used in the header, and the client is expected to derive the sequence numbers
/// for subsequent messages in the block. In the case of a heartbeat which includes
/// only header in the block, the expected next sequence number is used.
int sequenceNumber;
/// Raw timestamp of when the message block is sent.
///
/// It is the number of milliseconds since Jan 1st, 1970, 00:00:00 GMT.
DateTime rawSentTime;
/// Time when the UDP packet was received by Handler.
Timestamp receiveTime;
/// Time when the UDP packet was received by Handler in case of log replay
/// in progress. For live data it will be the same as \c receiveTime.
Timestamp originalReceiveTime;
/// Is message received during snapshot?
bool isMessageReceivedDuringSnapshot;
/// Bundle marker.
///
/// This field is true if messages has been received within bundle (see BundleMarker)
bool isBundled;
/// Returns string representation.
std::string toString() const;
};
ONIXS_ICE_IMPACT_MD_API std::ostream& operator<<(std::ostream&, const MessageInfo&);
}}}} // namespace MarketData, iMpact, ICE, OnixS