15 class PositionerStage;
20 namespace PositionerStageTasks
87 void ResetImpl(dispatch_tag<InstrumentDataBase>)
override final;
129 virtual const char*
GetParamClassTag() const noexcept
override {
return "PositionerStageParams"; }
183 constexpr
static auto Name() noexcept {
return "Positioner Stage"; }
184 constexpr
static auto Category() noexcept {
return "Positioners"; }
197 virtual std::chrono::milliseconds
GetTaskQueueDelay()
const override {
return std::chrono::milliseconds(100); }
Implementation of DynExp instrument objects.
Configurator class for PositionerStage.
PositionerStageConfigurator()=default
virtual ~PositionerStageConfigurator()=0
Data class for PositionerStage.
bool HasFailed() const noexcept
Returns whether the stage is in an error state, i.e. moving has failed (result of HasFailedChild())
PositionType Velocity
Velocity in nm/s if the respective stage supports SI units. Otherwise, in units of steps/s.
auto GetCurrentPosition() const noexcept
Returns Position.
signed long long PositionType
Numeric type to store the stage positions.
bool IsMoving() const noexcept
Returns whether the stage is currently moving (result of IsMovingChild())
void SetCurrentPosition(PositionType Position) noexcept
Sets Position to Position.
void SetVelocity(PositionType Velocity) noexcept
Sets Velocity to Velocity.
void ResetImpl(dispatch_tag< InstrumentDataBase >) override final
virtual ~PositionerStageData()=default
PositionType Position
Position in nm if the respective stage supports SI units. Otherwise, in units of steps performed.
PositionerStageData()=default
virtual bool IsMovingChild() const noexcept=0
Returns whether the stage is currently moving (result of IsMovingChild())
virtual bool IsReferencedChild() const noexcept
Returns whether a closed-loop positioner knows its position in respect to its zero point (result of I...
virtual bool HasArrivedChild() const noexcept=0
Returns whether the stage has arrived at its destiny position (result of HasArrivedChild())
bool IsReferenced() const noexcept
Returns whether a closed-loop positioner knows its position in respect to its zero point (result of I...
virtual bool HasFailedChild() const noexcept=0
Returns whether the stage is in an error state, i.e. moving has failed (result of HasFailedChild())
virtual void ResetImpl(dispatch_tag< PositionerStageData >)
Refer to DynExp::InstrumentDataBase::Reset(). Using tag dispatch mechanism to ensure that ResetImpl()...
bool HasArrived() const noexcept
Returns whether the stage has arrived at its destiny position (result of HasArrivedChild())
auto GetVelocity() const noexcept
Returns Velocity.
Parameter class for PositionerStage.
PositionerStageParams(DynExp::ItemIDType ID, const DynExp::DynExpCore &Core)
Constructs the parameters for a PositionerStage instance.
DummyParam Dummy
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
virtual ~PositionerStageParams()=0
void ConfigureParamsImpl(dispatch_tag< InstrumentParamsBase >) override final
virtual const char * GetParamClassTag() const noexcept override
This function is intended to be overridden once in each derived class returning the name of the respe...
virtual void ConfigureParamsImpl(dispatch_tag< PositionerStageParams >)
Called by DynExp::ParamsBase::ConfigureParams() as a starting point for the tag dispatch mechanism to...
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
virtual void ExitFuncImpl(dispatch_tag< ExitTask >, DynExp::InstrumentInstance &Instance)
Deinitializes the respective instrument within the instrument inheritance hierarchy....
void ExitFuncImpl(dispatch_tag< ExitTaskBase >, DynExp::InstrumentInstance &Instance) override final
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
virtual void InitFuncImpl(dispatch_tag< InitTask >, DynExp::InstrumentInstance &Instance)
Initializes the respective instrument within the instrument inheritance hierarchy....
void InitFuncImpl(dispatch_tag< InitTaskBase >, DynExp::InstrumentInstance &Instance) override final
Defines a task for updating an instrument within an instrument inheritance hierarchy....
void UpdateFuncImpl(dispatch_tag< UpdateTaskBase >, DynExp::InstrumentInstance &Instance) override final
virtual void UpdateFuncImpl(dispatch_tag< UpdateTask >, DynExp::InstrumentInstance &Instance)
Updates the respective instrument within the instrument inheritance hierarchy. Call UpdateFuncImpl() ...
Implementation of a meta instrument to control single-axis positioner stages.
virtual PositionerStageData::PositionType GetMinPosition() const noexcept=0
Returns the minimal position the stage can move to in nm if the stage supports SI units,...
virtual std::string GetCategory() const override
Returns the category of this Object type.
virtual void MoveAbsolute(const PositionerStageData::PositionType Steps, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Moves the positioner to an absolute position in its native units. Do divide units of PositionerStageD...
PositionerStage(const std::thread::id OwnerThreadID, DynExp::ParamsBasePtrType &&Params)
Constructs an instrument instance.
virtual void MoveRelative(const PositionerStageData::PositionType Steps, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const =0
Moves the positioner to a position relative to its current position. The position offset Steps has to...
virtual std::string GetName() const override
Returns the name of this Object type.
virtual PositionerStageData::PositionType GetDefaultVelocity() const noexcept=0
Returns the stage's default velocity in nm/s if the stage supports SI units, in steps/s otherwise.
virtual void Reference(DirectionType Direction=DirectionType::Forward, DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
References the positioner such that it finds its zero position or end stop.
void ResetImpl(dispatch_tag< InstrumentBase >) override final
virtual std::chrono::milliseconds GetTaskQueueDelay() const override
Specifies in which time intervals the instrument's task queue runs to handle pending tasks.
virtual void Calibrate(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Calibrates the positioner. The meaning of such a calibration is solely specified by the hardware manu...
virtual void SetVelocity(const PositionerStageData::PositionType Velocity) const =0
Sets the positioner's velocity in its native units. Do divide units of PositionerStageData::Velocity ...
virtual PositionerStageData::PositionType GetMinVelocity() const noexcept=0
Returns the minimal velocity the stage can move with in nm/s if the stage supports SI units,...
virtual PositionerStageData::PositionType GetResolution() const noexcept=0
Returns the stage's position resolution (precision) in nm if the stage supports SI units,...
virtual void StopMotion() const =0
Stops any motion or position stabilization of the positioner immediately.
virtual bool IsUsingSIUnits() const noexcept
Determines whether the underlying hardware expects SI units for positions and velocities or arbitrary...
virtual void ResetImpl(dispatch_tag< PositionerStage >)=0
Refer to DynExp::Object::Reset(). Using tag dispatch mechanism to ensure that ResetImpl() of every de...
constexpr static auto Name() noexcept
Every derived class has to redefine this function.
constexpr static auto Category() noexcept
Every derived class has to redefine this function.
virtual PositionerStageData::PositionType GetMaxPosition() const noexcept=0
Returns the maximal position the stage can move to in nm if the stage supports SI units,...
virtual void MoveToHome(DynExp::TaskBase::CallbackType CallbackFunc=nullptr) const
Moves the positioner to its stored home position. Also refer to SetHome().
virtual PositionerStageData::PositionType GetMaxVelocity() const noexcept=0
Returns the maximal velocity the stage can move with in nm/s if the stage supports SI units,...
DirectionType
Type to determine the direction of the positioner stage's movements.
virtual ~PositionerStage()=0
virtual double GetStepNanoMeterRatio() const noexcept
Determines the conversion factor in between internal PositionerStageData::PositionType positiond and ...
virtual void SetHome() const
Stores the positioner's home position. Also refer to MoveToHome().
DynExp's core class acts as the interface between the user interface and DynExp's internal data like ...
Defines a task for deinitializing an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
Defines a task for initializing an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
Base class for instruments. Instruments comprise virtual devices (meta instruments) and physial devic...
InstrumentBase(const std::thread::id OwnerThreadID, ParamsBasePtrType &&Params)
Constructs an instrument instance.
Configurator class for InstrumentBase.
Data structure to contain data which is synchronized in between different threads....
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a InstrumentBase instance. Refer to RunnableInstance.
Parameter class for InstrumentBase.
InstrumentParamsBase(ItemIDType ID, const DynExpCore &Core)
Constructs the parameters for a InstrumentBase instance.
const std::thread::id OwnerThreadID
Thread id of the thread which has constructed (and owns) this Object instance.
const ParamsBasePtrType Params
Pointer to the parameter class instance belonging to this Object instance.
Refer to ParamsBase::dispatch_tag.
Dummy parameter which is to be owned once by parameter classes that do not contain any other paramete...
const ItemIDType ID
ID of the Object this parameter class instance belongs to.
const DynExpCore & Core
Reference to DynExp's core.
Tag for function dispatching mechanism within this class used when derived classes are not intended t...
std::function< void(const TaskBase &, ExceptionContainer &)> CallbackType
Type of a callback function which is invoked when a task has finished, failed or has been aborted....
Defines a task for updating an instrument within an instrument inheritance hierarchy....
Refer to DynExp::ParamsBase::dispatch_tag.
DynExp's instrument namespace contains the implementation of DynExp instruments which extend DynExp's...
std::unique_ptr< ParamsBase > ParamsBasePtrType
Alias for a pointer to the parameter system base class ParamsBase.
size_t ItemIDType
ID type of objects/items managed by DynExp.
Accumulates include statements to provide a precompiled header.