Class Sync
Defined in File Sync.hpp
Inheritance Relationships
Base Types
public dai::DeviceNodeCRTP< DeviceNode, Sync, SyncProperties >(Template Class DeviceNodeCRTP)public dai::HostRunnable(Class HostRunnable)
Class Documentation
-
class Sync : public dai::DeviceNodeCRTP<DeviceNode, Sync, SyncProperties>, public dai::HostRunnable
Sync node. Performs syncing between image frames.
Public Functions
-
void setSyncThreshold(std::chrono::nanoseconds syncThreshold)
Set the maximal interval between messages in the group
- Parameters:
syncThreshold – Maximal interval between messages in the group
-
void setSyncAttempts(int syncAttempts)
Set the number of attempts to get the specified max interval between messages in the group
- Parameters:
syncAttempts – Number of attempts to get the specified max interval between messages in the group:
if syncAttempts = 0 then the node sends a message as soon at the group is filled
if syncAttempts > 0 then the node will make syncAttemts attempts to synchronize before sending out a message
if syncAttempts = -1 (default) then the node will only send a message if successfully synchronized
-
std::chrono::nanoseconds getSyncThreshold() const
Gets the maximal interval between messages in the group in milliseconds
-
int getSyncAttempts() const
Gets the number of sync attempts
-
void setRunOnHost(bool runOnHost)
Specify whether to run on host or device By default, the node will run on device.
-
virtual bool runOnHost() const override
Check if the node is set to run on host
-
virtual void run() override
-
inline DeviceNodeCRTP()
-
inline DeviceNodeCRTP(std::unique_ptr<Properties> props)
-
inline DeviceNodeCRTP(std::unique_ptr<Properties> props, bool confMode)
Public Members
-
InputMap inputs = {*this, "inputs", {"", DEFAULT_GROUP, false, 10, {{{DatatypeEnum::Buffer, true}}}, DEFAULT_WAIT_FOR_MESSAGE}}
A map of inputs
-
Output out = {*this, {"out", DEFAULT_GROUP, {{{DatatypeEnum::MessageGroup, false}}}}}
Output message of type MessageGroup
Public Static Attributes
-
static constexpr const char *NAME = "Sync"
-
void setSyncThreshold(std::chrono::nanoseconds syncThreshold)