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

#include <NP_Conex_CC.h>

+ Inheritance diagram for DynExpInstr::NP_Conex_CC_StageData:

Classes

struct  Conex_CCStatusType
 Interprets and queries the controller's internal state based on the TS command byte code. More...
 

Public Types

enum  ErrorCodeType : uint16_t { NoError , OtherError }
 
using ChannelType = int16_t
 
- Public Types inherited from DynExpInstr::PositionerStageData
using PositionType = signed long long
 Numeric type to store the stage positions.
 
- 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

 NP_Conex_CC_StageData ()=default
 
virtual ~NP_Conex_CC_StageData ()=default
 
auto GetChannel () const noexcept
 
auto GetConex_CCStatus () const noexcept
 
auto GetErrorCode () const noexcept
 
- Public Member Functions inherited from DynExpInstr::PositionerStageData
 PositionerStageData ()=default
 
virtual ~PositionerStageData ()=default
 
auto GetCurrentPosition () const noexcept
 Returns Position.
 
auto GetVelocity () const noexcept
 Returns Velocity.
 
void SetCurrentPosition (PositionType Position) noexcept
 Sets Position to Position.
 
void SetVelocity (PositionType Velocity) noexcept
 Sets Velocity to Velocity.
 
bool IsMoving () const noexcept
 Returns whether the stage is currently moving (result of IsMovingChild())
 
bool HasArrived () const noexcept
 Returns whether the stage has arrived at its destiny position (result of HasArrivedChild())
 
bool HasFailed () const noexcept
 Returns whether the stage is in an error state, i.e. moving has failed (result of HasFailedChild())
 
bool IsReferenced () const noexcept
 Returns whether a closed-loop positioner knows its position in respect to its zero point (result of IsReferencedChild())
 
- 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< TaskBasePopTaskFront ()
 Removes a task from the front of an instrument's task queue.
 
std::unique_ptr< TaskBasePopTaskBack ()
 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< TaskBasePopFinishedTask ()
 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
 
INonCopyableoperator= (const INonCopyable &)=delete
 

Public Attributes

DynExp::LinkedObjectWrapperContainer< DynExp::SerialCommunicationHardwareAdapterHardwareAdapter
 
- 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().
 

Private Member Functions

void ResetImpl (dispatch_tag< PositionerStageData >) override final
 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.
 
virtual void ResetImpl (dispatch_tag< NP_Conex_CC_StageData >)
 
virtual bool IsMovingChild () const noexcept override
 Returns whether the stage is currently moving (result of IsMovingChild())
 
virtual bool HasArrivedChild () const noexcept override
 Returns whether the stage has arrived at its destiny position (result of HasArrivedChild())
 
virtual bool HasFailedChild () const noexcept override
 Returns whether the stage is in an error state, i.e. moving has failed (result of HasFailedChild())
 

Private Attributes

ChannelType Channel = 0
 
Conex_CCStatusType Conex_CCStatus
 
ErrorCodeType ErrorCode = NoError
 
size_t NumFailedStatusUpdateAttempts = 0
 

Friends

class NP_Conex_CC_Tasks::InitTask
 
class NP_Conex_CC_Tasks::UpdateTask
 

Additional Inherited Members

- 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 205 of file NP_Conex_CC.h.

Member Typedef Documentation

◆ ChannelType

Definition at line 211 of file NP_Conex_CC.h.

Member Enumeration Documentation

◆ ErrorCodeType

Enumerator
NoError 
OtherError 

Definition at line 290 of file NP_Conex_CC.h.

Constructor & Destructor Documentation

◆ NP_Conex_CC_StageData()

DynExpInstr::NP_Conex_CC_StageData::NP_Conex_CC_StageData ( )
default

◆ ~NP_Conex_CC_StageData()

virtual DynExpInstr::NP_Conex_CC_StageData::~NP_Conex_CC_StageData ( )
virtualdefault

Member Function Documentation

◆ GetChannel()

auto DynExpInstr::NP_Conex_CC_StageData::GetChannel ( ) const
inlinenoexcept

Definition at line 298 of file NP_Conex_CC.h.

◆ GetConex_CCStatus()

auto DynExpInstr::NP_Conex_CC_StageData::GetConex_CCStatus ( ) const
inlinenoexcept

Definition at line 300 of file NP_Conex_CC.h.

◆ GetErrorCode()

auto DynExpInstr::NP_Conex_CC_StageData::GetErrorCode ( ) const
inlinenoexcept

Definition at line 301 of file NP_Conex_CC.h.

◆ HasArrivedChild()

bool DynExpInstr::NP_Conex_CC_StageData::HasArrivedChild ( ) const
overrideprivatevirtualnoexcept

Returns whether the stage has arrived at its destiny position (result of HasArrivedChild())

Implements DynExpInstr::PositionerStageData.

Definition at line 325 of file NP_Conex_CC.cpp.

◆ HasFailedChild()

bool DynExpInstr::NP_Conex_CC_StageData::HasFailedChild ( ) const
overrideprivatevirtualnoexcept

Returns whether the stage is in an error state, i.e. moving has failed (result of HasFailedChild())

Implements DynExpInstr::PositionerStageData.

Definition at line 331 of file NP_Conex_CC.cpp.

◆ IsMovingChild()

bool DynExpInstr::NP_Conex_CC_StageData::IsMovingChild ( ) const
overrideprivatevirtualnoexcept

Returns whether the stage is currently moving (result of IsMovingChild())

Implements DynExpInstr::PositionerStageData.

Definition at line 320 of file NP_Conex_CC.cpp.

◆ ResetImpl() [1/2]

virtual void DynExpInstr::NP_Conex_CC_StageData::ResetImpl ( dispatch_tag< NP_Conex_CC_StageData )
inlineprivatevirtual

Definition at line 307 of file NP_Conex_CC.h.

◆ ResetImpl() [2/2]

void DynExpInstr::NP_Conex_CC_StageData::ResetImpl ( dispatch_tag< PositionerStageData )
finaloverrideprivatevirtual

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.

Reimplemented from DynExpInstr::PositionerStageData.

Definition at line 311 of file NP_Conex_CC.cpp.

Friends And Related Symbol Documentation

◆ NP_Conex_CC_Tasks::InitTask

friend class NP_Conex_CC_Tasks::InitTask
friend

Definition at line 207 of file NP_Conex_CC.h.

◆ NP_Conex_CC_Tasks::UpdateTask

friend class NP_Conex_CC_Tasks::UpdateTask
friend

Definition at line 208 of file NP_Conex_CC.h.

Member Data Documentation

◆ Channel

ChannelType DynExpInstr::NP_Conex_CC_StageData::Channel = 0
private

Definition at line 313 of file NP_Conex_CC.h.

◆ Conex_CCStatus

Conex_CCStatusType DynExpInstr::NP_Conex_CC_StageData::Conex_CCStatus
private

Definition at line 315 of file NP_Conex_CC.h.

◆ ErrorCode

ErrorCodeType DynExpInstr::NP_Conex_CC_StageData::ErrorCode = NoError
private

Definition at line 316 of file NP_Conex_CC.h.

◆ HardwareAdapter

DynExp::LinkedObjectWrapperContainer<DynExp::SerialCommunicationHardwareAdapter> DynExpInstr::NP_Conex_CC_StageData::HardwareAdapter

Definition at line 303 of file NP_Conex_CC.h.

◆ NumFailedStatusUpdateAttempts

size_t DynExpInstr::NP_Conex_CC_StageData::NumFailedStatusUpdateAttempts = 0
private

Definition at line 317 of file NP_Conex_CC.h.


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