BACnet.Protocol.Services.Error.AddListElementError (bacstack v0.1.0-dev.1)

Copy Markdown View Source

The Add List Element Error is returned when an Add List Element service request fails.

In addition to the standard error information, it indicates which element in the list of values being added caused the failure (via first_failed_element_number). This helps clients diagnose problems when attempting to append multiple values to a list property in a single request.

Summary

Types

t()

Error response for a failed Add List Element service.

Functions

Converts a received Error APDU into an AddListElementError struct.

Constructs an Error APDU from an AddListElementError struct.

Types

t()

@type t() :: %BACnet.Protocol.Services.Error.AddListElementError{
  error_class: BACnet.Protocol.Constants.error_class() | non_neg_integer(),
  error_code: BACnet.Protocol.Constants.error_code() | non_neg_integer(),
  first_failed_element_number: non_neg_integer()
}

Error response for a failed Add List Element service.

In addition to the standard BACnet error class/code, includes the 1-based index of the first element in the request list that caused the failure.

If first_failed_element_number is 0, then the request is not invalid due to the "List of Elements" parameters.

Functions

from_apdu(error)

@spec from_apdu(BACnet.Protocol.APDU.Error.t()) :: {:ok, t()} | {:error, term()}

Converts a received Error APDU into an AddListElementError struct.

to_apdu(error, invoke_id \\ 0)

@spec to_apdu(t(), 0..255) :: {:ok, BACnet.Protocol.APDU.Error.t()} | {:error, term()}

Constructs an Error APDU from an AddListElementError struct.