[][src]Trait velodyne::StatusListener

pub trait StatusListener: Sized {
    type Status: Clone;
    fn init<T: PacketSource>(packet_source: &mut T) -> Result<Self>;
fn feed(&mut self, status: StatusBytes);
fn get_status(&self) -> &Self::Status; }

Trait for tracking sensor status

In case if sensor does not emits meaningful status data or you don't need status information, use DummyStatusListener.

Associated Types

type Status: Clone

Type of the status information

Loading content...

Required methods

fn init<T: PacketSource>(packet_source: &mut T) -> Result<Self>

Initialize listener from packet source

fn feed(&mut self, status: StatusBytes)

Feed status from the parsed packet.

This method will update internall state of the listener, updating sensor status (which is accessible through get_status method) when possible

fn get_status(&self) -> &Self::Status

Get current status state

Loading content...

Implementors

impl StatusListener for StatusListener[src]

type Status = Status

impl StatusListener for DummyStatusListener[src]

type Status = ()

Loading content...