Skip to content

update to stack 6x - #4

Merged
sws-chipkin merged 2 commits into
mainfrom
update-to-stack-6x
Sep 15, 2026
Merged

sws-chipkin merged 2 commits into
mainfrom
update-to-stack-6x

Conversation

@sws-chipkin

Copy link
Copy Markdown
Contributor

Summary

Migrates B-ASC-CPP to the series-wide CAS BACnet Stack 6.x pin (abd4cee1, reports 6.0.21), switches to the STATIC link mode, and refreshes common/ to the series-wide vendored copy (2.1.0).

  • Stack pinned to 6.x @ abd4cee1; .gitmodules tracks the 6.x branch.
  • Links a prebuilt CASBACnetStack_x64_Release.lib (CAS_BACNET_STACK_LINK=STATIC), built by tools/build-stack-static.sh from the stack's own project files (ReleaseLib|x64). No DLL mode documented or shipped.
  • API migration: every GetProperty* callback gains a trailing uint32_t* errorCode out-parameter (used once — State_Text out-of-range now answers invalid-array-index instead of silently returning an empty string); BACnetStack_AddNetworkPortObjectWithNetworkNumber renamed to BACnetStack_AddNetworkPortObject; CASExampleHelper::SetNetworkPortInstance() added before RegisterCommonCallbacks().
  • common/ replaced wholesale with the current series-wide copy (2.1.0, byte-identical to BACnetProfileExample-B-SS-CPP/common/).
  • APP_VERSION bumped to 1.2.0 (MINOR).
  • Docs regenerated: new docs/objects.json + generated "Objects and properties" README block (zero warning rows), series profile table synced into README, CHANGELOG.md unreleased entry, AGENTS.md rewritten to the 8-section template, .github/workflows/release.yml replaced with the proven Wave 0 STATIC-library template (names substituted only).

Verification

  • Local build: CAS_BACNET_STACK_LINK:STRING=STATIC in CMakeCache.txt, /MT forced, zero warnings from main.cpp/common/.
  • Smoke test (--port 47821): prints CAS BACnet Stack version: 6.0.21.0, Common helper (common/) version: 2.1.0, binds the UDP port, sends a broadcast I-Am, stays up. --help/--version exit 0; --deviceID overrides the announced instance.
  • F-DCC (DM-DCC-B) wire-verified with a real BACnet client (Python bacpypes3, confirmed-service round trip against the running executable, password temporarily set to a non-empty value for the test and reverted before commit):
    • disable-initiation with a wrong password → Error(security, password-failure)
    • disable-initiation with the right password → SimpleAck (stops initiating)
    • enable with the right password → SimpleAck (restores)
    • plain disable (deprecated at Protocol_Revision ≥ 20) → Error(services, service-request-denied)
  • Not wire-verified in this PR: a full third-party client scan (CAS BACnet Explorer or similar) of every object/property in the generated table — the scripted bacpypes3 check above covers discovery + the DCC behaviors; a GUI-client pass is recommended before the next release if available.
  • Gate: tools/check-series.sh BACnetProfileExample-B-ASC-CPP → SERIES CHECK PASSED.
  • Self-history grep clean except one inherited phrase inside the byte-identical vendored common/ file (also present in the B-SS-CPP reference; common/ is not this repo's to edit — owned by the B-AAC Wave-1 change).

🤖 Generated with Claude Code

sws-chipkin and others added 2 commits September 15, 2026 00:33
Co-Authored-By: Claude <noreply@anthropic.com>
… 2.1.0

- Pin the stack to 6.x @ abd4cee1 (6.0.21), tracking the 6.x branch.
- Link the CAS BACnet Stack as a prebuilt STATIC library
  (CAS_BACNET_STACK_LINK=STATIC, built by tools/build-stack-static.sh) instead
  of SOURCE mode; forces the /MT static MSVC runtime. No DLL mode documented
  or shipped.
- Every GetProperty* callback gains a trailing uint32_t* errorCode
  out-parameter (stack issue #974); State_Text with an out-of-range array
  index now answers Error(property, invalid-array-index) instead of an empty
  string. Every other catch-all `return false` deliberately leaves errorCode
  alone, per the stack's decline-and-fabricate fallback for properties this
  device does not serve.
- BACnetStack_AddNetworkPortObjectWithNetworkNumber() renamed to
  BACnetStack_AddNetworkPortObject() (same arguments).
- CASExampleHelper::SetNetworkPortInstance() is now called before
  RegisterCommonCallbacks(), since links are identified by Network Port
  object instance rather than network type.
- common/ replaced wholesale with the series-wide vendored copy at 2.1.0 (up
  from 1.5.1), byte-identical to BACnetProfileExample-B-SS-CPP/common/.
- APP_VERSION bumped to 1.2.0 (MINOR).
- Docs regenerated: docs/objects.json (new) + the generated Objects and
  properties README block (zero warning rows), the series profile table
  synced into README, CHANGELOG unreleased entry, AGENTS.md rewritten to the
  8-section template, .github/workflows/release.yml replaced with the
  proven Wave 0 STATIC-library template (names substituted only).

Verified: local build is STATIC (CAS_BACNET_STACK_LINK:STRING=STATIC in
CMakeCache.txt, /MT forced), zero warnings from main.cpp/common/. Smoke test
prints CAS BACnet Stack version 6.0.21.0, common/ 2.1.0, binds UDP, sends a
broadcast I-Am, and stays up; --help/--version exit 0; --deviceID overrides
the announced instance. F-DCC (DM-DCC-B) verified on the wire with a real
BACnet client (bacpypes3, confirmed-service round trip against the running
executable): DeviceCommunicationControl disable-initiation with a wrong
password -> Error(security, password-failure); the same with the right
password -> SimpleAck (stops initiating); enable with the right password ->
SimpleAck (restores); plain disable (deprecated at Protocol_Revision >= 20)
-> Error(services, service-request-denied). tools/check-series.sh
BACnetProfileExample-B-ASC-CPP -> SERIES CHECK PASSED.

Co-Authored-By: Claude <noreply@anthropic.com>
@sws-chipkin
sws-chipkin merged commit 3c950ab into main Sep 15, 2026
3 checks passed
@sws-chipkin
sws-chipkin deleted the update-to-stack-6x branch September 15, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant