SecureEdgePlatform is an end-to-end C++20 edge-computing sandbox that simulates a secure gateway device. It combines a secure boot pipeline, a sensor telemetry scheduler, multi-channel publishing, and an interactive command shell so you can validate edge scenarios before deploying to real hardware.
- Highlights
- Architecture
- Core Modules
- Prerequisites
- Build
- Run the Platform
- Command Reference
- Configuration & Data
- Testing
- Project Layout
- Development Notes
- Roadmap
- Contact
- Secure boot simulation – validates staged boot policies before telemetry starts.
- Deterministic sensor scheduler – produces reproducible sample streams with configurable fault injection.
- Modular gateway – publishes data to console, file, and agent channels; easy to extend with new transports.
- Interactive shells – operator-facing
PlatformShellplus developer-orientedsensor::EdgeShell. - Lightweight persistence – optional MiniDB-backed logging for sensor history analysis.
- Catch2 coverage – targeted unit tests and a full-platform integration suite.
┌─────────────────────────────┐
│ SecureEdgePlatformRunner │
│ • CLI entry point │
└──────────────▲──────────────┘
│ constructs
│
┌──────────────┴──────────────┐
│ SecureEdgePlatformController│
│ • Secure boot (BootSimulator)│
│ • EdgeGateway lifecycle │
│ • Thread management │
└───────┬───────────┬─────────┘
│ │
│ │ shares scheduler
│ ▼
│ ┌──────────────────────┐
│ │ PlatformShell │
│ │ • Platform commands │
│ │ • Bridges to sensors │
│ └───────────┬──────────┘
│ │ enters on demand
│ ▼
│ ┌──────────────────┐
│ │ sensor::EdgeShell│
│ │ • Sensor control │
│ └──────────────────┘
│
▼
┌──────────────────────────────┐
│ EdgeGateway │
│ • SensorScheduler │
│ • Channel fan-out │
│ • EdgeAgent integration │
└──────────────┬───────────────┘
▼
┌──────────────────────────────┐
│ EdgeAgent & MiniDB │
│ • Telemetry buffering │
│ • Optional persistence │
└──────────────────────────────┘
| Module | Summary |
|---|---|
SecureEdgePlatformRunner |
Binary entry point that launches the platform shell. |
SecureEdgePlatformController |
Orchestrates secure boot, manages the gateway loop, and exposes lifecycle hooks. |
SecureBootSimulator |
Supplies staged boot checks with configurable policies. |
SensorSimulator |
Hosts sensor definitions, the deterministic scheduler, and an interactive sensor shell. |
EdgeGateway |
Loads channel configs, schedules sensors, and publishes telemetry to console, file, and agent channels. |
EdgeAgent |
Buffers telemetry rows and supports custom publishers. |
CppMiniDB |
Lightweight tabular store for sensor logs and queries. |
Supporting libraries (Catch2, nlohmann/json) live under third_party/.
- CMake ≥ 3.10
- A C++20-capable compiler (GCC 11+, Clang 13+, Apple Clang 14+, MSVC 19.30+)
- Standard build toolchain (Make or Ninja)
- Git (optional, for submodule updates – all third-party code is vendored)
From the repository root:
cmake -S . -B build
cmake --build buildThe default build produces every library, test, and executable target. Build individual components as needed, for example:
cmake --build build --target SecureEdgePlatformRunner
cmake --build build --target EdgeGatewayRunner
cmake --build build --target test_full_platformLaunch the interactive platform shell:
./build/SecureEdgePlatformRunner/SecureEdgePlatformRunnerTypical session:
[SecureEdgePlatform Shell] Type 'help' for commands.
> start
[Controller] Starting SecureEdgePlatform...
[BootPhase] Starting secure boot...
[EdgeGateway] Starting run loop. Press Ctrl+C to exit.
> status
[Shell] System running.
> sensors
[Shell] Entering Sensor Management Mode...
EdgeShell> list
TEMP-001
EdgeShell> exit
[Shell] Exited Fault Injection Mode.
> stop
[Controller] Stopping SecureEdgePlatform...
> exit
[Shell] Exiting...
Use Ctrl+C or the stop command to halt the gateway loop when running outside the shell context.
PlatformShell commands available in the runner:
| Command | Purpose |
|---|---|
help |
List available commands. |
boot |
Execute the secure boot sequence without starting the gateway loop. |
start |
Boot (if needed) and launch the gateway loop on a background thread. |
stop |
Signal the gateway loop to stop and join the worker thread. |
status |
Print a basic running-state message. |
flush |
Placeholder for future telemetry flush functionality. |
sensors |
Pause the controller and enter the sensor shell (sensor::EdgeShell). |
exit |
Stop the controller (if running) and terminate the process. |
Inside the sensor shell you can manage sensors (add, remove, inject, tick, export, etc.). See SensorSimulator/README.md for the full catalog.
- Gateway configuration –
EdgeGateway/data/gateway_config.jsonenumerates channel backends (console,file,agent). File channel paths are resolved relative to the config file. - Boot configuration –
SecureBootSimulator/data/boot_config.jsondefines the staged boot policies consumed by the simulator. - MiniDB storage – Sensor logs (when enabled) are written to
SensorSimulator/data/. - Temporary files – Integration tests create isolated temp directories via
std::filesystem::temp_directory_path()and clean them up after execution.
Adjust these files to experiment with new channel configurations, telemetry destinations, or boot policies. Restart the platform (stop → start) after edits.
Catch2-based suites cover individual modules and the full integration path:
| Target | Focus |
|---|---|
test_full_platform |
Exercises gateway channel fan-out, scheduler behaviour, concurrency guards, and controller lifecycle. |
EdgeGateway/test_edgegateway |
Validates channel publishing and configuration parsing. |
SensorSimulator/test_cli, SensorSimulator/test_sensors |
Cover shell workflows and sensor logic. |
SecureBootSimulator/tests/... |
Ensure boot stages and configuration loading behave as expected. |
Run everything with CTest:
ctest --test-dir build --output-on-failureOr target specific suites:
cmake --build build --target test_full_platform
ctest --test-dir build -R FullPlatform::SecureEdgePlatform/
├── CMakeLists.txt
├── README.md
├── CppMiniDB/
├── EdgeAgent/
├── EdgeGateway/
├── SecureBootSimulator/
├── SecureEdgePlatformController/
├── SecureEdgePlatformRunner/
├── SensorSimulator/
├── tests/
└── third_party/
Each module includes its own README detailing design choices and usage.
- Coding standards – modern C++20, prefer RAII, avoid raw pointers unless ownership is explicit. Logging uses
std::cout/std::cerrfor simplicity. - Threading – the controller owns the gateway loop thread. Re-entrancy guards prevent concurrent
runLoop()invocations. - Extensibility – add new gateway channels by implementing
channel::IGatewayChannel; register sensors throughSensorScheduler::addScheduledSensor. - Testing discipline – extend existing Catch2 suites when modifying behaviour. Integration tests live under
tests/test_full_platform.cpp. - Versioning – the repo is preparing for
v1.0. Follow semantic versioning for tagged releases.
- Richer platform status reporting (health metrics, channel counters).
- Configurable persistence backends for
EdgeAgent. - Hot-reloadable gateway configuration and shell autocompletion.
- Additional secure boot stages (cryptographic attestation, policy enforcement).
- CI integration for automated builds and test runs.