Class MeshManagerApi

java.lang.Object
org.openremote.agent.protocol.bluetooth.mesh.MeshManagerApi
All Implemented Interfaces:
MeshMngrApi

public class MeshManagerApi extends Object implements MeshMngrApi
  • Field Details

    • LOG

      public static final Logger LOG
    • MESH_PROVISIONING_UUID

      public static final UUID MESH_PROVISIONING_UUID
    • MESH_PROXY_UUID

      public static final UUID MESH_PROXY_UUID
    • PDU_TYPE_PROVISIONING

      public static final byte PDU_TYPE_PROVISIONING
      See Also:
    • PDU_TYPE_NETWORK

      public static final byte PDU_TYPE_NETWORK
      See Also:
    • PDU_TYPE_MESH_BEACON

      public static final byte PDU_TYPE_MESH_BEACON
      See Also:
    • PDU_TYPE_PROXY_CONFIGURATION

      public static final byte PDU_TYPE_PROXY_CONFIGURATION
      See Also:
  • Constructor Details

    • MeshManagerApi

      public MeshManagerApi(ScheduledExecutorService scheduledExecutorService)
      The mesh manager api constructor.
  • Method Details

    • setMeshManagerCallbacks

      public void setMeshManagerCallbacks(MeshManagerCallbacks callbacks)
      Description copied from interface: MeshMngrApi
      Sets the MeshManagerCallbacks listener
      Specified by:
      setMeshManagerCallbacks in interface MeshMngrApi
      Parameters:
      callbacks - callbacks
    • setMeshStatusCallbacks

      public void setMeshStatusCallbacks(MeshStatusCallbacks callbacks)
      Description copied from interface: MeshMngrApi
      Sets the MeshManagerCallbacks listener to return mesh status callbacks.
      Specified by:
      setMeshStatusCallbacks in interface MeshMngrApi
      Parameters:
      callbacks - callbacks
    • handleWriteCallbacks

      public final void handleWriteCallbacks(int mtuSize, byte[] data)
      Description copied from interface: MeshMngrApi
      Must be called to handle provisioning states
      Specified by:
      handleWriteCallbacks in interface MeshMngrApi
      Parameters:
      mtuSize - GATT MTU size
      data - PDU received by the client
    • handleNotifications

      public final void handleNotifications(int mtuSize, byte[] data)
      Description copied from interface: MeshMngrApi
      Handles notifications received by the client.

      This method will check if the library should wait for more data in case of a gatt layer segmentation. If its required the method will remove the segmentation bytes and reassemble the pdu together.

      Specified by:
      handleNotifications in interface MeshMngrApi
      Parameters:
      mtuSize - GATT MTU size
      data - PDU received by the client
    • dataAsHexString

      public String dataAsHexString(byte[] data)
    • getMeshNetwork

      public MeshNetwork getMeshNetwork()
    • createMeshPdu

      public void createMeshPdu(int dst, MeshMessage meshMessage)
      Description copied from interface: MeshMngrApi
      Sends the specified mesh message specified within the MeshMessage object
      Specified by:
      createMeshPdu in interface MeshMngrApi
      Parameters:
      dst - destination address
      meshMessage - MeshMessage Mesh message containing the message opcode and message parameters
    • resetMeshNetwork

      public final void resetMeshNetwork(int provisionerAddress)