class DriverImpl
Defined at line 19 of file ../../src/sensors/playback/driver_impl.h
Public Methods
void DriverImpl (async_dispatcher_t * dispatcher, PlaybackController & controller)
Defined at line 25 of file ../../src/sensors/playback/driver_impl.cc
void GetSensorsList (GetSensorsListCompleter::Sync & completer)
Driver protocol method implementations.
Defined at line 28 of file ../../src/sensors/playback/driver_impl.cc
void ActivateSensor (ActivateSensorRequest & request, ActivateSensorCompleter::Sync & completer)
Defined at line 37 of file ../../src/sensors/playback/driver_impl.cc
void DeactivateSensor (DeactivateSensorRequest & request, DeactivateSensorCompleter::Sync & completer)
Defined at line 53 of file ../../src/sensors/playback/driver_impl.cc
void BindSelfManagedServer (async_dispatcher_t * dispatcher, async::Executor & cleanup_executor, PlaybackController & controller, fidl::ServerEnd<Driver> server_end)
Server connection management.
LIFECYCLE NOTES:
Cleaning up when a Driver protocol client disconnects involves waiting for some cleanup to
happen on the playback controller thread. In order to do this, the version of BindServer which
accepts a shared_ptr is used so that the DriverImpl instance can be kept alive after the
OnUnbound callback returns.
A copy of the shared_ptr is stored in a callback which is given to the controller when it is
notified of the client's disconnection. When the controller cleanup is done, it will call the
callback which in turn schedules a promise that resets the shared_ptr (deleting the DriverImpl
instance). It's not legal for the DriverImpl to delete itself in a task scheduled on it's own
Executor. Instead, a separate Executor which schedules on the same thread but outlives the
DriverImpl instance is provided for the final part of the cleanup.
Defined at line 55 of file ../../src/sensors/playback/driver_impl.h
void ConfigureSensorRate (ConfigureSensorRateRequest & request, ConfigureSensorRateCompleter::Sync & completer)
Defined at line 69 of file ../../src/sensors/playback/driver_impl.cc
void handle_unknown_method (fidl::UnknownMethodMetadata<Driver> metadata, fidl::UnknownMethodCompleter::Sync & completer)
Defined at line 85 of file ../../src/sensors/playback/driver_impl.cc
void OnUnbound (fidl::UnbindInfo info, fidl::ServerEnd<Driver> server_end, fit::callback<void ()> unbind_callback)
Defined at line 91 of file ../../src/sensors/playback/driver_impl.cc
fpromise::promise<void> DisconnectClient (zx_status_t epitaph)
Defined at line 111 of file ../../src/sensors/playback/driver_impl.cc