/*********************************************************************
*
* 文 件: LimitsMag.h 声明极限值管理相关接口
*
* 版权所有: Shanghai Baosight Software Co., Ltd.
*
* 概述:
* :
* :
*
* 版本历史
* 1.0 2010-09-02 echo_li 增加注释
*
*********************************************************************/
#ifndef _LIMITS_MAG_H
#define _LIMITS_MAG_H
#include
#include
#include "dbinc/T_LOV_LIMIT.h"
#include "CCalculator.h"
using namespace log4cplus;
/*********************************************************************
* 类 名: //TODO请补充类名称
* 版权所有: Shanghai Baosight Software Co., Ltd.
* 类 职 责:
* :
* :
* 版本历史
* 1.0 2010-09-02 echo_li 增加注释
*
*********************************************************************/
class LimitsMag{
public:
LimitsMag();
/**********************************************************************
* 概述: 返回数值极限值检查后的结果
* 函数名: CheckNumberLimit
* 返回值: short 正常:0 异常:Limit表中的报警等级
* 参数列表: 参数类型 取值范围 描述
* limitName: const char * 极限值名称
* value: float 需要检查的数值
* type: const char * 极限类型
*
* 版本历史
* 1.0 2010-09-02 echo_li 增加注释
*
**********************************************************************/
short CheckNumberLimit( const char *limitName, float value, const char * type = "L3");
/**********************************************************************
* 概述: 返回字符检查结果
* 函数名:CheckCharAvailable
* 返回值: short 正常:0 异常:Limit表中的报警等级
* 参数列表: 参数类型 取值范围 描述
* limitName: const char * 极限值名称
* value: const char * 需要检查的字符类型
* type: const char * 极限类型
*
* 版本历史
* 1.0 2010-09-02 echo_li 增加注释
*
**********************************************************************/
float claformula( const char *limitName, const char* type = "L3");
short CheckCharAvailable( const char *limitName, const char* input, const char* type = "L3");
short CheckEnumeChar( const char *assemb, const char* input);
/**********************************************************************
* 概述: 检查数值极限,并修改输入值
* 函数名: CheckNumberLimit
* 返回值: short 正常:0 异常:Limit表中的报警等级
* 参数列表: 参数类型 取值范围 描述
* limitName: const char * 极限值名称
* value: float * 需要限值的数值
* type: const char * 极限类型
*
* 版本历史
* 1.0 2010-09-02 echo_li 增加注释
*
**********************************************************************/
short ApplyNumberLimit( const char *limitName, float *value, const char* type = "L3");
private:
short Limit2( const char *input, const char *assemb);
public:
virtual ~LimitsMag();
private:
T_LOV_LIMIT *mp_plantLimits;
char *dbMessage;
CCalculator *mp_cal;
};
#endif //Endif _LIMITS_MAG_H