High Performance OPC UA Server SDK
1.2.0.193
|
Contains a qualified name. More...
#include <qualifiedname.h>
Public Member Functions | |
void | ua_qualifiedname_init (struct ua_qualifiedname *qn) |
Initializes an ua_qualifiedname t with a null name and namespace index zero. | |
void | ua_qualifiedname_clear (struct ua_qualifiedname *qn) |
Clears an ua_qualifiedname t and sets a null name and namespace index to zero. | |
int | ua_qualifiedname_set (struct ua_qualifiedname *qn, uint16_t nsindex, const char *name) |
Set the namespace index and name of an ua_qualifiedname. More... | |
int | ua_qualifiedname_compare (const struct ua_qualifiedname *a, const struct ua_qualifiedname *b) |
Compare two ua_qualifiednames. More... | |
int | ua_qualifiedname_copy (struct ua_qualifiedname *dst, const struct ua_qualifiedname *src) |
Copy the ua_qualifiedname src to dst . More... | |
int | ua_qualifiedname_to_string (const struct ua_qualifiedname *qn, struct ua_string *dst) |
Converts a UA qualified name into an UA string. More... | |
int | ua_qualifiedname_snprintf (char *dst, size_t size, const struct ua_qualifiedname *qn) |
Converts the given UA qualifiedname parameter dt into a string. More... | |
int | ua_qualifiedname_from_string (struct ua_qualifiedname *qn, const struct ua_string *src) |
Parses the given string and creates a qualified name from it. More... | |
Data Fields | |
struct ua_string | name |
The text portion of the QualifiedName. More... | |
uint16_t | nsindex |
Index that identifies the namespace that defines the name. More... | |
Related Functions | |
#define | UA_QUALIFIEDNAME_INITIALIZER { UA_STRING_INITIALIZER, 0 } |
Initializes ua_qualifiedname with namespace index zero and null name. | |
Contains a qualified name.
It is, for example, used as BrowseName. The name part of the QualifiedName is restricted to 512 characters.
int ua_qualifiedname_compare | ( | const struct ua_qualifiedname * | a, |
const struct ua_qualifiedname * | b | ||
) |
Compare two ua_qualifiednames.
int ua_qualifiedname_copy | ( | struct ua_qualifiedname * | dst, |
const struct ua_qualifiedname * | src | ||
) |
Copy the ua_qualifiedname src
to dst
.
int ua_qualifiedname_from_string | ( | struct ua_qualifiedname * | qn, |
const struct ua_string * | src | ||
) |
Parses the given string and creates a qualified name from it.
This is the reverse operation of ua_qualifiedname_to_string.
qn | Pointer to qualfiedname which should be initialized. src The qualified name text input. |
int ua_qualifiedname_set | ( | struct ua_qualifiedname * | qn, |
uint16_t | nsindex, | ||
const char * | name | ||
) |
Set the namespace index and name of an ua_qualifiedname.
This function makes a copy of the name, so the ua_qualifiedname t
must be cleared when no longer needed.
t | ua_qualifiedname to set namespace index and name. |
nsindex | Namespace index to set. |
name | Name to set. |
int ua_qualifiedname_snprintf | ( | char * | dst, |
size_t | size, | ||
const struct ua_qualifiedname * | qn | ||
) |
Converts the given UA qualifiedname parameter dt
into a string.
This functions prints the qualifiedname string into the preallocated buffer dst
. The qualifiedname format is "[<nsidx>:]<name>". The <nsidx> part is optional and is only printed if the nsidx is not zero.
dst | Pointer of preallocated string buffer. |
size | Length of dst in bytes. |
qn | UA QualifiedName input parameter. |
int ua_qualifiedname_to_string | ( | const struct ua_qualifiedname * | qn, |
struct ua_string * | dst | ||
) |
Converts a UA qualified name into an UA string.
This function uses ua_qualifiedname_snprintf to write the formatted string into the UA string buffer. The parameter dst
can be an uninitialized variable. It will be initialized using ua_string_allocate. You must call ua_string_clear to free this resources.
Example:
qn | The UA datetime value |
dst | The UA string which receives the result. |
struct ua_string name |
The text portion of the QualifiedName.
uint16_t nsindex |
Index that identifies the namespace that defines the name.
This index is the index of that namespace in the local Server’s NamespaceArray.
The Client may read the NamespaceArray Variable to access the string value of the namespace.