pub enum InputDeviceRequest {
GetInputReportsReader {
reader: ServerEnd<InputReportsReaderMarker>,
control_handle: InputDeviceControlHandle,
},
GetDescriptor {
responder: InputDeviceGetDescriptorResponder,
},
SendOutputReport {
report: OutputReport,
responder: InputDeviceSendOutputReportResponder,
},
GetFeatureReport {
responder: InputDeviceGetFeatureReportResponder,
},
SetFeatureReport {
report: FeatureReport,
responder: InputDeviceSetFeatureReportResponder,
},
GetInputReport {
device_type: DeviceType,
responder: InputDeviceGetInputReportResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: InputDeviceControlHandle,
method_type: MethodType,
},
}
Expand description
An InputDevice
driver represents a single physical input device.
The InputDevice maintains an internal FIFO of MAX_DEVICE_REPORT_COUNT
reports for each client that connects. Reports are removed from the FIFO
once they are read by the client. If the FIFO is full, it will drop the
oldest report to make room for an incoming report.
Variants§
GetInputReportsReader
Open a new InputReportsReader on this device. Each reader receives their own reports.
GetDescriptor
Gets the device descriptor for this device.
Fields
responder: InputDeviceGetDescriptorResponder
SendOutputReport
Send a single output report to the device. This will throw an error if the output report does not follow the OutputDescriptor.
GetFeatureReport
Get the feature report for a given device. This requests the state of the device’s features.
Fields
responder: InputDeviceGetFeatureReportResponder
SetFeatureReport
Set the feature report for a given device. This sets the state of the device’s features.
GetInputReport
For general cases, InputReportReader is the preferred way of getting
InputReports. For devices that don’t send InputReports naturally, this
method can be used to request a report from the device type indicated.
Does not block, and returns ZX_ERR_NOT_SUPPORTED if GetInputReport
or
device_type
are not supported.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: InputDeviceControlHandle
method_type: MethodType
Implementations§
Source§impl InputDeviceRequest
impl InputDeviceRequest
pub fn into_get_input_reports_reader( self, ) -> Option<(ServerEnd<InputReportsReaderMarker>, InputDeviceControlHandle)>
pub fn into_get_descriptor(self) -> Option<InputDeviceGetDescriptorResponder>
pub fn into_send_output_report( self, ) -> Option<(OutputReport, InputDeviceSendOutputReportResponder)>
pub fn into_get_feature_report( self, ) -> Option<InputDeviceGetFeatureReportResponder>
pub fn into_set_feature_report( self, ) -> Option<(FeatureReport, InputDeviceSetFeatureReportResponder)>
pub fn into_get_input_report( self, ) -> Option<(DeviceType, InputDeviceGetInputReportResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL