High Performance OPC UA Server SDK
1.2.0.193
|
UA File Writer. More...
#include <file_writer.h>
Public Member Functions | |
int | ua_file_writer_open (struct ua_file_writer *w, const char *filename) |
Creates a new file for writing and writes the file header, the global extension table, string tables and namespaces tables. More... | |
int | ua_file_writer_add_stringtables (struct ua_file_writer *w, unsigned int num_strings, const char *locales) |
Creates a strings table for each locale. More... | |
Data Fields | |
char * | filename |
ua_file_t | f |
uint32_t | num_reqnamespaces |
uint32_t | num_namespaces |
struct ua_file_node_stat | stat |
uint32_t | num_stringtables |
struct ua_file_stringtable * | stringtables |
struct ua_file_namespace * | reqnamespacetable |
struct ua_file_namespace * | namespacetable |
struct ua_file_extensions | extensions |
UA File Writer.
This object is used to serialize UA information models into the Unified Automation UA Binary File Format. This is used on PCs for xml2bin and is not intended for embedded systems.
int ua_file_writer_add_stringtables | ( | struct ua_file_writer * | w, |
unsigned int | num_strings, | ||
const char * | locales | ||
) |
Creates a strings table for each locale.
The locales are separated by ";", the default locale can be an empty string "". Examples:
Only the default locale: "" Two locales: ";de-DE", or "en-US;de-DE"
w | pointer to file writer |
num_strings | numbers of strings per table (table size). |
locales | String with locales. This indicates the number of string tables. |
int ua_file_writer_open | ( | struct ua_file_writer * | w, |
const char * | filename | ||
) |
Creates a new file for writing and writes the file header, the global extension table, string tables and namespaces tables.
Thus you must add this information before invoking this method. Then you can add all nodes and references and finally close the file writer.
Correct order of calls:
w | File writer instance. |
filename | Filename to create. |