High Performance OPC UA Server SDK  1.2.0.193
ua_staticstore Struct Reference

Implementation of a store using preencoded values. More...

#include <staticstore.h>

Public Member Functions

static void ua_staticstore_get_value (void *staticstore, ua_node_t node, unsigned int idx, bool source_ts, struct ua_indexrange *idxrange, unsigned int num_ranges, struct ua_datavalue *result)
 
static ua_statuscode ua_staticstore_attach_value (void *store, ua_node_t node, unsigned int idx, struct ua_indexrange *range, unsigned int num_ranges, struct ua_datavalue *value)
 
int ua_staticstore_init (struct ua_staticstore *store, unsigned int req_index)
 
void ua_staticstore_clear (struct ua_staticstore *store)
 
uint8_t ua_staticstore_get_storeindex (struct ua_staticstore *store)
 
int ua_staticstore_from_const_data (struct ua_staticstore *store, const struct ua_staticstore_element *elements, unsigned int num_elements, uint8_t storeidx)
 

Data Fields

const struct
ua_staticstore_element
elements
 
unsigned int num_elements
 
bool const_data
 
uint8_t storeidx
 

Detailed Description

Implementation of a store using preencoded values.

This store is used for read-only values which can be compiled-in const data like it is generated by xml2c, or data that is loaded from file using ua_addressspace_load_file. The later uses the ua_valuestore_add function to populate the static store at runtime.

Member Function Documentation

static ua_statuscode ua_staticstore_attach_value ( void *  store,
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 staticstore. Write is not supported by the staticstore, this is mainly to provide a proper trace.

void ua_staticstore_clear ( struct ua_staticstore store)

Clear any allocated memory and unregister the store.

int ua_staticstore_from_const_data ( struct ua_staticstore store,
const struct ua_staticstore_element elements,
unsigned int  num_elements,
uint8_t  storeidx 
)

Load a staticstore from constant data.

The store context must be provided by the user, the other parameters are generated when a store is saved to c file. This function also registers the store.

Returns
Zero on success or errorcode on failure.
uint8_t ua_staticstore_get_storeindex ( struct ua_staticstore store)

Get the storeindex of the staticstore.

static void ua_staticstore_get_value ( void *  staticstore,
ua_node_t  node,
unsigned int  idx,
bool  source_ts,
struct ua_indexrange idxrange,
unsigned int  num_ranges,
struct ua_datavalue result 
)

Implementation of the ua_store_get function for the staticstore.

int ua_staticstore_init ( struct ua_staticstore store,
unsigned int  req_index 
)

Initializes a static store.

Parameters
storestore pointer
req_indexrequested store index. 0=auto-assign.

The documentation for this struct was generated from the following files: