pub struct DeviceSynchronousProxy { /* private fields */ }
Implementations§
source§impl DeviceSynchronousProxy
impl DeviceSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<DeviceEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<DeviceEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn query(
&self,
query_id: QueryId,
___deadline: Time
) -> Result<DeviceQueryResult, Error>
pub fn query( &self, query_id: QueryId, ___deadline: Time ) -> Result<DeviceQueryResult, Error>
On success, returns a result either in a buffer or a simple value.
sourcepub fn connect2(
&self,
client_id: u64,
primary_channel: ServerEnd<PrimaryMarker>,
notification_channel: ServerEnd<NotificationMarker>
) -> Result<(), Error>
pub fn connect2( &self, client_id: u64, primary_channel: ServerEnd<PrimaryMarker>, notification_channel: ServerEnd<NotificationMarker> ) -> Result<(), Error>
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.