Syntalos

Syntalos

Namespaces

Name
Syntalos::datactl
Syntalos::edl
Syntalos::ipc

Classes

Name
classSyntalos::AbstractModule
Abstract base class for all modules.
classSyntalos::AbstractStreamPort
structSyntalos::ApiVersionRequest
structSyntalos::ApiVersionResponse
structSyntalos::BaseDataType
Base interface for all data types.
classSyntalos::BinaryStreamReader
Reader for Syntalos data entity deserialization.
classSyntalos::BinaryStreamWriter
Writer for Syntalos data entity serialization.
structSyntalos::ConnectInputRequest
structSyntalos::ControlCommand
A control command to a module.
structSyntalos::DeletePortRequest
structSyntalos::DoneResponse
classSyntalos::EDLAuthor
classSyntalos::EDLCollection
A collection of groups and datasets.
classSyntalos::EDLDataFile
classSyntalos::EDLDataPart
classSyntalos::EDLDataset
An EDL dataset.
classSyntalos::EDLGroup
A grouping of groups or datasets.
structSyntalos::EdlReserveReply
structSyntalos::EdlReserveRequest
classSyntalos::EDLUnit
Base class for all EDL entities.
structSyntalos::ErrorEvent
structSyntalos::ExportedStreamInfo
classSyntalos::Flags
Type-safe bitfield wrapper for scoped enums.
structSyntalos::Frame
A single frame of a video stream.
classSyntalos::FreqCounterSynchronizer
Synchronizer for a monotonic counter, given a frequency.
classSyntalos::GlobalConfig
structSyntalos::InputPortChangeRequest
Information about an input port change.
classSyntalos::InputPortInfo
Reference for an input port.
classSyntalos::IoxLogger
structSyntalos::IpcServiceTopology
IPC service topology limits.
structSyntalos::LineCommand
Command issued to a hardware signal line / channel / pin.
structSyntalos::LineReading
Scalar reading from a hardware signal line at a moment in time.
structSyntalos::LoadScriptRequest
structSyntalos::LoadSettingsRequest
structSyntalos::MetaArray
Array of values used for stream metadata.
structSyntalos::MetaSize
Represents the dimensions of a two-dimensional object with width and height.
structSyntalos::MetaStringMap
Mapping of values used for stream metadata.
structSyntalos::MetaValue
Data type that can be used as stream metadata.
classSyntalos::MLinkModule
Master link for out-of-process modules.
classSyntalos::ModuleInfo
Static information about a module.
structSyntalos::ModuleInitOptions
classSyntalos::OptionalWaitCondition
The OptionalWaitCondition class.
structSyntalos::OutputPortChangeRequest
Information about an output port change.
classSyntalos::OutputPortInfo
Reference for an output port.
classSyntalos::OutputPortLink
Reference for an output port to emit new data.
structSyntalos::PrepareRunRequest
structSyntalos::RunInfo
Information about the current run and its data storage location.
structSyntalos::SaveSettingsRequest
structSyntalos::SaveSettingsResponse
classSyntalos::SecondaryClockSynchronizer
Synchronizer for an external steady monotonic clock.
structSyntalos::SetCPUAffinityRequest
structSyntalos::SetMaxRealtimePriority
structSyntalos::SetNicenessRequest
structSyntalos::SetPortsPresetRequest
structSyntalos::ShowDisplayRequest
structSyntalos::ShowSettingsRequest
structSyntalos::ShutdownRequest
structSyntalos::SignalBlockF32
A block of 32-bit floating-point timestamped signal data.
structSyntalos::SignalBlockI32
A block of 32-bit signed integer signal data with timestamps.
structSyntalos::SignalBlockU16
A block of 16-bit unsigned integer signal data with timestamps.
classSyntalos::SimpleTerminal
A simple integrated terminal emulator.
structSyntalos::StartRequest
structSyntalos::StateChangeEvent
structSyntalos::StatusMessageEvent
structSyntalos::StopRequest
classSyntalos::StreamExporter
Exporter for streaming data from modules.
classSyntalos::StreamInputPort
classSyntalos::StreamOutputPort
classSyntalos::SubscriptionNotifier
Notifies about new data on a stream subscription in a Qt event loop.
structSyntalos::supports_buffer_reuse
structSyntalos::supports_buffer_reuse< Frame >
structSyntalos::symaster_clock
Syntalos Master Clock.
structSyntalos::SyncDetailsEvent
structSyntalos::SyncOffsetEvent
classSyntalos::SyncTimer
classSyntalos::SyntalosLink
Connection to a Syntalos instance.
classSyntalos::SyntalosLinkModule
Convenience interface to write an OOP Syntalos module.
classSyntalos::SysInfo
structSyntalos::TableRow
A new row for a table.
structSyntalos::TestSubject
The TestSubject struct Data about a test subject.
structSyntalos::TestSubjectInfo
Information about the current test subject.
classSyntalos::TimeSyncFileReader
Read a time-sync (.tsync) file.
classSyntalos::TimeSyncFileWriter
Write a timestamp synchronization file.
structSyntalos::UpdateInputPortMetadataRequest
request to update the metadata of an input port
structSyntalos::Uuid
A 16-byte UUID (Universally Unique Identifier).
classSyntalos::VarStreamInputPort

Types

Name
enum class uint8_tModuleState { UNKNOWN, INITIALIZING, IDLE, PREPARING, DORMANT, READY, RUNNING, ERROR}
The ModuleState enum.
enum classControlCommandKind { UNKNOWN, START, PAUSE, STOP, STEP, CUSTOM}
The ControlCommandKind enum.
enum classLineCommandKind { UNKNOWN, SET_MODE, WRITE_DIGITAL, WRITE_ANALOG, WRITE_DIGITAL_PULSE, WRITE_ANALOG_PULSE, CUSTOM}
The LineCommandKind enum.
enum class uint32_tLineModeFlag { NONE = 0, IS_INPUT = 1u « 0, IS_OUTPUT = 1u « 1, PULL_UP = 1u « 2}
Individual mode bits for LineCommandKind::SetMode.
enum classSignalDataType { Amplifier, AuxInput, SupplyVoltage, BoardAdc, BoardDigIn, BoardDigOut}
Type of a signal from a signal source.
enum classEDLUnitKind { UNKNOWN, COLLECTION, GROUP, DATASET}
enum classEDLCreateFlag { OPEN_ONLY, CREATE_OR_OPEN, MUST_CREATE}
enum classTimeSyncStrategy { NONE = 0, SHIFT_TIMESTAMPS_FWD = 1 « 0, SHIFT_TIMESTAMPS_BWD = 1 « 1, ADJUST_CLOCK = 1 « 2, WRITE_TSYNCFILE = 1 « 3}
The time synchronization strategy.
enum classTSyncFileMode { CONTINUOUS = 0, SYNCPOINTS = 1}
Timepoint storage of a TSync file.
enum classTSyncFileTimeUnit { INDEX = 0, NANOSECONDS = 1, MICROSECONDS = 2, MILLISECONDS = 3, SECONDS = 4}
Unit types for time representation in a TSync file.
enum classTSyncFileDataType { INVALID = 0, INT16 = 2, INT32 = 3, INT64 = 4, UINT16 = 6, UINT32 = 7, UINT64 = 8}
Data types use for storing time values in the data file.
enum classSysInfoCheckResult { UNKNOWN, OK, SUSPICIOUS, ISSUE}
enum classColorMode { SYSTEM, BRIGHT, DARK}
enum classModuleWorkerMode { PERSISTENT, TRANSIENT}
Worker mode for out-of-process modules.
enum class uint8_tPortAction { UNKNOWN, ADD, REMOVE, CHANGE}
Action performed to modify a module port.
enum classConnectionHeatLevel { NONE, LOW, MEDIUM, HIGH}
Connection heat level.
enum classModuleFeature { NONE = 0, SHOW_SETTINGS = 1 « 0, SHOW_DISPLAY = 1 « 1, REALTIME = 1 « 2, CALL_UI_EVENTS = 1 « 3, REQUEST_CPU_AFFINITY = 1 « 4, PROHIBIT_CPU_AFFINITY = 1
« 5}
The ModuleFeature flags List of basic features this module may or may not support, or may request from the engine to be available.
enum classModuleDriverKind { NONE, THREAD_DEDICATED, EVENTS_DEDICATED, EVENTS_SHARED}
The ModuleDriverKind enum.
enum classUsbHotplugEventKind { NONE, DEVICE_ARRIVED, DEVICE_LEFT, DEVICES_CHANGE}
The UsbHotplugEventKind enum.
enum class uint32_tModuleCategory { NONE = 0, SYNTALOS_DEV = 1 « 0, EXAMPLES = 1 « 1, DEVICES = 1 « 2, GENERATORS = 1 « 3, SCRIPTING = 1 « 4, DISPLAY = 1 « 5, WRITERS = 1 « 6, PROCESSING = 1 « 7}
Categorization for modules.
enum classModuleModifier { NONE = 0, ENABLED = 1 « 0, STOP_ON_FAILURE = 1 « 1}
The ModuleModifier flags Flags set by Syntalos or the user to modify the behavior of the module in the wider context of the running experiment.
enum classPortDirection { NONE, INPUT, OUTPUT}
Enum specifying directionality of a port (in or out)
enum class uint8_tMetaTypeTag { Null = 0, BoolFalse = 1, BoolTrue = 2, Int64 = 3, Double = 4, String = 5, Size = 6, Array = 7, Object = 8}
Type tag used in MetaValue binary serialization.
enum classPyVirtualEnvStatus { VALID, MISSING, REQUIREMENTS_CHANGED, INTERPRETER_MISSING}
using Flags< LineModeFlag >LineModeFlags
using std::tuple< ControlCommand, TableRow, Frame, LineCommand, LineReading, SignalBlockI32, SignalBlockU16, SignalBlockF32 >StreamTypeList
Compile-time list of all stream data types.
typedef std::chrono::zoned_time< std::chrono::system_clock::duration >EdlDateTime
using std::chrono::time_point< symaster_clock >symaster_timepoint
A timepoint on the master clock.
using std::chrono::secondsseconds_t
Shorthand for seconds.
using std::chrono::millisecondsmilliseconds_t
Shorthand for milliseconds.
using std::chrono::duration< int64_t, std::micro >microseconds_t
Shorthand for microseconds.
using std::chrono::duration< int64_t, std::nano >nanoseconds_t
Shorthand for nanoseconds.
typedef Eigen::Matrix< int32_t, Eigen::Dynamic, 1 >VectorXi32
typedef Eigen::Matrix< int64_t, Eigen::Dynamic, 1 >VectorXi64
typedef Eigen::Matrix< uint16_t, Eigen::Dynamic, 1 >VectorXu16
typedef Eigen::Matrix< uint64_t, Eigen::Dynamic, 1 >VectorXu64
typedef Eigen::Matrix< float, Eigen::Dynamic, 1 >VectorXf
typedef Eigen::Matrix< double, Eigen::Dynamic, 1 >VectorXd
typedef Eigen::Matrix< int32_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >MatrixXi32
typedef Eigen::Matrix< uint16_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >MatrixXu16
typedef Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >MatrixXf
typedef Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor >MatrixXd
using Flags< TimeSyncStrategy >TimeSyncStrategies
using std::function< void(const std::string &id, const TimeSyncStrategies &strategies, const microseconds_t &tolerance)>SyncDetailsChangeNotifyFn
Function to call when synchronizer details have changed.
using std::function< void(const std::string &id, const microseconds_t &currentOffset)>OffsetChangeNotifyFn
Function to call to notify about an offset change.
using quill::LoggerQuillLogger
using void(AbstractModule::*)(int &)intervalEventFunc_t
Event function type for timed callbacks.
using std::function< void()>recvDataEventFunc_t
Callable type used for subscription new-data callbacks.
using std::pmr::vector< std::byte >ByteVector
ByteVector is a vector of bytes using the polymorphic allocator.
using std::function< void(const std::string &script, const fs::path &wdir)>LoadScriptFn
using std::function< bool(ByteVector &settings, const fs::path &baseDir)>SaveSettingsFn
using std::function< bool(const ByteVector &settings, const fs::path &baseDir)>LoadSettingsFn
using std::function< bool()>PrepareRunFn
using std::function< void()>StartFn
using std::function< void()>StopFn
using std::function< void()>ShutdownFn
using std::function< void(const void *data, size_t size)>NewDataRawFn
using std::function< void(BaseDataType &data)>NewDataFn
using std::function< void(void)>ShowSettingsFn
using std::function< void(void)>ShowDisplayFn

Functions

Name
std::stringtoString(ModuleState state)
voidregisterStreamMetaTypes()
Helper function to register all meta types for stream data.
std::vector< std::pair< std::string, int > >streamTypeIdIndex()
Get a mapping of type names to their IDs.
template <typename T >
constexpr int
syDataTypeId()
Helper function to get the type ID of a data type.
template <typename T >
T
deserializeFromMemory(const void * memory, size_t size)
Convenience function to deserialize a data type from memory.
template <typename Fn >
constexpr bool
forEachStreamType(Fn && fn)
Call fn(std::type_identity<T>{}) for every T in StreamTypeList.
template <typename T >
std::string
numToString(T x)
Convert a numeric value to a string using Syntalos’ default notation.
EdlDateTimeedlCurrentDateTime()
std::stringmakeAnimalMoniker()
std::stringmakeAnimalMonikerForString(const std::string & source)
std::stringmakeMonikerForUuid(const Uuid & uuid)
std::stringmakeMonikerForString(const std::string & source)
std::ostream &operator«(std::ostream & os, const MetaSize & sz)
std::ostream &operator«(std::ostream & os, const MetaArray & arr)
std::ostream &operator«(std::ostream & os, const MetaValue & v)
std::ostream &operator«(std::ostream & os, const MetaStringMap & map)
voidwriteJson(std::ostream & os, const MetaValue & val)
Write a MetaValue as JSON to the given stream (RFC-8259, compact).
voidwriteJsonObject(std::ostream & os, const std::map< std::string, MetaValue > & obj)
Write a MetaValue map as a JSON object to the given stream.
std::stringtoJsonString(const MetaValue & v)
std::stringtoJsonObjectString(const MetaStringMap & m)
std::expected< MetaStringMap, std::string >stringMapFromJson(const std::string & json)
std::stringmakeAnimalMonikerFromRng(std::mt19937_64 & rng)
std::stringmakeMonikerFromSeed(uint64_t seed)
UuidnewUuid7()
Generate a Version 7 UUID (UUIDv7) based on a timestamp and random data.
voidwriteJsonString(std::ostream & os, const std::string & s)
autousecToMsec(const microseconds_t & usec)
Convert microseconds to milliseconds.
automsecToUsec(const milliseconds_t & msec)
Convert milliseconds microseconds.
autonsecToUsec(const nanoseconds_t & msec)
Convert nanoseconds microseconds.
autotimeDiffSec(const symaster_timepoint & timePoint1, const symaster_timepoint & timePoint2)
autotimeDiffMsec(const symaster_timepoint & timePoint1, const symaster_timepoint & timePoint2)
autotimeDiffUsec(const symaster_timepoint & timePoint1, const symaster_timepoint & timePoint2)
autotimeDiffToNowMsec(const std::chrono::time_point< symaster_clock > & timePoint)
autotimeDiffToNowUsec(const std::chrono::time_point< symaster_clock > & timePoint)
symaster_timepointcurrentTimePoint()
template <typename T >
double
vectorMedian(const Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec)
template <typename T >
double
vectorMedianInplace(Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec)
template <typename T >
double
vectorVariance(const Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec, const double & mean, bool unbiased =true)
template <typename T >
double
vectorVariance(const Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec, bool unbiased =true)
template <typename EigenType >
void
serializeEigen(BinaryStreamWriter & stream, const EigenType & matrix)
template <typename EigenType >
EigenType
deserializeEigen(BinaryStreamReader & stream)
const std::stringtimeSyncStrategyToHString(const TimeSyncStrategy & strategy)
const std::stringtimeSyncStrategiesToHString(const TimeSyncStrategies & strategies)
template <typename T >
void
safeStopSynchronizer(const T & synchronizerSmartPtr)
template <typename T >
void
safeStopSynchronizer(const T & synchronizer, const microseconds_t & lastValidMasterTimestamp)
std::stringtsyncFileTimeUnitToString(const TSyncFileTimeUnit & tsftunit)
std::stringtsyncFileDataTypeToString(const TSyncFileDataType & dtype)
std::stringtsyncFileModeToString(const TSyncFileMode & mode)
std::optional< QImage >cvMatToQImage(const cv::Mat & mat)
Converts an OpenCV Mat to a QImage.
std::optional< QPixmap >cvMatToQPixmap(const cv::Mat & mat)
cv::RectqRectToCvRect(const QRect & r)
QStringshellQuote(const QString & str)
Shell-escape a string.
QStringfindHostExecutable(const QString & exe)
Find executable on the host system (if running in a sandbox)
intrunHostExecutable(const QString & exe, const QStringList & args, bool waitForFinished)
Run command on the host.
intrunInTerminal(const QString & cmd, const QStringList & args, const QString & wdir, const QString & title)
boollaunchProgramNC3Fallback(const QString & exePath, int * pidfd_out)
boollaunchProgramPidFd(const QString & exePath, int * pidfd_out)
Launch a program in a new process, and return the PID of the new process as pidfd.
boolisProcessRunning(int pidfd)
Check if a process is still running using a pidfd.
quill::Logger *getLogger(const std::string & name)
quill::Logger *getLogger(const QString & name)
quill::Logger *getLogger(const char * name)
quill::Logger *logModTmp(const char * name)
quill::Logger *getDefaultLogger()
voidremoveLogger(quill::Logger * logger)
voidinitializeSyLogSystem(quill::LogLevel consoleLogLevel =quill::LogLevel::Info)
voidshutdownSyLogSystem()
const QString &qstr(const QString & s)
QStringqstr(QStringView s)
QStringqstr(const char * s)
QStringqstr(std::string_view s)
QStringqstr(const std::string & s)
QStringcolorModeToString(ColorMode mode)
ColorModecolorModeFromString(const QString & str)
voidfindSyntalosLibraryPaths(QString & pkgConfigPath, QString & ldLibraryPath, QString & includePath)
QStringListfindSyntalosMlinkPyModulePaths()
voiddatactlLogHandler(const datactl::LogMessage & m)
voidqtLogHandler(QtMsgType type, const QMessageLogContext & ctx, const QString & msg)
GLogWriterOutputglibLogWriter(GLogLevelFlags log_level, const GLogField * fields, gsize n_fields, gpointer )
constexpr IpcServiceTopologymakeIpcServiceTopology(uint senderCount, uint receiverCount)
QStringconnectionHeatToHumanString(ConnectionHeatLevel heat)
QStringtoString(ModuleCategory category)
ModuleCategorymoduleCategoryFromString(const QString & categoryStr)
ModuleCategoriesmoduleCategoriesFromVariant(const QVariant & value)
uintqHash(ModuleModifier key, uint seed)
VariantDataStream *newStreamForType(int typeId)
Create a new DataStream for the type identified by the given ID.
VarStreamInputPort *newInputPortForType(int typeId, AbstractModule * mod, const QString & id, const QString & title)
Create a new Input Port for the type identified by the given ID.
template <typename E ,typename =std::enable_if_t<std::is_scoped_enum_v>>
constexpr Flags< E >
**[operator
QStringpythonVEnvDirForName(const QString & venvName)
boolpythonVirtualEnvExists(const QString & venvName)
QStringrequirementsHashMetadataPath(const QString & venvDir)
boolwriteRequirementsHashMetadata(const QString & venvDir, const QByteArray & requirementsHash)
boolreadRequirementsHashMetadata(const QString & venvDir, QString & requirementsHashOut)
QStringinterpreterPathFromCfg(const QString & venvDir)
PyVirtualEnvStatuspythonVirtualEnvStatus(const QString & venvName, const QString & requirementsFile)
voidinjectSyntalosMlinkIntoVenv(const QString & venvDir)
autocreatePythonVirtualEnv(const QString & venvName, const QString & requirementsFile, bool recreate)
template <typename T >
T
streamDataFromRawMemory(const void * data, size_t size)
Convert raw received bytes into their data type.
std::unique_ptr< SyntalosLink >initSyntalosModuleLink(const ModuleInitOptions & optn ={})
SY_DEFINE_LOG_CATEGORY(logSyLink , “sylink” )
template <typename Sub >
auto
safeReceive(Sub & sub)
std::stringgetenvSafe(const char * name)
voidresolveTypedNewDataCallback(InputPortInfo * iport)
SY_DEFINE_LOG_CATEGORY(logIpc , “ipc” )
voidipcLogMessageDispatch(datactl::LogSeverity severity, const std::string & msg)
std::stringedlRelPath(const EDLGroup & root, const EDLGroup & target)
SY_DEFINE_LOG_CATEGORY(logLinkMod , “sylm” )

Attributes

Name
std::vector< std::pair< std::string, int > >g_streamTypeIdIndex
constexpr int64_tUS_PER_MS
constexpr int64_tUS_PER_S
constexpr int64_tUS_PER_MIN
constexpr int64_tUS_PER_H
constexpr int64_tNS_PER_US
constexpr int64_tMS_PER_S
constexpr int64_tMS_PER_MIN
constexpr autoSECONDARY_CLOCK_TOLERANCE
The amount of time a secondary clock is allowed to deviate from the master.
constexpr autoDEFAULT_CLOCKSYNC_CHECK_INTERVAL
Interval at which we check for external clock synchronization.
std::shared_ptr< quill::Sink >g_consoleSink
quill::LogLevelg_defaultLogLevel
QtMessageHandlerg_prevQtHandler
constexpr uint64_tSY_IOX_QUEUE_CAPACITY
constexpr uint64_tSY_IOX_HISTORY_SIZE
constexpr uint64_tSY_IOX_INITIAL_SLICE_LEN
constexpr size_tSY_IOX_ID_MAX_LEN
constexpr uint64_tSY_IOX_MAX_RESPONSE_BUF_SIZE
const std::stringIN_PORT_CHANGE_CHANNEL_ID
const std::stringOUT_PORT_CHANGE_CHANNEL_ID
const std::stringIN_PORT_UPDATE_METADATA_ID
const std::stringWORKER_CTL_EVENT_ID
const std::stringMASTER_CTL_EVENT_ID
const std::stringERROR_CHANNEL_ID
const std::stringSTATE_CHANNEL_ID
const std::stringSTATUS_MESSAGE_CHANNEL_ID
const std::stringSYNC_DETAILS_CHANNEL_ID
const std::stringSYNC_OFFSET_CHANNEL_ID
const std::stringAPI_VERSION_CALL_ID
const std::stringSET_NICENESS_CALL_ID
const std::stringSET_MAX_RT_PRIORITY_CALL_ID
const std::stringSET_CPU_AFFINITY_CALL_ID
const std::stringDELETE_PORT_CALL_ID
const std::stringCONNECT_INPUT_CALL_ID
const std::stringLOAD_SCRIPT_CALL_ID
const std::stringSET_PORTS_PRESET_CALL_ID
const std::stringSAVE_SETTINGS_CALL_ID
const std::stringLOAD_SETTINGS_CALL_ID
const std::stringPREPARE_RUN_CALL_ID
const std::stringSTART_CALL_ID
const std::stringSTOP_CALL_ID
const std::stringSHUTDOWN_CALL_ID
const std::stringSHOW_SETTINGS_CALL_ID
const std::stringSHOW_DISPLAY_CALL_ID
const std::stringEDL_RESERVE_CALL_ID

Types Documentation

enum ModuleState

EnumeratorValueDescription
UNKNOWN
INITIALIZINGModule is in an unknown state.
IDLEModule is initializing after being added.
PREPARINGModule is inactive and not started.
DORMANTModule is preparing a run.
READYThe module is inactive for this run, as it has no work to do.
RUNNINGEverything is prepared, we are ready to start.
ERRORModule is running. Module failed to run / is in an error state

The ModuleState enum.

Describes the state a module can be in. The state is usually displayed to the user via a module indicator widget.

enum ControlCommandKind

EnumeratorValueDescription
UNKNOWN
START
PAUSEStart an operation.
STOPPause an operation, can be resumed with START.
STEPStop an operation.
CUSTOMAdvance operation by one step.

The ControlCommandKind enum.

Basic operations to control a module from another module.

enum LineCommandKind

EnumeratorValueDescription
UNKNOWN
SET_MODE
WRITE_DIGITALConfigure line direction / mode.
WRITE_ANALOGSet a digital line to a value (0/1)
WRITE_DIGITAL_PULSESet an analog line to a value.
WRITE_ANALOG_PULSEPulse a digital line for duration (value = level during pulse)
CUSTOMDrive an analog line at value for duration (for stim devices) Arbitrary device-defined payload carried in extra

The LineCommandKind enum.

Type of operation requested on a hardware signal line / channel / pin.

enum LineModeFlag

EnumeratorValueDescription
NONE0
IS_INPUT1u « 0
IS_OUTPUT1u « 1Line is an input.
PULL_UP1u « 2Line is an output.

Individual mode bits for LineCommandKind::SetMode.

Composable bit flags describing how a line should be configured. Only meaningful for SetMode; ignored for other command kinds.

enum SignalDataType

EnumeratorValueDescription
Amplifier
AuxInput
SupplyVoltage
BoardAdc
BoardDigIn
BoardDigOut

Type of a signal from a signal source.

This is usually set in the metadata of a data stream.

enum EDLUnitKind

EnumeratorValueDescription
UNKNOWN
COLLECTION
GROUP
DATASET

Type of an EDL unit.

enum EDLCreateFlag

EnumeratorValueDescription
OPEN_ONLY
CREATE_OR_OPENUnit will only be opened, never created.
MUST_CREATEUnit will be opened if it exists, and created otherwise. Unit must be created, it is an error if it already exists

Flag to influence how EDL units are loaded.

enum TimeSyncStrategy

EnumeratorValueDescription
NONE0
SHIFT_TIMESTAMPS_FWD1 « 0
SHIFT_TIMESTAMPS_BWD1 « 1Move timestamps forward to match the master clock.
ADJUST_CLOCK1 « 2Move timestamps backward to match the master clock.
WRITE_TSYNCFILE1 « 3Do not change timestamps by adjust the secondary clocks to match the master clock.

The time synchronization strategy.

enum TSyncFileMode

EnumeratorValueDescription
CONTINUOUS0
SYNCPOINTS1Continuous time-point mapping with no gaps.

Timepoint storage of a TSync file.

enum TSyncFileTimeUnit

EnumeratorValueDescription
INDEX0
NANOSECONDS1monotonically increasing counter without dimension
MICROSECONDS2
MILLISECONDS3
SECONDS4

Unit types for time representation in a TSync file.

enum TSyncFileDataType

EnumeratorValueDescription
INVALID0
INT162
INT323
INT644
UINT166
UINT327
UINT648

Data types use for storing time values in the data file.

enum SysInfoCheckResult

EnumeratorValueDescription
UNKNOWN
OK
SUSPICIOUS
ISSUE

enum ColorMode

EnumeratorValueDescription
SYSTEM
BRIGHT
DARK

enum ModuleWorkerMode

EnumeratorValueDescription
PERSISTENT
TRANSIENTWorker is started once, and runs while the module is present on the board. Worker run only for the duration of the experiment, and terminated afterwards

Worker mode for out-of-process modules.

enum PortAction

EnumeratorValueDescription
UNKNOWN
ADDUndefined action.
REMOVEAdd a new port.
CHANGERemove an existing port. Change an existing port

Action performed to modify a module port.

enum ConnectionHeatLevel

EnumeratorValueDescription
NONE
LOW
MEDIUM
HIGH

Connection heat level.

Warning level dependent on how full the buffer that is represented by a connection is. A high heat means lots of pending stuff and potentially a slow receiving module or not enough system resources. This state is managed internally by Syntalos.

enum ModuleFeature

EnumeratorValueDescription
NONE0
SHOW_SETTINGS1 « 0
SHOW_DISPLAY1 « 1Module can display a settings window.
REALTIME1 « 2Module has one or more display window(s) to show.
CALL_UI_EVENTS1 « 3Enable realtime scheduling for the module’s thread.
REQUEST_CPU_AFFINITY1 « 4Call direct UI events processing method.
PROHIBIT_CPU_AFFINITY1
« 5Pin the module’s thread to a separate CPU core, if possible (even if the user disabled this)

The ModuleFeature flags List of basic features this module may or may not support, or may request from the engine to be available.

enum ModuleDriverKind

EnumeratorValueDescription
NONE
THREAD_DEDICATEDModule will be run in the main (GUI) thread.
EVENTS_DEDICATEDModule wants to run in a dedicated thread.
EVENTS_SHAREDModule shares a thread(pool) with other modules of its kind, via an event loop. Module shares a thread(pool) with arbitrary other modules, actions are triggered by events

The ModuleDriverKind enum.

enum UsbHotplugEventKind

EnumeratorValueDescription
NONE
DEVICE_ARRIVEDNo USB hotplug event.
DEVICE_LEFTA new device appeared.
DEVICES_CHANGEA device has left. Devices have appeared and left

The UsbHotplugEventKind enum.

enum ModuleCategory

EnumeratorValueDescription
NONE0
SYNTALOS_DEV1 « 0Not categorized.
EXAMPLES1 « 1A development/test tool for Syntalos itself.
DEVICES1 « 2An example / template module.
GENERATORS1 « 3Modules which communicate with hardware devices.
SCRIPTING1 « 4(Test)data generators
DISPLAY1 « 5Scripting & customization.
WRITERS1 « 6Display modules.
PROCESSING1 « 7Modules which write data to disk.

Categorization for modules.

enum ModuleModifier

EnumeratorValueDescription
NONE0
ENABLED1 « 0
STOP_ON_FAILURE1 « 1The module is enabled.

The ModuleModifier flags Flags set by Syntalos or the user to modify the behavior of the module in the wider context of the running experiment.

enum PortDirection

EnumeratorValueDescription
NONE
INPUT
OUTPUT

Enum specifying directionality of a port (in or out)

enum MetaTypeTag

EnumeratorValueDescription
Null0
BoolFalse1
BoolTrue2
Int643
Double4
String5
Size6
Array7
Object8

Type tag used in MetaValue binary serialization.

enum PyVirtualEnvStatus

EnumeratorValueDescription
VALID
MISSING
REQUIREMENTS_CHANGED
INTERPRETER_MISSING

using LineModeFlags

using Syntalos::LineModeFlags = typedef Flags<LineModeFlag>;

using StreamTypeList

using Syntalos::StreamTypeList = typedef std:: tuple<ControlCommand, TableRow, Frame, LineCommand, LineReading, SignalBlockI32, SignalBlockU16, SignalBlockF32>;

Compile-time list of all stream data types.

Append a new type here when adding it to the TypeId enum.

typedef EdlDateTime

typedef std::chrono::zoned_time< std::chrono::system_clock::duration > Syntalos::EdlDateTime;

using symaster_timepoint

using Syntalos::symaster_timepoint = typedef std::chrono::time_point<symaster_clock>;

A timepoint on the master clock.

using seconds_t

using Syntalos::seconds_t = typedef std::chrono::seconds;

Shorthand for seconds.

using milliseconds_t

using Syntalos::milliseconds_t = typedef std::chrono::milliseconds;

Shorthand for milliseconds.

using microseconds_t

using Syntalos::microseconds_t = typedef std::chrono::duration<int64_t, std::micro>;

Shorthand for microseconds.

using nanoseconds_t

using Syntalos::nanoseconds_t = typedef std::chrono::duration<int64_t, std::nano>;

Shorthand for nanoseconds.

typedef VectorXi32

typedef Eigen::Matrix<int32_t, Eigen::Dynamic, 1> Syntalos::VectorXi32;

typedef VectorXi64

typedef Eigen::Matrix<int64_t, Eigen::Dynamic, 1> Syntalos::VectorXi64;

typedef VectorXu16

typedef Eigen::Matrix<uint16_t, Eigen::Dynamic, 1> Syntalos::VectorXu16;

typedef VectorXu64

typedef Eigen::Matrix<uint64_t, Eigen::Dynamic, 1> Syntalos::VectorXu64;

typedef VectorXf

typedef Eigen::Matrix<float, Eigen::Dynamic, 1> Syntalos::VectorXf;

typedef VectorXd

typedef Eigen::Matrix<double, Eigen::Dynamic, 1> Syntalos::VectorXd;

typedef MatrixXi32

typedef Eigen::Matrix<int32_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Syntalos::MatrixXi32;

typedef MatrixXu16

typedef Eigen::Matrix<uint16_t, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Syntalos::MatrixXu16;

typedef MatrixXf

typedef Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Syntalos::MatrixXf;

typedef MatrixXd

typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Syntalos::MatrixXd;

using TimeSyncStrategies

using Syntalos::TimeSyncStrategies = typedef Flags<TimeSyncStrategy>;

using SyncDetailsChangeNotifyFn

using Syntalos::SyncDetailsChangeNotifyFn = typedef std::function< void(const std::string &id, const TimeSyncStrategies &strategies, const microseconds_t &tolerance)>;

Function to call when synchronizer details have changed.

using OffsetChangeNotifyFn

using Syntalos::OffsetChangeNotifyFn = typedef std::function<void(const std::string &id, const microseconds_t &currentOffset)>;

Function to call to notify about an offset change.

using QuillLogger

using Syntalos::QuillLogger = typedef quill::Logger;

using intervalEventFunc_t

using Syntalos::intervalEventFunc_t = typedef void (AbstractModule::*)(int &);

Event function type for timed callbacks.

using recvDataEventFunc_t

using Syntalos::recvDataEventFunc_t = typedef std::function<void()>;

Callable type used for subscription new-data callbacks.

using ByteVector

using Syntalos::ByteVector = typedef std::pmr::vector<std::byte>;

ByteVector is a vector of bytes using the polymorphic allocator.

In Syntalos’ heavily threaded environment, where in the worst case a ton of these vectors may be created and destroyed in quick succession, the default glibc allocator is less than optimal. Mimalloc has shown to perform a lot better for this burst-like, threaded activity, therefore we prefer it. Please try to reuse buffers whenever possible though - while mimalloc is a significant improvement, reusing memory segments is even better.

We do use the C++ polymorphic allocator since datactl is used in places where swapping the allocator is undesirable, e.g. in mlink that may be linked into non-Syntalos processes. These processes may use the default allocator instead of Syntalos’ mimalloc-based one.

using LoadScriptFn

using Syntalos::LoadScriptFn = typedef std::function<void(const std::string &script, const fs::path &wdir)>;

using SaveSettingsFn

using Syntalos::SaveSettingsFn = typedef std::function<bool(ByteVector &settings, const fs::path &baseDir)>;

using LoadSettingsFn

using Syntalos::LoadSettingsFn = typedef std::function<bool(const ByteVector &settings, const fs::path &baseDir)>;

using PrepareRunFn

using Syntalos::PrepareRunFn = typedef std::function<bool()>;

using StartFn

using Syntalos::StartFn = typedef std::function<void()>;

using StopFn

using Syntalos::StopFn = typedef std::function<void()>;

using ShutdownFn

using Syntalos::ShutdownFn = typedef std::function<void()>;

using NewDataRawFn

using Syntalos::NewDataRawFn = typedef std::function<void(const void *data, size_t size)>;

using NewDataFn

using Syntalos::NewDataFn = typedef std::function<void(BaseDataType &data)>;

using ShowSettingsFn

using Syntalos::ShowSettingsFn = typedef std::function<void(void)>;

using ShowDisplayFn

using Syntalos::ShowDisplayFn = typedef std::function<void(void)>;

Functions Documentation

function toString

std::string toString(
    ModuleState state
)

function registerStreamMetaTypes

void registerStreamMetaTypes()

Helper function to register all meta types for stream data.

This function registers all types with the meta object system and also creates a global map of all available stream types.

function streamTypeIdIndex

std::vector< std::pair< std::string, int > > streamTypeIdIndex()

Get a mapping of type names to their IDs.

function syDataTypeId

template <typename T >
constexpr int syDataTypeId()

Helper function to get the type ID of a data type.

function deserializeFromMemory

template <typename T >
T deserializeFromMemory(
    const void * memory,
    size_t size
)

Convenience function to deserialize a data type from memory.

function forEachStreamType

template <typename Fn >
constexpr bool forEachStreamType(
    Fn && fn
)

Call fn(std::type_identity<T>{}) for every T in StreamTypeList.

The lambda must return bool: true to stop iterating (typically “I found what I was looking for”), false to keep going.

function numToString

template <typename T >
inline std::string numToString(
    T x
)

Convert a numeric value to a string using Syntalos’ default notation.

This function converts arithmetic types to strings in a locale-independent way. For floating-point types, it uses the “general” format (shortest representation). Special values (NaN, infinity) are handled consistently across all types.

function edlCurrentDateTime

EdlDateTime edlCurrentDateTime()

function makeAnimalMoniker

std::string makeAnimalMoniker()

function makeAnimalMonikerForString

std::string makeAnimalMonikerForString(
    const std::string & source
)

function makeMonikerForUuid

std::string makeMonikerForUuid(
    const Uuid & uuid
)

function makeMonikerForString

std::string makeMonikerForString(
    const std::string & source
)

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const MetaSize & sz
)

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const MetaArray & arr
)

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const MetaValue & v
)

function operator«

inline std::ostream & operator<<(
    std::ostream & os,
    const MetaStringMap & map
)

function writeJson

void writeJson(
    std::ostream & os,
    const MetaValue & val
)

Write a MetaValue as JSON to the given stream (RFC-8259, compact).

function writeJsonObject

void writeJsonObject(
    std::ostream & os,
    const std::map< std::string, MetaValue > & obj
)

Write a MetaValue map as a JSON object to the given stream.

function toJsonString

std::string toJsonString(
    const MetaValue & v
)

function toJsonObjectString

std::string toJsonObjectString(
    const MetaStringMap & m
)

function stringMapFromJson

std::expected< MetaStringMap, std::string > stringMapFromJson(
    const std::string & json
)

Rudimentary JSON object parser: handles {“key”: “str”} and {“key”: 123}

function makeAnimalMonikerFromRng

static std::string makeAnimalMonikerFromRng(
    std::mt19937_64 & rng
)

function makeMonikerFromSeed

static std::string makeMonikerFromSeed(
    uint64_t seed
)

function newUuid7

Uuid newUuid7()

Generate a Version 7 UUID (UUIDv7) based on a timestamp and random data.

Return: A new UUIDv7.

The function generates a UUID conforming to Version 7 of the UUID format.

function writeJsonString

static void writeJsonString(
    std::ostream & os,
    const std::string & s
)

function usecToMsec

inline auto usecToMsec(
    const microseconds_t & usec
)

Convert microseconds to milliseconds.

Shorthand for duration-case to increase code readability.

function msecToUsec

inline auto msecToUsec(
    const milliseconds_t & msec
)

Convert milliseconds microseconds.

Shorthand for duration-case to increase code readability.

function nsecToUsec

inline auto nsecToUsec(
    const nanoseconds_t & msec
)

Convert nanoseconds microseconds.

Shorthand for duration-case to increase code readability.

function timeDiffSec

inline auto timeDiffSec(
    const symaster_timepoint & timePoint1,
    const symaster_timepoint & timePoint2
)

function timeDiffMsec

inline auto timeDiffMsec(
    const symaster_timepoint & timePoint1,
    const symaster_timepoint & timePoint2
)

function timeDiffUsec

inline auto timeDiffUsec(
    const symaster_timepoint & timePoint1,
    const symaster_timepoint & timePoint2
)

function timeDiffToNowMsec

inline auto timeDiffToNowMsec(
    const std::chrono::time_point< symaster_clock > & timePoint
)

function timeDiffToNowUsec

inline auto timeDiffToNowUsec(
    const std::chrono::time_point< symaster_clock > & timePoint
)

function currentTimePoint

inline symaster_timepoint currentTimePoint()

function vectorMedian

template <typename T >
double vectorMedian(
    const Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec
)

function vectorMedianInplace

template <typename T >
double vectorMedianInplace(
    Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec
)

function vectorVariance

template <typename T >
double vectorVariance(
    const Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec,
    const double & mean,
    bool unbiased =true
)

function vectorVariance

template <typename T >
double vectorVariance(
    const Eigen::Matrix< T, Eigen::Dynamic, 1 > & vec,
    bool unbiased =true
)

function serializeEigen

template <typename EigenType >
void serializeEigen(
    BinaryStreamWriter & stream,
    const EigenType & matrix
)

function deserializeEigen

template <typename EigenType >
EigenType deserializeEigen(
    BinaryStreamReader & stream
)

function timeSyncStrategyToHString

const std::string timeSyncStrategyToHString(
    const TimeSyncStrategy & strategy
)

function timeSyncStrategiesToHString

const std::string timeSyncStrategiesToHString(
    const TimeSyncStrategies & strategies
)

function safeStopSynchronizer

template <typename T >
void safeStopSynchronizer(
    const T & synchronizerSmartPtr
)

function safeStopSynchronizer

template <typename T >
void safeStopSynchronizer(
    const T & synchronizer,
    const microseconds_t & lastValidMasterTimestamp
)

function tsyncFileTimeUnitToString

std::string tsyncFileTimeUnitToString(
    const TSyncFileTimeUnit & tsftunit
)

function tsyncFileDataTypeToString

std::string tsyncFileDataTypeToString(
    const TSyncFileDataType & dtype
)

function tsyncFileModeToString

std::string tsyncFileModeToString(
    const TSyncFileMode & mode
)

function cvMatToQImage

std::optional< QImage > cvMatToQImage(
    const cv::Mat & mat
)

Converts an OpenCV Mat to a QImage.

Parameters:

  • mat The OpenCV Mat to convert.

Return: An optional containing the converted QImage, or std::nullopt if conversion fails.

This function attempts to convert the given OpenCV Mat to a QImage. It supports grayscale (1 channel), RGB (3 channels), and RGBA (4 channels) images. If the conversion is successful, it returns a QImage wrapped in std::optional. If the conversion fails (e.g., unsupported number of channels), it returns std::nullopt.

function cvMatToQPixmap

std::optional< QPixmap > cvMatToQPixmap(
    const cv::Mat & mat
)

function qRectToCvRect

inline cv::Rect qRectToCvRect(
    const QRect & r
)

Helper to convert a QRect into a cv::Rect

For a cv::Rect, right and bottom edges are exclusive, while they are inclusive for a QRect. This helper just ensures we don’t accidentally make any conversion mistakes.

function shellQuote

QString shellQuote(
    const QString & str
)

Shell-escape a string.

function findHostExecutable

QString findHostExecutable(
    const QString & exe
)

Find executable on the host system (if running in a sandbox)

Parameters:

  • exe Name of the executable to look for

Return: Executable name, or empty string if not found

function runHostExecutable

int runHostExecutable(
    const QString & exe,
    const QStringList & args,
    bool waitForFinished
)

Run command on the host.

Parameters:

  • exe The program to run
  • args Program arguments
  • waitForFinished Wait for the command to finish

Return: Exit status of the program (if waiting for finished)

function runInTerminal

int runInTerminal(
    const QString & cmd,
    const QStringList & args,
    const QString & wdir,
    const QString & title
)

function launchProgramNC3Fallback

static bool launchProgramNC3Fallback(
    const QString & exePath,
    int * pidfd_out
)

Fallback for launchProgram() if the clone3() syscall was not available or is blocked by seccomp filters.

function launchProgramPidFd

bool launchProgramPidFd(
    const QString & exePath,
    int * pidfd_out
)

Launch a program in a new process, and return the PID of the new process as pidfd.

Parameters:

  • exePath The path to the executable to launch.
  • pidfd_out A pointer to an integer, which will be set to the PID of the new process.

Return: true if the program was successfully launched, false otherwise.

This function is used to launch a new program in a new process, and return the PID as pidfd.

function isProcessRunning

bool isProcessRunning(
    int pidfd
)

Check if a process is still running using a pidfd.

Parameters:

  • pidfd The PIDFD of the process to check.

Return: true if the process is still running, false otherwise.

This function checks if a process is still running, by checking if the process has exited or not.

function getLogger

quill::Logger * getLogger(
    const std::string & name
)

function getLogger

quill::Logger * getLogger(
    const QString & name
)

function getLogger

quill::Logger * getLogger(
    const char * name
)

function logModTmp

quill::Logger * logModTmp(
    const char * name
)

Parameters:

  • name A custom-defined module name.

Return: A logger for the module ID.

Get a temporary logger for an arbitrary module name. This is not for high-volume logging and mostly for compatibility with older code, think twice before using it in any new code.

Usually there is a better solution.

function getDefaultLogger

inline quill::Logger * getDefaultLogger()

function removeLogger

void removeLogger(
    quill::Logger * logger
)

Remove a logger explicitly. Should usually not be needed.

function initializeSyLogSystem

void initializeSyLogSystem(
    quill::LogLevel consoleLogLevel =quill::LogLevel::Info
)

Initialize Syntalos logging. Must only ever be called once, at program startup. Purely internal API.

function shutdownSyLogSystem

void shutdownSyLogSystem()

function qstr

inline const QString & qstr(
    const QString & s
)

function qstr

inline QString qstr(
    QStringView s
)

function qstr

inline QString qstr(
    const char * s
)

function qstr

inline QString qstr(
    std::string_view s
)

function qstr

inline QString qstr(
    const std::string & s
)

function colorModeToString

QString colorModeToString(
    ColorMode mode
)

function colorModeFromString

ColorMode colorModeFromString(
    const QString & str
)

function findSyntalosLibraryPaths

void findSyntalosLibraryPaths(
    QString & pkgConfigPath,
    QString & ldLibraryPath,
    QString & includePath
)

function findSyntalosMlinkPyModulePaths

QStringList findSyntalosMlinkPyModulePaths()

Build an ordered list of directories that can contain syntalos_mlink. Dev/build paths are preferred over installed paths.

function datactlLogHandler

static void datactlLogHandler(
    const datactl::LogMessage & m
)

function qtLogHandler

static void qtLogHandler(
    QtMsgType type,
    const QMessageLogContext & ctx,
    const QString & msg
)

function glibLogWriter

static GLogWriterOutput glibLogWriter(
    GLogLevelFlags log_level,
    const GLogField * fields,
    gsize n_fields,
    gpointer 
)

function makeIpcServiceTopology

inline constexpr IpcServiceTopology makeIpcServiceTopology(
    uint senderCount,
    uint receiverCount
)

Helper to create a Syntalos IPC service topology, for setting limits on IOX connections.

function connectionHeatToHumanString

QString connectionHeatToHumanString(
    ConnectionHeatLevel heat
)

function toString

QString toString(
    ModuleCategory category
)

function moduleCategoryFromString

ModuleCategory moduleCategoryFromString(
    const QString & categoryStr
)

function moduleCategoriesFromVariant

ModuleCategories moduleCategoriesFromVariant(
    const QVariant & value
)

function qHash

inline uint qHash(
    ModuleModifier key,
    uint seed
)

function newStreamForType

VariantDataStream * newStreamForType(
    int typeId
)

Create a new DataStream for the type identified by the given ID.

function newInputPortForType

VarStreamInputPort * newInputPortForType(
    int typeId,
    AbstractModule * mod,
    const QString & id,
    const QString & title
)

Create a new Input Port for the type identified by the given ID.

function operator|

template <typename E ,
typename  =std::enable_if_t<std::is_scoped_enum_v<E>>>
constexpr Flags< E > operator|(
    E lhs,
    E rhs
)

Allow E | E to produce Flags<E> for any scoped enum.

Restricted to scoped enums so we don’t shadow the built-in int-returning operator| that plain (unscoped) enums rely on - most notably Eigen’s internal storage-option enums, which are evaluated inside Syntalos namespace scope when Eigen templates are instantiated against our types.

function pythonVEnvDirForName

QString pythonVEnvDirForName(
    const QString & venvName
)

Get the absolute directory path of a virtual environment with the given name.

function pythonVirtualEnvExists

static bool pythonVirtualEnvExists(
    const QString & venvName
)

function requirementsHashMetadataPath

static QString requirementsHashMetadataPath(
    const QString & venvDir
)

function writeRequirementsHashMetadata

static bool writeRequirementsHashMetadata(
    const QString & venvDir,
    const QByteArray & requirementsHash
)

function readRequirementsHashMetadata

static bool readRequirementsHashMetadata(
    const QString & venvDir,
    QString & requirementsHashOut
)

function interpreterPathFromCfg

static QString interpreterPathFromCfg(
    const QString & venvDir
)

function pythonVirtualEnvStatus

PyVirtualEnvStatus pythonVirtualEnvStatus(
    const QString & venvName,
    const QString & requirementsFile
)

function injectSyntalosMlinkIntoVenv

static void injectSyntalosMlinkIntoVenv(
    const QString & venvDir
)

function createPythonVirtualEnv

auto createPythonVirtualEnv(
    const QString & venvName,
    const QString & requirementsFile,
    bool recreate
)

function streamDataFromRawMemory

template <typename T >
T streamDataFromRawMemory(
    const void * data,
    size_t size
)

Convert raw received bytes into their data type.

function initSyntalosModuleLink

std::unique_ptr< SyntalosLink > initSyntalosModuleLink(
    const ModuleInitOptions & optn ={}
)

function SY_DEFINE_LOG_CATEGORY

SY_DEFINE_LOG_CATEGORY(
    logSyLink ,
    "sylink" 
)

function safeReceive

template <typename Sub >
static auto safeReceive(
    Sub & sub
)

Safely receive from a subscriber on the client. Returns the inner optional (empty = no data available) and logs a warning instead of crashing when the receive itself fails.

function getenvSafe

static std::string getenvSafe(
    const char * name
)

function resolveTypedNewDataCallback

void resolveTypedNewDataCallback(
    InputPortInfo * iport
)

Resolve the variant (typed) callback into a per-sample raw callback once, using the recorded source-on-wire type ID and the declared input type ID. Compatible stream type castings are applied here.

Port has to be connected (sourceTypeId != 0) and d.newDataCb should be set.

function SY_DEFINE_LOG_CATEGORY

SY_DEFINE_LOG_CATEGORY(
    logIpc ,
    "ipc" 
)

function ipcLogMessageDispatch

static void ipcLogMessageDispatch(
    datactl::LogSeverity severity,
    const std::string & msg
)

function edlRelPath

static std::string edlRelPath(
    const EDLGroup & root,
    const EDLGroup & target
)

Helper: compute the relative path of target from the rootGroup. Returns "" if target IS the rootGroup (i.e., put at root level).

function SY_DEFINE_LOG_CATEGORY

SY_DEFINE_LOG_CATEGORY(
    logLinkMod ,
    "sylm" 
)

Attributes Documentation

variable g_streamTypeIdIndex

static std::vector< std::pair< std::string, int > > g_streamTypeIdIndex;

variable US_PER_MS

constexpr int64_t US_PER_MS = 1'000;

variable US_PER_S

constexpr int64_t US_PER_S = 1'000 * US_PER_MS;

variable US_PER_MIN

constexpr int64_t US_PER_MIN = 60 * US_PER_S;

variable US_PER_H

constexpr int64_t US_PER_H = 60 * US_PER_MIN;

variable NS_PER_US

constexpr int64_t NS_PER_US = 1'000;

variable MS_PER_S

constexpr int64_t MS_PER_S = 1'000;

variable MS_PER_MIN

constexpr int64_t MS_PER_MIN = 60 * MS_PER_S;

variable SECONDARY_CLOCK_TOLERANCE

static constexpr auto SECONDARY_CLOCK_TOLERANCE = microseconds_t(1000);

The amount of time a secondary clock is allowed to deviate from the master.

Since Syntalos uses millisecond time resolution, permitting (slightly more than) half a millisecond deviation for secondary clocks from the master clock is sensible.

IMPORTANT: Modules may override this value for their synchronizers to one that fits their device better. This is just a default for modules which do not change the default setting.

variable DEFAULT_CLOCKSYNC_CHECK_INTERVAL

static constexpr auto DEFAULT_CLOCKSYNC_CHECK_INTERVAL = milliseconds_t(4000);

Interval at which we check for external clock synchronization.

IMPORTANT: This is just a default value for modules which do not explicitly define a check interval. Individual modules may choose a different value that fits the device they are communicating with best.

variable g_consoleSink

static std::shared_ptr< quill::Sink > g_consoleSink = nullptr;

variable g_defaultLogLevel

static quill::LogLevel g_defaultLogLevel = quill::LogLevel::Info;

variable g_prevQtHandler

static QtMessageHandler g_prevQtHandler = nullptr;

variable SY_IOX_QUEUE_CAPACITY

static constexpr uint64_t SY_IOX_QUEUE_CAPACITY = 16U;

variable SY_IOX_HISTORY_SIZE

static constexpr uint64_t SY_IOX_HISTORY_SIZE = 1U;

variable SY_IOX_INITIAL_SLICE_LEN

static constexpr uint64_t SY_IOX_INITIAL_SLICE_LEN = 4096;

variable SY_IOX_ID_MAX_LEN

static constexpr size_t SY_IOX_ID_MAX_LEN = IOX2_SERVICE_NAME_LENGTH;

variable SY_IOX_MAX_RESPONSE_BUF_SIZE

static constexpr uint64_t SY_IOX_MAX_RESPONSE_BUF_SIZE = 2U;

variable IN_PORT_CHANGE_CHANNEL_ID

static const std::string IN_PORT_CHANGE_CHANNEL_ID = "InPortChange";

variable OUT_PORT_CHANGE_CHANNEL_ID

static const std::string OUT_PORT_CHANGE_CHANNEL_ID = "OutPortChange";

variable IN_PORT_UPDATE_METADATA_ID

static const std::string IN_PORT_UPDATE_METADATA_ID = "UpdateInputPortMetadata";

variable WORKER_CTL_EVENT_ID

static const std::string WORKER_CTL_EVENT_ID = "worker-event";

Shared wakeup event service names for the control channel.

WORKER_CTL_EVENT_ID - the worker notifies the master whenever it publishes on a control channel (error, state, port-changes …). The master attaches one listener for this to its WaitSet.

MASTER_CTL_EVENT_ID - the master notifies the worker whenever it sends a request (request-response commands).

variable MASTER_CTL_EVENT_ID

static const std::string MASTER_CTL_EVENT_ID = "master-event";

variable ERROR_CHANNEL_ID

static const std::string ERROR_CHANNEL_ID = "Error";

variable STATE_CHANNEL_ID

static const std::string STATE_CHANNEL_ID = "State";

variable STATUS_MESSAGE_CHANNEL_ID

static const std::string STATUS_MESSAGE_CHANNEL_ID = "StatusMessage";

variable SYNC_DETAILS_CHANNEL_ID

static const std::string SYNC_DETAILS_CHANNEL_ID = "SyncDetails";

variable SYNC_OFFSET_CHANNEL_ID

static const std::string SYNC_OFFSET_CHANNEL_ID = "SyncOffset";

variable API_VERSION_CALL_ID

static const std::string API_VERSION_CALL_ID = "ApiVersion";

variable SET_NICENESS_CALL_ID

static const std::string SET_NICENESS_CALL_ID = "SetNiceness";

variable SET_MAX_RT_PRIORITY_CALL_ID

static const std::string SET_MAX_RT_PRIORITY_CALL_ID = "SetMaxRealtimePriority";

variable SET_CPU_AFFINITY_CALL_ID

static const std::string SET_CPU_AFFINITY_CALL_ID = "SetCPUAffinity";

variable DELETE_PORT_CALL_ID

static const std::string DELETE_PORT_CALL_ID = "DeletePort";

variable CONNECT_INPUT_CALL_ID

static const std::string CONNECT_INPUT_CALL_ID = "ConnectInputPort";

variable LOAD_SCRIPT_CALL_ID

static const std::string LOAD_SCRIPT_CALL_ID = "LoadScript";

variable SET_PORTS_PRESET_CALL_ID

static const std::string SET_PORTS_PRESET_CALL_ID = "SetPortsPresetRequest";

variable SAVE_SETTINGS_CALL_ID

static const std::string SAVE_SETTINGS_CALL_ID = "SaveSettings";

variable LOAD_SETTINGS_CALL_ID

static const std::string LOAD_SETTINGS_CALL_ID = "LoadSettings";

variable PREPARE_RUN_CALL_ID

static const std::string PREPARE_RUN_CALL_ID = "PrepareRun";

variable START_CALL_ID

static const std::string START_CALL_ID = "Start";

variable STOP_CALL_ID

static const std::string STOP_CALL_ID = "Stop";

variable SHUTDOWN_CALL_ID

static const std::string SHUTDOWN_CALL_ID = "Shutdown";

variable SHOW_SETTINGS_CALL_ID

static const std::string SHOW_SETTINGS_CALL_ID = "ShowSettings";

variable SHOW_DISPLAY_CALL_ID

static const std::string SHOW_DISPLAY_CALL_ID = "ShowDisplay";

variable EDL_RESERVE_CALL_ID

static const std::string EDL_RESERVE_CALL_ID = "EdlReserve";

Updated on 2026-05-24 at 18:43:38 +0000