DynExp
Highly flexible laboratory automation for dynamically changing experiments.
Loading...
Searching...
No Matches
DynExpModule::Trajectory1DData Class Reference

#include <Trajectory1D.h>

+ Inheritance diagram for DynExpModule::Trajectory1DData:

Public Types

enum  TriggerModeType { Continuous , ManualOnce , Manual , OnStreamChanged }
 
enum  PositioningModeType { Absolute , Relative }
 
- Public Types inherited from DynExp::ModuleDataBase
using EventPtrType = std::unique_ptr< EventBase >
 Pointer owning an event.
 
using EventQueueType = std::queue< EventPtrType >
 A module's event queue is a FIFO queue owning the enqueued events.
 

Public Member Functions

 Trajectory1DData ()
 
virtual ~Trajectory1DData ()=default
 
auto & GetTrajectoryDataInstr ()
 
auto & GetPositionerStage ()
 
auto & GetCommunicator ()
 
auto GetTriggerMode () const noexcept
 
void SetTriggerMode (TriggerModeType TriggerMode) noexcept
 
auto GetPositioningMode () const noexcept
 
void SetPositioningMode (PositioningModeType PositioningMode) noexcept
 
auto GetPosMultiplier () const noexcept
 
void SetPosMultiplier (double PosMultiplier) noexcept
 
auto GetRepeatCount () const noexcept
 
void SetRepeatCount (size_t RepeatCount) noexcept
 
auto GetDwellTime () const noexcept
 
void SetDwellTime (std::chrono::milliseconds DwellTime) noexcept
 
auto GetLastWrittenSampleID () const noexcept
 
void SetLastWrittenSampleID (size_t LastWrittenSampleID) noexcept
 
const auto & GetSamples () const noexcept
 
auto & GetSamples () noexcept
 
void SetSamples (DynExpInstr::DataStreamBase::BasicSampleListType &&Samples) noexcept
 
auto GetCurrentPlaybackPos () const noexcept
 
bool IsTriggered () const noexcept
 
void SetCurrentPlaybackPos (size_t CurrentPlaybackPos) noexcept
 
auto GetCurrentRepeatCount () const noexcept
 
void SetCurrentRepeatCount (size_t CurrentRepeatCount) noexcept
 
auto IsReady () const noexcept
 
void SetReady (bool Ready) noexcept
 
auto GetTrajectoryStartedTime () const noexcept
 
void SetTrajectoryStartedTime (std::chrono::time_point< std::chrono::system_clock > TrajectoryStartedTime) noexcept
 
- Public Member Functions inherited from DynExp::QModuleDataBase
 QModuleDataBase ()=default
 
virtual ~QModuleDataBase ()=default
 
- Public Member Functions inherited from DynExp::ModuleDataBase
 ModuleDataBase ()
 
virtual ~ModuleDataBase ()
 
bool IsExceptionIndicated () const noexcept
 Getter for HasException. Only performs atomic operations. Hence, this module data instance does not need to be locked for this function call.
 
std::exception_ptr GetException () const noexcept
 Getter for ModuleDataBase::ModuleException. If ModuleDataBase::ModuleException is nullptr and ModuleDataBase::HasException is still true, returns a pointer to a Util::Exception instance.
 
void EnqueueEvent (EventPtrType &&Event)
 Enqueues Event at the module event queue's back. Takes ownership of the event. Notifies the module owning the respective ModuleDataBase's instance that a new event has been enqueued.
 
EventPtrType PopEvent ()
 Removes one event from the event queue's front and returns the event. Ownership of the event is transferred to the caller of this method.
 
const auto & GetEventFront () const noexcept
 Returns a pointer to the event in the front of the module's event queue without transferring ownership and without removing the event from the queue.
 
auto & GetEventFront () noexcept
 Returns a pointer to the event in the front of the module's event queue without transferring ownership and without removing the event from the queue.
 
size_t GetNumEnqueuedEvents () const noexcept
 Getter for the module event queue's length.
 
void RunQueue ()
 Wakes up a module waiting for events and forces it to run its main loop once.
 
- Public Member Functions inherited from Util::INonCopyable
 INonCopyable (const INonCopyable &)=delete
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Private Member Functions

void ResetImpl (dispatch_tag< QModuleDataBase >) override final
 
virtual void ResetImpl (dispatch_tag< Trajectory1DData >)
 
void Init ()
 

Private Attributes

DynExp::LinkedObjectWrapperContainer< DynExpInstr::DataStreamInstrumentTrajectoryDataInstr
 
DynExp::LinkedObjectWrapperContainer< DynExpInstr::PositionerStagePositionerStage
 
DynExp::LinkedObjectWrapperContainer< DynExpInstr::InterModuleCommunicatorCommunicator
 
TriggerModeType TriggerMode = TriggerModeType::Manual
 
PositioningModeType PositioningMode = PositioningModeType::Absolute
 
double PosMultiplier = 1.0
 
size_t RepeatCount = 1
 
std::chrono::milliseconds DwellTime = std::chrono::milliseconds(100)
 
size_t LastWrittenSampleID = 0
 
DynExpInstr::DataStreamBase::BasicSampleListType Samples
 
size_t CurrentPlaybackPos = 0
 0 means waiting for trigger. Values > 0 mean running. They indicate the sample to be written next.
 
size_t CurrentRepeatCount = 0
 
bool Ready = false
 Running (not necessarily triggered yet) if true.
 
std::chrono::time_point< std::chrono::system_clock > TrajectoryStartedTime
 

Additional Inherited Members

- Public Attributes inherited from DynExp::ModuleDataBase
ModuleBaseOnlyType ModuleBaseOnly
 Allow exclusive access to some of ModuleDataBase's private methods to ModuleBase.
 
ModuleThreadOnlyType ModuleThreadOnly
 Allow exclusive access to some of ModuleDataBase's private methods to the module thread ModuleThreadMain().
 
- 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
 

Detailed Description

Definition at line 46 of file Trajectory1D.h.

Member Enumeration Documentation

◆ PositioningModeType

Enumerator
Absolute 
Relative 

Definition at line 50 of file Trajectory1D.h.

◆ TriggerModeType

Enumerator
Continuous 
ManualOnce 
Manual 
OnStreamChanged 

Definition at line 49 of file Trajectory1D.h.

Constructor & Destructor Documentation

◆ Trajectory1DData()

DynExpModule::Trajectory1DData::Trajectory1DData ( )
inline

Definition at line 52 of file Trajectory1D.h.

◆ ~Trajectory1DData()

virtual DynExpModule::Trajectory1DData::~Trajectory1DData ( )
virtualdefault

Member Function Documentation

◆ GetCommunicator()

auto & DynExpModule::Trajectory1DData::GetCommunicator ( )
inline

Definition at line 57 of file Trajectory1D.h.

◆ GetCurrentPlaybackPos()

auto DynExpModule::Trajectory1DData::GetCurrentPlaybackPos ( ) const
inlinenoexcept

Definition at line 76 of file Trajectory1D.h.

◆ GetCurrentRepeatCount()

auto DynExpModule::Trajectory1DData::GetCurrentRepeatCount ( ) const
inlinenoexcept

Definition at line 79 of file Trajectory1D.h.

◆ GetDwellTime()

auto DynExpModule::Trajectory1DData::GetDwellTime ( ) const
inlinenoexcept

Definition at line 67 of file Trajectory1D.h.

◆ GetLastWrittenSampleID()

auto DynExpModule::Trajectory1DData::GetLastWrittenSampleID ( ) const
inlinenoexcept

Definition at line 70 of file Trajectory1D.h.

◆ GetPositionerStage()

auto & DynExpModule::Trajectory1DData::GetPositionerStage ( )
inline

Definition at line 56 of file Trajectory1D.h.

◆ GetPositioningMode()

auto DynExpModule::Trajectory1DData::GetPositioningMode ( ) const
inlinenoexcept

Definition at line 61 of file Trajectory1D.h.

◆ GetPosMultiplier()

auto DynExpModule::Trajectory1DData::GetPosMultiplier ( ) const
inlinenoexcept

Definition at line 63 of file Trajectory1D.h.

◆ GetRepeatCount()

auto DynExpModule::Trajectory1DData::GetRepeatCount ( ) const
inlinenoexcept

Definition at line 65 of file Trajectory1D.h.

◆ GetSamples() [1/2]

const auto & DynExpModule::Trajectory1DData::GetSamples ( ) const
inlinenoexcept

Definition at line 72 of file Trajectory1D.h.

◆ GetSamples() [2/2]

auto & DynExpModule::Trajectory1DData::GetSamples ( )
inlinenoexcept

Definition at line 73 of file Trajectory1D.h.

◆ GetTrajectoryDataInstr()

auto & DynExpModule::Trajectory1DData::GetTrajectoryDataInstr ( )
inline

Definition at line 55 of file Trajectory1D.h.

◆ GetTrajectoryStartedTime()

auto DynExpModule::Trajectory1DData::GetTrajectoryStartedTime ( ) const
inlinenoexcept

Definition at line 83 of file Trajectory1D.h.

◆ GetTriggerMode()

auto DynExpModule::Trajectory1DData::GetTriggerMode ( ) const
inlinenoexcept

Definition at line 59 of file Trajectory1D.h.

◆ Init()

void DynExpModule::Trajectory1DData::Init ( )
private

Definition at line 22 of file Trajectory1D.cpp.

◆ IsReady()

auto DynExpModule::Trajectory1DData::IsReady ( ) const
inlinenoexcept

Definition at line 81 of file Trajectory1D.h.

◆ IsTriggered()

bool DynExpModule::Trajectory1DData::IsTriggered ( ) const
inlinenoexcept

Definition at line 77 of file Trajectory1D.h.

◆ ResetImpl() [1/2]

void DynExpModule::Trajectory1DData::ResetImpl ( dispatch_tag< QModuleDataBase )
finaloverrideprivate

Definition at line 17 of file Trajectory1D.cpp.

◆ ResetImpl() [2/2]

virtual void DynExpModule::Trajectory1DData::ResetImpl ( dispatch_tag< Trajectory1DData )
inlineprivatevirtual

Definition at line 88 of file Trajectory1D.h.

◆ SetCurrentPlaybackPos()

void DynExpModule::Trajectory1DData::SetCurrentPlaybackPos ( size_t  CurrentPlaybackPos)
inlinenoexcept

Definition at line 78 of file Trajectory1D.h.

◆ SetCurrentRepeatCount()

void DynExpModule::Trajectory1DData::SetCurrentRepeatCount ( size_t  CurrentRepeatCount)
inlinenoexcept

Definition at line 80 of file Trajectory1D.h.

◆ SetDwellTime()

void DynExpModule::Trajectory1DData::SetDwellTime ( std::chrono::milliseconds  DwellTime)
inlinenoexcept

Definition at line 68 of file Trajectory1D.h.

◆ SetLastWrittenSampleID()

void DynExpModule::Trajectory1DData::SetLastWrittenSampleID ( size_t  LastWrittenSampleID)
inlinenoexcept

Definition at line 71 of file Trajectory1D.h.

◆ SetPositioningMode()

void DynExpModule::Trajectory1DData::SetPositioningMode ( PositioningModeType  PositioningMode)
inlinenoexcept

Definition at line 62 of file Trajectory1D.h.

◆ SetPosMultiplier()

void DynExpModule::Trajectory1DData::SetPosMultiplier ( double  PosMultiplier)
inlinenoexcept

Definition at line 64 of file Trajectory1D.h.

◆ SetReady()

void DynExpModule::Trajectory1DData::SetReady ( bool  Ready)
inlinenoexcept

Definition at line 82 of file Trajectory1D.h.

◆ SetRepeatCount()

void DynExpModule::Trajectory1DData::SetRepeatCount ( size_t  RepeatCount)
inlinenoexcept

Definition at line 66 of file Trajectory1D.h.

◆ SetSamples()

void DynExpModule::Trajectory1DData::SetSamples ( DynExpInstr::DataStreamBase::BasicSampleListType &&  Samples)
inlinenoexcept

Definition at line 74 of file Trajectory1D.h.

◆ SetTrajectoryStartedTime()

void DynExpModule::Trajectory1DData::SetTrajectoryStartedTime ( std::chrono::time_point< std::chrono::system_clock >  TrajectoryStartedTime)
inlinenoexcept

Definition at line 84 of file Trajectory1D.h.

◆ SetTriggerMode()

void DynExpModule::Trajectory1DData::SetTriggerMode ( TriggerModeType  TriggerMode)
inlinenoexcept

Definition at line 60 of file Trajectory1D.h.

Member Data Documentation

◆ Communicator

DynExp::LinkedObjectWrapperContainer<DynExpInstr::InterModuleCommunicator> DynExpModule::Trajectory1DData::Communicator
private

Definition at line 94 of file Trajectory1D.h.

◆ CurrentPlaybackPos

size_t DynExpModule::Trajectory1DData::CurrentPlaybackPos = 0
private

0 means waiting for trigger. Values > 0 mean running. They indicate the sample to be written next.

Definition at line 105 of file Trajectory1D.h.

◆ CurrentRepeatCount

size_t DynExpModule::Trajectory1DData::CurrentRepeatCount = 0
private

Definition at line 106 of file Trajectory1D.h.

◆ DwellTime

std::chrono::milliseconds DynExpModule::Trajectory1DData::DwellTime = std::chrono::milliseconds(100)
private

Definition at line 100 of file Trajectory1D.h.

◆ LastWrittenSampleID

size_t DynExpModule::Trajectory1DData::LastWrittenSampleID = 0
private

Definition at line 102 of file Trajectory1D.h.

◆ PositionerStage

DynExp::LinkedObjectWrapperContainer<DynExpInstr::PositionerStage> DynExpModule::Trajectory1DData::PositionerStage
private

Definition at line 93 of file Trajectory1D.h.

◆ PositioningMode

PositioningModeType DynExpModule::Trajectory1DData::PositioningMode = PositioningModeType::Absolute
private

Definition at line 97 of file Trajectory1D.h.

◆ PosMultiplier

double DynExpModule::Trajectory1DData::PosMultiplier = 1.0
private

Definition at line 98 of file Trajectory1D.h.

◆ Ready

bool DynExpModule::Trajectory1DData::Ready = false
private

Running (not necessarily triggered yet) if true.

Definition at line 107 of file Trajectory1D.h.

◆ RepeatCount

size_t DynExpModule::Trajectory1DData::RepeatCount = 1
private

Definition at line 99 of file Trajectory1D.h.

◆ Samples

DynExpInstr::DataStreamBase::BasicSampleListType DynExpModule::Trajectory1DData::Samples
private

Definition at line 103 of file Trajectory1D.h.

◆ TrajectoryDataInstr

DynExp::LinkedObjectWrapperContainer<DynExpInstr::DataStreamInstrument> DynExpModule::Trajectory1DData::TrajectoryDataInstr
private

Definition at line 92 of file Trajectory1D.h.

◆ TrajectoryStartedTime

std::chrono::time_point<std::chrono::system_clock> DynExpModule::Trajectory1DData::TrajectoryStartedTime
private

Definition at line 108 of file Trajectory1D.h.

◆ TriggerMode

TriggerModeType DynExpModule::Trajectory1DData::TriggerMode = TriggerModeType::Manual
private

Definition at line 96 of file Trajectory1D.h.


The documentation for this class was generated from the following files: