HardwareList

HardwareList#

class HardwareList#

Bases: MmParameter

HardwareList catalogs available hardware objects and their data folders.

Maps a logical Name to Type and DeviceModel, plus a device-specific DataPath and ResourceName. Use saveEntry() to persist a hardware object’s parameters and per-channel settings, and loadEntry() to reconstruct the device from stored entries. Per-channel settings are stored in HardwareSetting.

Schema (columns, types, defaults):

Column

Type

Default

Name

string

DefaultWg

Type

string

WaveformGenerator

DataPath

string

XXX

DeviceModel

string

Keysight33600A

ResourceName

string

XXX

Foreign keys:

(none)

Join conditions:

(none)

Flags:

Property

Value

IsIncludeDefaultEntry

false

IsFirstColumnUnique

true

IsTriggerJoinOnRight

false

IsTriggerJoinOnLeft

false

Constructor Summary
HardwareList()#
Property Summary
HardwareSetting#

HardwareSetting accessor used to read/write per-device settings

WaveformListLibrary#

WaveformListLibrary accessor used to load/save waveform lists

Method Summary
defineSchema()#
loadEntry(nameOrID)#

Load a hardware object from the database.

Resolves by numeric ID or string Name, then constructs the device using its DeviceModel and populates properties from HardwareSetting (including WaveformList if present).

Parameters:

nameOrID (double or string) – Hardware row ID or logical Name

Returns:

Instantiated hardware object populated from settings

Return type:

Hardware

saveEntry(hw, isSaveSettingOnly)#

Save a hardware object into the database.

Persists general hardware properties in this table, and upserts per-channel settings into HardwareSetting.

Parameters:
  • hw (Hardware) – Hardware object to save (e.g., a scope, WG, phase lock)

  • isSaveSettingOnly (logical, optional) – If true, only upsert settings; skip general props

Returns:

Row ID of the saved hardware entry

Return type:

double

updateHardware(nameOrID, hw)#

Update a hardware object in-memory from stored settings.

Reads HardwareSetting rows and applies them to the provided object. Useful when settings were changed externally.

Parameters:
  • nameOrID (double or string) – Hardware row ID or logical Name

  • hw (Hardware) – Existing hardware object to update

Returns:

Updated hardware object

Return type:

Hardware