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

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

Classes

struct  CancelRequest
 A request to cancel an active limit order in the book. More...
 
struct  CancelResponse
 A response describing the cancellation of an active order in the book. More...
 
struct  Header
 A header containing type information and metadata for a message. More...
 
struct  LoginRequest
 A request that indicates a client is attempting to create a new session. More...
 
struct  LoginResponse
 A response that tells the status of a session creation to the client. More...
 
struct  LogoutRequest
 A request that indicates a client is attempting to close an active session. More...
 
struct  LogoutResponse
 A response that tells the status of a session destruction to the client. More...
 
struct  OrderRequest
 A request to place a new limit / market order in the book. More...
 
struct  OrderResponse
 A response describing the status of an order request. More...
 
struct  PurgeRequest
 A request to cancel all active orders in the book. More...
 
struct  PurgeResponse
 A response describing the status of canceling all active orders in the book. More...
 
struct  ReplaceRequest
 A request to replace an active order in the book with a new order. More...
 
struct  ReplaceResponse
 A response describing the replacement of an active order with a new order. More...
 
struct  TradeResponse
 A response describing a trade that occurred for a limit / market order. More...
 

Typedefs

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

Enumerations

enum  MessageID : char {
  LoginRequest = 'L', LoginResponse = 'l', LogoutRequest = 'O', LogoutResponse = 'o',
  OrderRequest = 'N', OrderResponse = 'n', CancelRequest = 'C', CancelResponse = 'c',
  ReplaceRequest = 'R', ReplaceResponse = 'r', PurgeRequest = 'P', PurgeResponse = 'p',
  TradeResponse = 't'
}
 Message IDs for messages in the protocol.
 
enum  LoginResponseStatus : char { Accepted = 'A', NotAuthorized = 'N', AlreadyAuthorized = 'C', SessionInUse = 'B' }
 Possible statuses for a login response.
 
enum  LogoutReason : char { UserRequested = 'U', EndOfDay = 'E', Administrative = 'A', ProtocolViolation = '!' }
 Reasons that a user may have been logged out.
 
enum  OrderStatus : char { Accepted = 'A', Rejected = 'R' }
 Possible statuses for an order response.
 
enum  CancelStatus : char { Accepted = 'A', Rejected = 'R' }
 Possible statuses for a cancellation response.
 
enum  ReplaceStatus : char { Accepted = 'A', Rejected = 'R' }
 Possible statuses for a replace response.
 
enum  PurgeStatus : char { Accepted = 'A', Rejected = 'R' }
 Possible statuses for a purge response.
 

Functions

std::ostream & operator<< (std::ostream &stream, const MessageID &uid)
 Write a template ID to a stream. More...
 
struct OrderEntry::Messages::Header __attribute__ ((packed))
 
std::ostream & operator<< (std::ostream &stream, const LoginResponseStatus &status)
 Write the login status to a stream. More...
 
std::ostream & operator<< (std::ostream &stream, const LogoutReason &reason)
 Write the logout reason to a stream. More...
 
std::ostream & operator<< (std::ostream &stream, const OrderStatus &status)
 Write the order status to a stream. More...
 
std::ostream & operator<< (std::ostream &stream, const CancelStatus &status)
 Write the cancel status to a stream. More...
 
std::ostream & operator<< (std::ostream &stream, const ReplaceStatus &status)
 Write the order replace status to a stream. More...
 
std::ostream & operator<< (std::ostream &stream, const PurgeStatus &status)
 Write the purge status to a stream. More...
 

Variables

enum OrderEntry::Messages::LoginResponseStatus __attribute__
 

Detailed Description

Packet templates for the OrderEntry communication protocol.

Typedef Documentation

◆ Packet

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

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

Function Documentation

◆ operator<<() [1/7]

std::ostream& OrderEntry::Messages::operator<< ( std::ostream &  stream,
const CancelStatus status 
)
inline

Write the cancel status to a stream.

Parameters
streamthe stream to write the cancel status to
statusthe cancel status to write to the stream
Returns
the stream after writing the cancel status to it

◆ operator<<() [2/7]

std::ostream& OrderEntry::Messages::operator<< ( std::ostream &  stream,
const LoginResponseStatus status 
)
inline

Write the login status to a stream.

Parameters
streamthe stream to write the login status to
statusthe login status to write to the stream
Returns
the stream after writing the login status to it

◆ operator<<() [3/7]

std::ostream& OrderEntry::Messages::operator<< ( std::ostream &  stream,
const LogoutReason reason 
)
inline

Write the logout reason to a stream.

Parameters
streamthe stream to write the logout reason to
reasonthe logout reason to write to the stream
Returns
the stream after writing the logout reason to it

◆ operator<<() [4/7]

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

Write a template ID to a stream.

Parameters
streamthe stream to write the template id to
uidthe template id to write to the stream
Returns
the stream after writing the template id to it

◆ operator<<() [5/7]

std::ostream& OrderEntry::Messages::operator<< ( std::ostream &  stream,
const OrderStatus status 
)
inline

Write the order status to a stream.

Parameters
streamthe stream to write the order status to
statusthe order status to write to the stream
Returns
the stream after writing the order status to it

◆ operator<<() [6/7]

std::ostream& OrderEntry::Messages::operator<< ( std::ostream &  stream,
const PurgeStatus status 
)
inline

Write the purge status to a stream.

Parameters
streamthe stream to write the purge status to
statusthe purge status to write to the stream
Returns
the stream after writing the purge status to it

◆ operator<<() [7/7]

std::ostream& OrderEntry::Messages::operator<< ( std::ostream &  stream,
const ReplaceStatus status 
)
inline

Write the order replace status to a stream.

Parameters
streamthe stream to write the order replace status to
statusthe order replace status to write to the stream
Returns
the stream after writing the order replace status to it