39 DEBUG_ENTRY(
"item_meta_t *item_meta = <%p>, string_t **json_string = <%p>", item_meta, json_string)
78 DEBUG_ENTRY(
"time_series_payload_t *payload = <%p>, string_t **json_string = <%p>", payload, json_string)
98 MCL_DEBUG(
"Generated json_string = <%s>", (*json_string)->buffer);
106 DEBUG_ENTRY(
"data_source_configuration_payload_t *payload = <%p>, string_t **json_string = <%p>", payload, json_string)
131 DEBUG_ENTRY(
"list_t *event_list_payload = <%p>, string_t **json_string = <%p>", event_list_payload, json_string)
147 MCL_DEBUG(
"Generated json_string = <%s>", (*json_string)->buffer);
156 DEBUG_ENTRY(
"list_t *event_list = <%p>, json_t *event_list_array = <%p>", event_list, event_list_array)
172 DEBUG_ENTRY(
"event_t *event = <%p>, json_t *event_list_array = <%p>", event, event_list_array)
265 DEBUG_ENTRY(
"list_t *value_sets = <%p>, json_t *value_set_array = <%p>", value_sets, value_set_array)
282 DEBUG_ENTRY(
"time_series_value_set_t *value_set = <%p>, json_t *value_set_array = <%p>", value_set, value_set_array)
307 DEBUG_ENTRY(
"list_t *values = <%p>, json_t *value_set = <%p>", values, value_set)
331 DEBUG_ENTRY(
"time_series_value_t *value = <%p>, json_t *values_array = <%p>", value, values_array)
356 DEBUG_ENTRY(
"item_meta_t *item_meta = <%p>, json_t *root = <%p>", item_meta, root)
362 ASSERT_CODE_MESSAGE(
MCL_OK == code, code,
"Details object of item meta couldn't be allocated in memory for json_string.");
393 DEBUG_ENTRY(
"item_meta_t *item_meta = <%p>, json_t *payload = <%p>", item_meta, payload)
398 MCL_DEBUG(
"Item type specific fields will be added.");
402 MCL_DEBUG(
"Payload type is time series.");
431 MCL_DEBUG(
"Payload type is data source configuration.");
439 MCL_DEBUG(
"Payload type is custom type.");
475 DEBUG_ENTRY(
"item_meta_t *item_meta = <%p>, json_t *root = <%p>", item_meta, root)
481 ASSERT_CODE_MESSAGE(
MCL_OK == code, code,
"Payload object of item meta couldn't be allocated in memory for json_string.");
507 DEBUG_ENTRY(
"list_t *data_source_list = <%p>, json_t *payload_object = <%p>", data_source_list, payload_object)
629 DEBUG_ENTRY(
"json_t *parent_object = <%p>, char *field_name = <%s>, const string_t *field_to_be_added = <%p>, mcl_bool_t is_mandatory = <%u>", parent_object, field_name, field_to_be_added, is_mandatory)
636 MCL_DEBUG(
"<%s> field will be added.", field_name);
mcl_int32_t severity
Severity level.
Quality code of payload field values.
mcl_bool_t json_util_has_child(json_t *root)
This function checks whether root object has child object or not.
static E_MCL_ERROR_CODE _add_event_list(list_t *event_list, json_t *event_list_array)
string_t * data_point_id
Id of the datapoint the value is read from.
Memory module header file.
string_t * name
Name of the data point.
Type of payload field data sources data points.
E_MCL_ERROR_CODE json_util_add_uint(json_t *root, const char *object_name, const mcl_size_t number)
This function adds integer number to root which can be object or array.
void list_reset(list_t *list)
Reset the current node to head node.
mcl_json_t * details
Event/alarm details.
This struct is used for building the payload of time series which is list of value sets...
Json util module header file.
string_t * correlation_id
Parent event id.
Time series type of meta field payload.
File type of meta field payload.
list_t * data_sources
List of data sources definitions.
Configuration id of meta field payload details.
char * buffer
Buffer of string handle.
Business event type of meta field payload.
This struct is used for building data_source_configuration.data_points structure. ...
static E_MCL_ERROR_CODE _add_time_series_payload_values_objects(time_series_value_t *value, json_t *values_array)
string_t * version
Version of the event/alarm type.
E_MCL_ERROR_CODE json_util_start_array(json_t *root, const char *array_name, json_t **json_array)
This function creates an array in root.
string_t * description
Event description.
static E_MCL_ERROR_CODE _add_item_meta_payload_details(item_meta_t *item_meta, json_t *payload)
#define MCL_FALSE
MCL bool type.
static E_MCL_ERROR_CODE _add_data_source_configuration_data_sources(list_t *data_source_list, json_t *payload_object)
static E_MCL_ERROR_CODE _add_time_series_payload_values_array(list_t *values, json_t *value_set)
Data point id of payload field values.
mcl_json_t * custom_data
Custom data.
Log utility module header file.
E_MCL_ERROR_CODE
MCL Error code definitions. Every function returning an error code uses this enum values...
Correlation id of payload field.
This struct is used for building value set of time series.
void json_util_destroy(json_t **root)
This function destroys root.
event_payload_t * payload
Payload of event.
Payload field data sources data points.
File type of meta field details.
string_t * type
Type of data point.
Configuration id of payload field.
#define ASSERT_STATEMENT_CODE_MESSAGE(condition, statement, return_code,...)
Event module interface header file.
Version of payload field.
static E_MCL_ERROR_CODE _add_data_source_configuration_data_points(list_t *data_points, json_t *data_sources_object)
list_t * value_sets
List of value sets.
Description of payload field.
This struct is used for building data_source_configuratio.payload structure.
string_t meta_field_names[META_FIELD_NAMES_END]
E_MCL_ERROR_CODE string_compare(const string_t *string, const string_t *other)
Compare the contents of two string_t's.
string_t * timestamp
Time of values in YYYY-MM-DDThh:mm:ss.sssZ format.
Type of meta field payload.
File name of meta field details.
void json_util_finish_array(json_t **json_array)
This function destroys json_array data struct. But the array still exists in root json object...
static E_MCL_ERROR_CODE _add_time_series_value_sets(list_t *value_sets, json_t *value_set_array)
Value of payload field values.
Version of meta field payload.
#define ASSERT_STATEMENT_CODE(condition, statement, return_code)
#define ASSERT_CODE_MESSAGE(condition, return_code,...)
Definitions module header file.
Timestamp of payload field.
E_MCL_ERROR_CODE string_initialize_dynamic(const char *value, mcl_size_t value_length, string_t **string)
Initializes a dynamic string_t object with the given value and length.
E_MCL_ERROR_CODE json_from_item_meta(item_meta_t *item_meta, string_t **json_string)
Creates item meta part of all types in json format.
string_t * timestamp
Creation time of the event in ISO format.
static E_MCL_ERROR_CODE _add_item_meta_payload(item_meta_t *item_meta, json_t *root)
E_MCL_ERROR_CODE json_util_add_string(json_t *root, const char *object_name, const char *object_value)
This function adds string to root which can be object or array.
E_MCL_ERROR_CODE json_util_add_object(json_t *root, const char *object_name, json_t *object)
This function adds object to root.
Severity of payload field.
list_node_t * list_next(list_t *list)
Get the next node from the list.
string_t * description
Description of the data source.
mcl_json_t * custom_data
Custom data.
Routing of meta field details.
static E_MCL_ERROR_CODE _add_event(event_t *event, json_t *event_list_array)
string_t meta_field_values[META_FIELD_VALUES_END]
void json_util_finish_object(json_t **json_object)
This function destroys json_object data struct. But the object still exists in root json object...
static E_MCL_ERROR_CODE _add_time_series_value_set(time_series_value_set_t *value_set, json_t *value_set_array)
E_MCL_ERROR_CODE json_from_time_series_payload(time_series_payload_t *payload, string_t **json_string)
Creates payload part of time series in json format.
E_MCL_ERROR_CODE json_util_duplicate(const json_t *source_json, mcl_bool_t with_children, json_t **duplicated_json)
This function duplicates source_json as duplicated_json.
This struct is used for building data_source_configuration.data_source structure. ...
string_t * description
Description of the data point.
Event module header file.
string_t payload_field_names[PAYLOAD_FIELD_NAMES_END]
string_t * quality_code
The quality of the value provided.
Name of payload field data sources data points.
Details of payload field.
This struct is used for building time_series.payload.values structure.
E_MCL_ERROR_CODE json_util_to_string(json_t *root, char **json_string)
This function gives the string of root in json format.
static E_MCL_ERROR_CODE _add_string_field_to_object(json_t *parent_object, char *field_name, const string_t *optional_field_to_be_added, mcl_bool_t is_mandatory)
string_t * unit
Measurement unit of the data point.
Creation date of meta field details.
string_t * name
Name of the data source.
list_t * data_points
List of data points definitions.
string_t * value
The value read.
Name of payload field data sources.
E_MCL_ERROR_CODE json_from_data_source_configuration_payload(data_source_configuration_payload_t *payload, string_t **json_string)
Creates payload part of data source configuration in json format.
This struct is used for building a single event.
Unit of payload field data sources data points.
string_t * configuration_id
Unique identifier of the configuration.
void json_util_add_item_to_array(json_t *root, json_t *object)
This function adds object to root array.
Data point id of payload field assets data sources data points.
Data source configuration type of meta field payload.
void * data
Data of the node.
E_MCL_ERROR_CODE json_from_event_payload(list_t *event_list_payload, string_t **json_string)
Creates payload part of event set in json format.
Custom data of payload field.
E_MCL_ERROR_CODE json_util_start_object(json_t *root, const char *object_name, json_t **json_object)
This function creates an object in root.
E_MCL_ERROR_CODE json_util_initialize(E_JSON_TYPE json_type, json_t **root)
This function initializes the given root json.
Payload field data sources.
string_t * id
Unique identifier of the event.
string_t * type
Type of the event.
list_t * values
List of measurements made at the given timestamp.
This struct is used for json handling.
static E_MCL_ERROR_CODE _add_item_meta_details(item_meta_t *item_meta, json_t *root)
string_t * id
Agent-unique identifier of the data point.