Skip to main content

Module event_notification_subscription

Module event_notification_subscription 

Source
Expand description

Encode and decode a Notification Forwarder’s Subscribed_Recipients elements (Clause 12.51.9, Clause 21 BACnetEventNotificationSubscription).

Each element is a bare sequence of four context-tagged members, all required: [0] wraps the recipient CHOICE, [1] is the process identifier (Unsigned32), [2] the confirmation flag and [3] the minutes remaining. The BACnetLIST concatenates elements with no wrapper, so the decoder reads one element at offset and returns the offset just past it.

A subscription’s recipient decodes through decode_recipient and encodes through the same bound: an address MAC is at most BACnetAddress::MAX_MAC_LEN octets (#1124, #1156).

Functions§

decode_event_notification_subscription
Decode one bare BACnetEventNotificationSubscription at offset; returns it and the offset past its [3] member. A member that is missing, out of order, or past its range (a process identifier or time remaining beyond Unsigned32) is a decode error.
encode_event_notification_subscription
Encode one bare BACnetEventNotificationSubscription sequence. A recipient MAC past BACnetAddress::MAX_MAC_LEN octets is an error, returned before buf changes.
encode_event_notification_subscription_list
Encode a BACnetLIST of BACnetEventNotificationSubscription in slice order. Every recipient is checked before buf changes, so a refused list writes nothing.