Publisher API Data Structures

Publisher API data structures hold information for callbacks, initialization, and market data messages.

Callbacks Structure

This structure holds information for callbacks to the feed handler. Only one callback is listed.
typedef struct {
void (*shutdown)(void);
/* notifies caller of shutdown request */
} PUB_CALLBACKS;

Initialization Information

Sample structure that holds information needed by the publisher for initialization. See pub_initialize for an explanation of the members of this class.

Feed handler initialization code must specify the version of the Publisher API used, prior to calling pub_initialize(). The current version is 1.

typedef struct {
/* always set to PUB_STARTUP_VERSION */
    size_t version;
/* directory in which to locate configuration file */
    const char * config_dir; 
/* directory in which to locate RDS templates */
    const char * template_dir; 
/* indicates what type of publisher this is */
    const char * component_subtype;
/* enables/disables strict checking of messages as they are being built */
    bool strict_check; 
/* indicates whether the feed handler has initialized the logger */
    bool own_logger;
/* callbacks to the feed handler */
    PUB_CALLBACKS callbacks;  
} PUB_STARTUP;

Market Data Message Information

This structure holds context information about a market data message that is being built to be sent to subscribers.
typedef struct {
/* MESSAGE_DEFN pointer */
void *  message_defn;	 
    uint16_t current_field_num;
/* location of destination message buffer */
    uchar * dest_buffer;
/* location of next fixed length value */
    uchar * current_fixed_data;
/* location of next variable length value */
    uchar * current_variable_data
/* length of market data message */
    uint16_t message_length;}
PUB_SEND_MESSAGE_CONTEXT;
Related concepts
Initialization
Functions to Send Messages
Methods
Logging
Related reference
Error Codes
pub_initialize