Struct rivlib::stream::Stream [] [src]

pub struct Stream {
    // some fields omitted
}

A 3D pointcloud data stream.

Methods

impl Stream

fn open<T: Into<Vec<u8>>>(uri: T, sync_to_pps: bool) -> Result<Stream>

Opens a data stream.

Examples

use rivlib::stream::Stream;
let stream = Stream::open("data/130501_232206_cut.rxp", true).unwrap();

fn add_demultiplexer(&mut self, filename: &str, selections: &str, classes: &str) -> Result<()>

Adds a demultiplexer to the data stream.

The demultiplexer will write selected packages from the rxpstream to a file.

Examples

use rivlib::Stream;
let mut stream = Stream::open("data/130501_232206_cut.rxp", true).unwrap();
stream.add_demultiplexer("/dev/null", "beam_geometry", "all");

fn set_rangegate(&mut self, zone: u16, near: f32, far: f32) -> Result<()>

Override the default rangegate of the sensor.

Examples

use rivlib::stream::Stream;
let mut stream = Stream::open("data/130501_232206_cut.rxp", true).unwrap();
stream.set_rangegate(1, 0.0, 1.0);

fn read(&mut self, want: u32) -> Result<Option<Vec<Point>>>

Reads some points from this stream.

Returns an optional vector of points, or None if the end of the stream has been reached.

Examples

use rivlib::stream::Stream;
let mut stream = Stream::open("data/130501_232206_cut.rxp", true).unwrap();
let points = stream.read(10).unwrap();

fn sync_to_pps(&self) -> bool

Returns true if this stream is synced to pps.

Examples

use rivlib::stream::Stream;
let stream = Stream::open("data/130501_232206_cut.rxp", false).unwrap();
assert!(!stream.sync_to_pps());

Trait Implementations

impl IntoIterator for Stream

type Item = Point

type IntoIter = PointIterator

fn into_iter(self) -> Self::IntoIter

Derived Implementations

impl Debug for Stream

fn fmt(&self, __arg_0: &mut Formatter) -> Result