High Performance OPC UA Server SDK
1.7.1.383
|
File extension registry for maintaining a list of known namespace URIs. More...
Data Structures | |
struct | ua_file_extension_registry |
struct | ua_file_extension_authorization |
Authorization information. More... | |
struct | ua_file_extension_generator |
This contains information about the tool which has generated the file. More... | |
struct | ua_file_extension |
A file extension allows to add vendor specific information to each node, namespace or global file header. More... | |
Functions | |
UAFILEFORMAT_EXPORT int | ua_file_extension_registry_init (struct ua_file_extension_registry *reg, unsigned int size) |
Intializes a extension uri registry of given size. More... | |
UAFILEFORMAT_EXPORT void | ua_file_extension_registry_clear (struct ua_file_extension_registry *reg) |
Frees all memory referenced by the given registry. More... | |
UAFILEFORMAT_EXPORT int | ua_file_extension_registry_lookup (struct ua_file_extension_registry *reg, const char *uri) |
Searches for the given uri in the registry. More... | |
UAFILEFORMAT_EXPORT int | ua_file_extension_registry_add_uri (struct ua_file_extension_registry *reg, const char *uri) |
Adds the given uri to the registry. More... | |
UAFILEFORMAT_EXPORT const char * | ua_file_extension_registry_get_uri (struct ua_file_extension_registry *reg, unsigned int index) |
Returns the URI for the given URI index. More... | |
UAFILEFORMAT_EXPORT int | ua_file_extension_set_authorization (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, const struct ua_file_extension_authorization *auth) |
UAFILEFORMAT_EXPORT int | ua_file_extension_get_authorization (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, struct ua_file_extension_authorization *auth) |
UAFILEFORMAT_EXPORT int | ua_file_extension_set_runtimeaddress (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, const struct ua_string *address) |
UAFILEFORMAT_EXPORT int | ua_file_extension_get_runtimeaddress (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, struct ua_string *address) |
UAFILEFORMAT_EXPORT int | ua_file_extension_set_documentation (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, const struct ua_string *doc) |
UAFILEFORMAT_EXPORT int | ua_file_extension_get_documentation (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, struct ua_string *doc) |
UAFILEFORMAT_EXPORT int | ua_file_extension_set_xml (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, const struct ua_string *xml) |
UAFILEFORMAT_EXPORT int | ua_file_extension_get_xml (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, struct ua_string *xml) |
UAFILEFORMAT_EXPORT void | ua_file_extension_generator_init (struct ua_file_extension_generator *generator) |
Initializes the generator info structure. | |
UAFILEFORMAT_EXPORT void | ua_file_extension_generator_clear (struct ua_file_extension_generator *generator) |
Clears the generator info structure. | |
UAFILEFORMAT_EXPORT int | ua_file_extension_set_generator (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, const struct ua_file_extension_generator *generator) |
UAFILEFORMAT_EXPORT int | ua_file_extension_get_generator (struct ua_file_extension_registry *reg, struct ua_file_extension *ex, struct ua_file_extension_generator *generator) |
#define | UA_EXTENSION_UNIFIEDAUTOMATION_URI "extension://unifiedautomation" |
Unified Automation Extension URI. | |
#define | UA_EXTENSION_USERDB 0 |
User database extension. | |
#define | UA_EXTENSION_GROUPDB 1 |
Group database extension. | |
#define | UA_EXTENSION_PASSDB 2 |
Password database extension. | |
#define | UA_EXTENSION_GENERATOR 3 |
Generator information extension. | |
#define | UA_EXTENSION_ENGINFO 4 |
Engineering Info extension. | |
#define | UA_EXTENSION_AUTHORIZATION 5 |
Authorization extension. | |
#define | UA_EXTENSION_RUNTIMEADDRESS 6 |
Runtime address extension. More... | |
#define | UA_EXTENSION_DOCUMENTATION 7 |
Documentation extension. More... | |
#define | UA_EXTENSION_XML 8 |
Raw XML extension. More... | |
File extension registry for maintaining a list of known namespace URIs.
#define UA_EXTENSION_DOCUMENTATION 7 |
Documentation extension.
This contents of UA NodeSet File's <Documentation>
element will be converted into this extension. Example fragment:
The contents "Example" gets extracted by xml2bin and is stored in ua_file_extension bytestring.
#define UA_EXTENSION_RUNTIMEADDRESS 6 |
Runtime address extension.
This is a Unified Automation specific extension, wich can contain a textual runtime address. Example fragment:
The contents "modbus://40001" gets extracted by xml2bin and is stored in ua_file_extension bytestring.
#define UA_EXTENSION_XML 8 |
Raw XML extension.
Any unknown XML extension that is not understood by xml2bin gets converted as-is into this extension. In this case the ua_file_extension contains the fill XML snippet, which then can be parsed on application level.
The contents <Extension>
element gets extracted by xml2bin and is stored in ua_file_extension bytestring, keeping all the subelements of <Extension>
. In this case the bytestring will contains this:
This includes all formatting like linebreaks and whitespaces. It makes sense to use unformatted XML fragments to reduce the XML overhead.
UAFILEFORMAT_EXPORT int ua_file_extension_registry_add_uri | ( | struct ua_file_extension_registry * | reg, |
const char * | uri | ||
) |
Adds the given uri to the registry.
This function does create a copy of the URI string.
reg | The registry context. |
uri | URI to add. |
UAFILEFORMAT_EXPORT void ua_file_extension_registry_clear | ( | struct ua_file_extension_registry * | reg | ) |
Frees all memory referenced by the given registry.
This includes memory allocated by ua_file_extension_registry_init and ua_file_extension_registry_add_uri.
UAFILEFORMAT_EXPORT const char* ua_file_extension_registry_get_uri | ( | struct ua_file_extension_registry * | reg, |
unsigned int | index | ||
) |
Returns the URI for the given URI index.
reg | The registry context. |
index | Index of URI returned by ua_file_extension_registry_add_uri. |
UAFILEFORMAT_EXPORT int ua_file_extension_registry_init | ( | struct ua_file_extension_registry * | reg, |
unsigned int | size | ||
) |
Intializes a extension uri registry of given size.
Use ua_file_extension_registry_clear the free all resources allocated by ua_file_extension_registry_init.
reg | The registry context. |
size | Maximum number of entries in registry. |
UAFILEFORMAT_EXPORT int ua_file_extension_registry_lookup | ( | struct ua_file_extension_registry * | reg, |
const char * | uri | ||
) |
Searches for the given uri in the registry.
reg | The registry context. |
uri | URI to search for. |