Functions | Variables
test-l500-json-load Namespace Reference

Functions

def json_to_dict (json)
 
def log_settings_differences (data)
 

Variables

 depth_sensor = device.first_depth_sensor()
 
 device = devices[0]
 
 devices = test.find_devices_by_product_line_or_exit(rs.product_line.L500)
 
 equal = test.check_equal(visual_preset_name, rs.l500_visual_preset.low_ambient_light)
 
string low_ambient_data_with_default_preset
 This test checks backward compatibility to old json files that saved with default preset The default preset is deprecated but json files that saved with default preset should be supported Here, we expect the data to fit a pre-defined "low-ambient" preset Note that, because FW defines them, the defaults can change from version to version and we need to keep this up-to-date with the latest. More...
 
list presets
 
 sd = rs.serializable_device(device)
 
 serialized_json = sd.serialize_json()
 
 visual_preset_name = rs.l500_visual_preset(int(visual_preset_number))
 
 visual_preset_number = depth_sensor.get_option(rs.option.visual_preset)
 
string wrong_data_with_default_preset
 There is no default preset: so when one is specified, the code should calculate the preset! Here, we intentionally should not fit into any of the defined presets, and check that the result is CUSTOM. More...
 
string wrong_data_with_low_ambient_preset
 Here, the json specifies a "low-ambient" preset – so the values of the individual controls (that are part of this preset) should not matter. More...
 

Function Documentation

def test-l500-json-load.json_to_dict (   json)
:param json: a string representing a json file
:return: a dictionary with all settings

Definition at line 17 of file test-l500-json-load.py.

def test-l500-json-load.log_settings_differences (   data)

Definition at line 33 of file test-l500-json-load.py.

Variable Documentation

test-l500-json-load.depth_sensor = device.first_depth_sensor()

Definition at line 11 of file test-l500-json-load.py.

test-l500-json-load.device = devices[0]

Definition at line 10 of file test-l500-json-load.py.

test-l500-json-load.devices = test.find_devices_by_product_line_or_exit(rs.product_line.L500)

Definition at line 9 of file test-l500-json-load.py.

test-l500-json-load.equal = test.check_equal(visual_preset_name, rs.l500_visual_preset.low_ambient_light)

Definition at line 107 of file test-l500-json-load.py.

string test-l500-json-load.low_ambient_data_with_default_preset

This test checks backward compatibility to old json files that saved with default preset The default preset is deprecated but json files that saved with default preset should be supported Here, we expect the data to fit a pre-defined "low-ambient" preset Note that, because FW defines them, the defaults can change from version to version and we need to keep this up-to-date with the latest.

If the FW changes, this test will fail and output (in debug mode) any settings that changed...

Definition at line 65 of file test-l500-json-load.py.

list test-l500-json-load.presets
Initial value:
1 = [rs.l500_visual_preset.custom,
2  rs.l500_visual_preset.no_ambient_light,
3  rs.l500_visual_preset.low_ambient_light,
4  rs.l500_visual_preset.max_range,
5  rs.l500_visual_preset.short_range]

Definition at line 218 of file test-l500-json-load.py.

test-l500-json-load.sd = rs.serializable_device(device)

Definition at line 12 of file test-l500-json-load.py.

test-l500-json-load.serialized_json = sd.serialize_json()

Definition at line 227 of file test-l500-json-load.py.

test-l500-json-load.visual_preset_name = rs.l500_visual_preset(int(visual_preset_number))

Definition at line 15 of file test-l500-json-load.py.

test-l500-json-load.visual_preset_number = depth_sensor.get_option(rs.option.visual_preset)

Definition at line 14 of file test-l500-json-load.py.

string test-l500-json-load.wrong_data_with_default_preset

There is no default preset: so when one is specified, the code should calculate the preset! Here, we intentionally should not fit into any of the defined presets, and check that the result is CUSTOM.

Definition at line 119 of file test-l500-json-load.py.

string test-l500-json-load.wrong_data_with_low_ambient_preset

Here, the json specifies a "low-ambient" preset – so the values of the individual controls (that are part of this preset) should not matter.

The result of loading the following should still result in LOW_AMBIENT even when the controls do not fit (because they're overridden).

Definition at line 170 of file test-l500-json-load.py.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:43