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

#include <ServiceWorker.h>

Inheritance diagram for Basda::PythonServiceWorkerSingleWork:
Inheritance graph
Collaboration diagram for Basda::PythonServiceWorkerSingleWork:
Collaboration graph

Public Member Functions

 PythonServiceWorkerSingleWork (const Nice::JointPtr &_c)
 
virtual ~PythonServiceWorkerSingleWork ()
 
virtual void work ()
 
 PythonServiceWorkerSingleWork (const Nice::JointPtr &_c)
 
virtual ~PythonServiceWorkerSingleWork ()
 
virtual void work ()
 
- Public Member Functions inherited from Basda::PythonServiceWorker< Basda::ServiceWorker >
 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::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< Basda::ServiceWorker >
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::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 abort ()
 does nothing. More...
 
virtual void stop ()
 does nothing. More...
 
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 abort ()
 
virtual void stop ()
 
virtual void packin ()
 
- Protected Attributes inherited from Basda::PythonServiceWorker< Basda::ServiceWorker >
bp::object m_pyModule
 
bp::object m_pyClass
 
bp::object m_pyInstance
 
- 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

◆ PythonServiceWorkerSingleWork() [1/2]

Basda::PythonServiceWorkerSingleWork::PythonServiceWorkerSingleWork ( const Nice::JointPtr _c)
inline

◆ ~PythonServiceWorkerSingleWork() [1/2]

virtual Basda::PythonServiceWorkerSingleWork::~PythonServiceWorkerSingleWork ( )
inlinevirtual

◆ PythonServiceWorkerSingleWork() [2/2]

Basda::PythonServiceWorkerSingleWork::PythonServiceWorkerSingleWork ( const Nice::JointPtr _c)
inline

◆ ~PythonServiceWorkerSingleWork() [2/2]

virtual Basda::PythonServiceWorkerSingleWork::~PythonServiceWorkerSingleWork ( )
inlinevirtual

Member Function Documentation

◆ work() [1/2]

void Basda::PythonServiceWorkerSingleWork::work ( )
virtual

Implements Basda::ServiceWorker.

◆ work() [2/2]

virtual void Basda::PythonServiceWorkerSingleWork::work ( )
virtual

Implements Basda::ServiceWorker.


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