Trait bluerobotics_ping::device::PingDevice
source · pub trait PingDevice {
// Required methods
fn get_common(&self) -> &Common;
fn get_mut_common(&mut self) -> &mut Common;
// Provided methods
fn subscribe(&self) -> Receiver<ProtocolMessage> { ... }
async fn send_general_request(
&self,
requested_id: u16
) -> Result<(), PingError> { ... }
async fn wait_for_message<T>(
&self,
receiver: Receiver<ProtocolMessage>
) -> Result<T, PingError>
where T: MessageInfo + Sync + Clone + Send + 'static { ... }
async fn wait_for_ack(
&self,
receiver: Receiver<ProtocolMessage>,
message_id: u16
) -> Result<(), PingError> { ... }
async fn request<T>(&self) -> Result<T, PingError>
where T: MessageInfo + Sync + Clone + Send + 'static { ... }
async fn device_information(
&self
) -> Result<DeviceInformationStruct, PingError> { ... }
async fn protocol_version(&self) -> Result<ProtocolVersionStruct, PingError> { ... }
async fn set_device_id(&self, device_id: u8) -> Result<(), PingError> { ... }
}Required Methods§
fn get_common(&self) -> &Common
fn get_mut_common(&mut self) -> &mut Common
Provided Methods§
fn subscribe(&self) -> Receiver<ProtocolMessage>
async fn send_general_request(&self, requested_id: u16) -> Result<(), PingError>
async fn wait_for_message<T>( &self, receiver: Receiver<ProtocolMessage> ) -> Result<T, PingError>
async fn wait_for_ack( &self, receiver: Receiver<ProtocolMessage>, message_id: u16 ) -> Result<(), PingError>
async fn request<T>(&self) -> Result<T, PingError>
sourceasync fn device_information(&self) -> Result<DeviceInformationStruct, PingError>
async fn device_information(&self) -> Result<DeviceInformationStruct, PingError>
Device information
sourceasync fn protocol_version(&self) -> Result<ProtocolVersionStruct, PingError>
async fn protocol_version(&self) -> Result<ProtocolVersionStruct, PingError>
The protocol version
Object Safety§
This trait is not object safe.