Class AirConditioner
- java.lang.Object
-
- com.heisha.heisha_sdk.Component.BaseComponent
-
- com.heisha.heisha_sdk.Component.AirConditioner.AirConditioner
-
public class AirConditioner extends BaseComponent
Air conditioner control module- Version:
- 1.0.0
- Author:
- wmy
-
-
Constructor Summary
Constructors Constructor Description AirConditioner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AirConditionerWorkingMode
getAirConditionerWorkingMode()
get air conditioner working modefloat
getCabinTemperature()
Get the air-conditioner cabin temperature.ConnStatus
getConnectionState()
get air conditioner component connection statusint
getFan1SpeedPWM()
get the PWM value of the fan1 speedint
getFan2SpeedPWM()
get the PWM value of the fan2 speedint
getFan3SpeedPWM()
get the PWM value of the fan3 speedbyte
getReplysStatus()
Relay status, high 4 bits from high to low respectively represent the open and close state of relay 7~4, 0 represents open, 1 represents close.int
getSmokeValue()
get the smoke detection sample valuefloat
getVentTemperature()
Get the air-conditioner vent temperature.int
getWaterloggingValue()
get the Waterlogging detection sample valuevoid
onOperateReply(ServiceCode code, ServiceResult result)
Called back when feedback is received from the servicevoid
onPost()
Called back upon receipt of a status report from the Air conditioner control modulevoid
setAirConditionerWorkingMode(AirConditionerWorkingMode airConditionerWorkingMode)
void
setCabinTemperature(float cabinTemperature)
void
setConnectionState(ConnStatus connectionState)
void
setFan1SpeedPWM(int fan1SpeedPWM)
void
setFan2SpeedPWM(int fan2SpeedPWM)
void
setFan3SpeedPWM(int fan3SpeedPWM)
void
setReplysStatus(byte replysStatus)
void
setSmokeValue(int smokeValue)
void
setStateCallback(AirConditionerStateCallback callback)
Instance of implementing event callback interface for air conditioner control modulevoid
setVentTemperature(float ventTemperature)
void
setWaterloggingValue(int waterloggingValue)
-
-
-
Method Detail
-
setStateCallback
public void setStateCallback(AirConditionerStateCallback callback)
Instance of implementing event callback interface for air conditioner control module- Parameters:
callback
- Instance of event callback interface for air conditioner control module
-
onPost
public void onPost()
Called back upon receipt of a status report from the Air conditioner control moduleCallbacks from the SDK itself
-
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
-
getConnectionState
public ConnStatus getConnectionState()
get air conditioner component connection status- Returns:
- component connection status
-
setConnectionState
public void setConnectionState(ConnStatus connectionState)
-
getAirConditionerWorkingMode
public AirConditionerWorkingMode getAirConditionerWorkingMode()
get air conditioner working mode- Returns:
- air conditioner working mode
-
setAirConditionerWorkingMode
public void setAirConditionerWorkingMode(AirConditionerWorkingMode airConditionerWorkingMode)
-
getCabinTemperature
public float getCabinTemperature()
Get the air-conditioner cabin temperature.- Returns:
- temperature °C
-
setCabinTemperature
public void setCabinTemperature(float cabinTemperature)
-
getVentTemperature
public float getVentTemperature()
Get the air-conditioner vent temperature.- Returns:
- temperature °C
-
setVentTemperature
public void setVentTemperature(float ventTemperature)
-
getWaterloggingValue
public int getWaterloggingValue()
get the Waterlogging detection sample value- Returns:
- sample value
-
setWaterloggingValue
public void setWaterloggingValue(int waterloggingValue)
-
getSmokeValue
public int getSmokeValue()
get the smoke detection sample value- Returns:
- sample value
-
setSmokeValue
public void setSmokeValue(int smokeValue)
-
getFan1SpeedPWM
public int getFan1SpeedPWM()
get the PWM value of the fan1 speed- Returns:
- PWM value,0~7
-
setFan1SpeedPWM
public void setFan1SpeedPWM(int fan1SpeedPWM)
-
getFan2SpeedPWM
public int getFan2SpeedPWM()
get the PWM value of the fan2 speed- Returns:
- PWM value,0~7
-
setFan2SpeedPWM
public void setFan2SpeedPWM(int fan2SpeedPWM)
-
getFan3SpeedPWM
public int getFan3SpeedPWM()
get the PWM value of the fan3 speed- Returns:
- PWM value,0~7
-
setFan3SpeedPWM
public void setFan3SpeedPWM(int fan3SpeedPWM)
-
getReplysStatus
public byte getReplysStatus()
Relay status, high 4 bits from high to low respectively represent the open and close state of relay 7~4, 0 represents open, 1 represents close.- Returns:
- relay status
-
setReplysStatus
public void setReplysStatus(byte replysStatus)
-
-