B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions
message_queue_iface.h File Reference
#include "b2b_platform.h"
+ Include dependency graph for message_queue_iface.h:
+ This graph shows which files directly or indirectly include this file:

Classes

struct  CommMsgHeader
 
struct  CommMsgReply
 
struct  CommMsgRequest
 
struct  MessageQueue
 
struct  OrderKillSwitchMsg
 
struct  SharedQueueData
 

Macros

#define MQ_ALIGN(x)   ALIGNTO((x), MQ_ALIGN_SIZE)
 
#define MQ_ALIGN_SIZE   8
 
#define MQ_ALIGNED   ALIGNED(MQ_ALIGN_SIZE)
 
#define MQ_ALIGNTO_CACHELINE(x)   ALIGNTO((x), MQ_CACHELINE_ALIGN_SIZE)
 
#define MQ_CACHELINE_ALIGN_SIZE   CACHELINE_SIZE
 
#define MQ_CACHELINE_ALIGNED   ALIGNED(MQ_CACHELINE_ALIGN_SIZE)
 
#define MQ_LEN_FIELD_SIZE   sizeof(int)
 
#define MQD_MAGIC   0x1234321
 
#define MQF_ALLOC_ON_HEAP   4
 
#define MQF_ALWAYS_REINIT   128
 
#define MQF_INITIATOR_SIDE   64
 
#define MQF_READ_LOCK   2
 
#define MQF_READ_SIDE   8
 
#define MQF_THIS_SIDE_CONNECTED   32
 
#define MQF_WRAP   0x80000000L
 
#define MQF_WRITE_LOCK   1
 
#define MQF_WRITE_SIDE   16
 
#define USE_SPINLOCK(_flags)   (!!((_flags) & (MQF_WRITE_LOCK | MQF_READ_LOCK)))
 

Typedefs

typedef struct MessageQueue MessageQueue
 
typedef struct SharedQueueData SharedQueueData
 

Enumerations

enum  CommMsgType {
  HEARTBEAT = 0, LOGON, REQUEST, REPLY,
  RISK_LIMITS, MARKET_DATA, SYMBOL_HALT, SECURITY_ETB,
  DEBUG_TERMINATE_PROCESS, DEBUG_CORRECTLY_TERMINATE_PROCESS, RISKCOMMON_REINIT, ORDER_KILL_SWITCH,
  DROPCOPY_REINIT
}
 

Functions

 _Pragma ("pack(1)")
 
 _Pragma ("pack()")
 
static void * claimSendBuffer (short type, int size, MessageQueue *queue, int flags)
 
template<typename MsgT >
static MsgT * claimSendBuffer (MessageQueue *queue)
 
static void commitSendBuffer (MessageQueue *queue)
 
static void * message_data (CommMsgHeader *msg)
 
static void * message_queue_claim_space_for_push (MessageQueue *queue, int len)
 
static void message_queue_commit_peek (MessageQueue *queue)
 
static void message_queue_commit_push (MessageQueue *queue)
 
static void message_queue_commit_push (MessageQueue *queue, int len)
 
static MessageQueuemessage_queue_create (void *buffer, int size, unsigned flags)
 
static void message_queue_dispose (MessageQueue *queue)
 
static int message_queue_is_empty (MessageQueue *queue)
 
static int message_queue_is_full (MessageQueue *queue, int len)
 
static int message_queue_is_ready (MessageQueue *queue)
 
static int message_queue_peek (MessageQueue *queue, void **ptr)
 
static int message_queue_pop (MessageQueue *queue, char *message, int bufLen)
 
static int message_queue_push (MessageQueue *queue, const char *message, int len)
 
static void message_queue_reinit (MessageQueue *queue)
 

Macro Definition Documentation

#define MQ_ALIGN (   x)    ALIGNTO((x), MQ_ALIGN_SIZE)
#define MQ_ALIGN_SIZE   8
#define MQ_ALIGNED   ALIGNED(MQ_ALIGN_SIZE)
#define MQ_ALIGNTO_CACHELINE (   x)    ALIGNTO((x), MQ_CACHELINE_ALIGN_SIZE)
#define MQ_CACHELINE_ALIGN_SIZE   CACHELINE_SIZE
#define MQ_CACHELINE_ALIGNED   ALIGNED(MQ_CACHELINE_ALIGN_SIZE)
#define MQ_LEN_FIELD_SIZE   sizeof(int)
#define MQD_MAGIC   0x1234321
#define MQF_ALLOC_ON_HEAP   4
#define MQF_ALWAYS_REINIT   128
#define MQF_INITIATOR_SIDE   64
#define MQF_READ_LOCK   2
#define MQF_READ_SIDE   8
#define MQF_THIS_SIDE_CONNECTED   32
#define MQF_WRAP   0x80000000L
#define MQF_WRITE_LOCK   1
#define MQF_WRITE_SIDE   16
#define USE_SPINLOCK (   _flags)    (!!((_flags) & (MQF_WRITE_LOCK | MQF_READ_LOCK)))

Typedef Documentation

typedef struct MessageQueue MessageQueue

Enumeration Type Documentation

Enumerator
HEARTBEAT 
LOGON 
REQUEST 
REPLY 
RISK_LIMITS 
MARKET_DATA 
SYMBOL_HALT 
SECURITY_ETB 
DEBUG_TERMINATE_PROCESS 
DEBUG_CORRECTLY_TERMINATE_PROCESS 
RISKCOMMON_REINIT 
ORDER_KILL_SWITCH 
DROPCOPY_REINIT 

Function Documentation

_Pragma ( "pack(1)"  )
_Pragma ( "pack()"  )
static void* claimSendBuffer ( short  type,
int  size,
MessageQueue queue,
int  flags 
)
inlinestatic
template<typename MsgT >
static MsgT* claimSendBuffer ( MessageQueue queue)
inlinestatic

References claimSendBuffer().

static void commitSendBuffer ( MessageQueue queue)
inlinestatic
static void* message_data ( CommMsgHeader msg)
inlinestatic
static void* message_queue_claim_space_for_push ( MessageQueue queue,
int  len 
)
inlinestatic
static void message_queue_commit_peek ( MessageQueue queue)
inlinestatic
static void message_queue_commit_push ( MessageQueue queue)
inlinestatic
static void message_queue_commit_push ( MessageQueue queue,
int  len 
)
inlinestatic
static MessageQueue* message_queue_create ( void *  buffer,
int  size,
unsigned  flags 
)
static
static void message_queue_dispose ( MessageQueue queue)
static
static int message_queue_is_empty ( MessageQueue queue)
inlinestatic
static int message_queue_is_full ( MessageQueue queue,
int  len 
)
inlinestatic
static int message_queue_is_ready ( MessageQueue queue)
inlinestatic
static int message_queue_peek ( MessageQueue queue,
void **  ptr 
)
inlinestatic
static int message_queue_pop ( MessageQueue queue,
char *  message,
int  bufLen 
)
inlinestatic
static int message_queue_push ( MessageQueue queue,
const char *  message,
int  len 
)
inlinestatic
static void message_queue_reinit ( MessageQueue queue)
inlinestatic