Protocol#
- class pulserver.design.Protocol[source]#
Bases:
Mapping[FloatKey|IntKey|BoolKey|EnumKey|ConfigKey|UserKey|UserNameKey,Any]The values of a plugin’s protocol, in the units of the sequence function’s arguments.
An immutable mapping from
ProtocolKeyto value. A time is in seconds and a float in the unit of the argument it binds, metres for a length; an integer is anint, a checkbox abooland a choice a member of its enum. A time entry showing a preset holds what the preset requests, a number of seconds orNonefor the sequence function’s own shortest choice, andpreset()names the preset. The prescription entries bind no argument and keep the units of the wire: mm for the offset, unitless for the rotation.The wire carries integer microseconds for a time and the entry’s own unit for a float, to six significant digits.
from_wire()andto_wire()are the only conversions between the two.- Parameters:
entries – The declared entries the values belong to, as
SequencePlugin.protocolholds them.values – The value of each key, in argument units.
presets – The preset each time key shows, by the key its entry declares it with.
Methods
Return the protocol that wire values stand for. |
|
Return the preset a time key shows, or |
|
Return a protocol holding |
|
Return the wire values of the protocol, the inverse of |
|
Attributes
The values by the name of the sequence function argument each binds. |