Transformer SDK For C  7.1.9.29929-d422075
Receiving updates (legacy API)

Typedefs

typedef void(* update_cb) (int peer, ds_data_t *dsdata, time_t update_time, int val, void *data)
 Definition of the function type used for update callbacks. More...
 

Functions

int deregister_interest (const char *name, update_cb update, int id, void *data)
 Deregister an interest in a particular group of symbols. More...
 
int deregister_type_interest (int typ, update_cb update, int id, void *data)
 Deregister an interest in a particular DataSource type. More...
 
int register_interest (const char *name, update_cb update, int id, void *data)
 Register an interest in a particular group of symbols. More...
 
int register_interest_check (const char *name, update_cb update, int id, void *data)
 Register an interest in a particular group of symbols checking the provider if necessary. More...
 
int register_type_interest (int typ, update_cb update, int id, void *data)
 Register an interest in a particular DataSource type. More...
 

Detailed Description

The old Transformer API is still supported, but we recommend that any new development use the new listener API instead of the legacy equivalents.

Typedef Documentation

typedef void(* update_cb) (int peer, ds_data_t *dsdata, time_t update_time, int val, void *data)

Definition of the function type used for update callbacks.

Parameters
peer- Peer number that this update was received from
dsdata- The update itself
update_time- Time that this update was received
val- User registered integer
data- User registered pointer

val and data are the values supplied by the module as parameters for the legacy listener registration functions.

This parameter dsdata->flags has been overloaded to provide notification of various conditions besides data updates.

If dsdata->flags is F_DELETEOBJECT the object has been removed from the Transformer's cache. The module's interest will be automatically removed. When a module receives a message of this type it should release all resources associated with this symbol.

Deprecated:
The use of filename-style wildcards is being deprecated throughout the Caplin platform in favour of standard regular expressions. The replacement API fully supports regular expressions.

Function Documentation

int deregister_interest ( const char *  name,
update_cb  update,
int  id,
void *  data 
)

Deregister an interest in a particular group of symbols.

Deregister interest in symbols. The symbolname may contain wildcard characters. This function scans the symbols present within the Transformer that match the specified symbolname and then deregisters the modules interest in them.

If a symbol has no module interested in it, and no peer has requested the object and the symbol has come from an active DataSource then it will be deleted from the Transformer and a DataSource discard message sent to the originating peer.

If the symbolname is wild then the placeholder for future registrations of symbols is removed.

Parameters
nameName or wildcard to deregister an interest in
updateFunction to callback when an update for the symbol(s) is received (to match)
idUser defined integer (to match)
dataUser defined pointer (to match)
Returns
Number of symbols deregistered
Deprecated:
The use of filename-style wildcards is being deprecated throughout the Caplin platform in favour of standard regular expressions. The replacement API fully supports regular expressions.
Note
The callbacks generated by registrations of this type on single threaded.
int deregister_type_interest ( int  typ,
update_cb  update,
int  id,
void *  data 
)

Deregister an interest in a particular DataSource type.

Deregister an interest in symbols with a particular DataSource type.

Parameters
typ- DataSource type to remove interested in
update- Callback function to match when removing interest
id- User defined integer (to match)
data- User defined pointer (to match)
Return values
0- Always
Deprecated:
The use of filename-style wildcards is being deprecated throughout the Caplin platform in favour of standard regular expressions. The replacement API fully supports regular expressions.
Note
The callbacks generated by registrations of this type on single threaded.
int register_interest ( const char *  name,
update_cb  update,
int  id,
void *  data 
)

Register an interest in a particular group of symbols.

API functions below this point Register interest in symbols. If the symbol has not been received by the Transformer then if the name parameter contains a wildcard character (* or ?) then the Transformer will wait for a symbol to exist before registering the interest. Otherwise it will request the symbol from its peers

Parameters
nameName or wildcard to request an interest in
updateFunction to callback when an update for the symbol(s) is received
idUser defined integer
dataUser defined pointer

If wildcard is requested:

Returns
Number of symbols that matched this wildcard
Return values
0- No symbols matched, but wildcard registered for the future

If an individual object is requested:

Return values
1- Object from datasource registered
0- Object from provider registered
Deprecated:
The use of filename-style wildcards is being deprecated throughout the Caplin platform in favour of standard regular expressions. The replacement API fully supports regular expressions.
Note
The callbacks generated by registrations of this type on single threaded.
See also
register_interest_check()
int register_interest_check ( const char *  name,
update_cb  update,
int  id,
void *  data 
)

Register an interest in a particular group of symbols checking the provider if necessary.

Register interest in symbols. If the symbol has not been received by the Transformer then if the name parameter contains a wildcard character (* or ?) then the Transformer will wait for a symbol to exist before registering the interest. Otherwise it will request the symbol from its peers

Parameters
nameName or wildcard to request an interest in
updateFunction to callback when an update for the symbol(s) is received
idUser defined integer
dataUser defined pointer

If wildcard is requested:

Returns
Number of symbols that matched this wildcard
Return values
0- No symbols matched, but wildcard registered for the future

If an individual object is requested:

Return values
1- Object from datasource registered
0- Object from provider registered
Deprecated:
The use of filename-style wildcards is being deprecated throughout the Caplin platform in favour of standard regular expressions. The replacement API fully supports regular expressions.
Note
The callbacks generated by registrations of this type on single threaded.
See also
register_interest()
int register_type_interest ( int  typ,
update_cb  update,
int  id,
void *  data 
)

Register an interest in a particular DataSource type.

Register an interest in symbols with a particular DataSource type. All future updates with the specified type will be propagated through to the requesting module.

Parameters
typ- DataSource type to be interested in
update- Function to callback when an update for the symbol(s) is received
id- User defined integer
data- User defined pointer
Return values
0- Type registration succeeded
-1- Type registration failed (out of memory)
Deprecated:
The use of filename-style wildcards is being deprecated throughout the Caplin platform in favour of standard regular expressions. The replacement API fully supports regular expressions.
Note
The callbacks generated by registrations of this type on single threaded.

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