|
DUDS
|
Distributed Update of Data from Something
|
A base class for receiving measurement signals from multiple Instruments. More...
#include <MeasurementSignalSink.hpp>
Classes | |
| struct | MeasurementConnections |
| Stores connections to a specific Insturment. More... | |
Public Types | |
| typedef GenericInstrument< SVT, SQT, TVT, TQT > | Instrument |
| typedef duds::data::GenericMeasurement< SVT, SQT, TVT, TQT > | Measurement |
| typedef boost::signals2::signal< void(const std::shared_ptr< Instrument > &, const std::shared_ptr< const Measurement > &) > | MesurementSignal |
| The type used for event listeners that are told of measurments. More... | |
Public Member Functions | |
| virtual | ~GenericMeasurementSignalSink () |
| Disconnects from all signals. More... | |
| bool | disconnectAll (const InstrumentSptr &inst) |
| Disconnects the group from both the new and old measurement signals from the given instrument. More... | |
| void | disconnectAll () |
| Disconnects the group from all signals. More... | |
| bool | disconnectNewMeasurement (const InstrumentSptr &inst) |
| Disconnects from the new measurement signal of the given instrument. More... | |
| bool | disconnectOldMeasurement (const InstrumentSptr &inst) |
| Disconnects from the old measurement signal of the given instrument. More... | |
| boost::signals2::connection | newMeasurementSource (const InstrumentSptr &inst, boost::signals2::connect_position at=boost::signals2::at_back) |
| Connect this object to the new measurement signal of the given instrument, or return the existing connection. More... | |
| boost::signals2::connection | newMeasurementSource (const typename MesurementSignal::group_type &group, const Instrument &inst, boost::signals2::connect_position at=boost::signals2::at_back) |
| boost::signals2::connection | oldMeasurementSource (const InstrumentSptr &inst, boost::signals2::connect_position at=boost::signals2::at_back) |
| boost::signals2::connection | oldMeasurementSource (const typename MesurementSignal::group_type &group, const Instrument &inst, boost::signals2::connect_position at=boost::signals2::at_back) |
| void | purgeDisconnections () |
| Removes any disconnected connection objects held by this object. More... | |
Protected Types | |
| typedef std::map< Instrument *, MeasurementConnections > | ConnectionMap |
| Reduce typing and limit line length; no other reason. More... | |
| typedef ConnectionMap | ConnectionMapIterator |
Protected Member Functions | |
| virtual void | handleNewMeasure (const std::shared_ptr< Instrument > &i, const std::shared_ptr< const Measurement > &m)=0 |
| Handles an incoming new measurement signal. More... | |
| virtual void | handleOldMeasure (const std::shared_ptr< Instrument > &i, const std::shared_ptr< const Measurement > &m)=0 |
| Handles an incoming old measurement signal. More... | |
Protected Attributes | |
| ConnectionMap | conns |
| Stores connections keyed by Instrument pointer. More... | |
A base class for receiving measurement signals from multiple Instruments.
| SVT | Sample value type |
| SQT | Sample quality type |
| TVT | Time value type |
| TQT | Time quality type |
Definition at line 26 of file MeasurementSignalSink.hpp.
|
protected |
Reduce typing and limit line length; no other reason.
Definition at line 48 of file MeasurementSignalSink.hpp.
|
protected |
Definition at line 49 of file MeasurementSignalSink.hpp.
| typedef GenericInstrument<SVT, SQT, TVT, TQT> duds::hardware::GenericMeasurementSignalSink< SVT, SQT, TVT, TQT >::Instrument |
Definition at line 28 of file MeasurementSignalSink.hpp.
| typedef duds::data::GenericMeasurement<SVT, SQT, TVT, TQT> duds::hardware::GenericMeasurementSignalSink< SVT, SQT, TVT, TQT >::Measurement |
Definition at line 29 of file MeasurementSignalSink.hpp.
| typedef boost::signals2::signal< void (const std::shared_ptr<Instrument> &, const std::shared_ptr<const Measurement> &) > duds::hardware::GenericMeasurementSignalSink< SVT, SQT, TVT, TQT >::MesurementSignal |
The type used for event listeners that are told of measurments.
Definition at line 36 of file MeasurementSignalSink.hpp.
|
inlinevirtual |
Disconnects from all signals.
Definition at line 79 of file MeasurementSignalSink.hpp.
|
inline |
Disconnects the group from both the new and old measurement signals from the given instrument.
| inst | The instrument to disconnect from. |
Definition at line 232 of file MeasurementSignalSink.hpp.
|
inline |
Disconnects the group from all signals.
Definition at line 250 of file MeasurementSignalSink.hpp.
Referenced by duds::hardware::GenericMeasurementSignalSink< SVT, SQT, TVT, TQT >::~GenericMeasurementSignalSink().
|
inline |
Disconnects from the new measurement signal of the given instrument.
| inst | The instrument to disconnect from. |
Definition at line 156 of file MeasurementSignalSink.hpp.
|
inline |
Disconnects from the old measurement signal of the given instrument.
| inst | The instrument to disconnect from. |
Definition at line 210 of file MeasurementSignalSink.hpp.
|
protectedpure virtual |
Handles an incoming new measurement signal.
| i | The originating Instrument. |
| m | The measurement. |
Implemented in duds::hardware::GenericMeasurementSignalQueue< SVT, SQT, TVT, TQT, IS, ISArgs >, and duds::hardware::GenericMeasurementSignalGroup< SVT, SQT, TVT, TQT >.
Referenced by duds::hardware::GenericMeasurementSignalSink< SVT, SQT, TVT, TQT >::newMeasurementSource().
|
protectedpure virtual |
Handles an incoming old measurement signal.
| i | The originating Instrument. |
| m | The measurement. |
Implemented in duds::hardware::GenericMeasurementSignalQueue< SVT, SQT, TVT, TQT, IS, ISArgs >, and duds::hardware::GenericMeasurementSignalGroup< SVT, SQT, TVT, TQT >.
Referenced by duds::hardware::GenericMeasurementSignalSink< SVT, SQT, TVT, TQT >::oldMeasurementSource().
|
inline |
Connect this object to the new measurement signal of the given instrument, or return the existing connection.
Only one connection per signal per insturment is allowed. Attempts to make additional identical connections will result in the existing connection being returned.
| inst | The Instrument that will be sending the new measurement signals. |
| at | The insertion position. |
Definition at line 106 of file MeasurementSignalSink.hpp.
|
inline |
Definition at line 128 of file MeasurementSignalSink.hpp.
|
inline |
Definition at line 171 of file MeasurementSignalSink.hpp.
|
inline |
Definition at line 187 of file MeasurementSignalSink.hpp.
|
inline |
Removes any disconnected connection objects held by this object.
The connections will no longer be connected if the source of the signal is destroyed.
Definition at line 87 of file MeasurementSignalSink.hpp.
|
protected |
Stores connections keyed by Instrument pointer.
The Instrument pointer must never be dereferenced and cannot be assumed to point to an existing object. It is also possible that the same address may be used for a different Instrument over time.
Definition at line 56 of file MeasurementSignalSink.hpp.