YControl message utilities are used internally to construct messages to the main server and receive messages from the main server.
More...
|
const xmlChar * | ycontrol_msg_cmn_get_msgtype (ycontrol_msgtype_t msgtype) |
| Get the string for the message type enumeration. More...
|
|
ycontrol_msgtype_t | ycontrol_msg_cmn_get_msgtype_enum (val_value_t *msgval, status_t *res) |
| Get the message type enumeration from the message. More...
|
|
status_t | ycontrol_msg_cmn_new (const xmlChar *server_id, const xmlChar *subsys_id, obj_template_t *msgobj, uint32 msgid, ycontrol_msgtype_t msgtype, const xmlChar *service_id, val_value_t **ret_msgval) |
| Create a new YControl message. More...
|
|
status_t | ycontrol_msg_cmn_reuse (val_value_t *msgval, uint32 msgid, ycontrol_msgtype_t msgtype, const xmlChar *server_id, const xmlChar *subsys_id, const xmlChar *service_id) |
| Reuse a message value struct and replace only changing fields. More...
|
|
status_t | ycontrol_msg_cmn_new_payload (obj_template_t *msgobj, val_value_t **ret_payload) |
| Create a new payload value for the message object. More...
|
|
status_t | ycontrol_msg_cmn_new_error (obj_template_t *msgobj, status_t res, const xmlChar *errstr, val_value_t **ret_error) |
| Create a new YControl error response message. More...
|
|
status_t | ycontrol_msg_cmn_reuse_error (val_value_t *error_val, status_t res, const xmlChar *errstr) |
| Reuse an error message value struct and replace only changing fields. More...
|
|
status_t | ycontrol_msg_cmn_new_ok (obj_template_t *msgobj, val_value_t **ret_ok) |
| Create a new YControl OK response message. More...
|
|
YControl message utilities are used internally to construct messages to the main server and receive messages from the main server.
These APIs help manage the message caches used to make message processing faster.
All functions in this module are system APIs for subsystem use only!
◆ ycontrol_msg_cmn_get_msgtype()
Get the string for the message type enumeration.
- Parameters
-
msgtype | enumeration to convert |
- Returns
- string version of the enum
◆ ycontrol_msg_cmn_get_msgtype_enum()
Get the message type enumeration from the message.
- Parameters
-
| msgval | parseed message to check |
[out] | res | address of return status
|
- Returns
- message type enum
◆ ycontrol_msg_cmn_new()
Create a new YControl message.
- Parameters
-
| server_id | server that the message will be sent to |
| subsys_id | the ID of this subsystem to use in the message |
| msgobj | object template for message to send |
| msgid | message ID to use |
| msgtype | message type to send |
| service_id | service name sending the message |
[out] | ret_msgval | address of created messagen
- *ret_msgval malloced message, must free with val_free_value
|
◆ ycontrol_msg_cmn_new_error()
Create a new YControl error response message.
- Parameters
-
| msgobj | object template for the service layer object |
| res | error code for operation failure |
| errstr | error string for operation failure |
[out] | ret_error | address of return message
- *ret_error malloced return message.
- Must free with val_free_value.
|
- Returns
- status
◆ ycontrol_msg_cmn_new_ok()
Create a new YControl OK response message.
- Parameters
-
| msgobj | object template for the service layer object |
[out] | ret_ok | address of return OK message
- *ret_ok malloced return message.
- Must free with val_free_value.
|
◆ ycontrol_msg_cmn_new_payload()
Create a new payload value for the message object.
- Parameters
-
| msgobj | object template for message to create payload for. The payload object will be found as a child node. |
[out] | ret_payload | address of return payload
- *ret_payload malloced return payload;
- Must free with val_free_value.
|
◆ ycontrol_msg_cmn_reuse()
Reuse a message value struct and replace only changing fields.
- Parameters
-
msgval | value tree containing message to reuse |
msgid | message ID to use |
msgtype | message type to send |
server_id | server that the message will be sent to |
subsys_id | the ID of this subsystem to use in the message |
service_id | service name sending the message |
- Returns
- status
◆ ycontrol_msg_cmn_reuse_error()
Reuse an error message value struct and replace only changing fields.
- Parameters
-
error_val | value tree containing error message to reuse |
res | new error status for operation failure to set |
errstr | new error string for operation failure |
- Returns
- status