Rooftop control
State
Dimming
Declaration
getDimming()
Discussion
1.0 (100%) is opaque, 0.0 (0%) is transparent
Example
val state:RooftopControl.State
assertTrue(state.dimming.value == 1.0)
// Rooftop is opaque (100%)
Position
Declaration
getPosition()
Discussion
1.0 (100%) is fully open, 0.0 (0%) is closed
Example
val state:RooftopControl.State
assertTrue(state.position.value == 0.5)
// Rooftop is half-open (50%)
Convertible roof state
Declaration
getConvertibleRoofState()
Example
val state:RooftopControl.State
assertTrue(state.convertibleRoofState.value == RooftopControl.ConvertibleRoofState.OPEN)
// Convertible roof is open
Sunroof tilt state
Declaration
getSunroofTiltState()
Example
val state:RooftopControl.State
assertTrue(state.sunroofTiltState.value == RooftopControl.SunroofTiltState.HALF_TILTED)
// Sunroof is half-tilted
Sunroof state
Declaration
getSunroofState()
Example
val state:RooftopControl.State
assertTrue(state.sunroofState.value == RooftopControl.SunroofState.OPEN)
// Sunroof is open
Sunroof rain event
Declaration
getSunroofRainEvent()
Discussion
Sunroof event happened in case of rain
Example
val state:RooftopControl.State
assertTrue(state.sunroofRainEvent.value == RooftopControl.SunroofRainEvent.NO_EVENT)
// Sunroof had no rain event
Setters
Control rooftop
Declaration
public ControlRooftop(@Nullable Double dimming, @Nullable Double position, @Nullable ConvertibleRoofState convertibleRoofState, @Nullable SunroofTiltState sunroofTiltState, @Nullable SunroofState sunroofState)
Example
val controlRooftop = RooftopControl.ControlRooftop(1.0, 0.5, RooftopControl.ConvertibleRoofState.OPEN, RooftopControl.SunroofTiltState.HALF_TILTED, RooftopControl.SunroofState.OPEN)
Getters
Get Rooftop Control property availability information
Declaration
public GetRooftopStateAvailability()
public GetRooftopStateAvailability(byte... propertyIdentifiers)
Example
// get all property availabilities
val getAvailability = GetRooftopStateAvailability()
// get dimming and position property availabilities
val getAvailabilityProperties = GetRooftopStateAvailability(0x01, 0x02)
Get rooftop state
Declaration
public GetRooftopState()
public GetRooftopState(byte... propertyIdentifiers)
Example
// get all properties
val getState = GetRooftopState()
// get dimming and position properties
val getStateProperties = GetRooftopState(0x01, 0x02)