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

Copy Markdown View Source

This module represents the BACnet Confirmed Private Transfer service.

The Confirmed Private Transfer service is used to invoke proprietary or non-standard services in a BACnet device.

Service Description (ASHRAE 135)

The ConfirmedPrivateTransfer is used by a client BACnet-user to invoke proprietary or non-standard services in a remote device. The specific proprietary services that may be provided by a given device are not defined by this standard. The PrivateTransfer services provide a mechanism for specifying a particular proprietary service in a standardized manner. The only required parameters for these services are a vendor identification code and a service number. Additional parameters may be supplied for each service if required. The form and content of these additional parameters, if any, are not defined by this standard. The vendor identification code and service number together serve to unambiguously identify the intended purpose of the information conveyed by the remainder of the APDU or the service to be performed by the remote device based on parameters in the remainder of the APDU.

Service Procedure (ASHRAE 135)

After verifying the validity of the request, the responding BACnet-user shall attempt to perform the specified proprietary service request. If successful, a 'Result(+)' response primitive shall be issued. If the request fails, a 'Result(-)' response primitive shall be issued.

Result(+) Response (ASHRAE 135)

On success, the responding BACnet-user returns a 'Result(+)' primitive. It may optionally include 'Result Parameters' (a list of values) whose meaning is defined by the vendor for the specific proprietary service.

Result(-) Errors (ASHRAE 135)

The 'Result(-)' parameter shall indicate that the service request has failed. The reason for failure shall be specified by the 'Error Type' parameter.

In addition to the standard Error Type (Error Class + Error Code per Clause 18), the ConfirmedPrivateTransfer-Error may include 'Error Parameters' (a list of values whose content and interpretation are specific to the proprietary service).

Summary

Types

t()

Parameters for the Confirmed Private Transfer service.

Functions

Whether the service is of type confirmed or unconfirmed.

Converts the given Confirmed Service Request into a Confirmed Private Transfer Service.

Get the service name atom.

Get the Confirmed Service request for the given Confirmed Private Transfer Service.

Types

t()

@type t() :: %BACnet.Protocol.Services.ConfirmedPrivateTransfer{
  parameters: [BACnet.Protocol.ApplicationTags.Encoding.t()] | nil,
  service_number: non_neg_integer(),
  vendor_id: pos_integer()
}

Parameters for the Confirmed Private Transfer service.

Vendor-specific request (vendor_id + service_number) with optional parameters. The remote device executes the proprietary service and returns results or error via the corresponding ACK or Error.

Functions

confirmed?()

@spec confirmed?() :: true

Whether the service is of type confirmed or unconfirmed.

from_apdu(request)

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

Converts the given Confirmed Service Request into a Confirmed Private Transfer Service.

get_name()

@spec get_name() :: atom()

Get the service name atom.

to_apdu(service, request_data)

@spec to_apdu(t(), Keyword.t()) ::
  {:ok, BACnet.Protocol.APDU.ConfirmedServiceRequest.t()} | {:error, term()}

Get the Confirmed Service request for the given Confirmed Private Transfer Service.

See the BACnet.Protocol.Services.Protocol function documentation for more information.