Repository navigation
feat: implement the B-RTR (Router) profile example - #1
Merged
Merged
Conversation
Seeded from BACnetProfileExample-B-ASC-CPP minus DeviceCommunicationControl,
per the profile card. Implements:
- DS-RP-B, DS-WP-B, DM-DDB-A/B, DM-DOB-B, NM-RC-B (partial - see below).
- Two Network Port objects ("Vermilion" / network 1, "Vermilion 2" /
network 2), using common/ 2.3.0's multi-port SetupUDP/SendIAm overloads
(F-MULTIPORT, series-canonical).
- Router configuration: AddRouterPort x2, AddRouterRoute (one demonstration
route), SetRouterEnabled, SendIAmRouterToNetwork (bound to the new 'r' key,
common/ 2.4.0), SendWhoIsRouterToNetwork, SendNetworkNumberIs (F-ROUTER,
series-canonical).
- Pinned to CAS BACnet Stack 6.x @ abd4cee1 (6.0.21), STATIC link.
- Vendors common/ 2.5.0.
Known gaps, documented in TODO.md and filed upstream:
- DM-LM-B (AddListElement/RemoveListElement) not implemented: the customer
STATIC build does not compile in STACK_OPTION_DM_LM_LIST_MANIPULATION.
chipkin/cas-bacnet-stack#2033
- Inter-network NPDU forwarding does not work: the pinned stack holds one
datalink instance per network type, so two BACnet/IP router ports cannot
both attribute ingress traffic, even though AddRouterPort/AddRouterRoute/
SetRouterEnabled all succeed. chipkin/cas-bacnet-stack#2037
- Routing_Table cannot be read (aborts outside a test-tool build); not
enabled in this example. chipkin/cas-bacnet-stack#2038
Verified: STATIC build, zero warnings from main.cpp/common/; live-client
(bacpypes3) ReadProperty of the Device and both Network Port objects
directly on each port (Network_Number 1/2, Network_Number_Quality
configured, Object_Name correct); WriteProperty + readback on Analog
Output 1; I-Am-Router-To-Network transmission on both ports at start-up
and on the 'r' key. tools/check-series.sh: SERIES CHECK PASSED.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the B-RTR (Router) profile - the series' canonical example for F-ROUTER and F-MULTIPORT. Seeded from
BACnetProfileExample-B-ASC-CPPminus DeviceCommunicationControl, per the profile card.common/2.3.0's multi-portSetupUDP/SendIAmoverloads.AddRouterPortx2,AddRouterRoute(one demonstration route),SetRouterEnabled,SendIAmRouterToNetwork(bound to the newrkey,common/2.4.0),SendWhoIsRouterToNetwork,SendNetworkNumberIs.6.x@abd4cee1(6.0.21), STATIC link. Vendorscommon/2.5.0.Known gaps (documented in
TODO.md, filed upstream)STACK_OPTION_DM_LM_LIST_MANIPULATION. chipkin/cas-bacnet-stack#2033AddRouterPort/AddRouterRoute/SetRouterEnabledall succeed andNetwork_Number/Network_Number_Qualityread back correctly. Root-caused to a scope gap in stack issue #304 (closed, but implemented for BACnet/SC only). chipkin/cas-bacnet-stack#2037Routing_Tablecannot be read. Enabling it and reading it aborts the request - the stack has noUseCallbackGetListcase for it outside a test-tool build. Not enabled in this example. chipkin/cas-bacnet-stack#2038None of these are faked or worked around; the README's "Verify" section and a prominent notice at the top state plainly what does and does not work.
Verification
main.cpp/common/.Object_Name="Rainbow") directly on BOTH ports independently.Network_Number=1,Network_Number_Quality=configured,Object_Name="Vermilion".Network_Number=2,Network_Number_Quality=configured,Object_Name="Vermilion 2".Present_Value=25.5@ priority 8, readback confirmed.I-Am-Router-To-Networkbroadcast confirmed on both ports via the device's own TX log, at start-up and on therkey.tools/check-series.sh BACnetProfileExample-B-RTR-CPP→SERIES CHECK PASSED.common/'s pre-existing, already-reviewed comments).docs/objects.json/ generated "Objects and properties" README block: 0 ⚠ rows.🤖 Generated with Claude Code