Syntalos::SyntalosLink
Syntalos::SyntalosLink
Connection to a Syntalos instance.
#include <syntaloslink.h>
Public Functions
| Name | |
|---|---|
| ~SyntalosLink() | |
| SyntalosLink(const SyntalosLink & ) =delete | |
| SyntalosLink & | operator=(const SyntalosLink & ) =delete |
| std::string | instanceId() const |
| void | raiseError(const std::string & message) |
| void | raiseError(const std::string & title, const std::string & message) |
| void | setLoadScriptCallback(LoadScriptFn callback) |
| void | setSaveSettingsCallback(SaveSettingsFn callback) |
| void | setLoadSettingsCallback(LoadSettingsFn callback) |
| void | setPrepareRunCallback(PrepareRunFn callback) |
| void | setStartCallback(StartFn callback) |
| void | setStopCallback(StopFn callback) |
| void | setShutdownCallback(ShutdownFn callback) |
| void | setShowSettingsCallback(ShowSettingsFn callback) |
| void | setShowDisplayCallback(ShowDisplayFn callback) |
| SyncTimer * | timer() const |
| const TestSubjectInfo & | testSubject() const |
| bool | allowAsyncStart() const |
| void | setAllowAsyncStart(bool allow) |
| void | awaitData(int timeoutUsec =-1, const std::function< void()> & eventFn =nullptr) |
| void | awaitDataForever(const std::function< void()> & eventFn =nullptr, int intervalUsec =125 *1000) |
| ModuleState | state() const |
| void | setState(ModuleState state) |
| bool | isShutdownPending() const Returns true if a shutdown (via IPC or SIGTERM/SIGINT) has been requested. |
| void | setStatusMessage(const std::string & message) |
| int | maxRealtimePriority() const |
| std::vector< std::shared_ptr< InputPortInfo > > | inputPorts() const |
| std::vector< std::shared_ptr< OutputPortInfo > > | outputPorts() const |
| auto | registerInputPort(const std::string & id, const std::string & title, BaseDataType::TypeId typeId) |
| auto | registerOutputPort(const std::string & id, const std::string & title, BaseDataType::TypeId typeId, const MetaStringMap & metadata ={}) |
| void | updateInputPort(const std::shared_ptr< InputPortInfo > & iport) |
| void | updateOutputPort(const std::shared_ptr< OutputPortInfo > & oport) |
| void | removeInputPort(const std::shared_ptr< InputPortInfo > & iport) |
| void | removeOutputPort(const std::shared_ptr< OutputPortInfo > & oport) |
| void | resetPorts() Drop all registered ports. |
| bool | submitOutput(const std::shared_ptr< OutputPortInfo > & oport, const BaseDataType & data) |
Friends
| Name | |
|---|---|
| std::unique_ptr< SyntalosLink > | initSyntalosModuleLink(const ModuleInitOptions & optn) |
Public Functions Documentation
function ~SyntalosLink
~SyntalosLink()function SyntalosLink
SyntalosLink(
const SyntalosLink &
) =deletefunction operator=
SyntalosLink & operator=(
const SyntalosLink &
) =deletefunction instanceId
std::string instanceId() constfunction raiseError
void raiseError(
const std::string & message
)function raiseError
void raiseError(
const std::string & title,
const std::string & message
)function setLoadScriptCallback
void setLoadScriptCallback(
LoadScriptFn callback
)function setSaveSettingsCallback
void setSaveSettingsCallback(
SaveSettingsFn callback
)function setLoadSettingsCallback
void setLoadSettingsCallback(
LoadSettingsFn callback
)function setPrepareRunCallback
void setPrepareRunCallback(
PrepareRunFn callback
)function setStartCallback
void setStartCallback(
StartFn callback
)function setStopCallback
void setStopCallback(
StopFn callback
)function setShutdownCallback
void setShutdownCallback(
ShutdownFn callback
)function setShowSettingsCallback
void setShowSettingsCallback(
ShowSettingsFn callback
)function setShowDisplayCallback
void setShowDisplayCallback(
ShowDisplayFn callback
)function timer
SyncTimer * timer() constfunction testSubject
const TestSubjectInfo & testSubject() constfunction allowAsyncStart
bool allowAsyncStart() constOn startup, Syntalos can request start() on all external modules in parallel. This is the async-start method, and it results in start times of modules being much closer aligned. However, some modules have circular dependencies on metadata from other modules and may modify it in start(). Those may want to disable async-start for themselves, so they run exclusively and the engine waits for their start() call to complete.
function setAllowAsyncStart
void setAllowAsyncStart(
bool allow
)function awaitData
void awaitData(
int timeoutUsec =-1,
const std::function< void()> & eventFn =nullptr
)Parameters:
- timeoutUsec Timeout after which we return, or -1 to loop forever.
- eventFn Callback to an external even processing function to be called occasionally.
Wait for incoming messages for the given amount of microseconds, then return.
When messages arrive, the respective callbacks are called.
function awaitDataForever
void awaitDataForever(
const std::function< void()> & eventFn =nullptr,
int intervalUsec =125 *1000
)Parameters:
- eventFn The event processing function to call.
- intervalUsec The interval at which the function should be called.
Wait for incoming messages forever, calling callbacks in the current thread when they arrive.
If an event function is provided, it is called at the respective interval while we loop.
function state
ModuleState state() constfunction setState
void setState(
ModuleState state
)function isShutdownPending
bool isShutdownPending() constReturns true if a shutdown (via IPC or SIGTERM/SIGINT) has been requested.
Callers with their own spin loops should check this flag and exit promptly.
function setStatusMessage
void setStatusMessage(
const std::string & message
)function maxRealtimePriority
int maxRealtimePriority() constfunction inputPorts
std::vector< std::shared_ptr< InputPortInfo > > inputPorts() constfunction outputPorts
std::vector< std::shared_ptr< OutputPortInfo > > outputPorts() constfunction registerInputPort
auto registerInputPort(
const std::string & id,
const std::string & title,
BaseDataType::TypeId typeId
)Parameters:
- id Unique port identifier string.
- title Human-readable port title shown in the flow graph.
- typeId Data type ID (e.g. DataType.Frame, DataType.TableRow).
Return: InputPortInfo handle.
Declare a new input port for this module.
Must be called at initialization time to tell Syntalos the port topology for this module. Will return an error if an invalid type is passed or communication with Syntalos failed.
function registerOutputPort
auto registerOutputPort(
const std::string & id,
const std::string & title,
BaseDataType::TypeId typeId,
const MetaStringMap & metadata ={}
)Parameters:
- id Unique port identifier string.
- title Human-readable port title shown in the flow graph.
- typeId Data type ID (e.g. DataType.Frame, DataType.TableRow).
- metadata Metadata associated with this port.
Return: OutputPortInfo handle.
Declare a new output port for this module.
Must be called at initialization time to tell Syntalos the port topology for this module. Will return an error if an invalid type is passed or communication with Syntalos failed.
function updateInputPort
void updateInputPort(
const std::shared_ptr< InputPortInfo > & iport
)function updateOutputPort
void updateOutputPort(
const std::shared_ptr< OutputPortInfo > & oport
)function removeInputPort
void removeInputPort(
const std::shared_ptr< InputPortInfo > & iport
)function removeOutputPort
void removeOutputPort(
const std::shared_ptr< OutputPortInfo > & oport
)function resetPorts
void resetPorts()Drop all registered ports.
This tears down every IPC publisher/subscriber and clears the port lists, so the next round of registerInputPort() / registerOutputPort() calls starts from a clean slate.
function submitOutput
bool submitOutput(
const std::shared_ptr< OutputPortInfo > & oport,
const BaseDataType & data
)Friends
friend initSyntalosModuleLink
friend std::unique_ptr< SyntalosLink > initSyntalosModuleLink(
const ModuleInitOptions & optn
);Updated on 2026-04-24 at 23:36:58 +0000