Click or drag to resize

HostedBACnetDeviceAddObject(BACnetObject) Method

Adds the specified host object to the corresponding host objects collection. This function also validates the object parameters passed. Success will be returned if the object is added successfully, otherwise an exception is thrown that tells what kind of error found. If response is not received from the BACnet stack for add request before the timeout occurs, then a remove request will be sent to the BACnet stack to remove the object from the stack and also the object will be deleted from the local collection. In this function Object Name is trimmed.

Namespace: Crestron.SimplSharpPro
Assembly: SimplSharpPro (in SimplSharpPro.dll) Version: 2.21.121
Syntax
C#
public override bool AddObject(
	BACnetObject paramObject
)

Parameters

paramObject  BACnetObject
Object to add to the hosted BACnet device.

Return Value

Boolean
Returns 'true' if the object is added successfully, otherwise an exception is thrown.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionThe BACnet host device object id or any other parameter is not valid.
ArgumentNullExceptionThe BACnet host device object name is empty or null.
BACnetExceptionUnable to add the BACnet host device object due to no response or error in the response packet received from the BACnet stack.
BACnetDeviceOrObjectAlreadyExistsExceptionThe BACnet host device object with the same object id is already present in the collection, so ignored the add request.
OutOfObjectLicensesExceptionUnable to add the BACnet host device object, due to the maximum number of endpoints are reached.
Remarks
This method will block pending a response. It is recommended to not invoke this method from within a event handler. Please launch a timer/thread to add a host object. Also – this method not to be called from the control system constructor.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also