AlexaCapability replaces the header-only AlexaInterface as what a device holds: 116 bytes with fixed places for
3 names, 4 action mappings and 2 state mappings, no std::vector or std::string. AlexaInterface and AlexaActions
stay as 1.x names; the five examples compile unchanged and announce the same bytes.
addCapability(row, instance) adds several capabilities of one generic controller. An instanced interface without
an instance or a name, an instance or semantics on an interface that takes none, and a full store are refused
with an ERROR line that says what to change.
PlaybackController and WakeOnLANController announce "properties": {} (AIF_EMPTY_PROPERTIES).
basicLight on a D1 mini: static RAM 30,788 -> 30,672 B, flash 330,509 -> 332,541 B; host tests 61 -> 77.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
19 lines
863 B
INI
19 lines
863 B
INI
; Development project of the library itself. A sketch does not need this file: it gets the library through
|
|
; lib_deps (readme.md, Quick Start).
|
|
;
|
|
; pio test -e native host tests of the bridge logic (src/AlexaBridgeLogic.cpp) and of discovery
|
|
; (src/AlexaDevice.cpp, src/AlexaCapability.cpp, src/AlexaInterfaces.cpp); no board, no broker
|
|
|
|
[platformio]
|
|
default_envs = native
|
|
|
|
[env:native]
|
|
platform = native
|
|
test_framework = unity
|
|
; Only the sources without a hardware dependency are compiled with the tests
|
|
test_build_src = yes
|
|
build_src_filter = -<*> +<AlexaBridgeLogic.cpp> +<AlexaCapability.cpp> +<AlexaDevice.cpp> +<AlexaInterfaces.cpp> +<AlexaLog.cpp>
|
|
lib_deps =
|
|
bblanchon/ArduinoJson@^7
|
|
; test/host_arduino holds the Arduino.h of the host: String, Print and Serial
|
|
build_flags = -std=gnu++17 -Wall -Wextra -Itest/host_arduino
|