Class ControlCenter
- java.lang.Object
-
- com.heisha.heisha_sdk.Component.BaseComponent
-
- com.heisha.heisha_sdk.Component.ControlCenter.ControlCenter
-
public class ControlCenter extends BaseComponent
central control module- Version:
- 1.0.0
- Author:
- wmy
-
-
Constructor Summary
Constructors Constructor Description ControlCenter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getConfigParameter(ConfigParameter parameter)
Get configuration parameter valuesvoid
getConfigVersionInfo()
Get parameter version informationThing
getThing()
Get the entity of the latest received thing.void
OneClickCharging()
One-click charging.void
OneClickChargingEnforcedly()
One-click charging enforcedly.void
OneClickChargingStop()
Stop one-click charging.void
OneClickFlightPreparation()
One-click flight preparation.void
OneClickFlightPreparationStop()
Stop one-click flight preparation.void
onGetConfigReply(ServiceResult result, ConfigParameter paramIndex, int value)
Called back when receiving feedback on a configuration parameter access requestvoid
onGetConfigVersionInfoReply(int version, int paramNum)
Called back when receiving feedback on a configuration parameter version information access requestvoid
onOperateReply(ServiceCode code, ServiceResult result)
Called back when feedback is received from the servicevoid
onSetConfigReply(ServiceResult result, ConfigParameter paramIndex, ConfigFailReason reason)
Called back when receiving feedback on configuration parameter settingsvoid
onThingPost(ThingLevel level, int code, int alarm, java.lang.String fileName)
Called back when event report is receivedvoid
resetSystem()
System Resetvoid
sendAnAlert(ServiceCode serviceCode)
Send an alert to the alerter.void
setConfigParameter(ConfigParameter parameter, int value)
Set parameter valuesvoid
setStateCallback(ControlCenterStateCallback callback)
Instance of implementing the event callback interface of the central control module
-
-
-
Method Detail
-
setStateCallback
public void setStateCallback(ControlCenterStateCallback callback)
Instance of implementing the event callback interface of the central control module- Parameters:
callback
- Central control module event callback interface instance
-
onThingPost
public void onThingPost(ThingLevel level, int code, int alarm, java.lang.String fileName)
Called back when event report is receivedCallbacks from the SDK itself
- Parameters:
level
- Reported event levelcode
- Reported event codealarm
- The code of the "alarm" in "params"fileName
- The value of the "file_name" in "params"
-
onOperateReply
public void onOperateReply(ServiceCode code, ServiceResult result)
Called back when feedback is received from the serviceCallbacks from the SDK itself
- Parameters:
code
- Device Service Coderesult
- Feedback result of service delivery
-
onGetConfigVersionInfoReply
public void onGetConfigVersionInfoReply(int version, int paramNum)
Called back when receiving feedback on a configuration parameter version information access requestCallbacks from the SDK itself
- Parameters:
version
- Parameter configuration versionparamNum
- Number of configurable parameters
-
onGetConfigReply
public void onGetConfigReply(ServiceResult result, ConfigParameter paramIndex, int value)
Called back when receiving feedback on a configuration parameter access requestCallbacks from the SDK itself
- Parameters:
result
- Feedback result of service deliveryparamIndex
- Parameter Sequence Numbervalue
- Parameter value
-
onSetConfigReply
public void onSetConfigReply(ServiceResult result, ConfigParameter paramIndex, ConfigFailReason reason)
Called back when receiving feedback on configuration parameter settingsCallbacks from the SDK itself
- Parameters:
result
- Feedback result of service deliveryparamIndex
- Parameter Sequence Numberreason
- Reasons for failure to set configuration parameters
-
resetSystem
public void resetSystem()
System Reset
-
OneClickFlightPreparation
public void OneClickFlightPreparation()
One-click flight preparation.
-
OneClickFlightPreparationStop
public void OneClickFlightPreparationStop()
Stop one-click flight preparation.
-
OneClickCharging
public void OneClickCharging()
One-click charging.
-
OneClickChargingStop
public void OneClickChargingStop()
Stop one-click charging.
-
OneClickChargingEnforcedly
public void OneClickChargingEnforcedly()
One-click charging enforcedly.
-
sendAnAlert
public void sendAnAlert(ServiceCode serviceCode)
Send an alert to the alerter.- Parameters:
serviceCode
- Device Service Code
-
getConfigVersionInfo
public void getConfigVersionInfo()
Get parameter version information
-
getConfigParameter
public void getConfigParameter(ConfigParameter parameter)
Get configuration parameter values- Parameters:
parameter
- Parameter Sequence Number
-
setConfigParameter
public void setConfigParameter(ConfigParameter parameter, int value)
Set parameter values- Parameters:
parameter
- Parameter Sequence Numbervalue
- Parameter value
-
getThing
public Thing getThing()
Get the entity of the latest received thing.- Returns:
- the latest received thing
-
-