Skip to content

Commit 96eada1

Browse files
committed
v2.0.5: ECP Protocol — open-source release
Binary emergency communication protocol for safety-critical systems. 96% data reduction vs JSON, 85-93% vs CAP XML. Apache 2.0 licensed.
0 parents  commit 96eada1

162 files changed

Lines changed: 14807 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.{cs,csx}]
12+
indent_size = 4
13+
14+
[*.{json,yml,yaml}]
15+
indent_size = 2
16+
17+
[*.md]
18+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Normalize text files in repository
2+
* text=auto
3+
4+
# Keep source and docs with LF for consistency
5+
*.cs text eol=lf
6+
*.csproj text eol=lf
7+
*.props text eol=lf
8+
*.targets text eol=lf
9+
*.md text eol=lf
10+
*.json text eol=lf
11+
*.yml text eol=lf
12+
*.yaml text eol=lf
13+
*.sh text eol=lf
14+
15+
# Visual Studio solution files are conventionally CRLF
16+
*.sln text eol=crlf
17+
18+
# Binary assets/packages
19+
*.png binary
20+
*.jpg binary
21+
*.jpeg binary
22+
*.gif binary
23+
*.ico binary
24+
*.nupkg binary
25+
*.snupkg binary
26+
*.dll binary
27+
*.exe binary
28+
*.pdb binary
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Bug Report
2+
description: Report a bug or unexpected behavior in ECP
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for taking the time to report a bug.
10+
Please fill out the sections below to help us understand and reproduce the issue.
11+
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Description
16+
description: A clear and concise description of the bug.
17+
placeholder: "When I call Ecp.Alert() with severity 0, an ArgumentException is thrown."
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: steps
23+
attributes:
24+
label: Steps to reproduce
25+
description: Minimal steps to reproduce the behavior.
26+
placeholder: |
27+
1. Install ECP.Core (the version you are using)
28+
2. Call Ecp.Alert(severity: 0, category: 1, zoneHash: 100)
29+
3. See exception
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: expected
35+
attributes:
36+
label: Expected behavior
37+
description: What you expected to happen.
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: actual
43+
attributes:
44+
label: Actual behavior
45+
description: What actually happened. Include the full exception message and stack trace if applicable.
46+
validations:
47+
required: true
48+
49+
- type: input
50+
id: ecp-version
51+
attributes:
52+
label: ECP package and version
53+
description: Which ECP package(s) and version are you using?
54+
placeholder: "ECP.Core x.y.z"
55+
validations:
56+
required: true
57+
58+
- type: input
59+
id: dotnet-version
60+
attributes:
61+
label: .NET version
62+
description: "Output of: dotnet --version"
63+
placeholder: "8.0.x"
64+
validations:
65+
required: true
66+
67+
- type: dropdown
68+
id: os
69+
attributes:
70+
label: Operating system
71+
options:
72+
- Windows
73+
- Linux
74+
- macOS
75+
- Other
76+
validations:
77+
required: true
78+
79+
- type: textarea
80+
id: additional
81+
attributes:
82+
label: Additional context
83+
description: Any other context, logs, or screenshots that might help.
84+
validations:
85+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Feature Request
2+
description: Suggest a new feature or improvement for ECP
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thank you for suggesting an improvement.
10+
Please describe your idea so we can evaluate it properly.
11+
12+
- type: textarea
13+
id: problem
14+
attributes:
15+
label: Problem or use case
16+
description: What problem does this feature solve? Or what use case does it enable?
17+
placeholder: "I need to send alerts over LoRa, but there is no transport adapter for it."
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: solution
23+
attributes:
24+
label: Proposed solution
25+
description: Describe how you think this could work. Include API examples if possible.
26+
placeholder: |
27+
A new ECP.Transport.LoRa package that implements IEcpTransport
28+
for LoRa radio communication.
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: alternatives
34+
attributes:
35+
label: Alternatives considered
36+
description: Have you considered any alternative solutions or workarounds?
37+
validations:
38+
required: false
39+
40+
- type: dropdown
41+
id: packages
42+
attributes:
43+
label: Related package(s)
44+
description: Which ECP package(s) would this feature affect?
45+
multiple: true
46+
options:
47+
- ECP.Core
48+
- ECP.Registry
49+
- ECP.Cascade
50+
- ECP.Standard
51+
- ECP.DependencyInjection
52+
- ECP.Transport.Abstractions
53+
- ECP.Transport.WebSocket
54+
- ECP.Transport.SignalR
55+
- ECP.Compatibility
56+
- New package
57+
validations:
58+
required: true
59+
60+
- type: textarea
61+
id: additional
62+
attributes:
63+
label: Additional context
64+
description: Any other context, mockups, or references that might help.
65+
validations:
66+
required: false

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-and-test:
14+
name: Build & Test
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ ubuntu-latest, windows-latest, macos-latest ]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: '8.0.x'
27+
28+
- name: Restore dependencies
29+
run: dotnet restore
30+
31+
- name: Build
32+
run: dotnet build --no-restore -c Release
33+
34+
- name: Test
35+
run: dotnet test --no-build -c Release --verbosity normal

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
bin/
2+
obj/
3+
BenchmarkDotNet.Artifacts/
4+
nupkg/
5+
artifacts/
6+
TestResults/
7+
*.nupkg
8+
*.snupkg
9+
*.trx
10+
*.user
11+
.vs/
12+
.idea/
13+
*.suo
14+
15+
# OS
16+
Desktop.ini
17+
Thumbs.db
18+
.DS_Store
19+
~$*
20+
21+
# Cursor / VS Code
22+
.cursor/
23+
.cursorrules
24+
.vscode/

CHANGELOG.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Changelog
2+
3+
All notable changes to ECP-SDK will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/).
7+
8+
---
9+
10+
## [2.0.5] — 2026-03-12
11+
12+
### Improved
13+
- Updated README with complete package examples for all free packages
14+
(Registry, Cascade, Compatibility, DI, Transport) and corrected test count.
15+
- Aligned test project dependencies (xunit 2.9.2, Test.Sdk 17.11.1) and
16+
CA1707 analyzer settings across all 10 test projects.
17+
- Removed hardcoded version references from CONTRIBUTING.md, SECURITY.md,
18+
and issue templates to prevent version drift on future releases.
19+
20+
---
21+
22+
## [2.0.4] — 2026-03-12
23+
24+
### Improved
25+
- NuGet package quality: XML documentation for IntelliSense, Source Link
26+
for source-level debugging, deterministic builds, and per-package
27+
descriptions.
28+
29+
---
30+
31+
## [2.0.1] — 2026-03-01
32+
33+
### Added
34+
- Support for unsigned envelopes (HMAC length 0) in envelope builder and
35+
decoders, enabling use in trusted internal networks where cryptographic
36+
signing is not required.
37+
38+
### Changed
39+
- HMAC length validation now accepts 0 (unsigned) or 8–16 bytes (signed).
40+
41+
---
42+
43+
## [2.0.0] — 2026-02-09
44+
45+
Initial public release.
46+
47+
### Core Protocol
48+
- **Universal Emergency Token (UET)** — 8-byte binary token encoding
49+
emergency type, priority, action flags, zone, timestamp, and confirmation
50+
hash.
51+
- **Emergency Envelope** — Variable-length binary envelope (45–100 bytes
52+
typical) with HMAC-SHA256 authentication, priority, TTL, and metadata.
53+
- **Progressive API** — Four levels of control: one-liner (`Ecp.Alert`),
54+
token (`Ecp.Token`), builder (`Ecp.Envelope().Build()`), and
55+
zero-allocation (`WriteTo(Span<byte>)`).
56+
- **Auto-detection decode**`Ecp.TryDecode` automatically distinguishes
57+
UET from Envelope format based on message structure.
58+
59+
### Security
60+
- HMAC-SHA256 message authentication with configurable length (8–16 bytes).
61+
- AES-GCM authenticated encryption (optional).
62+
- Key rotation via versioned `KeyRing`.
63+
- Anti-replay protection via timestamps.
64+
65+
### Compression
66+
- Two-level semantic dictionary (global + tenant) for payload compression.
67+
- Multilingual template engine with positional parameters.
68+
69+
### Delivery
70+
- Cascade broadcast with adaptive fan-out and confirmation aggregation.
71+
- Zone-based confirmation aggregation.
72+
73+
### Transport
74+
- Transport-agnostic design with pluggable implementations.
75+
- WebSocket and SignalR transports included.
76+
- JSON-to-ECP compatibility bridge for migration.
77+
78+
### Dependency Injection
79+
- `AddEcpCore()` — Registers core protocol services.
80+
- `AddEcpStandard()` — Registers full stack (Core + Registry + Cascade).
81+
- `AddEcpProfile()` — Preset profiles (Minimal, Standard, Enterprise).
82+
- Configurable options via `EcpOptions`.
83+
84+
### Platform
85+
- .NET 8.0
86+
- Zero external dependencies in `ECP.Core`.
87+
- 181 automated tests.
88+
89+
---
90+
91+
## License
92+
93+
Free packages in this repository are licensed under Apache 2.0.
94+
Premium modules (for example `ECP.Offline` and enterprise diagnostics) are
95+
distributed under separate commercial terms.
96+
See [LICENSE.txt](LICENSE.txt) and [NOTICE](NOTICE) for legal terms and notices.
97+
Patent pending (UIBM).

0 commit comments

Comments
 (0)