14 namespace duds {
namespace hardware {
45 template <
typename,
typename ...>
class IS = std::shared_ptr,
76 const IS<Instrument> &i,
77 const std::shared_ptr<const Measurement> &m,
100 const std::shared_ptr<Instrument> &i,
101 const std::shared_ptr<const Measurement> &m
103 std::lock_guard<duds::general::Spinlock> lock(block);
110 const std::shared_ptr<Instrument> &i,
111 const std::shared_ptr<const Measurement> &m
113 std::lock_guard<duds::general::Spinlock> lock(block);
119 std::lock_guard<duds::general::Spinlock> lock(sq.
block);
123 std::lock_guard<duds::general::Spinlock> lock(sq.block);
129 std::unique_lock<duds::general::Spinlock> lock0(block, std::defer_lock);
130 std::unique_lock<duds::general::Spinlock> lock1(sq.
block, std::defer_lock);
131 std::lock(lock0, lock1);
137 std::unique_lock<duds::general::Spinlock> lock0(block, std::defer_lock);
138 std::unique_lock<duds::general::Spinlock> lock1(sq.block, std::defer_lock);
139 std::lock(lock0, lock1);
147 std::unique_lock<duds::general::Spinlock> lock0(block, std::defer_lock);
148 std::unique_lock<duds::general::Spinlock> lock1(sq.
block, std::defer_lock);
149 std::lock(lock0, lock1);
158 std::lock_guard<duds::general::Spinlock> lock(block);
168 std::lock_guard<duds::general::Spinlock> lock(block);
178 std::lock_guard<duds::general::Spinlock> lock(block);
188 std::lock_guard<duds::general::Spinlock> lock(block);
196 std::lock_guard<duds::general::Spinlock> lock(block);
197 events.push_back(sd);
204 std::lock_guard<duds::general::Spinlock> lock(block);
205 events.push_front(sd);
214 std::lock_guard<duds::general::Spinlock> lock(block);
227 std::lock_guard<duds::general::Spinlock> lock(block);
237 std::lock_guard<duds::general::Spinlock> lock(block);
266 template <
typename>
class IS,
boost::variant< std::string, duds::general::LanguageTaggedString, std::array< std::int32_t, 4 >, std::array< std::int64_t, 2 >, duds::data::int128_w, std::array< float, 4 >, std::array< double, 2 >, double, duds::data::Quantity, boost::recursive_wrapper< duds::data::QuantityNddArray >, duds::time::interstellar::Femtoseconds, duds::time::interstellar::Nanoseconds, duds::time::interstellar::FemtoTime, duds::time::interstellar::NanoTime, boost::uuids::uuid, boost::recursive_wrapper< duds::data::GenericValueTable >, std::shared_ptr< std::vector< char > >> GenericValue
A general value of a type can be serialized for transmission over a network and can be used with a re...
GenericMeasurementSignalQueue & operator=(const GenericMeasurementSignalQueue &sq)
EventList move()
Returns a move-constructed list of the signal events stored internally.
EventList events
Storage of signal data.
move_impl move(unsigned int c, unsigned int r)
Display stream manipulator that moves the display cursor to the given location.
GenericMeasurementSignalQueue< duds::data::GenericValue, double, duds::time::interstellar::NanoTime, float > MeasurementSignalQueue
std::shared_ptr< const Measurement > measurement
The measurement taken by the instrument.
GenericMeasurementSignalQueue(const GenericMeasurementSignalQueue &sq)
void pushFront(const SignalData &sd)
Push signal data onto the front (oldest side) of the internal list.
SignalData(const IS< Instrument > &i, const std::shared_ptr< const Measurement > &m, EventType e)
GenericMeasurementSignalQueue()=default
A base class for receiving measurement signals from multiple Instruments.
SignalData popBack()
Pop signal data from the end (newest side) of the internal list and return that data.
IS< Instrument, ISArgs ... > insturment
The originating instrument.
void pushBack(const SignalData &sd)
Push signal data onto the end (newest side) of the internal list.
std::list< SignalData > EventList
The list type used to store information from incoming signals.
void copy(EventList ©) const
Creates a copy of the ignal events stored internally.
SignalData popFront()
Pop signal data from the front (oldest side) of the internal list and return that data...
void swap(GenericMeasurementSignalQueue &sq)
Swaps the internal signal data list with another GenericMeasurementSignalQueue object.
A simple spinlock following the lockable and timed lockable concepts so that it can be used with std:...
void handleOldMeasure(const std::shared_ptr< Instrument > &i, const std::shared_ptr< const Measurement > &m)
Receives an old measurement signal and queues its information.
GenericMeasurementSignalQueue(GenericMeasurementSignalQueue &&sq)
Stores the information from a new or old measurement signal.
void move(EventList ©)
Move-assigns to a given list the signal events stored internally.
void handleNewMeasure(const std::shared_ptr< Instrument > &i, const std::shared_ptr< const Measurement > &m)
Receives a new measurement signal and queues its information.
duds::data::GenericMeasurement< SVT, SQT, TVT, TQT > Measurement
Stores a sample of something along with a timestamp stored as a sample from a clock.
Queues mesurement signals for later processing.
EventList copy() const
Returns a copy of the signal events stored internally.
GenericInstrument< SVT, SQT, TVT, TQT > Instrument
EventType type
Denotes either a new or old measurement.
duds::general::Spinlock block
Used to allow only one thread access to events.
void clear()
Clear the signal data stored internally.
NanoClock::time_point NanoTime
A point in time in Interstellar Time stored in Nanoseconds.