pub enum DriverRequest {
Stop {
control_handle: DriverControlHandle,
},
HealthCheck {
request: HealthCheckRequest,
responder: DriverHealthCheckResponder,
},
}Expand description
Protocol through which a driver’s lifecycle can be managed.
The Driver Runner will call Stop() on this protocol to indicate that the Driver Host should stop the Driver. The Driver Host should close the server end of the channel with an epitath to signal that the driver has been stopped.
EPITAPH
This protocol sends a FIDL epitaph to indicate that the driver instance has been terminated correctly. The Driver Host must send an epitaph of ZX_OK in order to indicate the Driver was Stopped correctly. Not sending an epitaph, or sending an error, will cause Driver Runner to log an error.
Variants§
Stop
Request that the Driver is Stopped.
After stopping the driver instance, the server should close this connection with an epitath. This signals that the Driver has been stopped.
Fields
control_handle: DriverControlHandleHealthCheck
Requests the driver to perform a self-diagnostic check.
The Driver Host enforces per-level deadlines (PING 250ms, FAST 2s,
DEEP 2min) and fails the call with TIMEOUT if the driver does not
reply in time. A check is only forwarded while the driver is resumed;
otherwise the Driver Host replies INVALID_STATE itself, and a check
whose completion is observed while the driver is no longer resumed is
also answered INVALID_STATE. A driver built against an SDK without
HealthCheck replies NOT_SUPPORTED; other transport failures reply
INTERNAL_ERROR. In-flight checks are answered with INVALID_STATE
when Stop is received.
Implementations§
Source§impl DriverRequest
impl DriverRequest
pub fn into_stop(self) -> Option<DriverControlHandle>
pub fn into_health_check( self, ) -> Option<(HealthCheckRequest, DriverHealthCheckResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL