Class: RecordingContext

RecordingContext(fileName, section, mode)

This class is for testing purpose. It is used to record all operations over librealsense into a file

Constructor

new RecordingContext(fileName, section, mode)

Parameters:
Name Type Default Description
fileName String The file name to store the recorded data
section String The section name within the recording
mode String | Integer blank-frames Recording mode, default to 'blank-frames'
Source:
See:

Extends

Members

events

Get the events object of EventEmitter
Overrides:
Source:

Methods

destroy()

Cleanup underlying C++ context, and release all resources that were created by this context. The JavaScript Context object(s) will not be garbage-collected without call(s) to this function
Overrides:
Source:

getSensorParent(sensor) → {Device|undefined}

Get the device from one of its sensors
Parameters:
Name Type Description
sensor Sensor
Overrides:
Source:
Returns:
Type
Device | undefined

loadDevice(file) → {PlaybackDevice|undefined}

Create a PlaybackDevice to playback recored data file.
Parameters:
Name Type Description
file String the file path
Overrides:
Source:
Returns:
Type
PlaybackDevice | undefined

queryDevices() → {DeviceList|undefined}

Create a static snapshot of all connected devices at the time of the call
Overrides:
Source:
Returns:
connected devices at the time of the call
Type
DeviceList | undefined

querySensors() → {Array.<Sensor>|undefined}

Generate an array of all available sensors from all RealSense devices
Overrides:
Source:
Returns:
Type
Array.<Sensor> | undefined

setDevicesChangedCallback(callback)

Register a callback function to receive device-changed notification
Parameters:
Name Type Description
callback devicesChangedCallback devices changed callback
Overrides:
Source:

unloadDevice(file)

Removes a PlaybackDevice from the context, if exists
Parameters:
Name Type Description
file String The file name that was loaded to create the playback device
Overrides:
Source:

Events

device-changed

When one or more devices are plugged or unplugged into the system
Parameters:
Name Type Description
removed DeviceList The devices removed from the system
added DeviceList The devices added to the system
Overrides:
Source: