class Light
Defined at line 4968 of file fidling/gen/sdk/fidl/fuchsia.hardware.light/fuchsia.hardware.light/hlcpp/fuchsia/hardware/light/cpp/fidl.h
Public Members
static const char[] Name_
Public Methods
void ~Light ()
void GetNumLights (GetNumLightsCallback callback)
Returns the total number of physical lights.
This will typically be 1 for a simple LED light, but may be greater than one for an array of
lights or a more complicated lighting device.
The multiple lights are addressed using "index" parameter in the calls below.
void GetNumLightGroups (GetNumLightGroupsCallback callback)
Returns the total number of light groups (does not count single lights).
The light groups are addressed using "group_id" parameter in the calls below.
void GetInfo (uint32_t index, GetInfoCallback callback)
Returns info for the single light.
index: Index of the light defined by board. Must be less than value returned by GetNumLights.
void GetCurrentSimpleValue (uint32_t index, GetCurrentSimpleValueCallback callback)
Returns the current value. If the light is ON, the value is True. If the light is OFF,
the value is False.
If the capability 'SIMPLE' is not supported by this light, returns NOT_SUPPORTED.
Use GetInfo to check if light supports this operation.
index: a number between 0 inclusive and the count received from GetNumLights.
void SetSimpleValue (uint32_t index, bool value, SetSimpleValueCallback callback)
Sets the current value. Value should be set to 'TRUE' to turn on the light. Value should be
set to 'FALSE' to turn off the light.
If the capability 'SIMPLE' is not supported by this light, returns NOT_SUPPORTED.
Use GetInfo to check if light supports this operation.
index: a number between 0 inclusive and the count received from GetNumLights.
void GetCurrentBrightnessValue (uint32_t index, GetCurrentBrightnessValueCallback callback)
Returns the current brightness value (0.0 - 1.0) of the light indicated by index, where 0.0
is minimum brightness and 1.0 is maximum.
If the capability 'BRIGHTNESS' is not supported by this light, returns NOT_SUPPORTED.
Use GetInfo to check if light supports this operation.
index: a number between 0 inclusive and the count received from GetNumLights.
void SetBrightnessValue (uint32_t index, double value, SetBrightnessValueCallback callback)
Sets the current brightness value (0.0 - 1.0), where 0.0 is minimum brightness and 1.0 is
maximum.
If the capability 'BRIGHTNESS' is not supported by this light, returns NOT_SUPPORTED.
Use GetInfo to check if light supports this operation.
index: a number between 0 inclusive and the count received from GetNumLights.
void GetCurrentRgbValue (uint32_t index, GetCurrentRgbValueCallback callback)
Returns the current RGB value for the single light.
If the capability 'RGB' is not supported by this light, returns NOT_SUPPORTED.
Use GetInfo to check if light supports this operation.
index: a number between 0 inclusive and the count received from GetNumLights.
void SetRgbValue (uint32_t index, ::fuchsia::hardware::light::Rgb value, SetRgbValueCallback callback)
Sets the current RGB value.
If the capability 'RGB' is not supported by this light, returns NOT_SUPPORTED.
Use GetInfo to check if light supports this operation.
index: a number between 0 inclusive and the count received from GetNumLights.
void GetGroupInfo (uint32_t group_id, GetGroupInfoCallback callback)
Returns group info for the light group.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
void GetGroupCurrentSimpleValue (uint32_t group_id, GetGroupCurrentSimpleValueCallback callback)
Returns an array of the current values.If the light is ON, the value is True. If the light
is OFF, the value is False.
If group_id is invalid, INVALID_INDEX will be returned.
If the capability 'SIMPLE' is not supported by this group, returns NOT_SUPPORTED.
Use GetGroupInfo to check if group supports this operation.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
void SetGroupSimpleValue (uint32_t group_id, ::std::vector<bool> values, SetGroupSimpleValueCallback callback)
Sets the current values through the values array. Value should be set to 'TRUE' to turn on
the light. Value should be set to 'FALSE' to turn off the light.
If group_id is invalid, INVALID_INDEX will be returned.
If the capability 'SIMPLE' is not supported by this group, returns NOT_SUPPORTED.
Use GetGroupInfo to check if group supports this operation.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
void GetGroupCurrentBrightnessValue (uint32_t group_id, GetGroupCurrentBrightnessValueCallback callback)
Returns an array of the current brightness values (0.0 - 1.0) for the light group, where 0.0
is minimum brightness and 1.0 is maximum.
If group_id is invalid, INVALID_INDEX will be returned.
If the capability 'BRIGHTNESS' is not supported by this group, returns NOT_SUPPORTED.
Use GetGroupInfo to check if group supports this operation.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
void SetGroupBrightnessValue (uint32_t group_id, ::std::vector<double> values, SetGroupBrightnessValueCallback callback)
Sets the current brightness values (0.0 - 1.0) for the light group through the values array,
where 0.0 is minimum brightness and 1.0 is maximum.
If group_id is invalid, INVALID_INDEX will be returned.
If the capability 'BRIGHTNESS' is not supported by this group, returns NOT_SUPPORTED.
Use GetGroupInfo to check if group supports this operation.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
void GetGroupCurrentRgbValue (uint32_t group_id, GetGroupCurrentRgbValueCallback callback)
Returns an array of the current RGB values for the light group.
If group_id is invalid, INVALID_INDEX will be returned.
If the capability 'RGB' is not supported by this group, returns NOT_SUPPORTED.
Use GetGroupInfo to check if group supports this operation.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
void SetGroupRgbValue (uint32_t group_id, ::std::vector< ::fuchsia::hardware::light::Rgb> values, SetGroupRgbValueCallback callback)
Sets the current RGB value for the light group.
If group_id is invalid, INVALID_INDEX will be returned.
If the capability 'RGB' is not supported by this group, returns NOT_SUPPORTED.
Use GetGroupInfo to check if group supports this operation.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.