This module represents the BACnet I-Am service.
The I-Am service is the standard way a BACnet device announces its presence on the network. It is most commonly issued in response to a Who-Is request, but devices are also encouraged to broadcast an I-Am upon startup or after a significant configuration change so that other devices and operators can discover them without explicit polling.
Service Description (ASHRAE 135)
The I-Am service is used to respond to Who-Is service requests. However, the IAm service request may be issued at any time. It does not need to be preceded by the receipt of a Who-Is service request. In particular, a device may wish to broadcast an I-Am service request when it powers up. The network address is derived either from the MAC address associated with the I-Am service request, if the device issuing the request is on the local network, or from the NPCI if the device is on a remote network.
The I-Am carries the device's object identifier, the maximum APDU size it supports, its segmentation capability, and its vendor identifier. This information allows clients to decide how to communicate with the device efficiently.
Service Procedure (ASHRAE 135)
The sending BACnet-user shall broadcast or unicast the I-Am unconfirmed request. If the I-Am is broadcast, this broadcast may be on the local network only, a remote network only, or globally on all networks at the discretion of the application. If the I-Am is being sent in response to a previously received Who-Is, then the I-Am shall be sent in such a manner that the BACnet-user that sent the Who-Is will receive the resulting I-Am. Since the request is unconfirmed, no further action is required. A BACnet-user may issue an I-Am service request at any time.
Summary
Functions
Whether the service is of type confirmed or unconfirmed.
Converts the given Unconfirmed Service Request into an I-Am Service.
Get the service name atom.
Get the Unconfirmed Service request for the given I-Am Service.
Types
@type t() :: %BACnet.Protocol.Services.IAm{ device: BACnet.Protocol.ObjectIdentifier.t(), max_apdu: pos_integer(), segmentation_supported: BACnet.Protocol.Constants.segmentation(), vendor_id: BACnet.Protocol.ApplicationTags.unsigned16() }
Parameters for the I-Am service (unconfirmed).
Broadcast by a device to announce its presence, identity, maximum APDU length, segmentation support, and vendor ID so that other devices can discover and communicate with it.
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 an I-Am Service.
See the BACnet.Protocol.Services.Protocol function documentation for more information.
@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 I-Am Service.
See the BACnet.Protocol.Services.Protocol function documentation for more information.