pub enum DeviceRequest {
Query {
query_id: QueryId,
responder: DeviceQueryResponder,
},
Connect2 {
client_id: u64,
primary_channel: ServerEnd<PrimaryMarker>,
notification_channel: ServerEnd<NotificationMarker>,
control_handle: DeviceControlHandle,
},
}
Expand description
The Magma Device protocol allow clients to learn about the hardware by making queries, such as
device and vendor IDs, and which client drivers are supported by the device’s system driver.
To engage further with the device, clients may establish connections formed of channel pairs:
a primary channel for making requests (see Primary protocol below), and a secondary channel
for receiving notification messages (see Notification protocol below).
Variants§
Query
On success, returns a result either in a buffer or a simple value.
Connect2
Creates a connection to the device comprised of two IPC channels. The primary channel is for the Primary protocol (see below). The notification channel is used for vendor-specific messages which are sent only in the reverse (server-client) direction, typically in response to client command completion.
Fields
primary_channel: ServerEnd<PrimaryMarker>
notification_channel: ServerEnd<NotificationMarker>
control_handle: DeviceControlHandle
Implementations§
Source§impl DeviceRequest
impl DeviceRequest
pub fn into_query(self) -> Option<(QueryId, DeviceQueryResponder)>
pub fn into_connect2( self, ) -> Option<(u64, ServerEnd<PrimaryMarker>, ServerEnd<NotificationMarker>, DeviceControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL