Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.light

PROTOCOLS

Light

Defined in fuchsia.hardware.light/light.fidl

GetCurrentBrightnessValue

Returns the current brightness value (0 - 255) of the light indicated by index. 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.

Request

NameType
index uint32

Response

NameType
result Light_GetCurrentBrightnessValue_Result

GetCurrentBrightnessValue2

Redundant to GetCurrentBrightnessValue for transition.

Request

NameType
index uint32

Response

NameType
result Light_GetCurrentBrightnessValue2_Result

GetCurrentRgbValue

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.

Request

NameType
index uint32

Response

NameType
result Light_GetCurrentRgbValue_Result

GetCurrentSimpleValue

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.

Request

NameType
index uint32

Response

NameType
result Light_GetCurrentSimpleValue_Result

GetGroupCurrentBrightnessValue

Returns an array of the current brightness values (0 - 255) for the light group. 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.

Request

NameType
group_id uint32

Response

NameType
result Light_GetGroupCurrentBrightnessValue_Result

GetGroupCurrentBrightnessValue2

Redundant to GetGroupCurrentBrightnessValue for transition.

Request

NameType
group_id uint32

Response

NameType
result Light_GetGroupCurrentBrightnessValue2_Result

GetGroupCurrentRgbValue

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.

Request

NameType
group_id uint32

Response

NameType
result Light_GetGroupCurrentRgbValue_Result

GetGroupCurrentSimpleValue

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.

Request

NameType
group_id uint32

Response

NameType
result Light_GetGroupCurrentSimpleValue_Result

GetGroupInfo

Returns group info for the light group. group_id: a number between 0 inclusive and the count received from GetNumLightGroups.

Request

NameType
group_id uint32

Response

NameType
result Light_GetGroupInfo_Result

GetInfo

Returns info for the single light. index: Index of the light defined by board. Must be less than value returned by GetNumLights.

Request

NameType
index uint32

Response

NameType
result Light_GetInfo_Result

GetNumLightGroups

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.

Request

NameType

Response

NameType
count uint32

GetNumLights

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.

Request

NameType

Response

NameType
count uint32

SetBrightnessValue

Sets the current brightness value (0 - 255). 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.

Request

NameType
index uint32
value uint8

Response

NameType
result Light_SetBrightnessValue_Result

SetBrightnessValue2

Redundant to SetBrightnessValue for transition.

Request

NameType
index uint32
value uint8

Response

NameType
result Light_SetBrightnessValue2_Result

SetGroupBrightnessValue

Sets the current brightness values (0 - 255) for the light group through the values array. 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.

Request

NameType
group_id uint32
values vector<uint8>

Response

NameType
result Light_SetGroupBrightnessValue_Result

SetGroupBrightnessValue2

Redundant to GetGroupCurrentBrightnessValue for transition.

Request

NameType
group_id uint32
values vector<uint8>

Response

NameType
result Light_SetGroupBrightnessValue2_Result

SetGroupRgbValue

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.

Request

NameType
group_id uint32
values vector<Rgb>

Response

NameType
result Light_SetGroupRgbValue_Result

SetGroupSimpleValue

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.

Request

NameType
group_id uint32
values vector<bool>

Response

NameType
result Light_SetGroupSimpleValue_Result

SetRgbValue

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.

Request

NameType
index uint32
value Rgb

Response

NameType
result Light_SetRgbValue_Result

SetSimpleValue

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.

Request

NameType
index uint32
value bool

Response

NameType
result Light_SetSimpleValue_Result

STRUCTS

GroupInfo

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
name string[32] No default
count uint32 No default
capability Capability No default

Info

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
name string[32] No default
capability Capability No default

Light_GetCurrentBrightnessValue2_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
value uint8 No default

Light_GetCurrentBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
value uint8 No default

Light_GetCurrentRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
value Rgb No default

Light_GetCurrentSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
value bool No default

Light_GetGroupCurrentBrightnessValue2_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
values vector<uint8>? No default

Light_GetGroupCurrentBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
values vector<uint8>? No default

Light_GetGroupCurrentRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
values vector<Rgb>? No default

Light_GetGroupCurrentSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
values vector<bool>? No default

Light_GetGroupInfo_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
info GroupInfo No default

Light_GetInfo_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
info Info No default

Light_SetBrightnessValue2_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Light_SetBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Light_SetGroupBrightnessValue2_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Light_SetGroupBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Light_SetGroupRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Light_SetGroupSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Light_SetRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Light_SetSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault

Rgb

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescriptionDefault
red uint8 No default
green uint8 No default
blue uint8 No default

ENUMS

Capability

Type: uint32

Defined in fuchsia.hardware.light/light.fidl

NameValueDescription
BRIGHTNESS 1

This capability indicates that the light supports setting brightness to a uint8_t value. If this capability is not supported, the light only supports off and on state.

RGB 2

This capability indicates that the light supports setting an RGB value.

SIMPLE 3

No capabilities

LightError

Type: uint32

Defined in fuchsia.hardware.light/light.fidl

NameValueDescription
OK 0
NOT_SUPPORTED 1
INVALID_INDEX 2
FAILED 3

UNIONS

Light_GetCurrentBrightnessValue2_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetCurrentBrightnessValue2_Response
err LightError

Light_GetCurrentBrightnessValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetCurrentBrightnessValue_Response
err LightError

Light_GetCurrentRgbValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetCurrentRgbValue_Response
err LightError

Light_GetCurrentSimpleValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetCurrentSimpleValue_Response
err LightError

Light_GetGroupCurrentBrightnessValue2_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetGroupCurrentBrightnessValue2_Response
err LightError

Light_GetGroupCurrentBrightnessValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetGroupCurrentBrightnessValue_Response
err LightError

Light_GetGroupCurrentRgbValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetGroupCurrentRgbValue_Response
err LightError

Light_GetGroupCurrentSimpleValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetGroupCurrentSimpleValue_Response
err LightError

Light_GetGroupInfo_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetGroupInfo_Response
err LightError

Light_GetInfo_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_GetInfo_Response
err LightError

Light_SetBrightnessValue2_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetBrightnessValue2_Response
err LightError

Light_SetBrightnessValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetBrightnessValue_Response
err LightError

Light_SetGroupBrightnessValue2_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetGroupBrightnessValue2_Response
err LightError

Light_SetGroupBrightnessValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetGroupBrightnessValue_Response
err LightError

Light_SetGroupRgbValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetGroupRgbValue_Response
err LightError

Light_SetGroupSimpleValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetGroupSimpleValue_Response
err LightError

Light_SetRgbValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetRgbValue_Response
err LightError

Light_SetSimpleValue_Result

Defined in fuchsia.hardware.light/light.fidl

NameTypeDescription
response Light_SetSimpleValue_Response
err LightError

CONSTANTS

NameValueTypeDescription
LIGHT_NAME_LEN 32 uint8