HardwareList#
- class HardwareList#
Bases:
MmParameterHardwareListcatalogs available hardware objects and their data folders.Maps a logical
NametoTypeandDeviceModel, plus a device-specificDataPathandResourceName. UsesaveEntry()to persist a hardware object’s parameters and per-channel settings, andloadEntry()to reconstruct the device from stored entries. Per-channel settings are stored inHardwareSetting.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#
HardwareSettingaccessor used to read/write per-device settings
- WaveformListLibrary#
WaveformListLibraryaccessor used to load/save waveform lists
- Method Summary
- defineSchema()#
- loadEntry(nameOrID)#
Load a hardware object from the database.
Resolves by numeric
IDor stringName, then constructs the device using itsDeviceModeland populates properties fromHardwareSetting(includingWaveformListif present).- Parameters:
nameOrID (
double or string) – Hardware row ID or logical Name- Returns:
Instantiated hardware object populated from settings
- Return type:
- 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
HardwareSettingrows and applies them to the provided object. Useful when settings were changed externally.