Click or drag to resize

BACnet Class

BACnet class, this class is used to create the BACnet Host internally. This class implements methods to add/remove remote devices. Also implements the methods to register/unregister the BACnet slot with BACnet stack. This class defines the properties to know the current number of remote devices added, endpoint limit on the control system and current endpoint count.

This class will trigger "RemoteBACnetDevices.RemoteBACnetDevicesChange" events.

Inheritance Hierarchy
SystemObject
  Crestron.SimplSharpProBACnet

Namespace: Crestron.SimplSharpPro
Assembly: SimplSharpPro (in SimplSharpPro.dll) Version: 2.21.121
Syntax
C#
public sealed class BACnet : IDisposable

The BACnet type exposes the following members.

Properties
 NameDescription
Public propertyBACnetDiscoveryEnabled Flag to indicate if the BACnet Discovery feature is enabled. true: if BACnet Discovery is enabled; false: if BACnet Discovery is disabled
Public propertyDiscoveryBACnetBACnetDiscovery class object. This property is used to start and stop BACnet Discovery process.
Public propertyDisposed Property to indicate if the Device has been disposed.
Public propertyEndpointsLimit Maximum number of endpoints that can be added to the BACnet stack. Host device/object or a remote device/object is called an endpoint.
Public propertyHostDevice Host device object.
Public propertyStatic memberIsLicensed Property to return the availability status of the BACnet license. true: BACnet license available; false: No BACnet license available
Public propertyParent The parent Control System that this object was added to.
Public propertyRegistered Flag to tell whether the BACnet slot is registered or not.
Public propertyRegistrationFailureReason Property to get the Registration Failure Reason, this will match the return value from the call to register.
Public propertyRemoteBACnetDevices Remote devices object. Remote devices collection is part of this object.
Public propertyRemoteDevicesSubClass Remote Devices Slot under the Main BACnet slot, under which all the BACnet device sub-slots are be present.
Public propertyUnRegistrationFailureReason Property to get the Unregistration Failure Reason, this will match the return value from the call to unregister.
Top
Methods
 NameDescription
Public methodAddRemoteDevice(UInt32) Adds the specified remote device to the remote devices collection and with user settable timeout option. This function also validates the object parameters passed. Success will be returned if the device 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 remote from the stack and also the remote device will be deleted from the local collection. For Priority parameter the default value Available16 will be used.
Public methodAddRemoteDevice(UInt32, eBACnetPriorityType) Adds the specified remote device to the remote devices collection and with user settable timeout option. This function also validates the object parameters passed. Success will be returned if the device 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 remote from the stack and also the remote device will be deleted from the local collection.
Public methodAddRemoteDevice(UInt32, Int32) Adds the specified remote device to the remote devices collection and with user settable timeout option. This function also validates the object parameters passed. Success will be returned if the device is added successfully, otherwise an exception is thrown that tells what kind of error found. For Priority parameter the default value Available16 will be used.
Public methodAddRemoteDevice(UInt32, eBACnetPriorityType, Int32) Adds the specified remote device to the remote devices collection and with user settable timeout option. This function also validates the object parameters passed. Success will be returned if the device is added successfully, otherwise an exception is thrown that tells what kind of error found.
Public methodDispose Clean up of resources. To unregister the BACnet call UnRegister, do not call this method. This method will dispose the BACnet slot itself. This method can be called from the program stopping event handler. To register BACnet again after calling this method, program need to be restarted.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetNumberOfEndpoints Method to get the number of endpoints added to the BACnet stack. Host device/object or a remote device/object is called an endpoint.
Public methodGetNumberOfRemoteDevices Method to get the number of remote devices added to the BACnet.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodRegister(UInt32, String) Register this BACnet slot with the system. Default port number 47808 will be used for the host device. BACnet stack will be intimated about all the objects or devices that were already added to the local device/object collections so that those objects/devices will be added to the BACnet stack also.
Public methodRegister(UInt32, String, UInt32) Register this BACnet slot with the system. BACnet stack will be intimated about all the objects or devices that were already added to the local device/object collections so that those objects/devices will be added to the BACnet stack also.
Public methodRemoveAllRemoteDevices Removes all remote devices from the remote device collection. Success will be returned if all the devices are removed successfully, otherwise failure is returned and the corresponding error is logged.
Public methodRemoveAllRemoteDevices(Int32) Removes all remote devices from the remote device collection, with user settable timeout option. Success will be returned if all the devices are removed successfully, otherwise failure is returned and the corresponding error is logged.
Public methodRemoveRemoteDevice(UInt32) Removes the specified remote device from the remote device collection. Success will be returned if the device is removed successfully, otherwise an exception is thrown that tells what kind of error found.
Public methodRemoveRemoteDevice(UInt32, Int32) Removes the specified remote device from the remote device collection, with user settable timeout option. Success will be returned if the device is removed successfully, otherwise an exception is thrown that tells what kind of error found.
Public methodToString String representation of the BACnet.
(Overrides ObjectToString)
Public methodUnRegister Unregister this BACnet slot with the system. All the host/remote objects and remote devices will be removed from the corresponding local collections. But the host device will not be removed and will show up in the current endpoints list.
Top

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also