Class Sync

Inheritance Relationships

Base Type

Class Documentation

class Sync : public dai::NodeCRTP<Node, Sync, SyncProperties>

Public Functions

Sync(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId)
Sync(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId, std::unique_ptr<Properties> props)
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

Public Members

InputMap inputs

A map of inputs

Output out = {*this, "out", Output::Type::MSender, {{DatatypeEnum::MessageGroup, false}}}

Output message of type MessageGroup

Public Static Attributes

static constexpr const char *NAME = "Sync"