Skip to content

Conversation

@ivanhercaz
Copy link

@ivanhercaz ivanhercaz commented Apr 18, 2025

Because of how the bacnet-stack works, it is recommended to terminate the SUPPORTED_OBJECT_TABLE with a sentinel value that indicates the end.

Steve Karg's usual way is to set the last value of the list to a value completely null with the exception of the type in which is set MAX_BACNET_OBJECT_TYPE. See bacnet-stack device.c as an example of this. There the other values are set to NULL, but the only value required because it is normally the first one to be checked is the type.

This change is to make your BACnet application more robust, because depending of the system and the compilation, it can causes issues, like segmentation faults (@BACnetEd, fix me if I am wrong or something additional to comment).

Note: as it is a small change, we prefer to keep it simple and clean. This commit is done in a branch with the latest of your main branch.

Because of how the bacnet-stack works, it is recommended to terminate the `SUPPORTED_OBJECT_TABLE` with a sentinel value that indicates the end.

Steve Karg's usual way is to set the last value of the list to a value completely null with the exception of the type in which is set `MAX_BACNET_OBJECT_TYPE`.

Co-authored-by: Ed <edward@bac-test.com>
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