Transformer SDK For C
Transformer Module Implementation


void mod_config_parse_file (const char *file)
 Parse a mandatory module configuration file. More...
void mod_config_parse_optional_file (const char *file)
 Parse an optional module configuration file. More...
TRANSFORMER_MODULE_EXPORT void mod_init (char *module_name)
 Module initialisation function. More...

Detailed Description

A module for Caplin Transformer takes the form of a dynamic library which is loaded on startup or on receipt of a user command.

Each module consists of a series of routines written in C. This document describes the functions available to the module programmer that can be used to provide the real-time market data and republish it to the DataSource API.

The implementation of a module can be split into the following stages:

Module Management

For modules to be loaded correctly, they should implement the mod_init() function which is called on initialisation.

Module configuration

A Caplin Transformer module is configured by reading a configuration file at startup. Using a configuration file means aspects of the module's operation can be altered without the need for recompilation.

The Caplin Transformer SDK includes a configuration API which comprises functions that enable you to set configuration options specific to your application.

The configuration API gives you additional flexibility when programming your business module.

The configuration API makes use of "configuration contexts". A configuration context enables you to keep sets of configuration options independent of any others.

Note: Using the default configuration context is acceptable in most cases. The configuration API allows you to group your configuration options within a configuration context in two ways: either as a group or a section.

Requesting data

In order for Caplin Transformer to supply updated information to a module, the module has to add a listener to a particular set of symbols.

Transformer then makes an active request for the symbols from DataSource applications connected to the DataSource API, unless a requested symbol is already within the Caplin Transformer memory core (i.e. another module has requested it), in which case your module will receive the data without it being rerequesting from the data source.

Having requested data for a particular symbol, whenever any values associated with that symbol change, Caplin Transformer will receive a packet of information containing an array of values. Individual values can then be extracted and processed

Manipulating data

Once a module has received data it can manipulate the contents of the update that it as has received. The actual mathematical processing of the data must be accomplished using standard programming techniques, however the Transformer provides functions to manipulate the update packet.

Publishing data

Once processing is performed it is often necessary to publish the manipulated data. Data may be published to all connected DataSource peers or it may be held in the Transformer's cache pending a request from a peer.

Function Documentation

void mod_config_parse_file ( const char *  file)

Parse a mandatory module configuration file.

Called by modules to parse their configuration file

fileFilename (without path) of the configuration file
void mod_config_parse_optional_file ( const char *  file)

Parse an optional module configuration file.

Called by modules to parse their configuration file

fileFilename (without path) of the configuration file
TRANSFORMER_MODULE_EXPORT void mod_init ( char *  module_name)

Module initialisation function.

module_name- Name of the module

All standard modules should implement this function. This is standard entry point and allows a module to parse configuration files and register any initial interest or provider callbacks.

A module can be loaded many times under different names. The name allows each instance of the module to use a different configuration file if necessary.

Generated on Mon Jul 20 2020 19:17:22 for Transformer SDK For C