⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 seswatchdog.h

📁 在LINUX环境下
💻 H
字号:
/****************************************************************************
 *
 *         (c) Copyright 2007 by SCADA Enterprise Solutions Inc
 *         All rights reserved
 *
 * NAME:
 *
 *         sesWatchdog.H -- This is the header file for declaring all 
 *                          variables required by the sesWatchdog object.
 *
 * AUTHOR: Wai Tse
 *
 * DESCRIPTION:
 *
 *         This file contains all data structures used by sesWatchdog object.
 *
 * RESTRICTION:
 *         None
 *
 * REVISION HISTORY:
 *
 *         05-JUL-2006    Wai Tse    Created the initial version.
 *
 ***************************************************************************/
#ifndef WATCHDOG_H
#define WATCHDOG_H

#include "sesDbg.H"
#include "sesLogErr.H"

// define DTSIZE_H to suppress multiple declaration of dtSize
#define  DTSIZE_H
#include "dbUtil.H"

// Define process name
#define WATCHDOG_PROC "WATCHDOG"

// Define field ID
#define NAME_FIELD          0
#define CONTROL_FIELD       1

// Reinitialize time, program will reinitialize when the number of updates
// has reached this number.
// Every once in a while, the program will read the Process Info table
// to get the index number and the control info.
#define REINITIALIZE_TIME   30

class sesWatchdog
{
public:
              sesWatchdog(char *procName, dbUtil *db);
             ~sesWatchdog(){};
  void        init();
  void        updateTime();

private:

  dbUtil          *_db;               // pointer of a dbUtil object
  void            *_val;              // pointer to the value memory block
  char             _procName[40];     // process name
  dtPtr            _valPtr;           // ptr to value block for direct update
  dtInt16          _procCtrl;         // 1=check and restart, 2=check only
  int              _procIdx;          // index into the Process Info table
  dtIdx            _valIdx;           // offset index of a database value
  dtInt16          _cntUpdate;        // update count for re-initialize control
};

#endif // WATCHDOG_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -