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
20 changes: 19 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,26 @@ jobs:
- uses: actions/download-artifact@v4
with:
path: artifacts
# Every platform artifact carries the same docs (README.md, LICENSE, ...).
# Uploading two assets with one name makes the release action fail part-way
# and leaves a draft release behind (a real tagged release hit this). Flatten the
# artifacts into one folder with a single copy of each file name, and stop
# if two files share a name but differ.
- name: Collect release assets (one copy of each file name)
shell: bash
run: |
mkdir -p release
find artifacts -type f | sort | while read -r f; do
name=$(basename "$f")
if [ -e "release/$name" ]; then
cmp -s "$f" "release/$name" || { echo "FAIL: two different files are both named $name ($f)"; exit 1; }
else
cp "$f" "release/$name"
fi
done
ls -l release
- uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
generate_release_notes: true
files: artifacts/**/*
files: release/*
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Interactive keys while running: `h` help, `q` quit, up/down nudge Analog Input 1

## Conventions

- Device is named "Rainbow"; objects use the series' colour names; vendor id 389.
- Device is named "Chipkin Example B-RTR"; objects use the series' colour names; vendor id 389.
- Implement **only** the services and objects the B-RTR profile requires - but
expose **every required property** of each object for Protocol_Revision 24.
- Outputs are **commandable**: store the 16-slot `Priority_Array` +
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.2] - unreleased

### Changed

- **Device renamed from the series' colour placeholder "Rainbow" to "Chipkin
Example B-RTR"** so devices from different examples in the series are
distinguishable from each other on the same BACnet network - every example
previously announced the identical Object_Name "Rainbow", which made two
examples on one subnet indistinguishable by name. Sub-object names (Analog
Input 1 "Bronze", etc.) are unchanged - only the Device object's name
changed. `docs/colour-table.md` (series root) updated to match. APP_VERSION
bumped 1.0.1 -> 1.0.2.

## [Unreleased]

### Changed — documentation restructure, single-command build
Expand Down Expand Up @@ -66,6 +79,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
release refreshes them under the documented SOURCE build, matching the
series convention.

## [1.0.1] - unreleased

### Fixed

- **`Application_Software_Version` (12) and `Firmware_Revision` (44) were
hardcoded and never wired up**, despite a comment flagging the gap
("Change both to your product's REAL firmware / application software
versions"). Fixed: `Application_Software_Version` now reads `APP_VERSION`
directly (one source of truth, can't drift from `--version`'s own banner).
`Firmware_Revision` is now built at runtime from the CAS BACnet Stack's own
`BACnetStack_GetAPIMajorVersion()`/`GetAPIMinorVersion()`/
`GetAPIPatchVersion()`/`GetAPIBuildVersion()` (the same 4 calls
`common/CASExampleHelper.cpp`'s `PrintVersion()` already uses for the
startup banner), populated once right after `LoadBACnetFunctions()`
succeeds. Code-read verification: `Application_Software_Version` now
returns `"1.0.1"`, `Firmware_Revision` now returns the pinned stack's real
`major.minor.patch.build` (e.g. `"6.0.21.0"`) instead of the stale
hardcoded `"1.0.0"` for both.

## [1.0.0] - unreleased

### Added
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ discoverable via **Who-Is / I-Am**. It is the series' canonical example for
## The device this example creates

```
Device 389018 "Rainbow" (Vendor 389 - Chipkin Automation Systems)
Device 389018 "Chipkin Example B-RTR" (Vendor 389 - Chipkin Automation Systems)
|
+-- Analog Input 1 "Bronze" Present_Value 21.5 (REAL, degrees Celsius; read-only)
+-- Binary Input 1 "Emerald" Present_Value inactive (0 = inactive / 1 = active; read-only)
Expand Down Expand Up @@ -93,7 +93,7 @@ alarming, scheduling, or trending - not required by B-RTR.

| Object type | Instance | Name | Access |
|-------------|:--------:|------|--------|
| Device | 389018 | Rainbow | - |
| Device | 389018 | Chipkin Example B-RTR | - |
| Analog Input | 1 | Bronze | read-only |
| Binary Input | 1 | Emerald | read-only |
| Multi-State Input | 1 | Hot Pink | read-only |
Expand Down Expand Up @@ -197,7 +197,7 @@ FYI: Listening for BACnet/IP on UDP port 47809 (Network Port 2).
TX 21 bytes to 192.168.3.255:47808 (broadcast) (Network Port 1)
TX 21 bytes to 192.168.3.255:47809 (broadcast) (Network Port 2)
FYI: I-Am-Router-To-Network broadcast on Network Port 1 (Vermilion): sent; on Network Port 2 (Vermilion 2): sent
FYI: Device 389018 ("Rainbow") ready. Vendor ID 389. Routing network 1 (Vermilion, UDP 47808) <-> network 2 (Vermilion 2, UDP 47809). Press 'h' for help.
FYI: Device 389018 ("Chipkin Example B-RTR") ready. Vendor ID 389. Routing network 1 (Vermilion, UDP 47808) <-> network 2 (Vermilion 2, UDP 47809). Press 'h' for help.
```

The device listens on UDP **47808** and **47809** by default. Allow both ports
Expand Down Expand Up @@ -238,7 +238,7 @@ You need a BACnet client, such as the

1. **Discover on each network independently** - ReadProperty of Device
`Object_Name` succeeds directly against `127.0.0.1:47808` (network 1) AND
`127.0.0.1:47809` (network 2), both returning `"Rainbow"` (DS-RP-B works on
`127.0.0.1:47809` (network 2), both returning `"Chipkin Example B-RTR"` (DS-RP-B works on
both ports).
2. **Network_Number / Network_Number_Quality** - ReadProperty of Network Port 1's
`Network_Number` = `1`, `Network_Number_Quality` = `configured`; Network Port
Expand Down
3 changes: 3 additions & 0 deletions common/CASBACnetStackExampleConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ static const uint32_t PROPERTY_IDENTIFIER_APPLICATION_SOFTWARE_VERSION = 12;
static const uint32_t PROPERTY_IDENTIFIER_APDU_LENGTH = 399;
static const uint32_t PROPERTY_IDENTIFIER_DESCRIPTION = 28;
static const uint32_t PROPERTY_IDENTIFIER_FIRMWARE_REVISION = 44;
static const uint32_t PROPERTY_IDENTIFIER_LOCAL_DATE = 56;
static const uint32_t PROPERTY_IDENTIFIER_LOCAL_TIME = 57;
static const uint32_t PROPERTY_IDENTIFIER_LOCATION = 58;
static const uint32_t PROPERTY_IDENTIFIER_MODEL_NAME = 70;
static const uint32_t PROPERTY_IDENTIFIER_IP_ADDRESS = 400;
static const uint32_t PROPERTY_IDENTIFIER_IP_DEFAULT_GATEWAY = 401;
static const uint32_t PROPERTY_IDENTIFIER_BACNET_IP_MODE = 408;
static const uint32_t PROPERTY_IDENTIFIER_IP_SUBNET_MASK = 411;
static const uint32_t PROPERTY_IDENTIFIER_BACNET_IP_UDP_PORT = 412;
static const uint32_t PROPERTY_IDENTIFIER_LINK_SPEED = 420;
static const uint32_t PROPERTY_IDENTIFIER_MAC_ADDRESS = 423;
static const uint32_t PROPERTY_IDENTIFIER_NUMBER_OF_STATES = 74;
static const uint32_t PROPERTY_IDENTIFIER_OBJECT_IDENTIFIER = 75;
Expand Down
Loading
Loading