Python Module API
Syntalos provides a Python API to easily build new modules. Python modules do not
run within the Syntalos process, and instead communicate with the main application
via an interface provided by the syntalos_mlink Python module.
This API can be used from either the Python Script module, or by
standalone modules that are written in Python entirely.
The Python interface is documented below.
syntalos_mlink
Syntalos Python Module Interface
print_types_synonyms() -> None
list_types_synonyms() -> object
Common base class for all non-exit exceptions.
Initialize the connection with a running Syntalos instance.
A video frame.
Members:
UNKNOWN
START
PAUSE
STOP
STEP
CUSTOM
__init__(self: syntalos_mlink.ControlCommandKind, value: typing.SupportsInt) -> None
__init__(args, *kwargs) Overloaded function.
__init__(self: syntalos_mlink.ControlCommand) -> None
__init__(self: syntalos_mlink.ControlCommand, arg0: syntalos_mlink.ControlCommandKind) -> None
Members:
UNKNOWN
NEW_DIG_PIN
NEW_ANA_PIN
IO_MODE
WRITE_ANALOG
WRITE_DIGITAL
WRITE_DIGITAL_PULSE
SYSEX
__init__(self: syntalos_mlink.FirmataCommandKind, value: typing.SupportsInt) -> None
__init__(args, *kwargs) Overloaded function.
__init__(self: syntalos_mlink.FirmataControl) -> None
__init__(self: syntalos_mlink.FirmataControl, arg0: syntalos_mlink.FirmataCommandKind) -> None
A block of timestamped integer signal data.
A block of timestamped float signal data.
Timestamps of the data blocks.
Representation of a module input port.
Representation of a module output port.
Submit the given entity to the output port for transfer to its destination(s).
Set (immutable) metadata value for this port.
Set (immutable) metadata value for a 2D size type for this port.
Convenience function to create a command to register a named digital pin and immediately submit it on this port. The registered pin can later be referred to by its name.
Convenience function to emit a digital pulse on a named pin.
Print text to stdout.
Emit an error message string, immediately terminating the current action and (if applicable) the experiment.
Get time since experiment started in milliseconds.
Get time since experiment started in microseconds.
Wait (roughly) for the given amount of milliseconds without blocking communication with the master process.
Wait (roughly) for the given amount of seconds without blocking communication with the master process.
Wait for new data to arrive and call selected callbacks. Also keep communication with the Syntalos master process.
Return True if the experiment is still running, False if we are supposed to shut down.
Schedule call to a callable to be processed after a set amount of milliseconds.
Get reference to input port with the give ID.
Get reference to output port with the give ID.
Call the given function when the module's settings dialog should be shown. The callback receives settings as bytes.
Call the given function when the module's display window should be shown.
Send module settings data as bytes to Syntalos for safekeeping.
Create new Firmata control command with a given pin ID and registered name.
Create new Firmata control command with a given pin ID.
Create new Firmata control command with a given pin name (the name needs to be registered previously).