template <>
class Server
Defined at line 985 of file fidling/gen/sdk/fidl/fuchsia.hardware.light/fuchsia.hardware.light/cpp/fidl/fuchsia.hardware.light/cpp/natural_messaging.h
Public Methods
void GetNumLights (GetNumLightsCompleter::Sync & completer)
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 (GetNumLightGroupsCompleter::Sync & completer)
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 (GetInfoRequest & request, GetInfoCompleter::Sync & completer)
Returns info for the single light.
index: Index of the light defined by board. Must be less than value returned by GetNumLights.
void GetCurrentSimpleValue (GetCurrentSimpleValueRequest & request, GetCurrentSimpleValueCompleter::Sync & completer)
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 Server ()
Defined at line 988 of file fidling/gen/sdk/fidl/fuchsia.hardware.light/fuchsia.hardware.light/cpp/fidl/fuchsia.hardware.light/cpp/natural_messaging.h
void SetSimpleValue (SetSimpleValueRequest & request, SetSimpleValueCompleter::Sync & completer)
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 (GetCurrentBrightnessValueRequest & request, GetCurrentBrightnessValueCompleter::Sync & completer)
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 (SetBrightnessValueRequest & request, SetBrightnessValueCompleter::Sync & completer)
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 (GetCurrentRgbValueRequest & request, GetCurrentRgbValueCompleter::Sync & completer)
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 (SetRgbValueRequest & request, SetRgbValueCompleter::Sync & completer)
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 (GetGroupInfoRequest & request, GetGroupInfoCompleter::Sync & completer)
Returns group info for the light group.
group_id: a number between 0 inclusive and the count received from GetNumLightGroups.
void GetGroupCurrentSimpleValue (GetGroupCurrentSimpleValueRequest & request, GetGroupCurrentSimpleValueCompleter::Sync & completer)
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 (SetGroupSimpleValueRequest & request, SetGroupSimpleValueCompleter::Sync & completer)
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 (GetGroupCurrentBrightnessValueRequest & request, GetGroupCurrentBrightnessValueCompleter::Sync & completer)
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 (SetGroupBrightnessValueRequest & request, SetGroupBrightnessValueCompleter::Sync & completer)
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 (GetGroupCurrentRgbValueRequest & request, GetGroupCurrentRgbValueCompleter::Sync & completer)
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 (SetGroupRgbValueRequest & request, SetGroupRgbValueCompleter::Sync & completer)
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.
Handler bind_handler (async_dispatcher_t * dispatcher)
|bind_handler| returns a handler that binds incoming connections to this
server implementation.
The returned handler borrows the server instance.
The server must outlive the provided |dispatcher|. Only after
the dispatcher is shutdown will it be safe to destroy the servers.
The server should not be moved.
void ~Server ()
Defined at line 989 of file fidling/gen/sdk/fidl/fuchsia.hardware.light/fuchsia.hardware.light/cpp/fidl/fuchsia.hardware.light/cpp/natural_messaging.h