[][src]Struct rplidar_drv::RplidarDevice

pub struct RplidarDevice<T: ?Sized> { /* fields omitted */ }

Rplidar device driver

Methods

impl<T: ?Sized> RplidarDevice<T> where
    T: Read + Write
[src]

pub fn new(channel: Channel<RplidarHostProtocol, T>) -> RplidarDevice<T>[src]

Construct a new RplidarDevice with channel

Example

This example is not tested
let mut serial_port = serialport::open(serial_port_name)?;
let channel = Channel::new(RplidarHostProtocol::new(), serial_port);
let rplidar_device = RplidarDevice::new(channel);

pub fn with_stream(stream: Box<T>) -> RplidarDevice<T>[src]

Construct a new RplidarDevice with stream

Example

This example is not tested
let mut serial_port = serialport::open(serial_port_name)?;
let rplidar_device = RplidarDevice::with_stream(serial_port);

pub fn get_device_info(&mut self) -> Result<RplidarResponseDeviceInfo>[src]

get device info of the RPLIDAR

pub fn get_device_info_with_timeout(
    &mut self,
    timeout: Duration
) -> Result<RplidarResponseDeviceInfo>
[src]

get device info of the RPLIDAR with timeout

pub fn stop(&mut self) -> Result<()>[src]

Stop lidar

pub fn core_reset(&mut self) -> Result<()>[src]

Reset RPLIDAR core

pub fn set_motor_pwm(&mut self, pwm: u16) -> Result<()>[src]

Set motor PWM (via accessory board)

pub fn stop_motor(&mut self) -> Result<()>[src]

Stop motor

pub fn start_motor(&mut self) -> Result<()>[src]

Start motor

pub fn get_typical_scan_mode(&mut self) -> Result<u16>[src]

get typical scan mode of target LIDAR

pub fn get_typical_scan_mode_with_timeout(
    &mut self,
    timeout: Duration
) -> Result<u16>
[src]

get typical scan mode of target LIDAR with timeout

pub fn get_all_supported_scan_modes(&mut self) -> Result<Vec<ScanMode>>[src]

get all supported scan modes supported by the LIDAR

pub fn get_all_supported_scan_modes_with_timeout(
    &mut self,
    timeout: Duration
) -> Result<Vec<ScanMode>>
[src]

get all supported scan modes supported by the LIDAR with timeout

pub fn start_scan(&mut self) -> Result<ScanMode>[src]

start scan

pub fn start_scan_with_timeout(&mut self, timeout: Duration) -> Result<ScanMode>[src]

start scan with timeout

pub fn start_scan_with_options(
    &mut self,
    options: &ScanOptions
) -> Result<ScanMode>
[src]

start scan with options

pub fn start_scan_with_options_and_timeout(
    &mut self,
    options: &ScanOptions,
    timeout: Duration
) -> Result<ScanMode>
[src]

start scan with options and non-default timeout

pub fn grab_scan_point(&mut self) -> Result<ScanPoint>[src]

read scan point

pub fn grab_scan_point_with_timeout(
    &mut self,
    timeout: Duration
) -> Result<ScanPoint>
[src]

read scan point with timeout

pub fn grab_scan(&mut self) -> Result<Vec<ScanPoint>>[src]

read scan frame

pub fn grab_scan_with_timeout(
    &mut self,
    timeout: Duration
) -> Result<Vec<ScanPoint>>
[src]

read scan frame

pub fn get_device_health(&mut self) -> Result<Health>[src]

Get LIDAR health information

pub fn get_device_health_with_timeout(
    &mut self,
    timeout: Duration
) -> Result<Health>
[src]

Get LIDAR health information

pub fn check_motor_ctrl_support(&mut self) -> Result<bool>[src]

Check if the connected LIDAR supports motor control

pub fn check_motor_ctrl_support_with_timeout(
    &mut self,
    timeout: Duration
) -> Result<bool>
[src]

Check if the connected LIDAR supports motor control with timeout

Trait Implementations

impl<T: Debug + ?Sized> Debug for RplidarDevice<T>[src]

Auto Trait Implementations

impl<T: ?Sized> Send for RplidarDevice<T> where
    T: Send

impl<T: ?Sized> Sync for RplidarDevice<T> where
    T: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]