CBOE Emulator  1.0
Classes | Typedefs | Enumerations | Functions
DataFeed::Messages Namespace Reference

Packet templates for the DataFeed communication protocol. More...

Classes

struct  AddOrder
 A message that indicates a limit order was added to the book. More...
 
struct  Clear
 A message that indicates to clear all orders in the order book. More...
 
struct  DeleteOrder
 A message that indicates a limit order was added to the book. More...
 
struct  EndOfSession
 A message that indicates the end of a trading session. More...
 
struct  Header
 A header containing type information and metadata for a message. More...
 
struct  StartOfSession
 A message that indicates the start of a trading session. More...
 
struct  Trade
 A message that indicates a market order matches with a limit order. More...
 

Typedefs

typedef std::array< char, 40 > Packet
 
typedef std::deque< PacketPacketQueue
 A type for queuing packet buffers.
 

Enumerations

enum  MessageID : char {
  Clear = 'c', AddOrder = 'a', DeleteOrder = 'd', Trade = 't',
  StartOfSession = 's', EndOfSession = 'e'
}
 Message IDs for messages in the protocol.
 

Functions

std::ostream & operator<< (std::ostream &stream, const MessageID &uid)
 
struct DataFeed::Messages::Header __attribute__ ((packed))
 

Detailed Description

Packet templates for the DataFeed communication protocol.

Typedef Documentation

◆ Packet

typedef std::array<char, 40> DataFeed::Messages::Packet

A type for network buffers that is smaller than the size of an Ethernet frame. The largest packet is 37 bytes, aligned to 40 (5 64-bit registers).

Function Documentation

◆ operator<<()

std::ostream& DataFeed::Messages::operator<< ( std::ostream &  stream,
const MessageID uid 
)
inline

Write a message ID to a stream.

Parameters
streamthe stream to write the message ID to
uidthe message ID to write to the stream
Returns
the stream after writing the message ID to it