open62541-sys 0.3.0

Low-level, unsafe bindings for the C99 library open62541, an open source and free implementation of OPC UA (OPC Unified Architecture).
Documentation
#include <open62541/server.h>
#include <open62541/server_config_default.h>
#include <open62541/client.h>
#include <open62541/client_config_default.h>
#include <open62541/client_highlevel.h>
#include <open62541/client_highlevel_async.h>
#include <open62541/client_subscriptions.h>
#include <open62541/plugin/log_stdout.h>
#include <open62541/types.h>

// Include with binding of `vsnprintf()` and `va_list` functions to simplify formatting of log messages.
#include <stdio.h>
#include <stdarg.h>

// bindgen does not support non-trivial `#define` used for pointer constant. Use
// statically defined constant as workaround for now.
//
// See https://github.com/rust-lang/rust-bindgen/issues/2426
extern const void *const RS_EMPTY_ARRAY_SENTINEL;

// Wrapper for `vsnprintf()` with normalized behavior across different platforms
// such as Microsoft Windows.
//
// Other than the standard `vsnprintf()`, this implementation copies the `va_list`
// argument before passing it along to allow repeated calls. The caller is responsible
// to invoke `vsnprintf_va_end()` on the `va_list` argument eventually.
int vsnprintf_va_copy(
    char *buffer,
    size_t count,
    const char *format,
    va_list args);

// Wrapper for `va_end()` that is supposed to be used with `vsnprintf_va_copy()`.
void vsnprintf_va_end(va_list args);