Interface IIoTCClient

All Known Implementing Classes:
IoTCClient

public interface IIoTCClient
  • Method Details

    • SetModelId

      void SetModelId(String modelId)
      Parameters:
      modelId - IoT Central model Id for automatic approval process
    • SetGlobalEndpoint

      void SetGlobalEndpoint(String endpoint)
      Set global endpoint for DPS provisioning
      Parameters:
      endpoint - hostname without protocol
    • Disconnect

      void Disconnect() throws IoTCentralException
      Disconnect device. Client cannot be reused after disconnect!!!
      Throws:
      IoTCentralException - If disconnection fails
    • Connect

      void Connect() throws IoTCentralException
      Connect the device
      Throws:
      IoTCentralException - If connection fails
    • Connect

      void Connect(Integer timeout) throws IoTCentralException
      Connect the device
      Parameters:
      timeout - Timeout in seconds before forcing connection stop
      Throws:
      IoTCentralException - If connection fails
    • SendTelemetry

      void SendTelemetry(Object payload) throws IoTCentralException
      Parameters:
      payload - Message to send: can be any type (usually json) or a collection of messages
      Throws:
      IoTCentralException - If telemetry delivery failed
    • SendTelemetry

      void SendTelemetry(String payload) throws IoTCentralException
      Parameters:
      payload - Message to send: can be any type (usually json) or a collection of messages
      Throws:
      IoTCentralException - If telemetry delivery failed
    • SendTelemetry

      void SendTelemetry(Object payload, Object properties) throws IoTCentralException
      Parameters:
      payload - Message to send: can be any type (usually json) or a collection of messages
      properties - Properties to be added to the message (JSON format)
      Throws:
      IoTCentralException - If telemetry delivery failed
    • SendTelemetry

      void SendTelemetry(String payload, Object properties) throws IoTCentralException
      Parameters:
      payload - Message to send: can be any type (usually json) or a collection of messages
      properties - Properties to be added to the message (JSON format)
      Throws:
      IoTCentralException - If telemetry delivery failed
    • SendTelemetry

      void SendTelemetry(String payload, String properties) throws IoTCentralException
      Parameters:
      payload - Message to send: can be any type (usually json) or a collection of messages
      properties - Properties to be added to the message (JSON format)
      Throws:
      IoTCentralException - If telemetry delivery failed
    • SendTelemetry

      void SendTelemetry(Object payload, String properties) throws IoTCentralException
      Parameters:
      payload - Message to send: can be any type (usually json) or a collection of messages
      properties - Properties to be added to the message (JSON format)
      Throws:
      IoTCentralException - If telemetry delivery failed
    • SendProperty

      void SendProperty(Object payload) throws IoTCentralException
      Parameters:
      payload - Property to send: can be any type (usually json) or a collection of properties
      Throws:
      IoTCentralException - If property delivery fails
    • SendProperty

      void SendProperty(String payload) throws IoTCentralException
      Parameters:
      payload - Property to send: can be any type (usually json) or a collection of properties
      Throws:
      IoTCentralException - If property delivery fails
    • SetProtocol

      void SetProtocol(IOTC_PROTOCOL transport)
    • on

      void on(IOTC_EVENTS eventName, IoTCCallback callback)
      Parameters:
      eventName - name of the event to listen
      callback - function to execute when event triggers
    • SetLogging

      void SetLogging(IOTC_LOGGING loggingLevel)
    • IsConnected

      boolean IsConnected()
    • FetchTwin

      void FetchTwin() throws IoTCentralException
      Throws:
      IoTCentralException
    • UploadFile

      boolean UploadFile(String fileName, File file) throws IoTCentralException
      Throws:
      IoTCentralException
    • UploadFile

      boolean UploadFile(String fileName, File file, String encoding) throws IoTCentralException
      Throws:
      IoTCentralException