Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
XMotorDriver Class Referenceabstract
Inheritance diagram for XMotorDriver:
Inheritance graph
[legend]

Public Member Functions

 XMotorDriver (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
virtual ~XMotorDriver ()
 usually nothing to do
 
virtual void showForms ()
 Shows all forms belonging to driver.
 
const shared_ptr< XScalarEntry > & position () const
 driver specific part below
 
const shared_ptr< XDoubleNode > & target () const
 [deg.]
 
const shared_ptr< XUIntNode > & stepMotor () const
 [steps per rot.]
 
const shared_ptr< XUIntNode > & stepEncoder () const
 [steps per rot.]
 
const shared_ptr< XDoubleNode > & currentStopping () const
 [%]
 
const shared_ptr< XDoubleNode > & currentRunning () const
 [%]
 
const shared_ptr< XDoubleNode > & speed () const
 [Hz]
 
const shared_ptr< XDoubleNode > & timeAcc () const
 [ms/kHz]
 
const shared_ptr< XDoubleNode > & timeDec () const
 [ms/kHz]
 
const shared_ptr< XBoolNode > & active () const
 
const shared_ptr< XBoolNode > & ready () const
 
const shared_ptr< XBoolNode > & slipping () const
 
const shared_ptr< XBoolNode > & microStep () const
 
const shared_ptr< XBoolNode > & hasEncoder () const
 
const shared_ptr
< XTouchableNode > & 
store () const
 
const shared_ptr
< XTouchableNode > & 
clear () const
 
const shared_ptr< XUIntNode > & auxBits () const
 
const shared_ptr< XBoolNode > & round () const
 
const shared_ptr< XUIntNode > & roundBy () const
 
const shared_ptr
< XTouchableNode > & 
forwardMotor () const
 
const shared_ptr
< XTouchableNode > & 
reverseMotor () const
 
const shared_ptr
< XTouchableNode > & 
stopMotor () const
 
- Public Member Functions inherited from XPrimaryDriverWithThread
 XPrimaryDriverWithThread (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
virtual void stop ()
 
- Public Member Functions inherited from XPrimaryDriver
 XPrimaryDriver (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
- Public Member Functions inherited from XDriver
 XDriver (const char *name, bool runtime, Transaction &tr_meas, const shared_ptr< XMeasure > &meas)
 
- Public Member Functions inherited from XNode
 XNode (const char *name, bool runtime=false)
 
template<class T >
shared_ptr< T > create (const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (const char *name, bool runtime, Args &&...args)
 
template<class T >
shared_ptr< T > create (Transaction &tr, const char *name)
 
template<class T , typename... Args>
shared_ptr< T > create (Transaction &tr, const char *name, bool runtime, Args &&...args)
 
XString getName () const
 
virtual XString getLabel () const
 
XString getTypename () const
 
shared_ptr< XNodegetChild (const XString &var) const
 
shared_ptr< XNodegetParent () const
 
void setUIEnabled (bool v)
 Enables/disables controls over scripting/GUI.
 
void disable ()
 Disables all scripting/GUI operations on this node hereafter.
 
- Public Member Functions inherited from Transactional::Node< XNode >
bool insert (Transaction< XNode > &tr, const shared_ptr< XNode > &var, bool online_after_insertion=false)
 
void insert (const shared_ptr< XNode > &var)
 
bool release (Transaction< XNode > &tr, const shared_ptr< XNode > &var)
 
void release (const shared_ptr< XNode > &var)
 
void releaseAll ()
 
bool swap (Transaction< XNode > &tr, const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
void swap (const shared_ptr< XNode > &x, const shared_ptr< XNode > &y)
 
XNodeupperNode (Snapshot< XNode > &shot)
 Finds the parent node in shot.
 
Snapshot< XNodeiterate_commit (Closure)
 
Snapshot< XNodeiterate_commit_if (Closure)
 
void iterate_commit_while (Closure)
 
void print_ () const
 
 Node (const Node &)=delete
 
Nodeoperator= (const Node &)=delete
 

Protected Member Functions

virtual void analyzeRaw (RawDataReader &reader, Transaction &tr) throw (XRecordError&)
 
virtual void visualize (const Snapshot &shot)
 
virtual void getStatus (const Snapshot &shot, double *position, bool *slipping, bool *ready)=0
 
virtual void changeConditions (const Snapshot &shot)=0
 
virtual void getConditions (Transaction &tr)=0
 
virtual void setTarget (const Snapshot &shot, double target)=0
 
virtual void setForward ()=0
 
virtual void setReverse ()=0
 
virtual void stopRotation ()=0
 
virtual void setActive (bool active)=0
 
virtual void setAUXBits (unsigned int bits)=0
 
virtual void storeToROM ()=0
 stores current settings to the NV memory of the instrument.
 
virtual void clearPosition ()=0
 
- Protected Member Functions inherited from XPrimaryDriverWithThread
virtual void start ()
 
virtual void closeInterface ()=0
 This function should not cause an exception.
 
- Protected Member Functions inherited from XPrimaryDriver
void finishWritingRaw (const shared_ptr< const RawData > &rawdata, const XTime &time_awared, const XTime &time_recorded)
 
- Protected Member Functions inherited from XDriver
void record (Transaction &tr, const XTime &time_awared, const XTime &time_recorded)
 

Private Member Functions

void onTargetChanged (const Snapshot &shot, XValueNodeBase *)
 
void onAUXChanged (const Snapshot &shot, XValueNodeBase *)
 
void onConditionsChanged (const Snapshot &shot, XValueNodeBase *)
 
void onClearTouched (const Snapshot &shot, XTouchableNode *)
 
void onStoreTouched (const Snapshot &shot, XTouchableNode *)
 
void onForwardMotorTouched (const Snapshot &shot, XTouchableNode *)
 
void onReverseMotorTouched (const Snapshot &shot, XTouchableNode *)
 
void onStopMotorTouched (const Snapshot &shot, XTouchableNode *)
 
void * execute (const atomic< bool > &)
 

Private Attributes

const shared_ptr< XScalarEntrym_position
 
const shared_ptr< XDoubleNodem_target
 
const shared_ptr< XUIntNodem_stepMotor
 
const shared_ptr< XUIntNodem_stepEncoder
 
const shared_ptr< XDoubleNodem_currentStopping
 
const shared_ptr< XDoubleNodem_currentRunning
 
const shared_ptr< XDoubleNodem_speed
 
const shared_ptr< XDoubleNodem_timeAcc
 
const shared_ptr< XDoubleNodem_timeDec
 
const shared_ptr< XBoolNodem_active
 
const shared_ptr< XBoolNodem_ready
 
const shared_ptr< XBoolNodem_slipping
 
const shared_ptr< XBoolNodem_microStep
 
const shared_ptr< XBoolNodem_hasEncoder
 
const shared_ptr< XUIntNodem_auxBits
 
const shared_ptr< XTouchableNodem_clear
 
const shared_ptr< XTouchableNodem_store
 
const shared_ptr< XBoolNodem_round
 
const shared_ptr< XUIntNodem_roundBy
 
const shared_ptr< XTouchableNodem_forwardMotor
 
const shared_ptr< XTouchableNodem_reverseMotor
 
const shared_ptr< XTouchableNodem_stopMotor
 
shared_ptr< XListenerm_lsnTarget
 
shared_ptr< XListenerm_lsnConditions
 
shared_ptr< XListenerm_lsnClear
 
shared_ptr< XListenerm_lsnStore
 
shared_ptr< XListenerm_lsnForwardMotor
 
shared_ptr< XListenerm_lsnReverseMotor
 
shared_ptr< XListenerm_lsnStopMotor
 
shared_ptr< XListenerm_lsnAUX
 
xqcon_ptr m_conPosition
 
xqcon_ptr m_conTarget
 
xqcon_ptr m_conStepMotor
 
xqcon_ptr m_conStepEncoder
 
xqcon_ptr m_conCurrentStopping
 
xqcon_ptr m_conCurrentRunning
 
xqcon_ptr m_conSpeed
 
xqcon_ptr m_conTimeAcc
 
xqcon_ptr m_conTimeDec
 
xqcon_ptr m_conActive
 
xqcon_ptr m_conReady
 
xqcon_ptr m_conSlipping
 
xqcon_ptr m_conMicroStep
 
xqcon_ptr m_conHasEncoder
 
xqcon_ptr m_conClear
 
xqcon_ptr m_conStore
 
xqcon_ptr m_conForwardMotor
 
xqcon_ptr m_conReverseMotor
 
xqcon_ptr m_conStopMotor
 
xqcon_ptr m_conAUXBits
 
xqcon_ptr m_conRound
 
xqcon_ptr m_conRoundBy
 
const qshared_ptr< FrmMotorDriverm_form
 

Additional Inherited Members

- Public Types inherited from Transactional::Node< XNode >
using NodeNotFoundError = std::domain_error
 
using NodeList = fast_vector< shared_ptr< XNode >, 2 >
 
using iterator = typename NodeList::iterator
 
using const_iterator = typename NodeList::const_iterator
 
- Static Public Member Functions inherited from XNode
template<class T__ >
static shared_ptr< T__ > createOrphan (const char *name)
 
template<class T__ , typename... Args_>
static shared_ptr< T__ > createOrphan (const char *name, bool runtime, Args_ &&...args)
 

Detailed Description

Definition at line 25 of file motor.h.

Member Function Documentation

void XMotorDriver::analyzeRaw ( RawDataReader reader,
Transaction tr 
) throw (XRecordError&)
protectedvirtual

This function will be called when raw data are written. Implement this function to convert the raw data to the record (Payload).

See Also
analyze()

Implements XPrimaryDriver.

Definition at line 116 of file motor.cpp.

const shared_ptr<XScalarEntry>& XMotorDriver::position ( ) const
inline

driver specific part below

[deg.]

Definition at line 44 of file motor.h.

void XMotorDriver::showForms ( )
virtual

Shows all forms belonging to driver.

impliment form->show() here

Implements XPrimaryDriver.

Definition at line 109 of file motor.cpp.

void XMotorDriver::visualize ( const Snapshot shot)
protectedvirtual

This function is called after committing XPrimaryDriver::analyzeRaw() or XSecondaryDriver::analyze(). This might be called even if the record is invalid (time() == false).

Implements XDriver.

Definition at line 127 of file motor.cpp.


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

Generated for KAME4 by  doxygen 1.8.3