Package com.heisha.heisha_sdk.Manager
Class MqttManager
- java.lang.Object
-
- com.heisha.heisha_sdk.Manager.MqttManager
-
public class MqttManager extends java.lang.Object
Management classes for interacting with the MQTT server- Version:
- 1.0.0
- Author:
- wmy
-
-
Field Summary
Fields Modifier and Type Field Description static int
SERVICE_OP_CANCEL
static int
SERVICE_OP_EXECUTE
-
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 valuesvoid
sendConfigParamSet(int index, int value)
Set configuration parameter valuesvoid
sendControlService(int code, int operation)
Sending services to devicesvoid
sendControlServiceWithParam(int code, int operation, org.json.JSONObject json)
Sending services with a field "param" to devices.
-
-
-
Field Detail
-
SERVICE_OP_EXECUTE
public static final int SERVICE_OP_EXECUTE
- See Also:
- Constant Field Values
-
SERVICE_OP_CANCEL
public static final int SERVICE_OP_CANCEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
sendControlService
public void sendControlService(int code, int operation)
Sending services to devices- Parameters:
code
- Service Codeoperation
- 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 Codeoperation
- Service opcodejson
- 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 numbervalue
- parameter value
-
-