Public Types | Public Member Functions | Protected Member Functions | List of all members
icam::CCameraDelegatorComp Class Reference

Implementation of bitmap acquisition delegating all calls to some slave object. More...

#include <CCameraDelegatorComp.h>

Inheritance diagram for icam::CCameraDelegatorComp:
ilog::TLoggerCompWrap< Base > icam::IBitmapAcquisition ilog::CLoggerBase iproc::IProcessor ilog::ILoggable istd::ILogger istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic icam::CCalibratedCameraComp icam::CSelectionParamCameraComp

Public Types

typedef ilog::CLoggerComponentBase BaseClass
 
- Public Types inherited from iproc::IProcessor
enum  MessageId { MI_BAD_PARAMS = 0x16372620, MI_PROCESSING_ERROR }
 
enum  ProcessorState { PS_UNKNOWN, PS_INITIALIZATION, PS_READY, PS_INVALID }
 State of processing. More...
 
enum  TaskState {
  TS_NONE, TS_WAIT, TS_OK, TS_CANCELED,
  TS_INVALID
}
 Describe state of task. More...
 

Public Member Functions

virtual istd::CIndex2d GetBitmapSize (const iprm::IParamsSet *paramsPtr) const
 Get size of acquired bitmap for specified parameters. More...
 
virtual int GetProcessorState (const iprm::IParamsSet *paramsPtr) const
 Get state of this processor for processing of specified parameters. More...
 
virtual bool AreParamsAccepted (const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, const istd::IChangeable *outputPtr) const
 Check if specified parameter set is accepted for this processor. More...
 
virtual int DoProcessing (const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, istd::IChangeable *outputPtr, ibase::IProgressManager *progressManagerPtr=NULL)
 Do synchronized processing. More...
 
virtual int BeginTask (const iprm::IParamsSet *paramsPtr, const istd::IPolymorphic *inputPtr, istd::IChangeable *outputPtr, ibase::IProgressManager *progressManagerPtr=NULL)
 Begin new task for this processor and add them to queue. More...
 
virtual int WaitTaskFinished (int taskId=-1, double timeoutTime=-1, bool killOnTimeout=true)
 Wait for task is finished. More...
 
virtual void CancelTask (int taskId=-1)
 Remove task from queue. More...
 
virtual int GetReadyTask ()
 Get the ID of any ready task. More...
 
virtual int GetTaskState (int taskId=-1) const
 Get actual task state. More...
 
virtual void InitProcessor (const iprm::IParamsSet *paramsPtr)
 Init processor to optimal process with specified params. More...
 
- Public Member Functions inherited from ilog::ILoggable
virtual void SetLogPtr (IMessageConsumer *logPtr)=0
 
virtual IMessageConsumerGetLogPtr () const =0
 
virtual void SetTracingEnabled (bool trace)=0
 
virtual bool IsTracingEnabled () const =0
 

Protected Member Functions

virtual const iprm::IParamsSetGetWorkingParamsSet (const iprm::IParamsSet *inputParamsPtr) const
 
virtual void OnComponentCreated ()
 
- Protected Member Functions inherited from ilog::CLoggerBase
virtual void DecorateMessage (istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const
 

Detailed Description

Implementation of bitmap acquisition delegating all calls to some slave object.

It is used to provide cascades of camera implementations.

Definition at line 21 of file CCameraDelegatorComp.h.

Member Typedef Documentation

Definition at line 26 of file CCameraDelegatorComp.h.

Member Function Documentation

virtual bool icam::CCameraDelegatorComp::AreParamsAccepted ( const iprm::IParamsSet paramsPtr,
const istd::IPolymorphic inputPtr,
const istd::IChangeable outputPtr 
) const
virtual

Check if specified parameter set is accepted for this processor.

Parameters
inputPtroptional input object typically being source object used to processing.
outputPtroptional output object storing processing result.
Returns
task ID or -1 if it was not possible to add new task.

Implements iproc::IProcessor.

Reimplemented in icam::CSelectionParamCameraComp.

virtual int icam::CCameraDelegatorComp::BeginTask ( const iprm::IParamsSet paramsPtr,
const istd::IPolymorphic inputPtr,
istd::IChangeable outputPtr,
ibase::IProgressManager progressManagerPtr = NULL 
)
virtual

Begin new task for this processor and add them to queue.

If this method success, new task is added into the queue. To remove it from queue you have to call WaitTaskFinished or CancelTask.

Parameters
paramsPtrset of parameters controlling processing task. Pointed object can be used till task is finished. It can be NULL.
inputPtrinput object typically being source object used to processing. Pointed object can be used till task is finished. It can be NULL.
outputPtroutput object storing processing result. Pointed object can be used till task is finished. It can be NULL.
Returns
task ID or -1 if it was not possible to add new task.

Implements iproc::IProcessor.

Reimplemented in icam::CSelectionParamCameraComp.

virtual void icam::CCameraDelegatorComp::CancelTask ( int  taskId = -1)
virtual

Remove task from queue.

Parameters
taskIdID of task returned by BeginTask() or -1 if all tasks are mean.

Implements iproc::IProcessor.

Reimplemented in icam::CSelectionParamCameraComp.

virtual int icam::CCameraDelegatorComp::DoProcessing ( const iprm::IParamsSet paramsPtr,
const istd::IPolymorphic inputPtr,
istd::IChangeable outputPtr,
ibase::IProgressManager progressManagerPtr = NULL 
)
virtual

Do synchronized processing.

Returns
state of processing task
See Also
TaskState.

Implements iproc::IProcessor.

Reimplemented in icam::CSelectionParamCameraComp, and icam::CCalibratedCameraComp.

virtual istd::CIndex2d icam::CCameraDelegatorComp::GetBitmapSize ( const iprm::IParamsSet paramsPtr) const
virtual

Get size of acquired bitmap for specified parameters.

Returns
if size of bitmap is known it returns this value. Otherwise invalid size will be returned.
See Also
istd::TIndex::IsValid().

Implements icam::IBitmapAcquisition.

Reimplemented in icam::CSelectionParamCameraComp.

virtual int icam::CCameraDelegatorComp::GetProcessorState ( const iprm::IParamsSet paramsPtr) const
virtual

Get state of this processor for processing of specified parameters.

Parameters
paramsPtrpointer to parameter object or NULL if general state is mean.
Returns
state of this processor
See Also
ProcessorState.

Implements iproc::IProcessor.

Reimplemented in icam::CSelectionParamCameraComp.

virtual int icam::CCameraDelegatorComp::GetReadyTask ( )
virtual

Get the ID of any ready task.

Also for ready task it is necessary to call WaitTaskFinished().

Returns
ID of ready task or -1.

Implements iproc::IProcessor.

virtual int icam::CCameraDelegatorComp::GetTaskState ( int  taskId = -1) const
virtual

Get actual task state.

Please note that task state will be only stored till WaitTaskFinished() is called.

Parameters
taskIdtask ID number returned by BeginTask() method. If it is -1 state of the last task will be returned.
Returns
state of selected task or all tasks
See Also
TaskState.

Implements iproc::IProcessor.

virtual const iprm::IParamsSet* icam::CCameraDelegatorComp::GetWorkingParamsSet ( const iprm::IParamsSet inputParamsPtr) const
protectedvirtual
virtual void icam::CCameraDelegatorComp::InitProcessor ( const iprm::IParamsSet paramsPtr)
virtual

Init processor to optimal process with specified params.

Please note, that initalizing will be also done automatically in method BeginTask but, to avoid unpredictable waiting time during time critical processing, it is recommended to use this method while parameter initialization.

Parameters
paramsPtrset of parameters controlling processing task. Pointed object can be used till task is finished. It can be NULL.

Implements iproc::IProcessor.

Reimplemented in icam::CSelectionParamCameraComp.

virtual void icam::CCameraDelegatorComp::OnComponentCreated ( )
protectedvirtual
virtual int icam::CCameraDelegatorComp::WaitTaskFinished ( int  taskId = -1,
double  timeoutTime = -1,
bool  killOnTimeout = true 
)
virtual

Wait for task is finished.

Parameters
taskIdID of task returned by BeginTask() or -1 if all tasks are mean.
timeoutTimemaximal waiting time in seconds or negative value if timeout is not allowed. If this time will be exceeded, it returns TS_WAIT or TS_INVALID if killOnTimeout is set.
killOnTimeoutindicate that task must be killed by timeout.
Returns
state of selected task or all tasks
See Also
TaskState.

Implements iproc::IProcessor.

Reimplemented in icam::CSelectionParamCameraComp.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy