MCPcopy Create free account
hub / github.com/Ar-Ray-code/lingbot-depth-trt / _device_info

Function _device_info

python/scripts/camera/realsense.py:20–37  ·  view source on GitHub ↗
(device: Any)

Source from the content-addressed store, hash-verified

18
19
20def _device_info(device: Any) -> DeviceInfo:
21 rs = _rs()
22 fields = {
23 "name": rs.camera_info.name,
24 "serial": rs.camera_info.serial_number,
25 "firmware": rs.camera_info.firmware_version,
26 "physical_port": rs.camera_info.physical_port,
27 "product_id": rs.camera_info.product_id,
28 "product_line": rs.camera_info.product_line,
29 "usb_type": rs.camera_info.usb_type_descriptor,
30 }
31 out: DeviceInfo = {"backend": "realsense"}
32 for key, field in fields.items():
33 try:
34 out[key] = str(device.get_info(field))
35 except Exception:
36 pass
37 return out
38
39
40def list_devices() -> list[DeviceInfo]:

Callers 1

list_devicesFunction · 0.70

Calls 1

_rsFunction · 0.85

Tested by

no test coverage detected