samna.device#

Submodules#

Module content#

class samna.device.DeviceInfo#

Bases: pybind11_object

DeviceInfo is a structure that contains infomations about a device supported by Samna.

property device_type_name#

The name of the device.

from_json(self: samna.device.DeviceInfo, arg0: str) None#
property logic_version#

The logical version of the device.

property serial_number#

The serial number of the device.

to_json(self: samna.device.DeviceInfo) str#
property usb_bus_number#

The USB bus number of the device.

property usb_device_address#

The USB device address of the device.

samna.device.close_device(arg0: samna.dynapcnnDevKit.DynapcnnDevKit | samna.dvs128Testboard.Dvs128Testboard | samna.xyloTestBoard.XyloTestBoard | samna.xyloDevKit.XyloDevKit | samna.dynapse1.Dynapse1Model | samna.camera.inivation.Davis | samna.camera.inivation.DvXplorer | samna.camera.psee.Camera | samna.speck2TestBoard.Speck2TestBoard | samna.speck2bTestboard.Speck2bTestboard | samna.xyloAudioTestBoard.XyloAudioTestBoard | samna.xyloA2TestBoard.XyloA2TestBoard | samna.xyloImuBoards.XyloImuTestBoard | samna.xyloAudio3.XyloAudio3TestBoard | samna.speck2bDevKit.Speck2bDevKit | samna.speck2bDevKitTiny.Speck2bDevKitTiny | samna.speck2cMiniTestBoard.Speck2cMiniTestBoard | samna.speck2bMiniTestboard.Speck2bMiniTestboard | samna.speck2dMiniTestBoard.Speck2dMiniTestBoard | samna.speck2eTestBoard.Speck2eTestBoard | samna.speck2fBoards.Speck2fCharacterizationBoard | samna.speck2fBoards.Speck2fModuleDevKit | samna.speck2fBoards.Speck2fDevKit | samna.speck2fBoards.Speck2fLcc84LoulanBoard | samna.speck2fBoards.Speck2fModuleLoulanBoard | samna.speck2fBoards.Speck2fCharQiuciBoard | samna.dvsSynsTestBoard.DvsSynsTestBoard | samna.mooreaTestBoard.MooreaTestBoard | samna.speck3TestBoard.Speck3TestBoard | samna.dynapse2.Dynapse2Stack | samna.dynapse2.Dynapse2DevBoard) None#

Close a given device.

Parameters:

( (device) – class:) : The device to close.

samna.device.get_all_devices() List[samna.device.DeviceInfo]#

Get all supported devices that are currently connected to the machine.

The list also contains devices that are currently open in a different process. For a list of devices that can still be opened from this process, use get_unopened_devices() instead.

Returns:

A list of DeviceInfo.

samna.device.get_opened_devices() List[samna.device.DeviceInfo]#

Get all devices that have been opened by this device controller.

Returns:

A list of DeviceInfo.

samna.device.get_unopened_devices() List[samna.device.DeviceInfo]#

Get all supported devices that are currently connected to the machine and are not in use by any process.

Returns:

A list of DeviceInfo.

samna.device.open_device(*args, **kwargs)#

Overloaded function.

  1. open_device(deviceInfo: samna.device.DeviceInfo, defaultConfig: samna.device.DefaultConfigBase = None) -> Union[samna.dynapcnnDevKit.DynapcnnDevKit, samna.dvs128Testboard.Dvs128Testboard, samna.xyloTestBoard.XyloTestBoard, samna.xyloDevKit.XyloDevKit, samna.dynapse1.Dynapse1Model, samna.camera.inivation.Davis, samna.camera.inivation.DvXplorer, samna.camera.psee.Camera, samna.speck2TestBoard.Speck2TestBoard, samna.speck2bTestboard.Speck2bTestboard, samna.xyloAudioTestBoard.XyloAudioTestBoard, samna.xyloA2TestBoard.XyloA2TestBoard, samna.xyloImuBoards.XyloImuTestBoard, samna.xyloAudio3.XyloAudio3TestBoard, samna.speck2bDevKit.Speck2bDevKit, samna.speck2bDevKitTiny.Speck2bDevKitTiny, samna.speck2cMiniTestBoard.Speck2cMiniTestBoard, samna.speck2bMiniTestboard.Speck2bMiniTestboard, samna.speck2dMiniTestBoard.Speck2dMiniTestBoard, samna.speck2eTestBoard.Speck2eTestBoard, samna.speck2fBoards.Speck2fCharacterizationBoard, samna.speck2fBoards.Speck2fModuleDevKit, samna.speck2fBoards.Speck2fDevKit, samna.speck2fBoards.Speck2fLcc84LoulanBoard, samna.speck2fBoards.Speck2fModuleLoulanBoard, samna.speck2fBoards.Speck2fCharQiuciBoard, samna.dvsSynsTestBoard.DvsSynsTestBoard, samna.mooreaTestBoard.MooreaTestBoard, samna.speck3TestBoard.Speck3TestBoard, samna.dynapse2.Dynapse2Stack, samna.dynapse2.Dynapse2DevBoard]

Open a device given its device info. Returns the previously opened device on subsequent calls.

Parameters:
  • deviceInfo (DeviceInfo) – The device info of the device.

  • defaultConfig (Optional[DefaultConfigBase]) –

    The default configuration of the device, this should be one of follwing types:

    Once a default config is set, its settings are used until new defaults are provided in reset_board_soft.

Returns:

The opened device.

  1. open_device(nameAndId: str, defaultConfig: samna.device.DefaultConfigBase = None) -> Union[samna.dynapcnnDevKit.DynapcnnDevKit, samna.dvs128Testboard.Dvs128Testboard, samna.xyloTestBoard.XyloTestBoard, samna.xyloDevKit.XyloDevKit, samna.dynapse1.Dynapse1Model, samna.camera.inivation.Davis, samna.camera.inivation.DvXplorer, samna.camera.psee.Camera, samna.speck2TestBoard.Speck2TestBoard, samna.speck2bTestboard.Speck2bTestboard, samna.xyloAudioTestBoard.XyloAudioTestBoard, samna.xyloA2TestBoard.XyloA2TestBoard, samna.xyloImuBoards.XyloImuTestBoard, samna.xyloAudio3.XyloAudio3TestBoard, samna.speck2bDevKit.Speck2bDevKit, samna.speck2bDevKitTiny.Speck2bDevKitTiny, samna.speck2cMiniTestBoard.Speck2cMiniTestBoard, samna.speck2bMiniTestboard.Speck2bMiniTestboard, samna.speck2dMiniTestBoard.Speck2dMiniTestBoard, samna.speck2eTestBoard.Speck2eTestBoard, samna.speck2fBoards.Speck2fCharacterizationBoard, samna.speck2fBoards.Speck2fModuleDevKit, samna.speck2fBoards.Speck2fDevKit, samna.speck2fBoards.Speck2fLcc84LoulanBoard, samna.speck2fBoards.Speck2fModuleLoulanBoard, samna.speck2fBoards.Speck2fCharQiuciBoard, samna.dvsSynsTestBoard.DvsSynsTestBoard, samna.mooreaTestBoard.MooreaTestBoard, samna.speck3TestBoard.Speck3TestBoard, samna.dynapse2.Dynapse2Stack, samna.dynapse2.Dynapse2DevBoard]

Open a device given its device name and optionally an id in format of “NAME[:ID]”.

The current supported “NAME” are:
  • DynapcnnDevKit

  • Dvs128Testboard

  • XyloTestBoard

  • XyloDevKit

  • Dynapse1DevKit

  • Davis346

  • Davis240

  • DVXplorer

  • PSeeCamera

  • Speck2DevKit

  • Speck2bTestboard

  • XyloAudioTestBoard

  • XyloA2TestBoard

  • Speck2bDevKitTiny

  • Speck2bDevKit

  • Speck2bMiniTestBoard

  • Speck2cMiniTestBoard

  • Speck2dMiniTestBoard

  • Speck2eTestBoard

  • Speck2etTestBoard

  • Speck2eDevKit

  • Speck2fCharacterizationBoard

  • DvsSynsTestBoard

  • DYNAP-SE2 Stack

  • DYNAP-SE2 DevBoard

  • Speck2fModuleDevKit

  • Speck2fDevKit

  • Speck2fLcc84LoulanBoard

  • Speck2fModuleLoulanBoard

  • XyloImuTestBoard

  • XyloAudio3TestBoard

  • Speck2fCharQiuciBoard

The optional ID allows the selection of a specific device to open. Subsequent calls with the same NAME and ID return the previously opened device.

If no ID is provided, the next available device with the given device name will be opened. This usage never returns an already opened device.

Parameters:
  • nameAndId (string) – It should be in format of “NAME[:ID]”

  • defaultConfig (Optional[DefaultConfigBase]) –

    The default configuration of the device, this should be one of following types:

    Once a default config is set, its settings are used until new defaults are provided in reset_board_soft.

Returns:

The opened device.