How jeanloickdt/instantiot works
InstantIoT is an Arduino library that connects a board to the InstantIoT app. A sketch starts a link and optional destination, services the connection in loop(), sends addressed values, and handles app-originated signals or control gestures through file-scope DSL blocks. Internally, the facade delegates protocol work to the core, which encodes frames and uses a platform-selected transport. The README documents multiple link modes, TLS, replayed state, rate limiting, diagnostics, and timers. Some transport wiring is visible only through the source index; unsampled internals are not inferred.
Main entry points: InstantIoTCore.hpp Runtime core · Transport.h Transport interface · Links.hpp Link selection · wifi Wi-Fi transports
Components 25
Sketch API
- InstantIoT facade
src/InstantIoT.h - Event DSL
src/utils/InstantIoTWhen.hpp - Timers
src/utils/InstantIoTTimer.hpp
Signals and protocol
- Runtime core
src/core/InstantIoTCore.hpp - Binary codec
src/core/BinaryCodec.hpp - Signal model
src/core/InstantIoTSignals.hpp - Event dispatch
src/core/SignalEvents.hpp - Signal mapping
src/core/SignalToWidget.hpp - Protocol messages
src/core/InstantIoTMessage.hpp - Device config
src/core/InstantIoTDeviceConfig.hpp - Message sender
src/core/MessageSender.h
Links and transports
- Link selection
src/Links.hpp - Destinations
src/Destinations.hpp - Transport interface
src/core/Transport.h - TCP session
src/transport/TcpSession.hpp - Wi-Fi transports
src/transport/wifi - Ethernet transports
src/transport/ethernet - Bluetooth transports
src/transport/bluetooth - Serial transports
src/transport/serial
Runtime support
- Platform config
src/InstantIoTConfig.h - TLS trust roots
src/certs/InstantIoT_LE_Roots.h - Connection diagnostics
src/transport/wifi/WiFiReason_ESP32.hpp
Other components
- Arduino sketch
- InstantIoT app
- Cloud or hosted server
Connections 37
- Arduino sketch → InstantIoT facade: starts and calls
README.md - InstantIoT facade → Runtime core: delegates runtime
src/InstantIoT.h - Arduino sketch → Event DSL: declares handlers
README.md - Arduino sketch → Timers: schedules callbacks
README.md - InstantIoT facade → Link selection: selects link
src/InstantIoT.h - InstantIoT facade → Destinations: accepts destination
src/InstantIoT.h - Link selection → Destinations: combines link and destination
src/Links.hpp - Link selection → Wi-Fi transports: selects platform transport
src/Links.hpp - Link selection → Ethernet transports: selects platform transport
src/Links.hpp - Link selection → Bluetooth transports: selects Bluetooth transport
src/Links.hpp - Link selection → Serial transports: selects serial transport
src/Links.hpp - Wi-Fi transports → TCP session: uses TCP session
src/transport/wifi/TlsClient_ESP8266.hpp - Ethernet transports → TCP session: uses TCP session
src/transport/ethernet/EthClient_W5x00.hpp - TCP session → Transport interface: implements interface
src/transport/TcpSession.hpp - Wi-Fi transports → Transport interface: implements interface
src/transport/wifi/TlsClient_ESP32.hpp - Bluetooth transports → Transport interface: implements interface
src/transport/bluetooth/BLE_ESP32.hpp - Serial transports → Transport interface: implements interface
src/transport/serial/HardSerial.hpp - Runtime core → Transport interface: polls and transfers frames
src/core/InstantIoTCore.hpp - Runtime core → Binary codec: encodes and decodes
src/core/InstantIoTCore.hpp - Runtime core → Signal model: uses signal model
src/core/InstantIoTCore.hpp - Runtime core → Event dispatch: dispatches incoming events
src/core/InstantIoTCore.hpp - Event dispatch → Signal model: uses signal definitions
src/core/SignalEvents.hpp - Event DSL → Signal mapping: maps incoming signals
src/utils/InstantIoTWhen.hpp - Signal mapping → Protocol messages: uses message types
src/core/SignalToWidget.hpp - Runtime core → Protocol messages: processes messages
src/core/InstantIoTCore.hpp - Runtime core → Device config: uses device config
src/core/InstantIoTCore.hpp - Runtime core → Message sender: uses sender
src/core/InstantIoTCore.hpp - Platform config → Runtime core: configures runtime limits
src/core/InstantIoTCore.hpp - TLS trust roots → Wi-Fi transports: provides TLS trust roots
src/certs/InstantIoT_LE_Roots.h - Wi-Fi transports → Connection diagnostics: reports Wi-Fi reasons
src/transport/wifi/TlsClient_ESP32.hpp - InstantIoT app → Cloud or hosted server: sends values and gestures
README.md - Cloud or hosted server → InstantIoT app: replays stored state
README.md - InstantIoT app → Transport interface: exchanges app frames
- Transport interface → Cloud or hosted server: connects to destination
README.md - Cloud or hosted server → Transport interface: delivers frames
- Transport interface → Runtime core: returns received bytes
src/core/Transport.h - Runtime core → Arduino sketch: invokes handlers
README.md