TwiceAsNice  2019-02-18
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Laos::WfcLoopDataPushServiceWorker< ImageType > Class Template Reference

#include <LaosWfcLoopDataPushServiceWorker.h>

Inheritance diagram for Laos::WfcLoopDataPushServiceWorker< ImageType >:
Inheritance graph
Collaboration diagram for Laos::WfcLoopDataPushServiceWorker< ImageType >:
Collaboration graph

Classes

struct  DeviceAsyncImpl
 

Public Member Functions

 WfcLoopDataPushServiceWorker (const Nice::JointPtr &_config)
 
virtual ~WfcLoopDataPushServiceWorker ()
 
virtual void init ()
 
virtual void deinit ()
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual void stop ()
 does nothing. More...
 
virtual void abort ()
 does nothing. More...
 
virtual void work ()
 
virtual void idleOnline ()
 wait for a state change. More...
 
virtual Nice::SeqFloat getNewSlope ()
 
virtual Basda::ImageBase getNewImage ()
 
 WfcLoopDataPushServiceWorker (const Nice::JointPtr &_config)
 
virtual ~WfcLoopDataPushServiceWorker ()
 
virtual void init ()
 
virtual void deinit ()
 
virtual void activate ()
 
virtual void deactivate ()
 
virtual void stop ()
 does nothing. More...
 
virtual void abort ()
 does nothing. More...
 
virtual void work ()
 
virtual void idleOnline ()
 wait for a state change. More...
 
virtual Nice::SeqFloat getNewSlope ()
 
virtual Basda::ImageBase getNewImage ()
 
- Public Member Functions inherited from Laos::WfcLoopDataPushServiceWorkerSkeleton
 WfcLoopDataPushServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~WfcLoopDataPushServiceWorkerSkeleton ()
 
 WfcLoopDataPushServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~WfcLoopDataPushServiceWorkerSkeleton ()
 
- 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 ()
 

Private Types

typedef WfcLoopData WfcLoopDataType
 
typedef IceUtil::Handle< WfcLoopDataTypeWfcLoopDataTypePtr
 
typedef Basda::RingbufferDevice< WfcLoopDataTypeWfcLoopDeviceType
 
typedef IceUtil::Handle< WfcLoopDeviceTypeWfcLoopDeviceTypePtr
 
typedef WfcLoop< Nice::U16WfcLoopType
 
typedef IceUtil::Handle< WfcLoopTypeWfcLoopTypePtr
 
typedef std::vector< float > SeqType
 
typedef WfcLoopData WfcLoopDataType
 
typedef IceUtil::Handle< WfcLoopDataTypeWfcLoopDataTypePtr
 
typedef Basda::RingbufferDevice< WfcLoopDataTypeWfcLoopDeviceType
 
typedef IceUtil::Handle< WfcLoopDeviceTypeWfcLoopDeviceTypePtr
 
typedef WfcLoop< Nice::U16WfcLoopType
 
typedef IceUtil::Handle< WfcLoopTypeWfcLoopTypePtr
 
typedef std::vector< float > SeqType
 

Private Member Functions

void initNodes ()
 
void setMask (const Nice::SeqDynamicBitset &_mask)
 
void initNodes ()
 
void setMask (const Nice::SeqDynamicBitset &_mask)
 

Private Attributes

WfcLoopDeviceTypePtr m_device
 
DeviceAsyncImpl m_deviceAsync
 
Basda::ServiceWorkerPtr m_serviceCtrl
 
Nice::SeqFloat m_skippedFrames
 

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 Laos::WfcLoopDataPushServiceWorkerSkeleton
const char * getNewSlopeNode ()
 
const char * getNewImageNode ()
 
const char * getNewSlopeNode ()
 
const char * getNewImageNode ()
 
- 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 waitForNewState ()
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual void preinit ()
 
virtual void packin ()
 schedule ONLINE as the next target state. More...
 
virtual void terminate ()
 schedule EXIT as the next target state. More...
 
virtual void errorOffline ()
 set the target state to OFFLINE. More...
 
virtual void errorStandby ()
 set the target state to OFFLINE. More...
 
virtual void errorOnline ()
 set the target state to OFFLINE. More...
 
virtual void errorWorking ()
 set the target state to OFFLINE. More...
 
virtual void idleOffline ()
 wait for a state change. More...
 
virtual void idleStandby ()
 wait for a state change. 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 waitForNewState ()
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual void preinit ()
 
virtual void packin ()
 
virtual void terminate ()
 
virtual void errorOffline ()
 
virtual void errorStandby ()
 
virtual void errorOnline ()
 
virtual void errorWorking ()
 
virtual void idleOffline ()
 
virtual void idleStandby ()
 
- 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...
 

Member Typedef Documentation

◆ SeqType [1/2]

template<typename ImageType = Nice::U16>
typedef std::vector<float> Laos::WfcLoopDataPushServiceWorker< ImageType >::SeqType
private

◆ SeqType [2/2]

template<typename ImageType = Nice::U16>
typedef std::vector<float> Laos::WfcLoopDataPushServiceWorker< ImageType >::SeqType
private

◆ WfcLoopDataType [1/2]

template<typename ImageType = Nice::U16>
typedef WfcLoopData Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDataType
private

◆ WfcLoopDataType [2/2]

template<typename ImageType = Nice::U16>
typedef WfcLoopData Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDataType
private

◆ WfcLoopDataTypePtr [1/2]

template<typename ImageType = Nice::U16>
typedef IceUtil::Handle<WfcLoopDataType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDataTypePtr
private

◆ WfcLoopDataTypePtr [2/2]

template<typename ImageType = Nice::U16>
typedef IceUtil::Handle<WfcLoopDataType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDataTypePtr
private

◆ WfcLoopDeviceType [1/2]

template<typename ImageType = Nice::U16>
typedef Basda::RingbufferDevice<WfcLoopDataType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDeviceType
private

◆ WfcLoopDeviceType [2/2]

template<typename ImageType = Nice::U16>
typedef Basda::RingbufferDevice<WfcLoopDataType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDeviceType
private

◆ WfcLoopDeviceTypePtr [1/2]

template<typename ImageType = Nice::U16>
typedef IceUtil::Handle<WfcLoopDeviceType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDeviceTypePtr
private

◆ WfcLoopDeviceTypePtr [2/2]

template<typename ImageType = Nice::U16>
typedef IceUtil::Handle<WfcLoopDeviceType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDeviceTypePtr
private

◆ WfcLoopType [1/2]

template<typename ImageType = Nice::U16>
typedef WfcLoop<Nice::U16> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopType
private

◆ WfcLoopType [2/2]

template<typename ImageType = Nice::U16>
typedef WfcLoop<Nice::U16> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopType
private

◆ WfcLoopTypePtr [1/2]

template<typename ImageType = Nice::U16>
typedef IceUtil::Handle<WfcLoopType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopTypePtr
private

◆ WfcLoopTypePtr [2/2]

template<typename ImageType = Nice::U16>
typedef IceUtil::Handle<WfcLoopType> Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopTypePtr
private

Constructor & Destructor Documentation

◆ WfcLoopDataPushServiceWorker() [1/2]

template<typename ImageType >
Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDataPushServiceWorker ( const Nice::JointPtr _config)

m_config->getWithDefault<Nice::Time> ( "CFG.INTERVAL", Nice::Time::seconds ( 1.0 ) );

◆ ~WfcLoopDataPushServiceWorker() [1/2]

template<typename ImageType = Nice::U16>
virtual Laos::WfcLoopDataPushServiceWorker< ImageType >::~WfcLoopDataPushServiceWorker ( )
inlinevirtual

◆ WfcLoopDataPushServiceWorker() [2/2]

template<typename ImageType = Nice::U16>
Laos::WfcLoopDataPushServiceWorker< ImageType >::WfcLoopDataPushServiceWorker ( const Nice::JointPtr _config)

◆ ~WfcLoopDataPushServiceWorker() [2/2]

template<typename ImageType = Nice::U16>
virtual Laos::WfcLoopDataPushServiceWorker< ImageType >::~WfcLoopDataPushServiceWorker ( )
inlinevirtual

Member Function Documentation

◆ abort() [1/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::abort ( void  )
inlinevirtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.

◆ abort() [2/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::abort ( void  )
inlinevirtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.

◆ activate() [1/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::activate ( )
inlinevirtual

Implements Basda::ServiceWorker.

◆ activate() [2/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::activate ( )
inlinevirtual

Implements Basda::ServiceWorker.

◆ deactivate() [1/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::deactivate ( )
inlinevirtual

Implements Basda::ServiceWorker.

◆ deactivate() [2/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::deactivate ( )
inlinevirtual

Implements Basda::ServiceWorker.

◆ deinit() [1/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::deinit ( )
inlinevirtual

Implements Basda::ServiceWorker.

◆ deinit() [2/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::deinit ( )
inlinevirtual

Implements Basda::ServiceWorker.

◆ getNewImage() [1/2]

template<typename ImageType >
Basda::ImageBase Laos::WfcLoopDataPushServiceWorker< ImageType >::getNewImage ( )
virtual

◆ getNewImage() [2/2]

template<typename ImageType = Nice::U16>
virtual Basda::ImageBase Laos::WfcLoopDataPushServiceWorker< ImageType >::getNewImage ( )
virtual

◆ getNewSlope() [1/2]

template<typename ImageType >
Nice::SeqFloat Laos::WfcLoopDataPushServiceWorker< ImageType >::getNewSlope ( )
virtual

◆ getNewSlope() [2/2]

template<typename ImageType = Nice::U16>
virtual Nice::SeqFloat Laos::WfcLoopDataPushServiceWorker< ImageType >::getNewSlope ( )
virtual

◆ idleOnline() [1/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::idleOnline ( )
virtual

wait for a state change.


Reimplemented from Basda::ServiceWorker.

◆ idleOnline() [2/2]

template<typename ImageType >
void Laos::WfcLoopDataPushServiceWorker< ImageType >::idleOnline ( )
virtual

wait for a state change.


Reimplemented from Basda::ServiceWorker.

◆ init() [1/2]

template<typename ImageType >
void Laos::WfcLoopDataPushServiceWorker< ImageType >::init ( )
virtual

Implements Basda::ServiceWorker.

◆ init() [2/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::init ( )
virtual

Implements Basda::ServiceWorker.

◆ initNodes() [1/2]

template<typename ImageType >
void Laos::WfcLoopDataPushServiceWorker< ImageType >::initNodes ( )
private

◆ initNodes() [2/2]

template<typename ImageType = Nice::U16>
void Laos::WfcLoopDataPushServiceWorker< ImageType >::initNodes ( )
private

◆ setMask() [1/2]

template<typename ImageType >
void Laos::WfcLoopDataPushServiceWorker< ImageType >::setMask ( const Nice::SeqDynamicBitset _mask)
private

◆ setMask() [2/2]

template<typename ImageType = Nice::U16>
void Laos::WfcLoopDataPushServiceWorker< ImageType >::setMask ( const Nice::SeqDynamicBitset _mask)
private

◆ stop() [1/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::stop ( )
inlinevirtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.

◆ stop() [2/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::stop ( )
inlinevirtual

does nothing.


Reimplemented from Basda::ServiceWorkerSkeleton.

◆ work() [1/2]

template<typename ImageType = Nice::U16>
virtual void Laos::WfcLoopDataPushServiceWorker< ImageType >::work ( )
virtual

◆ work() [2/2]

template<typename ImageType >
void Laos::WfcLoopDataPushServiceWorker< ImageType >::work ( )
virtual

Member Data Documentation

◆ m_device

template<typename ImageType = Nice::U16>
WfcLoopDeviceTypePtr Laos::WfcLoopDataPushServiceWorker< ImageType >::m_device
private

◆ m_deviceAsync

template<typename ImageType = Nice::U16>
DeviceAsyncImpl Laos::WfcLoopDataPushServiceWorker< ImageType >::m_deviceAsync
private

◆ m_serviceCtrl

template<typename ImageType = Nice::U16>
Basda::ServiceWorkerPtr Laos::WfcLoopDataPushServiceWorker< ImageType >::m_serviceCtrl
private

◆ m_skippedFrames

template<typename ImageType = Nice::U16>
Nice::SeqFloat Laos::WfcLoopDataPushServiceWorker< ImageType >::m_skippedFrames
private

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