This module represents the BACnet Write Group service.
The Write Group service is used to write efficiently values to a large number of devices and objects.
Service Description (ASHRAE 135)
The purpose of WriteGroup is to facilitate the efficient distribution of values to a large number of devices and objects. WriteGroup provides compact representations for data values that allow rapid transfer of many values. See Clause 12-53 and Figure 12-10. The WriteGroup service is used by a sending BACnet-user to update arbitrary Channel objects' Present_Value properties for a particular numbered control group. The WriteGroup service is an unconfirmed service. Upon receipt of a WriteGroup service request, all devices that are members of the specified control group shall write to their corresponding Channel objects' Present_Value properties with the value applicable to the Channel Number, if any. A device shall be considered to be a member of a control group if that device has one or more Channel objects for which the 'Group Number' from the service appears in its Control_Groups property. If the receiving device does not contain one or more Channel objects with matching channel numbers, then those values shall be ignored. The WriteGroup service may be unicast, multicast, broadcast locally, on a particular remote network, or using the global BACnet network address. Since global broadcasts are generally discouraged, the use of multiple directed broadcasts is preferred.
Service Procedure (ASHRAE 135)
Since this is an unconfirmed service, no response primitives are expected. The sending BACnet-user shall transmit the WriteGroup unconfirmed request using a unicast, multicast or broadcast address. A broadcast may be sent locally, to a remote BACnet network number, or using the global BACnet network address. If the 'Group Number' is non-zero, and the receiving BACnet-user has been configured to be a member of the control group 'Group Number' by virtue of having that group number in any of the array elements of the Control_Groups property of any of its Channel objects, then for each (channel number, overridingPriority, value) tuple provided in the 'Change List' parameter, the receiving BACnet-user shall attempt to write to the Channel object(s) whose Channel_Number property(s) match that channel number with the indicated value. If no Channel object's Channel_Number property matches the provided channel number, then that value shall be ignored. If the optional field overridingPriority is provided, it shall specify the priority for writing the value. Otherwise the 'Write Priority' parameter shall specify the priority for writing. If a BACnetGroupChannelValue specifies a NULL value, it shall serve the same function as if NULL had been used with WriteProperty. The failure of any particular write shall not prevent the remaining writes from taking place.
Summary
Functions
Whether the service is of type confirmed or unconfirmed.
Converts the given Unconfirmed Service Request into a Write Group Service.
Get the service name atom.
Get the Unconfirmed Service request for the given Write Group Service.
Types
@type t() :: %BACnet.Protocol.Services.WriteGroup{ changelist: [BACnet.Protocol.GroupChannelValue.t()], group_number: BACnet.Protocol.ApplicationTags.unsigned32(), inhibit_delay: boolean() | nil, write_priority: 1..16 }
Parameters for the Write Group service (unconfirmed).
Efficiently distributes values to many devices/objects that belong to a numbered control group via their Channel objects. Includes group number, write priority, the list of channel+value pairs, and optional inhibit delay flag.
Functions
@spec confirmed?() :: false
Whether the service is of type confirmed or unconfirmed.
@spec from_apdu(BACnet.Protocol.APDU.UnconfirmedServiceRequest.t()) :: {:ok, t()} | {:error, term()}
Converts the given Unconfirmed Service Request into a Write Group Service.
@spec get_name() :: atom()
Get the service name atom.
@spec to_apdu(t(), Keyword.t()) :: {:ok, BACnet.Protocol.APDU.UnconfirmedServiceRequest.t()} | {:error, term()}
Get the Unconfirmed Service request for the given Write Group Service.
See the BACnet.Protocol.Services.Protocol function documentation for more information.