TwiceAsNice  2019-02-18
Public Member Functions | List of all members
Basda::MoccaXServiceWorkerSkeletonPython Class Reference

#include <XServiceWorkerSkeletonPython.h>

Inheritance diagram for Basda::MoccaXServiceWorkerSkeletonPython:
Inheritance graph
Collaboration diagram for Basda::MoccaXServiceWorkerSkeletonPython:
Collaboration graph

Public Member Functions

 MoccaXServiceWorkerSkeletonPython (const Nice::JointPtr &_config)
 
virtual ~MoccaXServiceWorkerSkeletonPython ()
 
virtual void stop ()
 does nothing. More...
 
virtual void abort ()
 does nothing. More...
 
virtual bool isReachable ()
 
virtual double getPosition (std::string _unit)
 
virtual void setPosition (double _position, std::string _unit)
 
virtual double getDeviceEncoderPosition (std::string _unit)
 
virtual double getAbsoluteEncoderPosition ()
 
virtual double getIncrementalEncoderPosition ()
 
virtual double getVelocity ()
 
virtual void setVelocity (double _velocity)
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 
virtual double getCurrentTime ()
 
virtual bool isAtHome ()
 
virtual bool isAtLimit ()
 
virtual bool isMoving ()
 
virtual double getNamedPosition (int _named_position)
 
virtual void moveRelative (double _position, std::string _unit)
 
virtual void moveAbsolute (double _position, std::string _unit)
 
virtual void moveToHome ()
 
virtual void moveToLimit (double _limit)
 
virtual void moveToNamedPosition (int _named_position)
 
virtual void dumpStatusInformation ()
 
virtual void send (std::string _card_no, std::string _cmd_id, std::string _module_no, std::string _select_id, std::string _parameter, std::string _lines)
 
virtual std::string receive ()
 
virtual std::string receiveDataRaw (std::string _card_no, std::string _cmd_id, std::string _module_no, std::string _lines)
 
- Public Member Functions inherited from Basda::PythonServiceWorker< MoccaXServiceWorkerSkeleton >
 PythonServiceWorker (const Nice::JointPtr &_config)
 
 PythonServiceWorker (const Nice::JointPtr &_config)
 
virtual ~PythonServiceWorker ()
 
virtual ~PythonServiceWorker ()
 
virtual void waitForNewState ()
 
virtual void waitForNewState ()
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual void preinit ()
 
virtual void preinit ()
 
virtual void init ()
 
virtual void init ()
 
virtual void deinit ()
 
virtual void deinit ()
 
virtual void activate ()
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual void deactivate ()
 
virtual void terminate ()
 
virtual void terminate ()
 
virtual void errorOffline ()
 
virtual void errorOffline ()
 
virtual void errorStandby ()
 
virtual void errorStandby ()
 
virtual void errorOnline ()
 
virtual void errorOnline ()
 
virtual void errorWorking ()
 
virtual void errorWorking ()
 
virtual void idleOffline ()
 
virtual void idleOffline ()
 
virtual void idleStandby ()
 
virtual void idleStandby ()
 
virtual void idleOnline ()
 
virtual void idleOnline ()
 
- Public Member Functions inherited from Basda::MoccaXServiceWorkerSkeleton
 MoccaXServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~MoccaXServiceWorkerSkeleton ()
 
 MoccaXServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~MoccaXServiceWorkerSkeleton ()
 
- Public Member Functions inherited from Basda::ServiceWorkerSkeleton
const Nice::PropertyPtrcmd ()
 
void setCompletion (const Nice::Completion &_c)
 
void cmdStart (const std::string &_action="")
 
void cmdDone ()
 
void cmdWarning (const std::string &_l)
 
void cmdWarning (const Nice::LoggerObject &_o)
 
void cmdError (const std::string &_l)
 
void cmdError (const Nice::LoggerObject &_o)
 
void cmdError (const Nice::SeqLoggerObject &_oo)
 
void cmdPercent (Nice::Int _v)
 
void cmdAction (Nice::Int _v, const std::string &_s)
 
virtual void cmd (const Nice::Completion &_c)
 
template<typename DataType >
Nice::Completion exec (const Nice::Completion &_c, DataType &_localdata, const DataType &_indata=DataType())
 if currently online, push the state into WORKING More...
 
template<typename DataType >
void execCommand (DataType _cmd)
 
const Nice::PropertyPtrcmd ()
 
void setCompletion (const Nice::Completion &_c)
 
void cmdStart (const std::string &_action="")
 
void cmdDone ()
 
void cmdWarning (const std::string &_l)
 
void cmdWarning (const Nice::LoggerObject &_o)
 
void cmdError (const std::string &_l)
 
void cmdError (const Nice::LoggerObject &_o)
 
void cmdError (const Nice::SeqLoggerObject &_oo)
 
void cmdPercent (Nice::Int _v)
 
void cmdAction (Nice::Int _v, const std::string &_s)
 
virtual void cmd (const Nice::Completion &_c)
 
template<typename DataType >
Nice::Completion exec (const Nice::Completion &_c, DataType &_localdata, const DataType &_indata=DataType())
 
template<typename DataType >
void execCommand (DataType _cmd)
 
- Public Member Functions inherited from Basda::ServiceWorker
const Nice::JointPtrconfig ()
 
Nice::JointPtr cfg ()
 
Nice::JointPtr var ()
 
virtual const std::string & name ()
 
virtual WorkerThreadPtr worker ()
 
virtual Nice::Monitormonitor ()
 
virtual void lock ()
 
virtual void unlock ()
 
bool stateIsSettled ()
 
bool stateHasChanged ()
 
void changeState (Basda::ServiceState _state)
 change state to a new state If the state is the current state, or a negative state, do nothing. Otherwise change the "next" state in the state machine and notify all threads. More...
 
bool tryChangeState (Basda::ServiceState _state, const Nice::Time &_timeout=Nice::Time::seconds(0.0))
 change state to a new state More...
 
void waitForState (Basda::ServiceState _state)
 wait (indefinitely) until the worker has reached a spcifici state More...
 
bool timedWaitForState (Basda::ServiceState _state, const Nice::Time &_timeout)
 wait (indefinitely) until the worker has reached a specific state More...
 
bool changeStateOnlyFromTo (Basda::ServiceState _from, Basda::ServiceState _to)
 wait (indefinitely) until the worker has reached a spcifici state More...
 
Basda::ServiceState state ()
 
Basda::ServiceState stateNow ()
 
Basda::ServiceState stateNext ()
 
Basda::ServiceState stateLast ()
 
bool isTransit ()
 
bool isTerminated ()
 
const Nice::JointPtrconfig ()
 
Nice::JointPtr cfg ()
 
Nice::JointPtr var ()
 
virtual const std::string & name ()
 
virtual WorkerThreadPtr worker ()
 
virtual Nice::Monitormonitor ()
 
virtual void lock ()
 
virtual void unlock ()
 
bool stateIsSettled ()
 
bool stateHasChanged ()
 
void changeState (Basda::ServiceState _state)
 
bool tryChangeState (Basda::ServiceState _state, const Nice::Time &_timeout=Nice::Time::seconds(0.0))
 
void waitForState (Basda::ServiceState _state)
 
bool timedWaitForState (Basda::ServiceState _state, const Nice::Time &_timeout)
 
bool changeStateOnlyFromTo (Basda::ServiceState _from, Basda::ServiceState _to)
 
Basda::ServiceState state ()
 
Basda::ServiceState stateNow ()
 
Basda::ServiceState stateNext ()
 
Basda::ServiceState stateLast ()
 
bool isTransit ()
 
bool isTerminated ()
 

Additional Inherited Members

- Protected Types inherited from Basda::ServiceWorker
typedef void(ServiceWorker::* ServiceWorkerMemFn) ()
 
typedef Branch BranchTable[6][6]
 
typedef IceUtil::Handle< WorkerThreadWorkerThreadPtr
 
typedef void(ServiceWorker::* ServiceWorkerMemFn) ()
 
typedef Branch BranchTable[6][6]
 
typedef IceUtil::Handle< WorkerThreadWorkerThreadPtr
 
- Protected Member Functions inherited from Basda::PythonServiceWorker< MoccaXServiceWorkerSkeleton >
virtual Nice::CompletionState reload (Nice::CommandFun< PythonServiceWorker > *_cmd, bool &_abort)
 
virtual Nice::CompletionState reload (Nice::CommandFun< PythonServiceWorker > *_cmd, bool &_abort)
 
virtual void handleException ()
 
virtual void handleException ()
 
void execPython (const char *_py)
 
void execPython (const char *_py, const Type1 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &, const Type3 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &, const Type5 &)
 
void execPython (const char *_py)
 
void execPython (const char *_py, const Type1 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &, const Type3 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &)
 
void execPython (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &, const Type5 &)
 
TypeRet execPythonWithRet (const char *_py)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &, const Type3 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &, const Type5 &)
 
TypeRet execPythonWithRet (const char *_py)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &, const Type3 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &)
 
TypeRet execPythonWithRet (const char *_py, const Type1 &, const Type2 &, const Type3 &, const Type4 &, const Type5 &)
 
- Protected Member Functions inherited from Basda::MoccaXServiceWorkerSkeleton
const char * isReachableNode ()
 
const char * getPositionNode ()
 
void getPositionInit (std::string _unit)
 
const char * setPositionNode ()
 
void setPositionInit (double _position, std::string _unit)
 
const char * getDeviceEncoderPositionNode ()
 
void getDeviceEncoderPositionInit (std::string _unit)
 
const char * getAbsoluteEncoderPositionNode ()
 
const char * getIncrementalEncoderPositionNode ()
 
const char * getVelocityNode ()
 
const char * setVelocityNode ()
 
void setVelocityInit (double _velocity)
 
const char * getPositionSwitchStatusNode ()
 
const char * getCurrentTimeNode ()
 
const char * isAtHomeNode ()
 
const char * isAtLimitNode ()
 
const char * isMovingNode ()
 
const char * getNamedPositionNode ()
 
void getNamedPositionInit (int _named_position)
 
const char * moveRelativeNode ()
 
void moveRelativeInit (double _position, std::string _unit)
 
const char * moveAbsoluteNode ()
 
void moveAbsoluteInit (double _position, std::string _unit)
 
const char * moveToHomeNode ()
 
const char * moveToLimitNode ()
 
void moveToLimitInit (double _limit)
 
const char * moveToNamedPositionNode ()
 
void moveToNamedPositionInit (int _named_position)
 
const char * dumpStatusInformationNode ()
 
const char * sendNode ()
 
void sendInit (std::string _card_no, std::string _cmd_id, std::string _module_no, std::string _select_id, std::string _parameter, std::string _lines)
 
const char * receiveNode ()
 
const char * receiveDataRawNode ()
 
void receiveDataRawInit (std::string _card_no, std::string _cmd_id, std::string _module_no, std::string _lines)
 
virtual void work ()
 
const char * isReachableNode ()
 
const char * getPositionNode ()
 
void getPositionInit (std::string _unit)
 
const char * setPositionNode ()
 
void setPositionInit (double _position, std::string _unit)
 
const char * getDeviceEncoderPositionNode ()
 
void getDeviceEncoderPositionInit (std::string _unit)
 
const char * getAbsoluteEncoderPositionNode ()
 
const char * getIncrementalEncoderPositionNode ()
 
const char * getVelocityNode ()
 
const char * setVelocityNode ()
 
void setVelocityInit (double _velocity)
 
const char * getPositionSwitchStatusNode ()
 
const char * getCurrentTimeNode ()
 
const char * isAtHomeNode ()
 
const char * isAtLimitNode ()
 
const char * isMovingNode ()
 
const char * getNamedPositionNode ()
 
void getNamedPositionInit (int _named_position)
 
const char * moveRelativeNode ()
 
void moveRelativeInit (double _position, std::string _unit)
 
const char * moveAbsoluteNode ()
 
void moveAbsoluteInit (double _position, std::string _unit)
 
const char * moveToHomeNode ()
 
const char * moveToLimitNode ()
 
void moveToLimitInit (double _limit)
 
const char * moveToNamedPositionNode ()
 
void moveToNamedPositionInit (int _named_position)
 
const char * dumpStatusInformationNode ()
 
const char * sendNode ()
 
void sendInit (std::string _card_no, std::string _cmd_id, std::string _module_no, std::string _select_id, std::string _parameter, std::string _lines)
 
const char * receiveNode ()
 
const char * receiveDataRawNode ()
 
void receiveDataRawInit (std::string _card_no, std::string _cmd_id, std::string _module_no, std::string _lines)
 
virtual void work ()
 
- Protected Member Functions inherited from Basda::ServiceWorkerSkeleton
 ServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
 ServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
- Protected Member Functions inherited from Basda::ServiceWorker
 ServiceWorker (const Nice::JointPtr &_jointPtr)
 ctor More...
 
virtual ~ServiceWorker ()
 dtor Does nothing (in this base class) More...
 
void triggerState (const Basda::ServiceStateMachine &_state)
 change state to a new state More...
 
void sendStateStatus (const std::string &_action, int _percent)
 
void setState (Basda::ServiceState _next)
 
virtual void packin ()
 schedule ONLINE as the next target state. More...
 
 ServiceWorker (const Nice::JointPtr &_jointPtr)
 
virtual ~ServiceWorker ()
 
void triggerState (const Basda::ServiceStateMachine &_state)
 
void sendStateStatus (const std::string &_action, int _percent)
 
void setState (Basda::ServiceState _next)
 
virtual void packin ()
 
- Protected Attributes inherited from Basda::PythonServiceWorker< MoccaXServiceWorkerSkeleton >
bp::object m_pyModule
 
bp::object m_pyClass
 
bp::object m_pyInstance
 
- Protected Attributes inherited from Basda::ServiceWorkerSkeleton
Nice::Completion m_completion
 
Nice::I64 m_id
 
Nice::PropertyPtr m_cmd
 
- Protected Attributes inherited from Basda::ServiceWorker
Nice::JointPtr m_config
 
Nice::PropertyPtr m_state
 
std::string m_name
 
- Static Protected Attributes inherited from Basda::ServiceWorker
static BranchTable s_stateTable
 A table which tells which state should go via which intermediate state to a target state. The 6 states are SHUTDOWN, OFFLINE, STANDBY, ONLINE, WORKING and ERROR. The principles are that. More...
 

Constructor & Destructor Documentation

◆ MoccaXServiceWorkerSkeletonPython()

Basda::MoccaXServiceWorkerSkeletonPython::MoccaXServiceWorkerSkeletonPython ( const Nice::JointPtr _config)

◆ ~MoccaXServiceWorkerSkeletonPython()

Basda::MoccaXServiceWorkerSkeletonPython::~MoccaXServiceWorkerSkeletonPython ( )
virtual

Member Function Documentation

◆ abort()

void Basda::MoccaXServiceWorkerSkeletonPython::abort ( void  )
virtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.

◆ dumpStatusInformation()

void Basda::MoccaXServiceWorkerSkeletonPython::dumpStatusInformation ( )
virtual

◆ getAbsoluteEncoderPosition()

double Basda::MoccaXServiceWorkerSkeletonPython::getAbsoluteEncoderPosition ( )
virtual

◆ getCurrentTime()

double Basda::MoccaXServiceWorkerSkeletonPython::getCurrentTime ( )
virtual

◆ getDeviceEncoderPosition()

double Basda::MoccaXServiceWorkerSkeletonPython::getDeviceEncoderPosition ( std::string  _unit)
virtual

◆ getIncrementalEncoderPosition()

double Basda::MoccaXServiceWorkerSkeletonPython::getIncrementalEncoderPosition ( )
virtual

◆ getNamedPosition()

double Basda::MoccaXServiceWorkerSkeletonPython::getNamedPosition ( int  _named_position)
virtual

◆ getPosition()

double Basda::MoccaXServiceWorkerSkeletonPython::getPosition ( std::string  _unit)
virtual

◆ getPositionSwitchStatus()

Nice::SeqBitSet Basda::MoccaXServiceWorkerSkeletonPython::getPositionSwitchStatus ( )
virtual

◆ getVelocity()

double Basda::MoccaXServiceWorkerSkeletonPython::getVelocity ( )
virtual

◆ isAtHome()

bool Basda::MoccaXServiceWorkerSkeletonPython::isAtHome ( )
virtual

◆ isAtLimit()

bool Basda::MoccaXServiceWorkerSkeletonPython::isAtLimit ( )
virtual

◆ isMoving()

bool Basda::MoccaXServiceWorkerSkeletonPython::isMoving ( )
virtual

◆ isReachable()

bool Basda::MoccaXServiceWorkerSkeletonPython::isReachable ( )
virtual

◆ moveAbsolute()

void Basda::MoccaXServiceWorkerSkeletonPython::moveAbsolute ( double  _position,
std::string  _unit 
)
virtual

◆ moveRelative()

void Basda::MoccaXServiceWorkerSkeletonPython::moveRelative ( double  _position,
std::string  _unit 
)
virtual

◆ moveToHome()

void Basda::MoccaXServiceWorkerSkeletonPython::moveToHome ( )
virtual

◆ moveToLimit()

void Basda::MoccaXServiceWorkerSkeletonPython::moveToLimit ( double  _limit)
virtual

◆ moveToNamedPosition()

void Basda::MoccaXServiceWorkerSkeletonPython::moveToNamedPosition ( int  _named_position)
virtual

◆ receive()

std::string Basda::MoccaXServiceWorkerSkeletonPython::receive ( )
virtual

◆ receiveDataRaw()

std::string Basda::MoccaXServiceWorkerSkeletonPython::receiveDataRaw ( std::string  _card_no,
std::string  _cmd_id,
std::string  _module_no,
std::string  _lines 
)
virtual

◆ send()

void Basda::MoccaXServiceWorkerSkeletonPython::send ( std::string  _card_no,
std::string  _cmd_id,
std::string  _module_no,
std::string  _select_id,
std::string  _parameter,
std::string  _lines 
)
virtual

◆ setPosition()

void Basda::MoccaXServiceWorkerSkeletonPython::setPosition ( double  _position,
std::string  _unit 
)
virtual

◆ setVelocity()

void Basda::MoccaXServiceWorkerSkeletonPython::setVelocity ( double  _velocity)
virtual

◆ stop()

void Basda::MoccaXServiceWorkerSkeletonPython::stop ( )
virtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.


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