eis/inc/zlib/LimitsMag.h

99 lines
3.5 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*********************************************************************
*
* 文 件: LimitsMag.h 声明极限值管理相关接口
*
* 版权所有: Shanghai Baosight Software Co., Ltd.
*
* 概述:
* :
* :
*
* 版本历史
* 1.0 2010-09-02 echo_li 增加注释
*
*********************************************************************/
#ifndef _LIMITS_MAG_H
#define _LIMITS_MAG_H
#include <base/TypeCheck.h>
#include <log4cplus/LOG.h>
#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