Interface BacnetConnection

All Superinterfaces:
AutoCloseable, Closeable

public interface BacnetConnection extends Closeable
High level BACnet connection API.
Version:
1.0
Author:
matt
  • Method Details

    • open

      void open() throws IOException
      Open the connection, if it is not already open.

      The connection must be opened before calling any of the other methods in this API. The Closeable.close() method must be called when the connection is longer needed.

      Throws:
      IOException - if the connection cannot be opened
    • isEstablished

      boolean isEstablished()
      Test if the connection has been established.
      Returns:
      true if the connection has been established, false if the connection has never been opened or has been closed
    • isClosed

      boolean isClosed()
      Test if Closeable.close() has been called.

      This method does not necessarily verify if the physical connection has been terminated, it is merely an indication if Closeable.close() has been invoked.

      Returns:
      true if Closeable.close() has been invoked on this connection
    • addCovHandler

      void addCovHandler(BacnetCovHandler handler)
      Add a handler to receive change-of-value property notifications.

      The handler will be passed the subscription ID and any associated property updates.

      Parameters:
      handler - the handler to add
    • removeCovHandler

      void removeCovHandler(BacnetCovHandler handler)
      Remove a handler previously registered with addCovHandler(BacnetCovHandler).
      Parameters:
      handler - the handler to remove
    • covSubscribe

      int covSubscribe(Collection<BacnetDeviceObjectPropertyRef> refs, int maxDelay)
      Subscribe to unconfirmed change-of-value property notifications.
      Parameters:
      refs - the device object properties to subscribe to
      maxDelay - the maximum delay, in seconds, for changes to be published within
      Returns:
      the unique subscription ID
    • covUnsubscribe

      void covUnsubscribe(int subscriptionId)
      Unsubscribe to unconfirmed change-of-value property notifications.
      Parameters:
      subscriptionId - the subscription ID to unsubscribe from, as previously returned from covSubscribe(Collection, int)
    • propertyValues

      Read property values.
      Parameters:
      refs - the property values to read
      Returns:
      the values
    • updatePropertyValues

      void updatePropertyValues(Map<BacnetDeviceObjectPropertyRef,?> values)
      Write property values.
      Parameters:
      values - the property values to write