WaveformListLibrary

WaveformListLibrary#

class WaveformListLibrary#

Bases: MmParameter

WaveformListLibrary stores named WaveformList presets.

Each row defines a waveform list preset with sampling rate and list-level behaviors such as concatenation and patching methods, and holds WaveformOrigin IDs pointing into WaveformLibrary.

Schema (columns, types, defaults):

Column

Type

Default

Name

string

DefaultWaveformList

SamplingRate

double

1000

ConcatMethod

string

Sequential

PatchMethod

string

Continue

PatchConstant

double

0

IsTriggerAdvance

logical

0

NPeriodPerCycle

double

10

WaveformOrigin

doubleMatrix

[]

Foreign keys:

(none)

Join conditions:

(none)

Flags:

Property

Value

IsIncludeDefaultEntry

false

IsFirstColumnUnique

true

IsTriggerJoinOnRight

false

IsTriggerJoinOnLeft

false

Constructor Summary
WaveformListLibrary()#
Method Summary
defineSchema()#
duplicateEntry(keyColumnValue, name, keyColumnName)#

Duplicate a row and its WaveformOrigin subtree.

Parameters:
  • keyColumnValue (double) – Source row key value

  • name (string) – New Name for the duplicated list

  • keyColumnName (string, optional) – Key column name (default ID)

Returns:

New row ID of the duplicated list

Return type:

double

loadEntry(nameOrID)#

Load a WaveformList object from the database.

Resolves by numeric ID or string Name and constructs a WaveformList with its WaveformOrigin items instantiated from WaveformLibrary. Remaining properties are copied from the row.

Parameters:

nameOrID (double or string) – Row ID or logical name

Returns:

Loaded waveform list (empty if not found)

Return type:

WaveformList

saveEntry(wfl)#

Save a WaveformList object into the database.

Upserts the list row by Name and synchronizes WaveformOrigin children in WaveformLibrary.

Parameters:

wfl (WaveformList) – Waveform list to persist

Returns:

Row ID of the waveform list

Return type:

double