10#include <ChimeraTK/NDRegisterAccessor.h>
11#include <ChimeraTK/SupportedUserTypes.h>
12#include <ChimeraTK/TransferGroup.h>
33 template<
typename UserType>
34 void addNetwork(boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> feedingNode,
47 template<
typename UserType>
48 using FanOutMap = std::map<boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>>,
49 boost::shared_ptr<FeedingFanOut<UserType>>>;
65 template<
typename UserType>
68 assert(feedingNode.get() !=
nullptr);
72 if(consumerImplementationPairs.empty()) {
80 auto feedingFanOut = boost::make_shared<FeedingFanOut<UserType>>(feedingNode->getName(), feedingNode->getUnit(),
81 feedingNode->getDescription(), feedingNode->getNumberOfSamples(),
83 consumerImplementationPairs);
84 boost::fusion::at_key<UserType>(
_fanOutMap.table)[feedingNode] = feedingFanOut;
constexpr useconds_t DeviceOpenTimeout
Implements access to a ChimeraTK::Device.
Base class for internal modules which are created by the variable connection code (e....
InternalModule which waits for a trigger, then reads a number of variables and distributes each of th...
boost::shared_ptr< ChimeraTK::TransferElement > _externalTrigger
TransferElement acting as our trigger.
DeviceManager & _deviceModule
The DeviceModule of the feeder.
boost::thread _thread
Thread handling the synchronisation, if needed.
void activate() override
Activate synchronisation thread if needed.
TemplateUserTypeMap< FanOutMap > _fanOutMap
void addNetwork(boost::shared_ptr< ChimeraTK::NDRegisterAccessor< UserType > > feedingNode, ConsumerImplementationPairs< UserType > const &consumerImplementationPairs)
Add a new network the TriggerFanOut.
std::map< boost::shared_ptr< ChimeraTK::NDRegisterAccessor< UserType > >, boost::shared_ptr< FeedingFanOut< UserType > > > FanOutMap
Map of the feeding NDRegisterAccessor to the corresponding FeedingFanOut for each UserType.
void deactivate() final
Deactivate synchronisation thread if running.
ChimeraTK::TransferGroup _transferGroup
TransferGroup containing all feeders NDRegisterAccessors.
~TriggerFanOut() override
void run()
Synchronise feeder and the consumers.
InvalidityTracer application module.
std::list< std::pair< boost::shared_ptr< ChimeraTK::NDRegisterAccessor< UserType > >, VariableNetworkNode > > ConsumerImplementationPairs