High Performance OPC UA Server SDK
1.2.0.193
|
Implementation of a store using in-memory float values. More...
#include <pointerstore.h>
Public Member Functions | |
static void | ua_pointerstore_get_value (void *pointerstore, ua_node_t node, unsigned int idx, bool source_ts, struct ua_indexrange *range, unsigned int num_ranges, struct ua_datavalue *result) |
static ua_statuscode | ua_pointerstore_attach_value (void *pointerstore, ua_node_t node, unsigned int idx, struct ua_indexrange *range, unsigned int num_ranges, struct ua_datavalue *value) |
int | ua_pointerstore_register_node (struct ua_pointerstore *store, ua_node_t node, void *variable, int index) |
Registers the given node in the pointerstore. More... | |
void ** | ua_pointerstore_clear (struct ua_pointerstore *store) |
Clears the given store. More... | |
int | ua_pointerstore_init (struct ua_pointerstore *store, uint8_t storeidx, void **values, unsigned int num_values) |
Initializes the float store. More... | |
uint8_t | ua_pointerstore_get_storeindex (struct ua_pointerstore *store) |
Get the storeindex of a memorystore. | |
Data Fields | |
void ** | values |
Array of pointers. | |
unsigned int | num_values |
Number of currently used values. | |
unsigned int | max_values |
Number of elements in the array. | |
uint8_t | storeidx |
Index of the store. | |
Implementation of a store using in-memory float values.
This store allows to connect UA variable to existing C variables, by storing its pointer. The datatype must be set correctly in the datatype attribute of the variable. Only scalar types are supported, no arrays.
static ua_statuscode ua_pointerstore_attach_value | ( | void * | pointerstore, |
ua_node_t | node, | ||
unsigned int | idx, | ||
struct ua_indexrange * | range, | ||
unsigned int | num_ranges, | ||
struct ua_datavalue * | value | ||
) |
Implementation of the ua_store_attach function for the pointerstore.
void ** ua_pointerstore_clear | ( | struct ua_pointerstore * | store | ) |
Clears the given store.
store | Pointer to store context. |
static void ua_pointerstore_get_value | ( | void * | pointerstore, |
ua_node_t | node, | ||
unsigned int | idx, | ||
bool | source_ts, | ||
struct ua_indexrange * | range, | ||
unsigned int | num_ranges, | ||
struct ua_datavalue * | result | ||
) |
Implementation of the ua_store_get function for the pointerstore.
int ua_pointerstore_init | ( | struct ua_pointerstore * | store, |
uint8_t | storeidx, | ||
void ** | values, | ||
unsigned int | num_values | ||
) |
Initializes the float store.
store | Pointer to store context. |
storeidx | Requested store index. 0 = auto assign new index. |
values | Array of float values. |
num_values | Array size of values. |
int ua_pointerstore_register_node | ( | struct ua_pointerstore * | store, |
ua_node_t | node, | ||
void * | variable, | ||
int | index | ||
) |
Registers the given node in the pointerstore.
This allocated a new slot in the real store and assigns the correct value_index to the node.
store | Context of the pointerstore. |
node | Handle of node associated with the value. |
variable | Pointer to variable to associate with node. |
index | Optional index. Set to -1 to auto-assign a free index and upate node accordingly. For constant address spaces you can assign the given value_index, that has been generated by xml2c. In this case the node will not be modified. |