tcsDB_SYNC_ERR_CHECK

Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:08
Index Return to man pages list
 

NAME

tcsDB_SYNC_ERR_CHECK - Class to handle sync betweer several event.s
                       Syncronizzation can be based
                       also on value of vltINT32 database attributes
                       Support is provided to handle error conditions
                       in the database value.  

SYNOPSIS


#include <tcsDB_SYNC_ERR_CHECK.h>

class tcsDB_SYNC_ERR_CHECK: public evhDB_SYNC
{
  public:
    tcsDB_SYNC_ERR_CHECK();
    ~tcsDB_SYNC_ERR_CHECK();

    ccsCOMPL_STAT ErrorAction(evhCALLBACK &newCB = NULL);

  protected:
    virtual evhCB_COMPL_STAT  HandlerCB(msgMESSAGE &msg, void *udata);

  private:
    evhCALLBACK *errorCb;

};

 

PARENT CLASS


public evhSYNC

 

DESCRIPTION


This class is like the parent evhDB_SYNC, but also allows to monitor
the database value for a special error value.
This error value is evhSTATE_ERROR.
If one of the monitored database attributes assumes this value, the
registered error callback is executed.
This is used while monitoring the state of objects derived from
evhDB_TASK. In this case their "state" attribute is monitored
for a special value, but if it gets evhSTATE_ERROR, this means that
an error has occurred and must be handled.

 

PUBLIC METHODS


tcsDB_SYNC_ERR_CHECK();
~tcsDB_SYNC_ERR_CHECK();

ccsCOMPL_STAT ErrorAction(evhCALLBACK &newCB = NULL);
  This method is used to register the callback to handle error conditions.

 

PROTECTED METHODS


virtual evhCB_COMPL_STAT  HandlerCB(msgMESSAGE &msg, void *udata);
  This method overload the inherited one in order to handle error
  conditions when a monitored attribute gets value evhSTATE_ERROR.

 

PRIVATE DATA MAMBERS


evhCALLBACK *errorCb;

 

RETURN VALUES


If the function prototype allows, methods return ccsCOMPL_STAT.
If it is not possible, error conditions can be retrieved using the
services provided by the parent class eccsERROR_CLASS(3) (when
an error is generated, it is logged on the error stack and the status
is set to ccsFAILURE).

 

CAUTIONS


This class has not been generalised, althought this coud be in
principle very usefull.
A generalizzation of the class should accept a list of values
for the monitored point with corresponding callbacks, instead
of only one.
Handling of error conditions could be improved also in parent classes.

 

EXAMPLES


Look at the example files in the appendix of the user manual.

 

SEE ALSO


evhDB_SYNC(4)



 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PROTECTED METHODS
PRIVATE DATA MAMBERS
RETURN VALUES
CAUTIONS
EXAMPLES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 10:08:47 GMT, April 23, 2012