DataSource for C SDK  7.1.28.98838-0467ac22
Publishing Record Data

Functions

int32_t ds_add_record_char (ds_data_t *data, const char *field, char value)
 Add a character value to a record object. More...
 
int32_t ds_add_record_float (ds_data_t *data, const char *field, double value)
 Add a floating point value to a record object. More...
 
int32_t ds_add_record_fmt (ds_data_t *data, const char *field, const char *fmt,...)
 Add a formatted string to a record object. More...
 
int32_t ds_add_record_int (ds_data_t *data, const char *field, int value)
 Add an integer value to a record object. More...
 
int32_t ds_add_record_str (ds_data_t *data, const char *field, const char *value)
 Add a string value to a record object. More...
 

Detailed Description

Fields may be added to record data objects using the field name as opposed to the field identifier number.

See also
Data Object Flags
Creating Data Objects

Example: Create a record update and send to subscribed peers

ds_data_t *dsdata;
ds_add_record_str(dsdata, "Bid", "1.3");
ds_add_record_str(dsdata, "Ask", "1.4");

Function Documentation

int32_t ds_add_record_char ( ds_data_t data,
const char *  field,
char  value 
)

Add a character value to a record object.

Parameters
dataThe record object
fieldThe fieldname
valueCharacter value for this field
See also
ds_add_data_char()
int32_t ds_add_record_float ( ds_data_t data,
const char *  field,
double  value 
)

Add a floating point value to a record object.

Parameters
dataThe record object
fieldThe fieldname
valueFloating point value for this field
See also
ds_add_data_float32()
ds_add_data_float64()
int32_t ds_add_record_fmt ( ds_data_t data,
const char *  field,
const char *  fmt,
  ... 
)

Add a formatted string to a record object.

Parameters
dataThe record object
fieldThe fieldname
fmtThe sprintf style format string
See also
ds_add_data_fmt()
int32_t ds_add_record_int ( ds_data_t data,
const char *  field,
int  value 
)

Add an integer value to a record object.

Parameters
dataThe record object
fieldThe fieldname
valueInteger value for this field
See also
ds_add_data_int32()
int32_t ds_add_record_str ( ds_data_t data,
const char *  field,
const char *  value 
)

Add a string value to a record object.

Parameters
dataThe record object
fieldThe fieldname
valueString value for this field
See also
ds_add_data_str()

Generated on Fri Jan 20 2023 17:49:17 for DataSource for C SDK