fuchsia.hardware.light

Added: 7

PROTOCOLS

Light

Defined in fuchsia.hardware.light/light.fidl

GetCurrentBrightnessValue

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.

Request

NameType
index uint32

Response

NameType
payload Light_GetCurrentBrightnessValue_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
payload 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
payload Light_GetCurrentSimpleValue_Result

GetGroupCurrentBrightnessValue

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.

Request

NameType
group_id uint32

Response

NameType
payload Light_GetGroupCurrentBrightnessValue_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
payload 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
payload 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
payload 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
payload 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

<EMPTY>

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

<EMPTY>

Response

NameType
count uint32

SetBrightnessValue

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.

Request

NameType
index uint32
value float64

Response

NameType
payload Light_SetBrightnessValue_Result

SetGroupBrightnessValue

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.

Request

NameType
group_id uint32
values vector<float64>

Response

NameType
payload Light_SetGroupBrightnessValue_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
payload 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
payload 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
payload 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
payload Light_SetSimpleValue_Result

STRUCTS

GroupInfo

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
name string:32 No default
count uint32 No default
capability Capability No default

Info

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
name string:32 No default
capability Capability No default

Light_GetCurrentBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
value float64 No default

Light_GetCurrentRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
value Rgb No default

Light_GetCurrentSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
value bool No default

Light_GetGroupCurrentBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
values vector<float64>? No default

Light_GetGroupCurrentRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
values vector<Rgb>? No default

Light_GetGroupCurrentSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
values vector<bool>? No default

Light_GetGroupInfo_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
info GroupInfo No default

Light_GetInfo_Response

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
info Info No default

Light_SetBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

<EMPTY>

Light_SetGroupBrightnessValue_Response

Defined in fuchsia.hardware.light/light.fidl

<EMPTY>

Light_SetGroupRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

<EMPTY>

Light_SetGroupSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

<EMPTY>

Light_SetRgbValue_Response

Defined in fuchsia.hardware.light/light.fidl

<EMPTY>

Light_SetSimpleValue_Response

Defined in fuchsia.hardware.light/light.fidl

<EMPTY>

Rgb

Defined in fuchsia.hardware.light/light.fidl

FieldTypeDescriptionDefault
red float64 No default
green float64 No default
blue float64 No default

ENUMS

Capability strict

Type: uint32

Defined in fuchsia.hardware.light/light.fidl

NameValueDescription
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.

2

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

3

No capabilities

LightError strict

Type: uint32

Defined in fuchsia.hardware.light/light.fidl

NameValueDescription
0
1
2
3

TABLES

Config

Defined in fuchsia.hardware.light/metadata.fidl

Added: HEAD

OrdinalFieldTypeDescription
name string
brightness bool
rgb bool
init_on bool
group_id int32

Metadata

Defined in fuchsia.hardware.light/metadata.fidl

Added: HEAD

OrdinalFieldTypeDescription
configs vector<Config>

UNIONS

Light_GetCurrentBrightnessValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetCurrentBrightnessValue_Response
err LightError

Light_GetCurrentRgbValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetCurrentRgbValue_Response
err LightError

Light_GetCurrentSimpleValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetCurrentSimpleValue_Response
err LightError

Light_GetGroupCurrentBrightnessValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetGroupCurrentBrightnessValue_Response
err LightError

Light_GetGroupCurrentRgbValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetGroupCurrentRgbValue_Response
err LightError

Light_GetGroupCurrentSimpleValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetGroupCurrentSimpleValue_Response
err LightError

Light_GetGroupInfo_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetGroupInfo_Response
err LightError

Light_GetInfo_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_GetInfo_Response
err LightError

Light_SetBrightnessValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_SetBrightnessValue_Response
err LightError

Light_SetGroupBrightnessValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_SetGroupBrightnessValue_Response
err LightError

Light_SetGroupRgbValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_SetGroupRgbValue_Response
err LightError

Light_SetGroupSimpleValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_SetGroupSimpleValue_Response
err LightError

Light_SetRgbValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_SetRgbValue_Response
err LightError

Light_SetSimpleValue_Result strict

Defined in fuchsia.hardware.light/light.fidl

OrdinalVariantTypeDescription
response Light_SetSimpleValue_Response
err LightError

CONSTANTS

NameValueTypeDescription
LIGHT_NAME_LEN 32 uint8
METADATA_TYPE_NAME fuchsia.hardware.light.Metadata String
Added: HEAD