Add the file transfer tutorial, a custom in-memory backend example, and
build and feature documentation. Wire the public API and tutorial into
the generated driver documentation.
Co-authored-by: Julius Pfrommer <julius.pfrommer@o6-automation.com>
Fix misspellings found with codespell across headers, sources, examples,
tests and the documentation, including "propably" in the nodeset
compiler docs. Identifiers, companion spec names and generated code are
left untouched.
Extend the WebSocket server driver to accept opc.ws:// URLs in addition
to opc.wss://, allowing plain (unencrypted) WebSocket connections without
requiring TLS certificates. TLS credentials are only checked and forwarded
when the configured URL uses the opc.wss:// scheme.
Changes:
- ua_server_ws.c: isWebSocketUrl() now matches both opc.ws:// and
opc.wss://; add isSecureWebSocketUrl() helper; useSSL and TLS params
are conditional on the URL scheme; default port is 4840 for opc.ws://
- ua_server.c: URL validation accepts opc.ws:// alongside opc.wss://;
TLS certificate check only applies when an opc.wss:// URL is present
- ua_util.c: Register opc.ws:// as a valid OPC UA endpoint URL scheme
feat: decouple server-side WS transport wiring from UA_ENABLE_LWS
src/server/ua_server_ws.c only looks up a UA_ConnectionManager named
"websocket" in the EventLoop and drives it through the generic
UA_ConnectionManager interface (URL scheme detection, ServerUrls/
DiscoveryUrls handling) -- it has no libwebsockets dependency of its
own. It was nevertheless gated behind UA_ENABLE_LWS together with the
actual libwebsockets-based ConnectionManager, which requires
UA_ARCHITECTURE_POSIX.
Add a new, independent CMake option UA_ENABLE_WEBSOCKET_TRANSPORT that
enables only the generic driver wiring and the corresponding
UA_ServerConfig fields (webSocketEnabled, webSocketBufSize, ...).
UA_ENABLE_LWS still implies it, so POSIX/libwebsockets builds are
unaffected. This lets a non-POSIX platform provide its own "websocket"
UA_ConnectionManager (e.g. built on a native HTTP/WS stack) without
pulling in libwebsockets.
feat(ws): Always enable WebSocket transport in server core & add encryption mode configuration
- Decouple server-side WebSocket transport wiring from build options so it is always compiled into the server core.
- Make WebSocket transport opt-in via server.config.webSocketEnabled (defaults to false).
- Require a registered "websocket" protocol-provider (ConnectionManager) in EventLoop at startup when webSocketEnabled=true, failing with UA_STATUSCODE_BADCONFIGURATIONERROR if missing.
- Add UA_WebSocketEncryptionMode enum (OPTIONAL, REQUIRED, DISABLED) and webSocketAllowUnencrypted flag (defaults to false) to UA_ServerConfig to control unencrypted opc.ws:// endpoints.
- Log prominent startup warning (UA_LOG_WARNING) when unencrypted opc.ws:// is enabled, as it is non-standard.
- Recognize both opc.ws:// and opc.wss:// in GetEndpoints and assign correct transport profiles (ws-uasc-uabinary / wss-uasc-uabinary).
- Fix default port handling in addWebSocketDiscoveryUrls to prevent skipping DiscoveryUrls when ports are omitted.
- Support short URLs (e.g. opc.ws://a) in UA_parseEndpointUrl by checking per-scheme length.
- Add unit and integration tests covering startup checks, unencrypted opt-in, encryption modes, and short URL parsing.
Refactor the JSON5 configuration parser: replace the jump table dispatch
with direct function calls, improve error handling with early returns.
Move the public API (UA_Server_newFromFile, UA_ServerConfig_loadFromFile)
from the removed server_config_file_based.h into server.h. Add the
server_config_schema.json schema and update the example configuration.