High Performance OPC UA Server SDK  1.2.0.193
ua_stringtable Struct Reference

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_mapmap
 
struct ua_stringtable
 
int table_num_elements
 

Member Function Documentation

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.

Parameters
stinitialized stringtable to add string to.
stringto add, st stores a copy so this string can savely be cleard after adding.
indexreference to an integer where the index of the stored string can be written to. May be NULL if index is not relvant.
Returns
0 on success or errorcode on failure.
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.

Parameters
stthe decoded stringtable.
stringthe caller must provide a ua_string struct, where the string will be filled into. On success the caller is responsible to clear this string.
indexof the string to get.
Returns
0 on success or errorcode on failure.
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.


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