2026-05-09 11:23:45 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
using std::string;
|
|
|
|
|
|
using std::vector;
|
|
|
|
|
|
enum class ErrorType {
|
|
|
|
|
|
Success = 0,
|
2026-05-09 13:30:09 +08:00
|
|
|
|
Empty = 1,
|
|
|
|
|
|
EnCodeError = 2,
|
|
|
|
|
|
EqualError = 3,
|
|
|
|
|
|
NotEqualError = 4,
|
|
|
|
|
|
CalError = 5,
|
2026-05-09 11:23:45 +08:00
|
|
|
|
};
|
|
|
|
|
|
enum class ErrorLocation {
|
|
|
|
|
|
Success = 0,
|
2026-05-09 13:30:09 +08:00
|
|
|
|
Tags = 1,
|
|
|
|
|
|
ExeCyc = 2,
|
|
|
|
|
|
DataSource = 3,
|
|
|
|
|
|
DataValue = 4,
|
|
|
|
|
|
ActExp = 5,
|
|
|
|
|
|
HoldOn = 6,
|
|
|
|
|
|
FBExp = 7,
|
|
|
|
|
|
ResultExp = 8,
|
|
|
|
|
|
ResultParam = 9,
|
2026-05-09 11:23:45 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
namespace ErrorCode {
|
|
|
|
|
|
const vector<string> ErrorTypeDescription = {"正确",
|
|
|
|
|
|
"为空",
|
|
|
|
|
|
"表达式存在中文等其它字符",
|
|
|
|
|
|
"相等应使用\"==\"而非其他",
|
|
|
|
|
|
"相等应使用\"!=\"而非其他",
|
|
|
|
|
|
"计算错误,比如除数是0"};
|
|
|
|
|
|
|
|
|
|
|
|
const vector<string> ErrorLocationDescription = {
|
|
|
|
|
|
"正确", "tag点异常", "执行周期", "数据源", "数据项",
|
|
|
|
|
|
"动作表达式", "动作保持", "反馈表达式", "监控表达式","监控表达式参数"};
|
2026-05-09 13:30:09 +08:00
|
|
|
|
}
|
2026-05-09 11:23:45 +08:00
|
|
|
|
|
|
|
|
|
|
struct ErrorCodeType {
|
|
|
|
|
|
ErrorType error_type;
|
|
|
|
|
|
ErrorLocation error_location;
|
|
|
|
|
|
};
|