Struct bluerobotics_ping::ping360::DeviceDataStruct
source · pub struct DeviceDataStruct {
pub mode: u8,
pub gain_setting: u8,
pub angle: u16,
pub transmit_duration: u16,
pub sample_period: u16,
pub transmit_frequency: u16,
pub number_of_samples: u16,
pub data_length: u16,
pub data: Vec<u8>,
}Expand description
This message is used to communicate the current sonar state. If the data field is populated, the other fields indicate the sonar state when the data was captured. The time taken before the response to the command is sent depends on the difference between the last angle scanned and the new angle in the parameters as well as the number of samples and sample interval (range). To allow for the worst case reponse time the command timeout should be set to 4000 msec.
Fields§
§mode: u8Operating mode (1 for Ping360)
gain_setting: u8Analog gain setting (0 = low, 1 = normal, 2 = high)
angle: u16Head angle
transmit_duration: u16Acoustic transmission duration (1~1000 microseconds)
sample_period: u16Time interval between individual signal intensity samples in 25nsec increments (80 to 40000 == 2 microseconds to 1000 microseconds)
transmit_frequency: u16Acoustic operating frequency. Frequency range is 500kHz to 1000kHz, however it is only practical to use say 650kHz to 850kHz due to the narrow bandwidth of the acoustic receiver.
number_of_samples: u16Number of samples per reflected signal
data_length: u168 bit binary data array representing sonar echo strength
data: Vec<u8>Trait Implementations§
source§impl Clone for DeviceDataStruct
impl Clone for DeviceDataStruct
source§fn clone(&self) -> DeviceDataStruct
fn clone(&self) -> DeviceDataStruct
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DeviceDataStruct
impl Debug for DeviceDataStruct
source§impl Default for DeviceDataStruct
impl Default for DeviceDataStruct
source§fn default() -> DeviceDataStruct
fn default() -> DeviceDataStruct
source§impl DeserializePayload for DeviceDataStruct
impl DeserializePayload for DeviceDataStruct
fn deserialize(payload: &[u8]) -> Self
source§impl PartialEq for DeviceDataStruct
impl PartialEq for DeviceDataStruct
source§fn eq(&self, other: &DeviceDataStruct) -> bool
fn eq(&self, other: &DeviceDataStruct) -> bool
self and other values to be equal, and is used
by ==.