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
15 changes: 13 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ Input 1, `s` advance Schedule 1 (Saffron) to a transition right now.
Older stack pins also flooded the log from
`AddTrendLogObject` alone
([#2050](https://github.com/chipkin/cas-bacnet-stack/issues/2050), same
class as B-ACC's #2045 for Event Log). That's gone on 6.0.22; if it comes
back, check #2050/#2045 before treating it as a new bug.
class as B-ACC's #2045 for Event Log). That's gone on 6.0.22. The current
`issues/runbook` pin logs a one-off burst of the same lines at startup,
plus one `BACnetDateRange` pair per Calendar `Date_List` access
([#2381](https://github.com/chipkin/cas-bacnet-stack/issues/2381),
bisected to stack commit `4c793c15`). Check #2381/#2050 before treating
either as a new bug.
- **Startup `UUID has not been set` error:** a single
`BACnetDataLinkSC::Loop() ... UUID has not been set` line at startup is a
harmless stack log defect
Expand All @@ -110,6 +114,13 @@ Input 1, `s` advance Schedule 1 (Saffron) to a transition right now.
the peer is bound, is never re-sent. That's stack gap
[#2343](https://github.com/chipkin/cas-bacnet-stack/issues/2343), not a
code bug. See TODO.md item 2.
- **Calendar 1 (Cream) is stack-held** (`BACnetStack_AddCalendarObject`,
stack IFC-045): the stack stores `Date_List` and derives `Present_Value`.
Don't serve either from a callback, because the stack answers first.
Saffron's exception is a calendar reference to Cream
(`AddScheduleExceptionEventWithCalendarReference`), which only matches a
stack-held Calendar. `tests/calendar_reference_check.py` adds today to
`Date_List` and checks Cream -> Saffron -> Chartreuse.
- Outputs are **commandable**: store the 16-slot `Priority_Array` +
`Relinquish_Default` in the app (the `Commandable` struct); let the stack
resolve `Present_Value`. Writes land via the `SetProperty*` callbacks (value)
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@ 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.7] - 2026-09-23

### Changed

- **Calendar 1 ("Cream") is now stack-held, and Schedule 1 ("Saffron")'s
exception references it.** Stack issue
[#1758](https://github.com/chipkin/cas-bacnet-stack/issues/1758) is fixed
on `issues/runbook` (IFC-045). `BACnetStack_AddCalendarObject` hands Cream
to the stack, which stores `Date_List` and derives `Present_Value` from
the device's `Local_Date`. Cream's `Date_List` holds December 25 of every
year (`BACnetStack_AddCalendarDateEntry`), and it is WRITABLE
(`SetPropertyWritable`, property 23), so clients can add holidays with
WriteProperty / AddListElement. Saffron's exception moved from the inline
`...WithCalendarEntry` form to
`BACnetStack_AddScheduleExceptionEventWithCalendarReference` pointing at
Cream. The app no longer serves Cream's `Present_Value` from
`GetPropertyBool`, because the stack answers first.
- New `tests/calendar_reference_check.py`: writes today into Cream's
`Date_List` and checks that Cream's `Present_Value` goes TRUE, Saffron's
exception takes over, and Chartreuse moves to 5.0, then restores the
list. Verified live: Cream FALSE -> TRUE, Chartreuse 20.0 -> 5.0 -> 20.0
after restore (PASS).
- **CAS BACnet Stack pinned to `issues/runbook` @ `00aa2d0e`**, ahead of
`6.x` @ `22ac3c98`, for the Calendar exports. It still reports 6.0.22.
Move back to `6.x` once #1758 lands there. #2051's stack-side change on
this branch is documentation only: the root cause was this example's
local-time window, fixed in 1.0.6.
- **Known log noise on this pin:** a one-off startup burst of
`BACnetDateTime ... Failed to set the date/time` lines (bisected to stack
commit `4c793c15`, #2207), plus a `BACnetDateRange` pair on each Calendar
`Date_List` access. Filed as
[cas-bacnet-stack#2381](https://github.com/chipkin/cas-bacnet-stack/issues/2381).
TODO.md item 1.
- TODO.md: the Calendar gap (old item 3) is removed and the items after it
are renumbered. TUTORIAL.md, AGENTS.md, README.md and `docs/objects.json`
now describe the stack-held Calendar (PICS regenerated).
- Re-verified on this pin: Trend Log 1 / Trend Log Multiple 1 record (28 /
29 records), ReadPropertyMultiple of the whole Device OK, and
`tests/sched_e_b_remote_peer.py` PASS.
- APP_VERSION bumped 1.0.6 -> 1.0.7.

## [1.0.6] - 2026-09-22

### Fixed
Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ and ReadRange). It listens on **BACnet/IP (UDP 47808)** and claims only B-BC.
- **[docs/PICS.md](docs/PICS.md)** - the Protocol Implementation Conformance
Statement: every object, every property, and who answers it.

> **Versions:** this document describes **example v1.0.6**, built and verified
> against **CAS BACnet Stack 6.0.22** (`6.x` @ `22ac3c98`), at
> **Versions:** this document describes **example v1.0.7**, built and verified
> against **CAS BACnet Stack 6.0.22** (`issues/runbook` @ `00aa2d0e`, ahead of `6.x` for
> stack-held Calendars - see `TODO.md`), at
> **Protocol_Revision 26**, with the vendored `common/` helper at **v3.0.0**.
> Running the example prints all three - if what it prints disagrees with this
> line, trust the program and check `CHANGELOG.md`.

> **B-BC is not fully claimable with the standard stack yet.** This example
> implements every B-BC capability the standard CAS BACnet Stack exposes, and
> clearly marks what it cannot do - see [TUTORIAL.md](TUTORIAL.md) and
> [TODO.md](TODO.md). In summary: Calendar 1
> ("Cream")'s `Date_List` cannot be populated
> ([#1758](https://github.com/chipkin/cas-bacnet-stack/issues/1758)).
> Schedule 1's SCHED-E-B remote write is verified on the wire, but the stack
> [TODO.md](TODO.md). In summary: Schedule 1's SCHED-E-B remote write is verified on the wire, but the stack
> drops the write it makes at startup, before the remote device has been
> found ([#2343](https://github.com/chipkin/cas-bacnet-stack/issues/2343)).

Expand Down Expand Up @@ -60,7 +58,7 @@ Analog Value 1 "Diamond" (REAL, WRITABLE; intrinsic OutOfRange ala
Notification Class 1 "Crimson" (routes Diamond's alarms; Recipient_List WRITABLE)
Network Port 1 "Vermilion" (BACnet/IP - required)
Schedule 1 "Saffron" (drives Chartreuse locally AND a remote peer - SCHED-E-B)
Calendar 1 "Cream" (see TUTORIAL.md - Date_List not evaluated)
Calendar 1 "Cream" (stack-held Date_List, WRITABLE; drives Saffron's exception)
File 1 "Ivory" (backup/restore payload - DM-BR-B)
Trend Log 1 "Lilac" (polls Bronze)
Trend Log Multiple 1 "Magenta" (polls Bronze/Diamond/Chartreuse)
Expand Down Expand Up @@ -217,7 +215,7 @@ CMake at it: `cmake -B build -S . -D CAS_STACK_DIR=/path/to/cas-bacnet-stack`.
Expected output:

```
BACnet B-BC (Building Controller) Example - C++ v1.0.6
BACnet B-BC (Building Controller) Example - C++ v1.0.7
CAS BACnet Stack version: 6.0.22.0
Common helper (common/) version: 3.0.0
FYI: Listening for BACnet/IP on UDP port 47808 (Network Port 1).
Expand Down
60 changes: 33 additions & 27 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# TODO — known gaps (all verified against the pinned stack source and/or the wire, not assumed)

Stack pin: `22ac3c986d3a1c46028527d356ddd80673715bf6` (`6.x`, release 6.0.22, merged 2026-09-22).
The example is back on the `6.x` branch named in `.gitmodules`. The previous pin (`a8d3b6bf` on
`issues/runbook`) was only there to pick up fixes for #2163, #2164 and #2165 early, and those
fixes are now on `6.x`. Every item below was re-checked live against `22ac3c98`.
Stack pin: `00aa2d0e` (`issues/runbook`, reports 6.0.22, 2026-09-23). This is deliberately ahead of
the `6.x` branch `.gitmodules` names (`6.x` @ `22ac3c98`), to pick up stack-held Calendar objects
([#1758](https://github.com/chipkin/cas-bacnet-stack/issues/1758), IFC-045) before they reach
`6.x`. Move back to a `6.x` commit once they do. Items verified on `22ac3c98` say so; everything
was re-checked live on `00aa2d0e`.

Each open item has a tracking issue in this repo:
[#14](https://github.com/chipkin/BACnetProfileExample-B-BC-CPP/issues/14) (item 3),
[#15](https://github.com/chipkin/BACnetProfileExample-B-BC-CPP/issues/15) (item 6),
[#16](https://github.com/chipkin/BACnetProfileExample-B-BC-CPP/issues/16) (item 7).
[#18](https://github.com/chipkin/BACnetProfileExample-B-BC-CPP/issues/18) (item 1),
[#15](https://github.com/chipkin/BACnetProfileExample-B-BC-CPP/issues/15) (item 5),
[#16](https://github.com/chipkin/BACnetProfileExample-B-BC-CPP/issues/16) (item 6).

## Fixed on earlier pins (verified live against `a8d3b6bf`, re-checked on `22ac3c98`)

Expand All @@ -31,15 +32,32 @@ Each open item has a tracking issue in this repo:
of commits, not by a change that references the issue directly) - see item 1's update below.
- **[#2178](https://github.com/chipkin/cas-bacnet-stack/issues/2178)** (`Schedule.Weekly_Schedule`
and `Network_Port.IP_DNS_Server` both Aborting instead of returning a value/Error) — fixed,
closed. `IP_DNS_Server` no longer Aborts, but now surfaces a narrower gap of its own — see item 6
closed. `IP_DNS_Server` no longer Aborts, but now surfaces a narrower gap of its own — see item 5
(`chipkin/cas-bacnet-stack#2196`).
- **[#2051](https://github.com/chipkin/cas-bacnet-stack/issues/2051)** (Trend Log 1 "Lilac"'s
`Record_Count` stuck at 0) — **not a stack defect.** The example built the
`SetTrendLogStartStopTime` window from local time, but the stack compares it against UTC, so
off-UTC hosts never logged. Fixed in this repo (`gmtime`, #9). Re-verified on `22ac3c98`.

## 1. `AddTrendLogObject` causes a continuous internal log flood (same class as #2045) — fixed (regression note only)

- **[#1758](https://github.com/chipkin/cas-bacnet-stack/issues/1758)** (Calendar `Date_List` had no
customer-facing storage, so a Schedule calendar-reference exception never matched) — fixed on
`issues/runbook` by stack-held Calendars (IFC-045). Calendar 1 ("Cream") is now stack-held with a
December 25 entry and a writable `Date_List`, and Schedule 1's exception references it.
Verified live: see CHANGELOG 1.0.7.

## 1. "Failed to set the date/time" log lines — the #2050 flood is fixed, but a new startup burst is back on this pin

**On the current pin (`00aa2d0e`):** 8 pairs of `BACnetDateTime ... Failed to set the date/time`
lines at startup, then silence. This is not the old per-tick flood. In addition, every access to
Calendar 1's `Date_List` logs one `BACnetDateRange ... Failed to set the start/end date` pair.
Behaviour is correct throughout. `git bisect` (same example source at every step) puts the startup
burst at stack commit `4c793c15` (#2207, SC hub-connection timestamps): `BACnetSCHubConnection::Reset()`
assigns an all-unspecified `BACnetDateTime`, and `operator=` rejects unspecified fields. The SC
data link builds those objects even on this BACnet/IP-only device. The `Date_List` lines are the
same pattern in the new Calendar code.
**Filed:** [chipkin/cas-bacnet-stack#2381](https://github.com/chipkin/cas-bacnet-stack/issues/2381).
Tracked here as [#18](https://github.com/chipkin/BACnetProfileExample-B-BC-CPP/issues/18).

**The original #2050 flood (below) stays fixed:**
**Fixed.** 0 occurrences of the flood over a ~30-second live run against `22ac3c98` (6.0.22). It
was already gone on `a8d3b6bf`. #2050 is still open upstream (see the re-verification comment
there) because no single commit names it. Tracked to closure by
Expand Down Expand Up @@ -95,19 +113,7 @@ value once the I-Am arrives. The remote target only catches up at the next `Pres
**Filed:** [chipkin/cas-bacnet-stack#2343](https://github.com/chipkin/cas-bacnet-stack/issues/2343).
Nothing to change on this side. This example's wiring is correct.

## 3. Calendar 1 ("Cream")'s `Date_List` — inherited, pre-existing gap

Same gap B-AAC's (and B-ACC's) file header already documents against stack issue
[#1758](https://github.com/chipkin/cas-bacnet-stack/issues/1758) (formerly tracked as #963, which
was closed 2026-09-13 with the remaining work split off to #1758 — update this link if you find
another sibling example still pointing at the closed #963):
`BACnetStack_AddScheduleExceptionEventWithCalendarReference` does not resolve a Calendar's
`Date_List` at evaluation time, and there is no customer-facing way to populate `Date_List` at
all. This file uses the inline `...WithCalendarEntry` exception form instead (fully functional,
live-verified), exactly as B-AAC does; Cream still exists as a correctly-served object with
`Date_List` `accepted` (not served) in `docs/objects.json`.

## 4. F-REINIT / #2036 (Life Safety) — confirmed not applicable
## 3. F-REINIT / #2036 (Life Safety) — confirmed not applicable

B-LSC's own port of this callback (`implement-lsc` branch, unmerged) states in its file header:
"F-REINIT (DM-RD-B): unchanged from B-AAC/B-ASC" — this example's `ReinitializeDevice` (inherited
Expand All @@ -116,13 +122,13 @@ B-ACC's pattern) is therefore already the same code B-LSC itself uses for COLDST
This example carries **no** Life Safety Point/Zone objects, so cas-bacnet-stack#2036 (a Life Safety
Point/Zone-specific defect) does not apply here — confirmed by inspection, not assumed.

## 5. Access-family gaps (#2044, #2046) — confirmed not applicable
## 4. Access-family gaps (#2044, #2046) — confirmed not applicable

This profile carries no Access Door/Point/Credential/Rights/Zone objects, so the AE-AC-B
notification-generation gap (#2044) and the constructed-property read gaps (#2046) B-ACC found do
not apply to this example.

## 6. Network Port 1's `Property_List` advertises two properties it can't actually answer
## 5. Network Port 1's `Property_List` advertises two properties it can't actually answer

Split from [#2178](https://github.com/chipkin/cas-bacnet-stack/issues/2178) (that issue's own
Abort-PDU bugs — `Schedule.Weekly_Schedule` and `Network_Port.IP_DNS_Server` both aborting — are
Expand All @@ -142,7 +148,7 @@ or serves either), so there's nothing to change on this side. `FD_Bbmd_Address`
`Error (property, value-not-initialized)` is NOT part of this gap — that's the correct answer for
a device with no BBMD configured.

## 7. A BACnet/SC "UUID has not been set" error is logged at startup
## 6. A BACnet/SC "UUID has not been set" error is logged at startup

Every start prints this line once, even though this example is BACnet/IP-only and never touches the
BACnet/SC API:
Expand Down
Loading
Loading