High Performance OPC UA Server SDK
1.2.0.193
|
Management for builtin and custom structures registered at the encoder. More...
Data Structures | |
struct | ua_type_table_base_fcts |
Base functions for builtin types. More... | |
struct | ua_type_table_encoder_fcts |
Encode and decode functions for builtin types. More... | |
struct | ua_type_table |
Struct for one entry in the type table. More... | |
Enumerations | |
enum | ua_type_table_sorting { UA_TYPE_TABLE_SORTING_NONE, UA_TYPE_TABLE_SORTING_ASC } |
Possible sortings for custom type tables to be registered. More... | |
Functions | |
const struct ua_type_table * | ua_type_table_find (uint16_t ns) |
Lookup the type table for a certain namespace index. | |
int | ua_type_table_register_table (uint16_t nsidx, struct ua_dict_structure *structures, uint16_t num_structures, uint16_t max_structures, enum ua_type_table_sorting sorting) |
Register new type table for a certain namespace. More... | |
int | ua_type_table_register_const_table (uint16_t nsidx, const struct ua_dict_structure *structures, uint16_t num_structures, enum ua_type_table_sorting sorting) |
Register new constant type table for a certain namespace. More... | |
int | ua_type_table_register_structure (uint16_t nsidx, const struct ua_dict_structure *structure) |
Add a new type to an existing type table. More... | |
int | ua_type_table_init (const struct ua_type_table_encoder_fcts *ns0_encoder_fcts) |
Register the encoder functions for ns 0 and validate ns 0 types. More... | |
void | ua_type_table_clear (void) |
Clear all registered type tables. More... | |
const struct ua_dict_structure * | ua_type_table_lookup_local_type (uint16_t local_ns, uint32_t local_type) |
Lookup a structure description by its local type. More... | |
const struct ua_dict_structure * | ua_type_table_lookup_binary_encoding (const struct ua_nodeid *binary_encoding_id, uint32_t *local_type) |
Lookup a structure description by its binary encoding id. More... | |
const struct ua_dict_structure * | ua_type_table_lookup_type_id (const struct ua_nodeid *type_id, uint32_t *local_type) |
Lookup a structure description by its type id. More... | |
Variables | |
const struct ua_type_table_base_fcts | g_base_fcts_ns0 [UA_TYPE_TABLE_NUM_NS0_FCTS] |
Array with namespace zero builtin base functions (copy, compare, clear) | |
const struct ua_dict_structure | g_type_table_ns0 [UA_TYPE_NUM_VALUES-countof(g_base_fcts_ns0)] |
Array with namespace zero structures. | |
Management for builtin and custom structures registered at the encoder.
These are automatically decoded when found inside an extensionobject.
void ua_type_table_clear | ( | void | ) |
Clear all registered type tables.
Called during encoder cleanup.
int ua_type_table_init | ( | const struct ua_type_table_encoder_fcts * | ns0_encoder_fcts | ) |
Register the encoder functions for ns 0 and validate ns 0 types.
Called during the encoder initialization.
const struct ua_dict_structure* ua_type_table_lookup_binary_encoding | ( | const struct ua_nodeid * | binary_encoding_id, |
uint32_t * | local_type | ||
) |
Lookup a structure description by its binary encoding id.
local_type | If not NULL the local type of the found structure is written to this address. |
const struct ua_dict_structure* ua_type_table_lookup_local_type | ( | uint16_t | local_ns, |
uint32_t | local_type | ||
) |
Lookup a structure description by its local type.
const struct ua_dict_structure* ua_type_table_lookup_type_id | ( | const struct ua_nodeid * | type_id, |
uint32_t * | local_type | ||
) |
Lookup a structure description by its type id.
local_type | If not NULL the local type of the found structure is written to this address. |
int ua_type_table_register_const_table | ( | uint16_t | nsidx, |
const struct ua_dict_structure * | structures, | ||
uint16_t | num_structures, | ||
enum ua_type_table_sorting | sorting | ||
) |
Register new constant type table for a certain namespace.
nsidx | Namespace index of the new types, there can only be one table for each namespace. |
structures | Array with descriptions of the new types. |
num_structures | Number of valid entries in the structures array. |
sorting | Sorting of the new types, in case of UA_TYPE_TABLE_SORTING_NONE this function will try to use a better sorting. |
int ua_type_table_register_structure | ( | uint16_t | nsidx, |
const struct ua_dict_structure * | structure | ||
) |
Add a new type to an existing type table.
The existing type table must have been registered with ua_type_table_register_table and still a free entry.
All memory referenced by the struct will be freed with ipc_free at shutdown. The struct itself will not be freed.
nsidx | Namespace index of the new type. |
structure | The new type to add. All memory referenced by this struct will be freed with ipc_free at shutdown. The struct itself will not be freed. |
int ua_type_table_register_table | ( | uint16_t | nsidx, |
struct ua_dict_structure * | structures, | ||
uint16_t | num_structures, | ||
uint16_t | max_structures, | ||
enum ua_type_table_sorting | sorting | ||
) |
Register new type table for a certain namespace.
This functions allows to register new types right now, but also add single types later using ua_type_table_register_structure. At server shutdown the table and their referenced fields are freed using ipc_free.
nsidx | Namespace index of the new types, there can only be one table for each namespace. |
structures | Array with descriptions of the new types. |
num_structures | Number of valid entries in the structures array, may also be 0. |
max_structures | Maximum number of entries in the structres array. The difference to num_structes determines the number of types that can be added later. |
sorting | Sorting of the types and all types added later. |