BACnet.Protocol.APDU.ConfirmedServiceRequest (bacstack v0.0.1)

View Source

Confirmed Service Request APDUs are used to convey the information contained in confirmed service request primitives.

Confirmed Service Requests require the BACnet server to reply with an appropriate response (such as ACK or error).

This module has functions for encoding Confirmed Service Request APDUs. Decoding is handled by BACnet.Protocol.APDU.

This module implements the BACnet.Stack.EncoderProtocol.

Summary

Types

BACnet Confirmed Service Request service structs.

t()

Represents the Application Data Unit (APDU) Confirmed Service Request.

Functions

Encodes the Confirmed Service Request APDU into binary data.

Converts the APDU into a service, if supported and possible.

Types

service()

BACnet Confirmed Service Request service structs.

t()

@type t() :: %BACnet.Protocol.APDU.ConfirmedServiceRequest{
  invoke_id: 0..255,
  max_apdu: BACnet.Protocol.Constants.max_apdu(),
  max_segments: BACnet.Protocol.Constants.max_segments(),
  parameters: BACnet.Protocol.ApplicationTags.encoding_list(),
  proposed_window_size: 1..127 | nil,
  segmented_response_accepted: boolean(),
  sequence_number: 0..255 | nil,
  service:
    BACnet.Protocol.Constants.confirmed_service_choice() | non_neg_integer()
}

Represents the Application Data Unit (APDU) Confirmed Service Request.

To allow forward compatibility, service is allowed to be an integer.

Functions

encode(apdu)

@spec encode(t()) :: {:ok, iodata()} | {:error, Exception.t()}

Encodes the Confirmed Service Request APDU into binary data.

Note that segmentation is ignored.

to_service(apdu)

@spec to_service(t()) :: {:ok, service()} | {:error, term()} | :not_supported

Converts the APDU into a service, if supported and possible.