Class AirConditioner


  • public class AirConditioner
    extends BaseComponent
    Air conditioner control module
    Version:
    1.0.0
    Author:
    wmy
    • Constructor Detail

      • AirConditioner

        public AirConditioner()
    • 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 module

        Callbacks from the SDK itself

      • onOperateReply

        public void onOperateReply​(ServiceCode code,
                                   ServiceResult result)
        Called back when feedback is received from the service

        Callbacks from the SDK itself

        Parameters:
        code - Device Service Code
        result - 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)