class ClientStateControl

Defined at line 280 of file fidling/gen/src/power/fidl/testing/test.thermal/hlcpp/test/thermal/cpp/fidl.h

Enables tests to manipulate the thermal state of clients via a test service.

A service would implement both this protocol and

`fuchsia.thermal.ClientStateConnector` /

`fuchsia.thermal.ClientStateWatcher`. It would be injected into the

environment of the component under test. Once a client has connected to the

`ClientStateControl` service (using

`fuchsia.thermal.ClientStateConnector/Connect`) and issued a

`fuchsia.thermal.ClientStateWatcher/Watch` request, a test suite can

directly trigger state-change commands to that client by calling

`ClientStateControl/SetThermalState`.

Public Members

static const char[] Name_

Public Methods

void ~ClientStateControl ()
void IsClientTypeConnected (::std::string client_type, IsClientTypeConnectedCallback callback)

Checks if a client of the specified type has an active

`fuchsia.thermal.ClientStateWatcher` connection.

The request completes immediately (no hanging-get or waiting behavior).

If a `ClientStateWatcher` was connected but then closes the channel,

this method would then return false for that client type until a later

time if/when that client type reconnects.

void SetThermalState (::std::string client_type, uint64_t state, SetThermalStateCallback callback)

Sets the thermal state of the specified client type.

It is a fatal error to call this method before a client of the specified

type has first connected to the `ClientStateConnector` service.

If a client of the specified type has a pending `Watch` request, then

the client will be updated with the new thermal state. The pending

`Watch` request will be completed before this method is completed.

If a client of the specified type does not have a pending `Watch`

request, then the new thermal state will be cached and this method will

be completed immediately.