High Performance OPC UA Server SDK
1.2.0.193
|
Public Member Functions | |
int | ua_stringtable_init (struct ua_stringtable *st, int num_entries) |
Initialize the stringtable st with a map of size num_entries . More... | |
void | ua_stringtable_clear (struct ua_stringtable *st) |
Clear all resources associated with the stringtable st . More... | |
int | ua_stringtable_add_string (struct ua_stringtable *st, const struct ua_string *string, int *index) |
Add the ua_string string into the stringtable st . More... | |
int | ua_stringtable_get_string (struct ua_stringtable *st, struct ua_string *string, int index) |
Get the string at index index from stringtable st . More... | |
Data Fields | |
struct util_map * | map |
struct ua_string * | table |
int | table_num_elements |
int ua_stringtable_add_string | ( | struct ua_stringtable * | st, |
const struct ua_string * | string, | ||
int * | index | ||
) |
Add the ua_string string
into the stringtable st
.
The stringtable must have been initialized with ua_stringtable_init() to successfully add a string.
st | initialized stringtable to add string to. |
string | to add, st stores a copy so this string can savely be cleard after adding. |
index | reference to an integer where the index of the stored string can be written to. May be NULL if index is not relvant. |
void ua_stringtable_clear | ( | struct ua_stringtable * | st | ) |
Clear all resources associated with the stringtable st
.
It is not possible to add strings to st
after calling this function.
int ua_stringtable_get_string | ( | struct ua_stringtable * | st, |
struct ua_string * | string, | ||
int | index | ||
) |
Get the string at index index
from stringtable st
.
This function only works for stringtables that were decoded.
st | the decoded stringtable. |
string | the caller must provide a ua_string struct, where the string will be filled into. On success the caller is responsible to clear this string. |
index | of the string to get. |
int ua_stringtable_init | ( | struct ua_stringtable * | st, |
int | num_entries | ||
) |
Initialize the stringtable st
with a map of size num_entries
.
Note: The ua_stringtable_add_string() function only works for stringtables that were initialized with this init function and a size greater 0. It though is not possible to get a string using ua_stringtable_get_string() from such a struct. Returns 0 on success or errorcode on failure.