libamxs  0.6.0
Data Model Synchronization C API
synchronization API Utility functions
Collaboration diagram for synchronization API Utility functions:

Functions

amxs_status_t amxs_sync_param_copy_trans_cb (const amxs_sync_entry_t *entry, amxs_sync_direction_t direction, const amxc_var_t *input, amxc_var_t *output, void *priv)
 Translates data from a dm:object-changed event to data suited for an amxb_set call for a single parameter. More...
 
amxs_status_t amxs_sync_batch_param_copy_trans_cb (const amxs_sync_entry_t *entry, amxs_sync_direction_t direction, const amxc_var_t *input, amxc_var_t *output, void *priv)
 Translates data from a dm:object-changed event to data suited for an amxb_set call for all parameters in the event that are marked as batch copy parameters. More...
 
amxs_status_t amxs_sync_param_copy_action_cb (const amxs_sync_entry_t *entry, amxs_sync_direction_t direction, amxc_var_t *data, void *priv)
 Sets the new parameter value. More...
 
amxs_status_t amxs_sync_object_copy_trans_cb (const amxs_sync_entry_t *entry, amxs_sync_direction_t direction, const amxc_var_t *input, amxc_var_t *output, void *priv)
 Translates data from a dm:instance-added or dm:instance-removed event to data suited for an amxb call for this instance and all it's parameters. More...
 
amxs_status_t amxs_sync_object_copy_action_cb (const amxs_sync_entry_t *entry, amxs_sync_direction_t direction, amxc_var_t *data, void *priv)
 Adds, removes or updates an object with the given data using an amxb call. More...
 

Detailed Description

Function Documentation

◆ amxs_sync_batch_param_copy_trans_cb()

amxs_status_t amxs_sync_batch_param_copy_trans_cb ( const amxs_sync_entry_t entry,
amxs_sync_direction_t  direction,
const amxc_var_t *  input,
amxc_var_t *  output,
void *  priv 
)

Translates data from a dm:object-changed event to data suited for an amxb_set call for all parameters in the event that are marked as batch copy parameters.

Parameters
entryPointer to the synchronization entry for which the callback is triggered.
directionDirection in which the synchronization is triggered.
inputVariant containing the incoming event data.
outputVariant to store the converted data, this data will be passed to the action callback.
privPointer to user data which was given when the entry was created.
Returns
amxs_status_ok when the parameter data is translated successfully.

◆ amxs_sync_object_copy_action_cb()

amxs_status_t amxs_sync_object_copy_action_cb ( const amxs_sync_entry_t entry,
amxs_sync_direction_t  direction,
amxc_var_t *  data,
void *  priv 
)

Adds, removes or updates an object with the given data using an amxb call.

Parameters
entryPointer to the synchronization entry for which the callback is triggered.
directionDirection in which the synchronization is triggered.
dataVariant containing the object data to be updated.
privPointer to user data which was given when the entry was created.
Returns
amxs_status_ok when the object has been updated successfully.

◆ amxs_sync_object_copy_trans_cb()

amxs_status_t amxs_sync_object_copy_trans_cb ( const amxs_sync_entry_t entry,
amxs_sync_direction_t  direction,
const amxc_var_t *  input,
amxc_var_t *  output,
void *  priv 
)

Translates data from a dm:instance-added or dm:instance-removed event to data suited for an amxb call for this instance and all it's parameters.

Parameters
entryPointer to the synchronization entry for which the callback is triggered.
directionDirection in which the synchronization is triggered.
inputVariant containing the incoming event data.
outputVariant to store the converted data, this data will be passed to the action callback.
privPointer to user data which was given when the entry was created.
Returns
amxs_status_ok when all data is translated successfully.

◆ amxs_sync_param_copy_action_cb()

amxs_status_t amxs_sync_param_copy_action_cb ( const amxs_sync_entry_t entry,
amxs_sync_direction_t  direction,
amxc_var_t *  data,
void *  priv 
)

Sets the new parameter value.

If a local dm is specified, an amxd transaction will be used to set the value. This allows writing read-only parameters.

If no local dm is specified, amxb_set will be used.

Parameters
entryPointer to the synchronization entry for which the callback is triggered.
directionDirection in which the synchronization is triggered.
dataVariant containing the parameter data to be set.
privPointer to user data which was given when the entry was created.
Returns
amxs_status_ok when the value has been set successfully.

◆ amxs_sync_param_copy_trans_cb()

amxs_status_t amxs_sync_param_copy_trans_cb ( const amxs_sync_entry_t entry,
amxs_sync_direction_t  direction,
const amxc_var_t *  input,
amxc_var_t *  output,
void *  priv 
)

Translates data from a dm:object-changed event to data suited for an amxb_set call for a single parameter.

Parameters
entryPointer to the synchronization entry for which the callback is triggered.
directionDirection in which the synchronization is triggered.
inputVariant containing the incoming event data.
outputVariant to store the converted data, this data will be passed to the action callback.
privPointer to user data which was given when the entry was created.
Returns
amxs_status_ok when the parameter data is translated successfully.