Apama Capital Markets Foundation
9.12.0.0
|
#include <MDM_MarketDataInterface.h>
Public Attributes | |
void(* | connect )(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss) |
void(* | disconnect )(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss) |
const char *(* | getKey )(void *transportInternals, const char *symbol, AP_int64 sourceId, AP_MDM_StreamType streamType, HashMap *ctrlParams) |
Adapter Market Data interface
The adapter must fill out this structure with working functions and provide it when initiaizing the Market Data library with AP_MDM_Init.
void(* AP_MDM_AdapterInterface::connect)(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss) |
Connect Callback
This is called when a new subscription has been identified by the Market Data library and the adapter should subscribe to the external source for the symbol contained in the subKey. If successful AP_MDM_ConnectSuccess() should called, else AP_MDM_ConnectFailed().
transportInternals | A pointer to the transport internals provided during initiaization. |
subKey | The unique subscription key for this connection generated by a call to getKey. |
streamType | The data stream type this connection is for. |
ctrlParams | The control parameters for this connection. |
tss | The set of timestamps from the connect event. |
void(* AP_MDM_AdapterInterface::disconnect)(void *transportInternals, const char *subKey, AP_MDM_StreamType streamType, HashMap *ctrlParams, AP_TimestampSet *tss) |
Disconnect Callback
This is called when the last unsubscription for a symbol has been identified by the Market Data library and the adapter should unsubscribe from the external source for the symbol contained in the subKey. If successful AP_MDM_DisconnectSuccess() should called, else AP_MDM_DisconnectFailed().
transportInternals | A pointer to the transport internals provided during initiaization. |
subKey | The unique subscription key for this disconnection. |
streamType | The data stream type this disconnection is for. |
ctrlParams | The control parameters for this disconnection. |
tss | The set of timestamps from the disconnect event. |
const char*(* AP_MDM_AdapterInterface::getKey)(void *transportInternals, const char *symbol, AP_int64 sourceId, AP_MDM_StreamType streamType, HashMap *ctrlParams) |
Subscription Key Generation Callback
This is called when any subscription is received and the adapter should generate a subscription key. It is used to detect duplicate subscriptions. The basic structure of the key should be:-
"symbol:streamType:sourceId:controlparam1=val1;controlParam2=val2;...:"
transportInternals | A pointer to the transport internals provided during initiaization. |
symbol | The symbol this subscription is for. |
sourceId | The source Id this subscription is for. |
streamType | The data stream type this subscription is for. |
ctrlParams | The control parameters for this subscription. |