Scope
scope::XYZControl Class Reference

#include <XYZControl.h>

Public Member Functions

 ~XYZControl ()
 
virtual void Initialize (parameters::XYZControl &_params)
 
virtual void StartPolling ()
 
virtual void StopPolling ()
 
virtual void UpdatePositionValues ()
 
virtual double CurrentXPosition ()
 
virtual double CurrentYPosition ()
 
virtual double CurrentZPosition ()
 
virtual void SetZero ()
 
virtual void SetZeroXAxis ()
 
virtual void SetZeroYAxis ()
 
virtual void SetZeroZAxis ()
 
virtual void MoveRelative (const double &_xrel, const double &_yrel, const double &_zrel)
 
virtual void MoveAbsolute (const double &_xabs, const double &_yabs, const double &_zabs)
 

Protected Member Functions

 XYZControl (XYZControl &)
 
XYZControl operator= (XYZControl)
 

Protected Attributes

bool initialized
 
StopCondition stop
 
std::future< bool > fut
 
std::array< ScopeNumber< double > *, 3 > xyzpos
 
uint32_t pollinterval
 

Detailed Description

Base class to control an xyz-stage.

Definition at line 14 of file XYZControl.h.

Constructor & Destructor Documentation

scope::XYZControl::XYZControl ( XYZControl )
protected

disable copy

scope::XYZControl::~XYZControl ( )

If pollthread was started, request stop and wait for finish.

Definition at line 12 of file XYZControl.cpp.

Member Function Documentation

XYZControl scope::XYZControl::operator= ( XYZControl  )
protected

disable assignment

void scope::XYZControl::Initialize ( parameters::XYZControl _params)
virtual

Initialize hardware.

Get the ScopeNumbers by reference so we can automatically update GUI by writing to xpos and ypos. Call StartPolling to start the polling thread, since StartPolling is virtual we always call the most derived version of it (which should be overwritten to start the derived RunPolling). If pollinterval is zero we do not start the polling thread. Call from your derived class Initialize after all specific initializations are done!

Definition at line 16 of file XYZControl.cpp.

void scope::XYZControl::StartPolling ( )
virtual

Start the worker function in the pollthread.

Definition at line 29 of file XYZControl.cpp.

void scope::XYZControl::StopPolling ( )
virtual

Stop the worker function.

Definition at line 39 of file XYZControl.cpp.

void scope::XYZControl::UpdatePositionValues ( )
virtual

Updates xpos, ypos, and zpos with the current device position.

Here only a dummy to check if polling works!

Definition at line 45 of file XYZControl.cpp.

virtual double scope::XYZControl::CurrentXPosition ( )
inlinevirtual
Returns
the current x position, questions device immediately, does not wait for polling

Definition at line 62 of file XYZControl.h.

virtual double scope::XYZControl::CurrentYPosition ( )
inlinevirtual
Returns
the current y position, questions device immediately, does not wait for polling

Definition at line 65 of file XYZControl.h.

virtual double scope::XYZControl::CurrentZPosition ( )
inlinevirtual
Returns
the current z position, questions device immediately, does not wait for polling

Definition at line 68 of file XYZControl.h.

void scope::XYZControl::SetZero ( )
virtual

Sets current xyz position as zero.

Definition at line 49 of file XYZControl.cpp.

virtual void scope::XYZControl::SetZeroXAxis ( )
inlinevirtual

Sets current X position as zero.

Definition at line 74 of file XYZControl.h.

virtual void scope::XYZControl::SetZeroYAxis ( )
inlinevirtual

Sets current Y position as zero.

Definition at line 77 of file XYZControl.h.

virtual void scope::XYZControl::SetZeroZAxis ( )
inlinevirtual

Sets current Z position as zero.

Definition at line 80 of file XYZControl.h.

virtual void scope::XYZControl::MoveRelative ( const double &  _xrel,
const double &  _yrel,
const double &  _zrel 
)
inlinevirtual

Relative movement in um.

Definition at line 83 of file XYZControl.h.

virtual void scope::XYZControl::MoveAbsolute ( const double &  _xabs,
const double &  _yabs,
const double &  _zabs 
)
inlinevirtual

Absolute movement in um.

Definition at line 86 of file XYZControl.h.

Member Data Documentation

bool scope::XYZControl::initialized
protected

true if initialized called successfully

Definition at line 18 of file XYZControl.h.

StopCondition scope::XYZControl::stop
protected

to signal the async polling thread to stop

Definition at line 21 of file XYZControl.h.

std::future<bool> scope::XYZControl::fut
protected

future for the async polling thread

Definition at line 24 of file XYZControl.h.

std::array<ScopeNumber<double>*, 3> scope::XYZControl::xyzpos
protected

pointers to a ScopeNumber that is updated with the polled x, y, and z positions

Definition at line 27 of file XYZControl.h.

uint32_t scope::XYZControl::pollinterval
protected

interval (in milliseconds) to poll device

Definition at line 30 of file XYZControl.h.


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