trmsg_add_instance()
#
trmsg_add_instance()
adds a new message instance to the specified topic in the TimeRanger database.
Prototype
int trmsg_add_instance(
json_t *tranger,
const char *topic_name,
json_t *jn_msg, // owned
md2_record_ex_t *md_record
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the TimeRanger database instance. |
|
|
Name of the topic where the instance will be added. |
|
|
JSON object containing the message instance data. Ownership is transferred to |
|
|
Pointer to the metadata record associated with the message instance. |
Return Value
Returns 0
on success, or a negative value on failure.
Notes
The jn_msg
parameter is owned by trmsg_add_instance()
, meaning it will be managed and freed internally.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples