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

Macros

#define AMXS_SYNC_DEFAULT   0x00
 Default synchronization attributes. More...
 
#define AMXS_SYNC_ONLY_B_TO_A   0x01
 Only synchronize from object B to object A. More...
 
#define AMXS_SYNC_ONLY_A_TO_B   0x02
 Only synchronize from object A to object B. More...
 
#define AMXS_SYNC_INIT_B   0x04
 Take the initial values from object B. More...
 
#define AMXS_SYNC_PARAM_BATCH   0x08
 Indicate that this parameter may be part of a batch copy operation. More...
 

Typedefs

typedef amxs_status_t(* amxs_translation_cb_t) (const amxs_sync_entry_t *entry, amxs_sync_direction_t direction, const amxc_var_t *input, amxc_var_t *output, void *priv)
 Definition of the translation callback function. More...
 
typedef amxs_status_t(* amxs_action_cb_t) (const amxs_sync_entry_t *entry, amxs_sync_direction_t direction, amxc_var_t *data, void *priv)
 Definition of the action callback function. More...
 

Detailed Description

Macro Definition Documentation

◆ AMXS_SYNC_DEFAULT

#define AMXS_SYNC_DEFAULT   0x00

Default synchronization attributes.

This means:

  • Synchronize bidirectionally
  • The initial values are taken from object A
  • Assume the existence of both objects

Definition at line 190 of file amxs_types.h.

◆ AMXS_SYNC_INIT_B

#define AMXS_SYNC_INIT_B   0x04

Take the initial values from object B.

Definition at line 205 of file amxs_types.h.

◆ AMXS_SYNC_ONLY_A_TO_B

#define AMXS_SYNC_ONLY_A_TO_B   0x02

Only synchronize from object A to object B.

Definition at line 200 of file amxs_types.h.

◆ AMXS_SYNC_ONLY_B_TO_A

#define AMXS_SYNC_ONLY_B_TO_A   0x01

Only synchronize from object B to object A.

Definition at line 195 of file amxs_types.h.

◆ AMXS_SYNC_PARAM_BATCH

#define AMXS_SYNC_PARAM_BATCH   0x08

Indicate that this parameter may be part of a batch copy operation.

Definition at line 210 of file amxs_types.h.

Typedef Documentation

◆ amxs_action_cb_t

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

Definition of the action callback function.

Callback function that will be executed when a synchonized parameter or object changes. The event data will first be passed to a translation function, if given, and then this function will be invoked to act on the change.

Parameters
entryPointer to the synchronization entry for which this callback function was registered.
directionIndication in which direction the translation is needed
dataPointer to a variant containing the input data
privPointer to private data which is given when creating or initializing a synchronization object or parameter.
Returns
amxs_status_ok when the action was successful, any other status code otherwise

Definition at line 156 of file amxs_types.h.

◆ amxs_translation_cb_t

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

Definition of the translation callback function.

Depending on the action function, the input data might need to be formatted differently from the default event data structure. This callback function will be executed before the action callback function, and the translated data will be passed to the action callack.

Parameters
entryPointer to the synchronization entry for which this callback function was registered.
directionIndication in which direction the translation is needed
inputPointer to a variant containing the initial data.
outputPointer to a variant in which the translated data must be stored.
privPointer to private data which is given when creating or initializing a synchronization object or parameter.
Returns
amxs_status_ok when the translation was successful, any other status code otherwise

Definition at line 131 of file amxs_types.h.