General addressspace management like register/unregister namespaces.
More...
|
int | ua_addressspace_init (void) |
| Allocate resources for addressspace management. More...
|
|
void | ua_addressspace_clear (void) |
| Remove all registered namespaces from the addressspace and free their resources.
|
|
int | ua_addressspace_register (const char *url, struct ua_addressspace_config *config, enum ua_addressspace_index_type type) |
| Registers a new namespace. More...
|
|
int | ua_addressspace_register_static (const char *url, int hashtablesize, struct mem_objectpool_static *nodepool, struct mem_objectpool_static *varpool, struct mem_objectpool_static *vartypepool, struct mem_objectpool_static *refpool, struct mem_objectpool_static *stringpool, const char *stringtable[], struct mem_objectpool_static *guidpool, uint16_t nsidx, unsigned int num_placeholders, enum ua_addressspace_index_type type) |
| Registers a new namespace. More...
|
|
void | ua_addressspace_unregister (uint16_t nsidx) |
| Unregister a namespace from the addressspace. More...
|
|
struct ua_addressspace * | ua_addressspace_getaddr (uint16_t nsidx) |
| Get the pointer to the ua_addressspace struct of a namespace. More...
|
|
bool | ua_addressspace_is_static (struct ua_addressspace *addr) |
| Returns true if the address space is static. More...
|
|
void | ua_addressspace_print_stat (uint16_t) |
| Print addressspace statistics for a namespace. More...
|
|
General addressspace management like register/unregister namespaces.
Possible index types for nodes in the addressspace.
Enumerator |
---|
UA_INDEX_BTREE |
Index using a binary tree (not implemented).
|
UA_INDEX_HASHTABLE |
Index using a hashtable with linked list for collision handling.
|
UA_INDEX_HASHTABLEQP |
Index using a hashtable with quadratic probing for collision handling.
|
Get the pointer to the ua_addressspace struct of a namespace.
- Parameters
-
nsidx | Index of the namespace. |
- Returns
- Valid pointer on success or NULL on failure.
int ua_addressspace_init |
( |
void |
| ) |
|
Allocate resources for addressspace management.
- Returns
- Zero on success or errorcode on failure.
Returns true if the address space is static.
Static means it's compiled into the application and is constant. On embedded systems static address space can lie in ROM.
void ua_addressspace_print_stat |
( |
uint16_t |
nsidx | ) |
|
Print addressspace statistics for a namespace.
The statistics are printed to trace at level debug and facility session.
- Parameters
-
nsidx | index of namespace to print statistics for |
Registers a new namespace.
- Parameters
-
url | URL of namespace. |
max_nodes | Maximum number of nodes in this namespace. |
node_size | Size of one node in bytes. |
max_references | Maximum number of references in this namespace. |
ref_size | Size of one reference in bytes. |
nsidx | Requested namespace index. Set to -1 if you don't care. |
type | Index type to use for indexing nodes. Note: Using UA_INDEX_HASHTABLEQP is not allowed as deleting nodes would corrupt the hashtable. |
- Returns
- Returns the assigned namespace index or -1 in case of an error.
int ua_addressspace_register_static |
( |
const char * |
url, |
|
|
int |
hashtablesize, |
|
|
struct mem_objectpool_static * |
nodepool, |
|
|
struct mem_objectpool_static * |
varpool, |
|
|
struct mem_objectpool_static * |
vartypepool, |
|
|
struct mem_objectpool_static * |
refpool, |
|
|
struct mem_objectpool_static * |
stringpool, |
|
|
const char * |
stringtable[], |
|
|
struct mem_objectpool_static * |
guidpool, |
|
|
uint16_t |
nsidx, |
|
|
unsigned int |
num_placeholders, |
|
|
enum ua_addressspace_index_type |
type |
|
) |
| |
Registers a new namespace.
- Parameters
-
url | URL of namespace. |
hashtablesize | Size of hashtable for indexing nodes. |
nodepool | Static memory pool of nodes. |
refpool | Static memory pool of references. |
stringpool | Static memory pool of strings. |
stringtable | String table with const strings. |
nsidx | Requested namespace index. Set to -1 if you don't care. |
type | Index type to use for indexing nodes. |
- Returns
- Returns the assigned namespace index or -1 in case of an error.
void ua_addressspace_unregister |
( |
uint16_t |
nsidx | ) |
|
Unregister a namespace from the addressspace.
Remove all nodes from the given namespace.
- Parameters
-
nsidx | index of the namespace to unregister. |