Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SampleBuffer

Collect scanSamples representing a full 360 degree scan of the lidar device.

The collector must be started with start() before data collection will begin. The collector will until it sees a scanSample.start === true. At that point it will begin collecting samples as they are added via the add(scanSample) method. Samples will continuing being collected until a scanSample.start === true. At that point invoke the callback function if one was been provided in the start(cb) method.

The collector can be reused by call reset(). Then proceed using the collector as if it where a new instance.

Hierarchy

  • SampleBuffer

Index

Constructors

constructor

  • new SampleBuffer(minQuality?: number, maxSize?: number): SampleBuffer

Properties

Private callback

callback: function

Type declaration

Private insertIdx

insertIdx: number

Private isCollecting

isCollecting: boolean

Private maxSize

maxSize: number

Private minQuality

minQuality: number

Private samples

samples: ScanSample[]

Private started

started: boolean

Static INIT_SIZE

INIT_SIZE: number = 2000

Static MAX_SIZE

MAX_SIZE: number = 10000

Methods

add

getSamples

Protected processComplete

  • processComplete(): void

reset

  • reset(): void

setMinimumQuality

  • setMinimumQuality(quality: any): void

start

  • start(callback: function): void

Generated using TypeDoc