Skip to content
Version 6.1.0
Contact Us

BACnetStack_RemoveObject

bool BACnetStack_RemoveObject(
const uint32_t deviceInstance,
const uint16_t objectType,
const uint32_t objectInstance);

Removes an object from a device.

The device must exist.

This function will also return true if the object does not exist.

RETURN SEMANTICS: false means only one of two things: the DEVICE does not exist, or the objectType/objectInstance pair does not fit a BACnet Object Identifier (see the API conventions). Every other case returns true - including “the object was never there” and “the underlying removal itself failed”, because that inner result is discarded. Do not use the return value to decide whether an object was actually removed; call BACnetStack_ObjectExists() instead.

Parameter Direction Description
deviceInstance in The instance of the device that contains the object to remove.
objectType in The BACnet object type of the object to remove. See CASBACnetStack::BACnetObjectType for more info. With objectInstance, this is one BACnet Object Identifier carried as two parameters (see the API conventions).
objectInstance in The instance of the object to remove.

True if successful, false if failed.

Topic: Objects and properties. Declared in CASBACnetStackDLL.h.