|
DynExp
Highly flexible laboratory automation for dynamically changing experiments.
|
Data class for DataStreamInstrument.
More...
#include <DataStreamInstrument.h>
Inheritance diagram for DynExpInstr::DataStreamInstrumentData:Public Types | |
| using | ValueType = double |
Data type to represent hardware limits on the sample values to write to the hardware adapter assigned to the related DataStreamInstrument instance. | |
Public Types inherited from DynExp::InstrumentDataBase | |
| using | TaskQueueType = std::list< std::unique_ptr< TaskBase > > |
| Type of an instrument task queue owning the tasks within. | |
| using | TaskQueueIteratorType = TaskQueueType::const_iterator |
Const iterator type to elements of TaskQueueType. | |
Public Member Functions | |
| DataStreamInstrumentData (DataStreamBasePtrType &&SampleStream) | |
Constructs a DataStreamInstrumentData instance. | |
| virtual | ~DataStreamInstrumentData ()=default |
| DataStreamBasePtrType::element_type * | GetSampleStream () const noexcept |
| Getter for the data stream instrument's sample stream. Logical const-ness: always returns a non-const type to allow modules to directly manipulate the sample stream. | |
| template<typename T > | |
| auto | GetCastSampleStream () const |
| Casts the data stream instrument's sample stream to a derived data stream type. | |
| ValueType | GetHardwareMinValue () const noexcept |
| Returns HardwareMinValue. | |
| ValueType | GetHardwareMaxValue () const noexcept |
| Returns HardwareMaxValue. | |
| DynExp::Units::UnitType | GetValueUnit () const noexcept |
| Returns ValueUnit. | |
| void | SetHardwareMinValue (ValueType Value) noexcept |
| Sets HardwareMinValue. | |
| void | SetHardwareMaxValue (ValueType Value) noexcept |
| Sets HardwareMaxValue. | |
| void | SetValueUnit (DynExp::Units::UnitType Unit) noexcept |
| Sets ValueUnit. | |
Public Member Functions inherited from DynExp::InstrumentDataBase | |
| InstrumentDataBase () | |
| virtual | ~InstrumentDataBase () |
| auto | GetLastUpdateTime () const |
| Getter for LastUpdate. | |
| bool | IsExceptionIndicated () const noexcept |
| Getter for HasException. Only performs atomic operations. Hence, this instrument data instance does not need to be locked for this function call. | |
| std::exception_ptr | GetException () const noexcept |
| Getter for InstrumentDataBase::InstrumentException. If InstrumentDataBase::InstrumentException is nullptr and InstrumentDataBase::HasException is still true, returns a pointer to a Util::Exception instance. | |
| void | EnqueueTask (std::unique_ptr< TaskBase > &&Task) |
| Enqueues a task at the back of an instrument's task queue and notifies the instrument about the new task. | |
| void | EnqueuePriorityTask (std::unique_ptr< TaskBase > &&Task) |
| Enqueues a task at the front of an instrument's task queue and notifies the instrument about the new task. | |
| std::unique_ptr< TaskBase > | PopTaskFront () |
| Removes a task from the front of an instrument's task queue. | |
| std::unique_ptr< TaskBase > | PopTaskBack () |
| Removes a task from the back of an instrument's task queue. | |
| auto | GetTaskFront () noexcept |
| Getter for first enqueued task. | |
| auto | GetTaskBack () noexcept |
| Getter for last enqueued task. | |
| size_t | GetNumEnqueuedTasks () const noexcept |
| Getter for the instrument task queue's length. | |
| std::unique_ptr< TaskBase > | PopFinishedTask () |
| Removes a task from the front of an instrument's list of finished tasks. | |
| size_t | GetNumFinishedTasks () const noexcept |
| Getter for the length of the instrument's list of finished tasks. | |
| bool | IsQueueClosed () const noexcept |
| Determines whether the instrument task queue is closed. | |
Public Member Functions inherited from Util::INonCopyable | |
| INonCopyable (const INonCopyable &)=delete | |
| INonCopyable & | operator= (const INonCopyable &)=delete |
Private Member Functions | |
| void | ResetImpl (dispatch_tag< InstrumentDataBase >) override final |
| virtual void | ResetImpl (dispatch_tag< DataStreamInstrumentData >) |
Private Attributes | |
| const DataStreamBasePtrType | SampleStream |
Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every derived class gets called - starting from InstrumentDataBase, descending the inheritance hierarchy. Override in order to reset derived classes. | |
Hardware-specific | |
These values denote hardware limits/settings and should be obtained from the hardware adapter assigned to the related | |
| ValueType | HardwareMinValue |
| Minimal possible value to read/write from/to the hardware adapter. | |
| ValueType | HardwareMaxValue |
| Maximal possible value to read/write from/to the hardware adapter. | |
| DynExp::Units::UnitType | ValueUnit |
| Unit type of the values to be read/written from/to the hardware adapter. | |
Additional Inherited Members | |
Public Attributes inherited from DynExp::InstrumentDataBase | |
| InstrumentBaseOnlyType | InstrumentBaseOnly |
Allow exclusive access to some of InstrumentDataBase's private methods to InstrumentBase. | |
| InstrumenThreadOnlyType | InstrumentThreadOnly |
Allow exclusive access to some of InstrumentDataBase's private methods to the instrument thread InstrumentThreadMain(). | |
Protected Member Functions inherited from Util::ISynchronizedPointerLockable | |
| ISynchronizedPointerLockable () | |
| ~ISynchronizedPointerLockable () | |
| Object should never be destroyed before completely unlocked. | |
Protected Member Functions inherited from Util::INonCopyable | |
| constexpr | INonCopyable ()=default |
| ~INonCopyable ()=default | |
Data class for DataStreamInstrument.
Definition at line 793 of file DataStreamInstrument.h.
| using DynExpInstr::DataStreamInstrumentData::ValueType = double |
Data type to represent hardware limits on the sample values to write to the hardware adapter assigned to the related DataStreamInstrument instance.
Definition at line 800 of file DataStreamInstrument.h.
| DynExpInstr::DataStreamInstrumentData::DataStreamInstrumentData | ( | DataStreamBasePtrType && | SampleStream | ) |
Constructs a DataStreamInstrumentData instance.
| SampleStream | Data stream the related DataStreamInstrument instance operates on. The DataStreamInstrumentData instance takes ownership of the stream. |
| Util::InvalidArgException | is thrown if SampleStream is nullptr. |
Definition at line 86 of file DataStreamInstrument.cpp.
|
virtualdefault |
|
inline |
Casts the data stream instrument's sample stream to a derived data stream type.
| T | Type derived from DataStreamBase to cast to |
using dynamic_cast. | Util::TypeErrorException | is thrown if the cast fails. |
Definition at line 827 of file DataStreamInstrument.h.
|
inlinenoexcept |
Returns HardwareMaxValue.
Definition at line 837 of file DataStreamInstrument.h.
|
inlinenoexcept |
Returns HardwareMinValue.
Definition at line 836 of file DataStreamInstrument.h.
|
inlinenoexcept |
Getter for the data stream instrument's sample stream. Logical const-ness: always returns a non-const type to allow modules to directly manipulate the sample stream.
Definition at line 818 of file DataStreamInstrument.h.
|
inlinenoexcept |
Returns ValueUnit.
Definition at line 838 of file DataStreamInstrument.h.
|
inlineprivatevirtual |
Reimplemented in DynExpInstr::FunctionGeneratorData, DynExpInstr::InputPortData, DynExpInstr::LockinAmplifierData, and DynExpInstr::TimeTaggerData.
Definition at line 845 of file DataStreamInstrument.h.
|
finaloverrideprivate |
Definition at line 93 of file DataStreamInstrument.cpp.
|
inlinenoexcept |
Sets HardwareMaxValue.
Definition at line 840 of file DataStreamInstrument.h.
|
inlinenoexcept |
Sets HardwareMinValue.
Definition at line 839 of file DataStreamInstrument.h.
|
inlinenoexcept |
Sets ValueUnit.
Definition at line 841 of file DataStreamInstrument.h.
|
private |
Maximal possible value to read/write from/to the hardware adapter.
Definition at line 855 of file DataStreamInstrument.h.
|
private |
Minimal possible value to read/write from/to the hardware adapter.
Definition at line 854 of file DataStreamInstrument.h.
|
private |
Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every derived class gets called - starting from InstrumentDataBase, descending the inheritance hierarchy. Override in order to reset derived classes.
Pointer to the base class of the data stream instrument's sample stream
Definition at line 847 of file DataStreamInstrument.h.
|
private |
Unit type of the values to be read/written from/to the hardware adapter.
Definition at line 856 of file DataStreamInstrument.h.