CBOE Emulator  1.0
Public Member Functions | Public Attributes | Friends | List of all members
DataFeed::Messages::Header Struct Reference

A header containing type information and metadata for a message. More...

#include <messages.hpp>

Public Member Functions

 Header (uint16_t length_, MessageID uid_, SequenceNumber sequence_=0, TimeStamp time_=0)
 Initialize a new session header. More...
 
std::string to_string () const
 Convert the object to an STL string. More...
 

Public Attributes

const uint16_t length
 the length of the message in bytes
 
const MessageID uid
 the template ID for the message
 
const uint8_t padding = 0
 arbitrary padding to align the sequence number in memory
 
const SequenceNumber sequence
 sequence number of the message (event time)
 
const TimeStamp time
 the time for the message
 

Friends

std::ostream & operator<< (std::ostream &stream, const Header &header)
 Write the data from the header to a stream. More...
 

Detailed Description

A header containing type information and metadata for a message.

Message Header

Constructor & Destructor Documentation

◆ Header()

DataFeed::Messages::Header::Header ( uint16_t  length_,
MessageID  uid_,
SequenceNumber  sequence_ = 0,
TimeStamp  time_ = 0 
)
inline

Initialize a new session header.

Parameters
length_the length of the message for the header in bytes
uid_the template ID of the message for the header
sequence_the sequence number for the message
time_the time for the message

Member Function Documentation

◆ to_string()

std::string DataFeed::Messages::Header::to_string ( ) const
inline

Convert the object to an STL string.

Returns
a string representation of the object

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const Header header 
)
friend

Write the data from the header to a stream.

Parameters
streamthe stream to write the data to
headerthe header to write to the stream
Returns
the stream with data from the header written to it

The documentation for this struct was generated from the following file: