Set Field Methods

A group of methods that each set the value of a field in a message that is being built.

Syntax

uint16_t pub_setInt8Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, int8_t field_value );
uint16_t pub_setInt16Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, int16_t field_value );
uint16_t pub_setInt32Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, int32_t field_value );
uint16_t pub_setInt64Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, int64_t field_value );
uint16_t pub_setUInt8Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uint8_t field_value );
uint16_t pub_setUInt16Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uint16_t field_value );
uint16_t pub_setUInt32Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uint32_t field_value );
uint16_t pub_setUInt64Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uint64_t field_value );
uint16_t pub_setDecimalField( PUB_SEND_MESSAGE_CONTEXT * msg, const char * field_name, double field_value );
The following method accepts a mantissa (the significant digits) and an exponent. The value of the decimal is mantissa x 10^exponent.
uint16_t pub_setDecimalFieldFromMantissa( PUB_SEND_MESSAGE_CONTEXT * msg, const char * field_name, int64_t mantissa, int8_t exponent );
uint16_t pub_setDecimalFieldFromString( PUB_SEND_MESSAGE_CONTEXT * msg, const char * field_name, const char * value );
uint16_t pub_setDateField( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uint32_t field_value );
uint16_t pub_setTimeField( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uint32_t field_value );
uint16_t pub_setTime2Field( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uint64_t field_value );
uint16_t pub_setDateTimeField( PUB_SEND_MESSAGE_CONTEXT * msg, const char * field_name, uint32_t dateField_value, uint32_t timeField_value );
uint16_t pub_setDateTime2Field( PUB_SEND_MESSAGE_CONTEXT * msg, const char * field_name, uint32_t dateField_value, uint64_t timeFieldValue );
uint16_t pub_setStringField( PUB_SEND_MESSAGE_CONTEXT * msg, char * field_name, uchar * field_value);
uint16_t pub_setNullField( PUB_SEND_MESSAGE_CONTEXT * msg, const char * field_name );

Parameters

Returns

uint16_t error_code
An error code or ERR_NONE (value 0).
Note: The approximate precision of the pub_setDecimalField API is 15 digits, pub_setDecimalFieldFromMantissa API is 18 digits, and pub_setDecimalFieldFromString is 38.
Related concepts
Datatype Conversion
Related reference
RDS Template and Element Descriptions