Class MqttManager


  • public class MqttManager
    extends java.lang.Object
    Management classes for interacting with the MQTT server
    Version:
    1.0.0
    Author:
    wmy
    • Constructor Summary

      Constructors 
      Constructor Description
      MqttManager​(com.heisha.heisha_sdk.Manager.MessageHandleCallback messageHandleCallback)
      Constructor for the MQTT Interaction Manager class
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void sendConfigParamGet​(int index)
      Get configuration parameter values
      void sendConfigParamSet​(int index, int value)
      Set configuration parameter values
      void sendControlService​(int code, int operation)
      Sending services to devices
      void sendControlServiceWithParam​(int code, int operation, org.json.JSONObject json)
      Sending services with a field "param" to devices.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MqttManager

        public MqttManager​(com.heisha.heisha_sdk.Manager.MessageHandleCallback messageHandleCallback)
        Constructor for the MQTT Interaction Manager class
        Parameters:
        messageHandleCallback - Message processing callback interface
    • Method Detail

      • sendControlService

        public void sendControlService​(int code,
                                       int operation)
        Sending services to devices
        Parameters:
        code - Service Code
        operation - Service opcode
      • sendControlServiceWithParam

        public void sendControlServiceWithParam​(int code,
                                                int operation,
                                                org.json.JSONObject json)
        Sending services with a field "param" to devices.
        Parameters:
        code - Service Code
        operation - Service opcode
        json - Message body of parameter "params"
      • sendConfigParamGet

        public void sendConfigParamGet​(int index)
        Get configuration parameter values
        Parameters:
        index - Parameter index number
      • sendConfigParamSet

        public void sendConfigParamSet​(int index,
                                       int value)
        Set configuration parameter values
        Parameters:
        index - Parameter index number
        value - parameter value