Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 56 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Tests

on:
push:
branches:
- main
- feature/observable-callback-coverage
pull_request:
branches:
- main
Expand All @@ -14,47 +11,82 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify core Command remains Event-free
run: |
if grep -R -nE '#[[:space:]]*include[[:space:]]*[<\"]ESPressio_(Event|CommandEvents|CommandRegistryEventBridge)' src/ESPressio_Command.hpp src/ESPressio_Commands.hpp; then
echo 'Core Command umbrella must not acquire Event integration.'
exit 1
fi
- name: Configure
run: cmake -S tests -B build
- name: Build
run: cmake --build build --parallel
- name: Test
run: ctest --test-dir build --output-on-failure

esp32-example:
esp32-event-integration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: project/ESPressio-Command
- uses: actions/checkout@v4
with:
repository: Flowduino/ESPressio-Observable
ref: 3.0.1
path: deps/ESPressio-Observable
path: project/dependencies/ESPressio-Observable
- uses: actions/checkout@v4
with:
repository: Flowduino/ESPressio-Units
ref: 0.2.3
path: project/dependencies/ESPressio-Units
- uses: actions/checkout@v4
with:
repository: Flowduino/ESPressio-Timing
ref: 2.2.4
path: project/dependencies/ESPressio-Timing
- uses: actions/checkout@v4
with:
repository: Flowduino/ESPressio-Threads
ref: 3.1.4
path: project/dependencies/ESPressio-Threads
- uses: actions/checkout@v4
with:
repository: Flowduino/ESPressio-Event
ref: 6.0.0
path: project/dependencies/ESPressio-Event
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install PlatformIO
run: pip install platformio
- name: Create PlatformIO consumer project
- name: Create Event integration compile project
shell: bash
run: |
mkdir -p "$RUNNER_TEMP/espressio-command-ci/src" "$RUNNER_TEMP/espressio-command-ci/lib"
rsync -a --exclude='.git' --exclude='deps' --exclude='build' ./ "$RUNNER_TEMP/espressio-command-ci/lib/ESPressio-Command/"
cp -R deps/ESPressio-Observable "$RUNNER_TEMP/espressio-command-ci/lib/ESPressio-Observable"
cat > "$RUNNER_TEMP/espressio-command-ci/platformio.ini" <<'EOF'
[env:esp32dev]
mkdir -p project/compile/src
cat > project/compile/platformio.ini <<'EOF'
[env:esp32]
platform = espressif32
board = esp32dev
framework = arduino
build_flags =
-std=gnu++17
-frtti
build_unflags =
-std=gnu++11
-fno-rtti
build_flags = -std=gnu++17 -frtti
build_unflags = -std=gnu++11 -fno-rtti
lib_ldf_mode = deep+
lib_deps =
ESPressio-Command
ESPressio-Observable
../dependencies/ESPressio-Observable
../dependencies/ESPressio-Units
../dependencies/ESPressio-Timing
../dependencies/ESPressio-Threads
../dependencies/ESPressio-Event
../ESPressio-Command
EOF
- name: Compile BasicCommand
shell: bash
run: |
cp examples/BasicCommand/BasicCommand.ino "$RUNNER_TEMP/espressio-command-ci/src/main.cpp"
pio run -d "$RUNNER_TEMP/espressio-command-ci"
cat > project/compile/src/main.cpp <<'EOF'
#include <Arduino.h>
#include <ESPressio_Command.hpp>
#include <ESPressio_CommandEvents.hpp>
#include <ESPressio_CommandRegistryEventBridge.hpp>
void setup() { ESPressio::Event::CommandRegistryEventBridge::GetInstance().Initialize(); }
void loop() {}
EOF
- name: Compile Command Event integration
run: pio run -d project/compile
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 0.4.0 — 2026-08-21

### Added

- Moved Command registry Event types and `CommandRegistryEventBridge` ownership into ESPressio Command.
- Added an opt-in Command -> Event integration targeting ESPressio Event 6.0.0 while keeping the normal Command core independent of Event.

### Changed

- Preserved the existing `ESPressio_CommandEvents.hpp` and `ESPressio_CommandRegistryEventBridge.hpp` public names in their new owning package.
- Updated package metadata, documentation, dependency charts, and CI for the 0.4.0 architecture.
- The normal Command umbrella remains Event-free; Event is required only when the Event bridge headers are selected.

### Compatibility

- Core Command APIs and registry behavior are unchanged.
- Applications using the Event bridge must obtain the bridge headers from ESPressio Command 0.4.0 rather than ESPressio Event 6.0.0.

### Tracking

- Implements #3.
- Coordinated with Flowduino/ESPressio-Event#35.

## 0.3.0

- Added `ICommandRegistryObserver` and observer registration on `CommandRegistry`.
Expand Down
7 changes: 7 additions & 0 deletions DEPENDENCY_BOUNDARIES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ESPressio Command Dependency Boundaries

ESPressio Command owns Command-specific lifecycle semantics and their optional Event representation.

The core Command mechanism depends on Observable and remains independent of ESPressio Event. `CommandRegistryEventBridge` and the Command Event family are optional integration headers owned by Command and may depend on Event only when explicitly selected.

The normal Command umbrella must remain free of Event includes.
50 changes: 22 additions & 28 deletions ESPRESSIO_DEPENDENCY_CHART.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
# ESPressio Dependency Chart
# ESPressio Dependency Chart — Command 0.4.0

## Purpose
![ESPressio Library Dependency Chart](ESPRESSIO_DEPENDENCY_CHART.svg)

This document describes ESPressio Command's place within the ESPressio library ecosystem.

- **Solid arrow** — required ESPressio dependency.
- **Dashed arrow** — opt-in dependency activated only by the associated feature/header.
- Arrows point from the dependent library to the library it consumes.

## ESPressio Command 0.2.0

ESPressio Command has **no required ESPressio dependencies**.

The core remains transport-neutral and independently usable:
## Command 0.4.0

```text
ESPressio Command 0.2.0
|
+-- no required ESPressio dependencies
Command 0.4.0
-> Observable >= 3.0.1 < 4.0.0
- - -> Event >= 6.0.0 < 7.0.0
Command Event types / CommandRegistryEventBridge only
```

Higher-level libraries may optionally consume Command:
The Event relationship is opt-in. Normal Command use remains Event-free.

## Final coordinated ecosystem

```text
ESPressio Serial 0.4.0
- - -> ESPressio Command >= 0.2.0 < 1.0.0
Observable 3.0.1
Serializable 0.10.2
Units 0.2.3
Timing 2.2.4
Threads 3.1.4
Command 0.4.0
Security 0.3.0
Event 6.0.0
Sockets 0.6.0
ESP-Now 0.6.0
Serial 0.6.0
```

Serial's `CommandConsole` adapts Stream/Console input to the shared Command registry, while its Command-backed EventConsole registers an `event` subtree using ownership-safe registration handles.

The dependency direction is intentionally one-way: Command does not depend on Serial, Event, Serializable, Sockets, networking transports, or Arduino `Stream`/`Print`.

## Design rule

Future transport/protocol integrations should depend on ESPressio Command rather than adding those transports as dependencies of the Command core.

Examples include future Serial, USB CDC, TCP, WebSocket, BLE, HTTP/RPC, Serializable, or Event bridge integrations.
Command owns its Command-specific Event bridge. Event 6.0.0 does not depend back on Command, so no reciprocal edge remains.
1 change: 1 addition & 0 deletions ESPRESSIO_DEPENDENCY_CHART.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading