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

Copy Markdown View Source

This module represents the BACnet Delete Object service.

The Delete Object service is used to delete an existing object in the remote device.

Service Description (ASHRAE 135)

The DeleteObject service is used by a client BACnet-user to delete an existing object. Although this service is general in the sense that it can be applied to any object type, it is expected that most objects in a control system cannot be deleted by this service because they are protected as a security feature. There are some objects, however, that may be created and deleted dynamically. Group objects and Event Enrollment objects are examples. This service is primarily used to delete objects of these types but may also be used to remove vendor-specific deletable objects.

Service Procedure (ASHRAE 135)

After verifying the validity of the request, the responding BACnet-user shall attempt to delete the object specified by the 'Object Identifier' parameter of the request/indication primitive. If the specified object exists and can be deleted, it shall be deleted and the 'Result(+)' primitive shall be issued. If the specified object does not exist or cannot be deleted, then the 'Result(-)' primitive shall be issued.

Result(-) Errors (ASHRAE 135)

The 'Result(-)' parameter shall indicate that the service request failed and the specified object was not deleted. The reason for failure is specified in the 'Error type' parameter.

The 'Error Class' and 'Error Code' to be returned for specific situations are as follows:

SituationError ClassError Code
The object to be deleted does not exist.OBJECTUNKNOWN_OBJECT
The object exists but cannot be deleted.OBJECTOBJECT_DELETION_NOT_PERMITTED

Summary

Types

t()

Parameters for the Delete Object service.

Functions

Whether the service is of type confirmed or unconfirmed.

Converts the given Confirmed Service Request into a Delete Object Service.

Get the service name atom.

Get the Confirmed Service request for the given Delete Object Service.

Types

t()

@type t() :: %BACnet.Protocol.Services.DeleteObject{
  object_specifier: BACnet.Protocol.ObjectIdentifier.t()
}

Parameters for the Delete Object service.

Identifies the object to be removed from the device. The object and all its properties are deleted.

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 Delete Object 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 Delete Object Service.

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