Open oberstet opened 7 years ago
The platform runtime support assists in providing a TCP-TLS backed implementation of the byte stream required for the WAMP connection.
At least one concrete WAMP message channel implementation like WAMP-RawSocket-CBOR-(Client) is required. This is used together with above byte stream running over TCP-TLS, parses the byte stream into individual message according to the WAMP-RawSocket framing spec, deserializes message payloads according to CBOR and forwards the object to the WAMP session object the message channel is attached to.
The WAMP session implements the core of the WAMP protocol: the client peer side of the conversation with the WAMP router connected to, as well as the user side of app code running.
A concrete first alpha goal for the library is to support the following example program.
The program is a simple C user program exposing a hardware button and a hardware LED as a WAMP component in a Crossbar.io based IoT system.
The user program interfaces with the hardware, registers a C procedure as a WAMP procedure to control the LED, and publishes WAMP events whenever the button is pressed.
For this, the user program creates a WAMP session object and uses that for registering, subscribing, calling and publishing. The session object is attached to a transport object that is a concrete implementation of an abstract stream transport.
The concrete stream transport is implemented for two platforms: Espressif ESP32 and ST STM32 F7, and runs on top of FreeRTOS, lwIP and mbedTLS.
The session object on the other hand is implemented in pure C and completely TLS, networking, OS, platform, SoC and CPU agnostic.
The library could be structured into: