596 lines
29 KiB
C++
596 lines
29 KiB
C++
/*
|
||
* 说明: 各种枚举和全局变量定义
|
||
*
|
||
* 作者: 杨海洋
|
||
* 日期: 2023-03-14
|
||
*/
|
||
|
||
#ifndef HBEAN_H
|
||
#define HBEAN_H
|
||
|
||
#include "HCommon.h"
|
||
|
||
//索引定义,为了和文档保持序号一致,文档中的字段序号都是从1开始的
|
||
#define II(x) ((x)-1)
|
||
//每秒处理数据帧数
|
||
#define FRAMES_PER_SECOND (5)
|
||
//小车及格分数
|
||
#define GRADE_PASS_80 (80)
|
||
//大车及格分数
|
||
#define GRADE_PASS_90 (90)
|
||
//满分
|
||
#define GRADE_TOTAL_FULL (100)
|
||
|
||
#define MESH_SCALE 50000 //500米
|
||
#define ERROR_JLCM 888888
|
||
#define VIEW_SCALE (5)
|
||
|
||
//科目三除以这个数才得到经纬度
|
||
#define GPS_DIV double(1000000.0)
|
||
|
||
#define DEAL_API virtual
|
||
#define DEAL_METHOD override
|
||
#define PURE_API
|
||
#define DRAW_API
|
||
|
||
#define MAKE_ITEM_UUID(itemNo, subIdx) (std::to_string(itemNo) + "~" + subIdx)
|
||
|
||
//GPS异常数据过滤误差范围
|
||
//1 如果这2个点的GPS夹角大于40度,属于异常数据突变
|
||
//2 (60KM/H 对应的相邻2帧是3.3米左右)
|
||
// 当前点的GPS经纬度坐标与上一点的 GPS经纬度坐标,如果这2个点的GPS坐标距离大于4米,直接退出(科目二不可能开到60KM/H以上)
|
||
#define DEVIATION_RANGE_DISTANCE_CM (400)
|
||
#define DEVIATION_RANGE_ANGLE_MIN (40)
|
||
#define DEVIATION_RANGE_ANGLE_MAX (300)
|
||
|
||
//地图东西和南北各延伸多少米,单位米
|
||
#define MAP_OPER_PROLONG_MI (15.0f)
|
||
//自己需要定义1个像素点代表的实际长度 单位厘米
|
||
#define MAP_OPER_PIX_CM (4.0f)
|
||
//视野缩放系数百分比,这个参数越大看见的视野越大 默认是是100百分百
|
||
#define MAP_OPER_SCALE (100)
|
||
//每个像素点代表几个厘米,是缩放比例,初始1.0
|
||
#define MAP_OPER_SCALING(scale) (MAP_OPER_PIX_CM * scale / 100.0)
|
||
|
||
|
||
#define PATH_CONFIG ("./config/")
|
||
#define TRACK_PATH ("./track/")
|
||
#define TRACK_SUFFIX (".track")
|
||
|
||
//100通用时间的代码
|
||
#define STOP_INTERVAL_100 100
|
||
|
||
|
||
//考试过程事件
|
||
//******注意顺序不能变,这个类型要传给上层APP调用方的***杨海洋2023-07-04***
|
||
#define EnumMakeExamEventType(declare) \
|
||
declare(ExamEventTypeInvalid, 0, "", XCharacter("无效的事件")) \
|
||
declare(ExamEventTypeItemEnter, 1, "", XCharacter("进项目事件")) \
|
||
declare(ExamEventTypeItemFinish, 2, "", XCharacter("项目结束事件")) \
|
||
declare(ExamEventTypeMark, 3, "", XCharacter("扣分事件")) \
|
||
declare(ExamEventTypeMoveState, 4, "", XCharacter("移动状态事件")) \
|
||
declare(ExamEventTypeExamFinish, 5, "", XCharacter("考试结束事件")) \
|
||
declare(ExamEventTypeItemCancel, 6, "", XCharacter("项目取消事件")) \
|
||
declare(ExamEventTypeSound, 7, "", XCharacter("语音播报和提示事件")) \
|
||
declare(ExamEventTypeLight, 8, "", XCharacter("模拟灯光事件")) \
|
||
declare(ExamEventTypeLane, 9, "", XCharacter("车道和路段变化事件"))
|
||
enum ExamEventType{ EnumMakeExamEventType(ENUM_SELECT_1_CMD_4) ExamEventTypeUnknown };
|
||
JUDGE_C_API const char* ExamEventType2Name(ExamEventType code);
|
||
JUDGE_C_API const char* ExamEventType2Desc(ExamEventType code);
|
||
JUDGE_C_API ExamEventType Name2ExamEventType(const char* name);
|
||
//******注意顺序不能变,这个类型要传给上层APP调用方的***杨海洋2023-07-04***
|
||
|
||
//考车移动状态,***注意:枚举不能变,和外壳有对应关系
|
||
enum CarMoveState
|
||
{
|
||
moveInvalid = -2, //无效未知的状态
|
||
moveBackward = -1, //后退状态
|
||
moveStop = 0, //停车状态(无变化)
|
||
moveForward = 1, //前进状态
|
||
};
|
||
|
||
//考试模式(0:训练 1:考试)***注意:枚举不能变,和外壳有对应关系
|
||
enum ExamMode
|
||
{
|
||
examModeDrill = 0, //0:训练
|
||
examModeExam = 1, //1:考试
|
||
};
|
||
|
||
//是否轨迹(回放)(0:否 1:是)***注意:枚举不能变,和外壳有对应关系
|
||
enum TrackReplayType
|
||
{
|
||
TrackReplayNot = 0, //0:否
|
||
TrackReplayYes = 1, //1:是
|
||
};
|
||
|
||
//传感信号,***注意:枚举不能变,和外壳有对应关系
|
||
enum SensorSignal
|
||
{
|
||
SNOT = 0, //传感无信号
|
||
SYES = 1, //传感有信号
|
||
};
|
||
|
||
//考试科目类型定义,注意:枚举不能变,和外壳有对应关系
|
||
enum ExamSubject
|
||
{
|
||
ExamSubject2 = 2, //科目二
|
||
ExamSubject3 = 3, //科目三
|
||
};
|
||
|
||
//人工项目操作类型,***注意:枚举不能变,和外壳有对应关系
|
||
enum ArtifItemType
|
||
{
|
||
ArtifItemTypeAuto = 0,
|
||
ArtifItemTypeEnter = 1,
|
||
ArtifItemTypeCancel = 2,
|
||
ArtifItemTypeEnd = 3,
|
||
};
|
||
|
||
//扣分类型,***注意:枚举不能变,和外壳有对应关系
|
||
enum MarkType
|
||
{
|
||
MarkTypeAuto = 0, //0:评判自动扣分
|
||
MarkTypeArti = 1, //1:人工扣分
|
||
MarkTypeRemote = 2, //2:远程扣分
|
||
};
|
||
|
||
//考试结束类型,***注意:枚举不能变,和外壳有对应关系
|
||
enum ExamFinishType
|
||
{
|
||
ExamFinishAuto = 0, //0:评判自动结束
|
||
ExamFinishArti = 1, //1:人工结束
|
||
};
|
||
|
||
//语音播报类型,***注意:枚举不能变,和外壳有对应关系
|
||
enum PlaySoundType
|
||
{
|
||
PlaySoundDefault = 0, //0:默认
|
||
PlaySoundEndNotify = 1, //1:表示是模拟灯光项目的语音,语音播报结束需要调用examJudgeSoundEnd通知评判。
|
||
};
|
||
|
||
|
||
//Tag1=0-无标线
|
||
//Tag1=1-中心线(黄色实线)
|
||
//Tag1=2-道路分界线(虚线)
|
||
//Tag1=3-道路右边缘线(右、白)
|
||
//Tag1=4-道路左边缘线(左、白)
|
||
//Tag1=5-非机动车道分界线
|
||
//Tag1=6-中心线(虚线)
|
||
//Tag1=7-道路分界线(实线)
|
||
//Tag1=8-道路边缘线(右、黄)(没听说过)
|
||
//Tag1=9-左虚右实线
|
||
//Tag1=10-右虚左实线
|
||
#define EnumMakeLineTag(declare) \
|
||
declare(LineTag0, "0", XCharacter("0-无标线(未压线)")) \
|
||
declare(LineTag1, "1", XCharacter("1-中心线(黄色实线)")) \
|
||
declare(LineTag2, "2", XCharacter("2-道路分界线(虚线)")) \
|
||
declare(LineTag3, "3", XCharacter("3-道路右边缘线(右、白)")) \
|
||
declare(LineTag4, "4", XCharacter("4-道路左边缘线(左、白)")) \
|
||
declare(LineTag5, "5", XCharacter("5-非机动车道分界线")) \
|
||
declare(LineTag6, "6", XCharacter("6-中心线(虚线)")) \
|
||
declare(LineTag7, "7", XCharacter("7-道路分界线(实线)")) \
|
||
declare(LineTag8, "8", XCharacter("8-道路边缘线(右、黄)(没听说过)")) \
|
||
declare(LineTag9, "9", XCharacter("9-左虚右实线")) \
|
||
declare(LineTag10, "10", XCharacter("10-右虚左实线"))
|
||
enum LineTag{ EnumMakeLineTag(ENUM_SELECT_1_CMD_3) LineTagUnknown };
|
||
JUDGE_C_API const char* lineTag2Name(LineTag code);
|
||
JUDGE_C_API const char* lineTag2Desc(LineTag code);
|
||
JUDGE_C_API LineTag name2LineTag(const char* name);
|
||
|
||
//ItemNo=5、表示路口停车线,8没查到有运用,有2到3个点关联
|
||
//ItemNo=6斑马线,53黄色网格线,表示有4个点关联的网格
|
||
//ItemNo=6、斑马线,4个点关联(减速、不能停车、夜考的时候需要远近光灯交替)
|
||
//ItemNo=53、黄色网格线(类似公交站台,禁止停车)
|
||
enum ItemNoTag
|
||
{
|
||
ItemNoTag5 = 5,
|
||
ItemNoTag6 = 6,
|
||
ItemNoTag8 = 8,
|
||
ItemNoTag53 = 53,
|
||
};
|
||
|
||
//SubName=0、路口停车线,2个点关联,
|
||
//SubName=1、停车线关联,3个点关联
|
||
//SubName=2、人行横道或者黄色网格线, 4个点关联(ItemNo=6或者ItemNo=53)
|
||
//SubName=3、等待线关联,2个点关联(深圳,在这个线上,处理特殊的等待业务)
|
||
//SubName=4、2个点关联的路口环岛线,外面几乎用不到,用于路口项目,不能读到这个路口换到线,压扣分,mark(5,5)
|
||
enum SubNameTag
|
||
{
|
||
//0-未越线 1-停车线 2-中心点右侧线 3-等待控制线 4-环岛相关的
|
||
SubNameTag0 = 0,
|
||
SubNameTag1 = 1,
|
||
SubNameTag2 = 2,
|
||
SubNameTag3 = 3,
|
||
SubNameTag4 = 4,
|
||
};
|
||
|
||
|
||
//GPS板卡类型定义 //GPS板卡类型 1:天宝(北云)/C1;2:诺瓦泰
|
||
#define EnumMakeBoardType(declare) \
|
||
declare(boardTypeINVALID, "----", XCharacter("无效板卡类型")) \
|
||
declare(boardTypeTB, "boardTypeTB", XCharacter("天宝")) \
|
||
declare(boardTypeNWT, "boardTypeNWT", XCharacter("诺瓦泰"))
|
||
enum BoardType{ EnumMakeBoardType(ENUM_SELECT_1_CMD_3) boardTypeUnknown };
|
||
JUDGE_C_API const char* boardType2Name(BoardType code);
|
||
JUDGE_C_API const char* boardType2Desc(BoardType code);
|
||
JUDGE_C_API BoardType name2BoardType(const char* name);
|
||
|
||
|
||
//我们在使用RTK进行作业的时候,进场会看到RTK GPS状态有多种,GPS状态当前 GPS 的经纬度坐标、平面坐标、解状态、差分模式、卫星接收、卫星分布情况等内容。
|
||
//“解状态”:包括单点解、伪距解、浮点解、固定解。
|
||
//单点解:表示未收到差分数据,精度最低,一般为 10 米以内;
|
||
//伪距解:表示接收到基准站差分,经过伪距解算得到的解,或接收 SBAS 信号得到的解状态,精度较低,一般为 3 米以内;
|
||
//浮点解:表示接收到基准站差分,经载波相位差分数据解算得到的初步解,精度较高,一般在 0.5 米以内;
|
||
//固定解:表示接收到基准站差分,经载波相位差分数据解算得到的最终解,精度较最高,一般在 0.02 米以内,进行高精度 GPS 测量时,需要达到固定解状态才能记录数据;
|
||
//位置差分 GPS状态,1个字节 0-无效 1-SINGLE 2-PSRDIFF 4-NARROW_INT 5-NARROW_FLOAT
|
||
#define EnumMakeGpsStatus(declare) \
|
||
declare(gpsStatusINVALID, "----", XCharacter("无效")) \
|
||
declare(gpsStatusSINGLE, "SINGLE", XCharacter("单点解")) \
|
||
declare(gpsStatusPSRDIFF, "PSRDIFF", XCharacter("伪距解")) \
|
||
declare(gpsStatusANGLE, "**ANGLE**", XCharacter("**角度差分状态**?")) \
|
||
declare(gpsStatusNARROW_INT, "NARROW_INT", XCharacter("固定解")) \
|
||
declare(gpsStatusNARROW_FLOAT, "NARROW_FLOAT", XCharacter("浮点解"))
|
||
enum GpsStatus{ EnumMakeGpsStatus(ENUM_SELECT_1_CMD_3) gpsStatusUnknown };
|
||
JUDGE_C_API const char* gpsStatus2Name(GpsStatus code);
|
||
JUDGE_C_API const char* gpsStatus2Desc(GpsStatus code);
|
||
JUDGE_C_API GpsStatus name2GpsStatus(const char* name);
|
||
|
||
|
||
//考试车型 中间一列可以做为车型代码 第3列为科二最低及格分数 第4列为科三最低及格分数
|
||
#define EnumMakeExamCarType(declare) \
|
||
declare(examCarTypeC1, "C1", GRADE_PASS_80, GRADE_PASS_90) \
|
||
declare(examCarTypeC2, "C2", GRADE_PASS_80, GRADE_PASS_90) \
|
||
declare(examCarTypeC5, "C5", GRADE_PASS_80, GRADE_PASS_90) \
|
||
declare(examCarTypeC6, "C6", GRADE_PASS_90, GRADE_PASS_90) \
|
||
declare(examCarTypeB1, "B1", GRADE_PASS_90, GRADE_PASS_90) \
|
||
declare(examCarTypeB2, "B2", GRADE_PASS_90, GRADE_PASS_90) \
|
||
declare(examCarTypeA1, "A1", GRADE_PASS_90, GRADE_PASS_90) \
|
||
declare(examCarTypeA2, "A2", GRADE_PASS_90, GRADE_PASS_90) \
|
||
declare(examCarTypeA3, "A3", GRADE_PASS_90, GRADE_PASS_90)
|
||
enum ExamCarType{ EnumMakeExamCarType(ENUM_SELECT_1_CMD_4) examCarTypeUnknown };
|
||
JUDGE_C_API const char* examCarType2Name(ExamCarType code);
|
||
JUDGE_C_API int examCarType2Pass(ExamSubject subject, ExamCarType code); //及格分数
|
||
JUDGE_C_API int examCarType2PassSub2(ExamCarType code); //科二及格分数
|
||
JUDGE_C_API int examCarType2PassSub3(ExamCarType code); //科三及格分数
|
||
JUDGE_C_API ExamCarType name2ExamCarType(const char* name);
|
||
|
||
|
||
#define IS_C1(x) ((x) == examCarTypeC1)
|
||
#define IS_C2(x) ((x) == examCarTypeC2)
|
||
#define IS_C5(x) ((x) == examCarTypeC5)
|
||
#define IS_C6(x) ((x) == examCarTypeC6)
|
||
#define IS_A1(x) ((x) == examCarTypeA1)
|
||
#define IS_A2(x) ((x) == examCarTypeA2)
|
||
#define IS_A3(x) ((x) == examCarTypeA3)
|
||
#define IS_B1(x) ((x) == examCarTypeB1)
|
||
#define IS_B2(x) ((x) == examCarTypeB2)
|
||
#define IS_A1B1(x) ((x) == examCarTypeA1 || (x) == examCarTypeB1)
|
||
#define IS_A2A3B2(x) ((x) == examCarTypeA2 || (x) == examCarTypeA3 || (x) == examCarTypeB2)
|
||
#define IS_C1C2C5(x) ((x) == examCarTypeC1 || (x) == examCarTypeC2 || (x) == examCarTypeC5)
|
||
#define IS_C1C2C5C6(x) ((x) == examCarTypeC1 || (x) == examCarTypeC2 || (x) == examCarTypeC5 || (x) == examCarTypeC6)
|
||
#define IS_A1A2A3B1B2(x) ((x) == examCarTypeA1 || (x) == examCarTypeA2 || (x) == examCarTypeA3 || (x) == examCarTypeB1 || (x) == examCarTypeB2)
|
||
#define IS_A1A2A3B1B2C6(x) ((x) == examCarTypeA1 || (x) == examCarTypeA2 || (x) == examCarTypeA3 || (x) == examCarTypeB1 || (x) == examCarTypeB2 || (x) == examCarTypeC6)
|
||
#define IS_A1A3B1B2(x) ((x) == examCarTypeA1 || (x) == examCarTypeA3 || (x) == examCarTypeB1 || (x) == examCarTypeB2)
|
||
|
||
|
||
|
||
//考试状态
|
||
#define EnumMakeExamState(declare) \
|
||
declare(examStateIng, "examStateIng", XCharacter("0-考试中,(考试或者训练)")) \
|
||
declare(examStateGoon, "examStateGoon", XCharacter("1-考试结束,继续评判(用于训练)")) \
|
||
declare(examStateFinish, "examStateFinish", XCharacter("2-考试结束,评判不继续(考试和训练)")) \
|
||
declare(examStateEnd, "examStateEnd", XCharacter("3-结束考试"))
|
||
enum ExamState{ EnumMakeExamState(ENUM_SELECT_1_CMD_3) examStateUnknown };
|
||
JUDGE_C_API const char* examState2Name(ExamState code);
|
||
JUDGE_C_API const char* examState2Desc(ExamState code);
|
||
JUDGE_C_API ExamState name2ExamState(const char* name);
|
||
|
||
|
||
//考试项目状态(项目状态颜色)
|
||
//(0-蓝色 1-绿色 2-红色 3-紫色)
|
||
//0:未考(蓝色)
|
||
//1:合格(项目考试完成,没有扣分)(绿色)
|
||
//2:不合格(项目考试完成,有扣分)(红色)
|
||
//3:正在考试(项目正在进行未结束)(紫色)
|
||
//4:项目结束
|
||
//5:项目取消
|
||
#define EnumMakeItemState(declare) \
|
||
declare(itemStateWk, "itemStateWk", XCharacter("未考")) \
|
||
declare(itemStateHg, "itemStateHg", XCharacter("合格")) \
|
||
declare(itemStateBhg, "itemStateBhg", XCharacter("不合格")) \
|
||
declare(itemStateZk, "itemStateZk", XCharacter("正在考试")) \
|
||
declare(itemStateEnd, "itemStateEnd", XCharacter("项目结束")) \
|
||
declare(itemStateCancel, "itemStateCancel", XCharacter("项目取消"))
|
||
enum ItemState{ EnumMakeItemState(ENUM_SELECT_1_CMD_3) itemStateUnknown };
|
||
JUDGE_C_API const char* itemState2Name(ItemState code);
|
||
JUDGE_C_API const char* itemState2Desc(ItemState code);
|
||
JUDGE_C_API ItemState name2ItemState(const char* name);
|
||
|
||
|
||
//项目考试各阶段标志位 0-空闲 1-初始化 2-过程判断 3-结束考试 4-取消项目
|
||
#define EnumMakeItemProFlag(declare) \
|
||
declare(ItemProFlagIdle, "ItemProFlagIdle", XCharacter("空闲")) \
|
||
declare(ItemProFlagInit, "ItemProFlagInit", XCharacter("初始化")) \
|
||
declare(ItemProFlagJudge, "ItemProFlagJudge", XCharacter("过程判断")) \
|
||
declare(ItemProFlagEnd, "ItemProFlagEnd", XCharacter("结束考试")) \
|
||
declare(ItemProFlagCancel, "ItemProFlagCancel", XCharacter("取消项目"))
|
||
enum ItemProFlag{ EnumMakeItemProFlag(ENUM_SELECT_1_CMD_3) ItemProFlagUnknown };
|
||
JUDGE_C_API const char* itemProFlag2Name(ItemProFlag code);
|
||
JUDGE_C_API const char* itemProFlag2Desc(ItemProFlag code);
|
||
JUDGE_C_API ItemProFlag name2ItemProFlag(const char* name);
|
||
|
||
|
||
|
||
//我们公司自定义的考试项目代码
|
||
using ExamItemCode = int;
|
||
using ExamItemCodes = std::vector<ExamItemCode>;
|
||
|
||
//科目二考试项目编码定义,中间一列是无锡科研所定义的考试编码
|
||
//如果不在考试项目里,项目代码就是行驶阶段
|
||
//0-倒车入库 (科研所编码:20100)
|
||
//2-坡道起步 (科研所编码:20300)
|
||
//3-侧方停车 (科研所编码:20400)
|
||
//5-曲线行驶 (科研所编码:20600)
|
||
//6-直角转弯 (科研所编码:20700)
|
||
#define EnumMakeSub2ItemType(declare) \
|
||
declare(Sub2ItemTypeInvalid_, -1, -1, "Invalid", XCharacter("科二无效考试项目代码")) \
|
||
declare(Sub2ItemType20Comm_, 20, 20, "COMM", XCharacter("通用评判")) \
|
||
declare(Sub2ItemType00Dcrk_, 0, 20100, "DCRK", XCharacter("倒车入库")) \
|
||
declare(Sub2ItemType02Pdqb_, 2, 20300, "PDQB", XCharacter("坡道起步")) \
|
||
declare(Sub2ItemType03Cftc_, 3, 20400, "CFTC", XCharacter("侧方停车")) \
|
||
declare(Sub2ItemType05Qxxs_, 5, 20600, "QXXS", XCharacter("曲线行驶")) \
|
||
declare(Sub2ItemType06Zjzw_, 6, 20700, "ZJZW", XCharacter("直角转弯"))
|
||
enum Sub2ItemType{ EnumMakeSub2ItemType(ENUM_SELECT_1_CMD_5) Sub2ItemTypeUnknown };
|
||
JUDGE_C_API int sub2Type2ItemNo(Sub2ItemType code);
|
||
JUDGE_C_API int sub2ItemNo2StdCode(int itemNo);
|
||
JUDGE_C_API Sub2ItemType sub2ItemNo2Type(int itemNo);
|
||
JUDGE_C_API const char* sub2ItemNo2Abbreviate(int itemNo); //缩写
|
||
JUDGE_C_API const char* sub2ItemNo2Name(int itemNo);
|
||
|
||
static const ExamItemCode Sub2ItemTypeInvalid = sub2Type2ItemNo(Sub2ItemTypeInvalid_);
|
||
static const ExamItemCode Sub2ItemType20Comm = sub2Type2ItemNo(Sub2ItemType20Comm_);
|
||
static const ExamItemCode Sub2ItemType00Dcrk = sub2Type2ItemNo(Sub2ItemType00Dcrk_);
|
||
static const ExamItemCode Sub2ItemType02Pdqb = sub2Type2ItemNo(Sub2ItemType02Pdqb_);
|
||
static const ExamItemCode Sub2ItemType03Cftc = sub2Type2ItemNo(Sub2ItemType03Cftc_);
|
||
static const ExamItemCode Sub2ItemType05Qxxs = sub2Type2ItemNo(Sub2ItemType05Qxxs_);
|
||
static const ExamItemCode Sub2ItemType06Zjzw = sub2Type2ItemNo(Sub2ItemType06Zjzw_);
|
||
|
||
//1、上车准备
|
||
//2、起步
|
||
//3、直线行驶
|
||
//4、变更车道
|
||
//5、直行通过路口
|
||
//6、通过人行横道线
|
||
//7、通过学校区域
|
||
//8、通过公共汽车站
|
||
//9、会车
|
||
//10、超车
|
||
//11、靠边停车
|
||
//12、掉头
|
||
//13、夜间行驶(大车)
|
||
//14、加减档位操作
|
||
//15、路口左转弯
|
||
//16、路口右转弯
|
||
//41、模拟灯光
|
||
//贵州的地点版本专考 急弯(56)、拱桥(58)、临时停车(71)
|
||
#define EnumMakeSub3ItemType(declare) \
|
||
declare(Sub3ItemTypeInvalid_, -1, -1, "Invalid", XCharacter("科三无效考试项目代码")) \
|
||
declare(Sub3ItemType20Comm_, 20, 20, "COMM", XCharacter("通用评判")) \
|
||
declare(Sub3ItemType01Sczb_, 1, 40100, "SCZB", XCharacter("上车准备")) \
|
||
declare(Sub3ItemType02Qbxx_, 2, 40200, "QBXX", XCharacter("起步")) \
|
||
declare(Sub3ItemType03Zxxs_, 3, 40300, "ZXXS", XCharacter("直线行驶")) \
|
||
declare(Sub3ItemType04Bgcd_, 4, 40500, "BGCD", XCharacter("变更车道")) \
|
||
declare(Sub3ItemType05Lkzx_, 5, 40700, "ZXLK", XCharacter("直行通过路口")) \
|
||
declare(Sub3ItemType06Rxhd_, 6, 41000, "RXHD", XCharacter("通过人行横道线")) \
|
||
declare(Sub3ItemType07Xxqy_, 7, 41100, "XXQY", XCharacter("通过学校区域")) \
|
||
declare(Sub3ItemType08Gjzt_, 8, 41200, "GJZT", XCharacter("通过公共汽车站")) \
|
||
declare(Sub3ItemType09Hcxx_, 9, 41300, "HCXX", XCharacter("会车")) \
|
||
declare(Sub3ItemType10Ccxx_, 10, 41400, "CCXX", XCharacter("超车")) \
|
||
declare(Sub3ItemType11Kbtc_, 11, 40600, "KBTC", XCharacter("靠边停车")) \
|
||
declare(Sub3ItemType12Dtxx_, 12, 41500, "DTXX", XCharacter("掉头")) \
|
||
declare(Sub3ItemType13Yjxs_, 13, 41600, "YJXS", XCharacter("夜间行驶*大车")) \
|
||
declare(Sub3ItemType14Jjdw_, 14, 40400, "JJDW", XCharacter("加减档位操作")) \
|
||
declare(Sub3ItemType15Lkzz_, 15, 40800, "LKZZ", XCharacter("路口左转弯")) \
|
||
declare(Sub3ItemType16Lkyz_, 16, 40900, "LKYZ", XCharacter("路口右转弯")) \
|
||
declare(Sub3ItemType41Mndg_, 41, 41700, "MNDG", XCharacter("模拟灯光")) \
|
||
declare(Sub3ItemType44Xxxx_, 44, 0, "44XX", XCharacter("特殊项目(不知道哪个地方的)")) \
|
||
declare(Sub3ItemType56Jwxx_, 56, 0, "JWXX", XCharacter("急弯*贵州")) \
|
||
declare(Sub3ItemType58Gqxx_, 58, 0, "GQXX", XCharacter("拱桥*贵州")) \
|
||
declare(Sub3ItemType71Lstc_, 71, 0, "LSTC", XCharacter("临时停车*贵州")) \
|
||
declare(Sub3ItemType69Xxxx_, 69, 0, "69XX", XCharacter("特殊项目(不知道哪个地方的)"))
|
||
enum Sub3ItemType{ EnumMakeSub3ItemType(ENUM_SELECT_1_CMD_5) Sub3ItemTypeUnknown };
|
||
JUDGE_C_API int sub3Type2ItemNo(Sub3ItemType code);
|
||
JUDGE_C_API int sub3ItemNo2StdCode(int itemNo);
|
||
JUDGE_C_API Sub3ItemType sub3ItemNo2Type(int itemNo);
|
||
JUDGE_C_API const char* sub3ItemNo2Abbreviate(int itemNo); //缩写
|
||
JUDGE_C_API const char* sub3ItemNo2Name(int itemNo);
|
||
|
||
static const ExamItemCode Sub3ItemTypeInvalid = sub3Type2ItemNo(Sub3ItemTypeInvalid_);
|
||
static const ExamItemCode Sub3ItemType20Comm = sub3Type2ItemNo(Sub3ItemType20Comm_);
|
||
static const ExamItemCode Sub3ItemType01Sczb = sub3Type2ItemNo(Sub3ItemType01Sczb_);
|
||
static const ExamItemCode Sub3ItemType02Qbxx = sub3Type2ItemNo(Sub3ItemType02Qbxx_);
|
||
static const ExamItemCode Sub3ItemType03Zxxs = sub3Type2ItemNo(Sub3ItemType03Zxxs_);
|
||
static const ExamItemCode Sub3ItemType04Bgcd = sub3Type2ItemNo(Sub3ItemType04Bgcd_);
|
||
static const ExamItemCode Sub3ItemType05Lkzx = sub3Type2ItemNo(Sub3ItemType05Lkzx_);
|
||
static const ExamItemCode Sub3ItemType06Rxhd = sub3Type2ItemNo(Sub3ItemType06Rxhd_);
|
||
static const ExamItemCode Sub3ItemType07Xxqy = sub3Type2ItemNo(Sub3ItemType07Xxqy_);
|
||
static const ExamItemCode Sub3ItemType08Gjzt = sub3Type2ItemNo(Sub3ItemType08Gjzt_);
|
||
static const ExamItemCode Sub3ItemType09Hcxx = sub3Type2ItemNo(Sub3ItemType09Hcxx_);
|
||
static const ExamItemCode Sub3ItemType10Ccxx = sub3Type2ItemNo(Sub3ItemType10Ccxx_);
|
||
static const ExamItemCode Sub3ItemType11Kbtc = sub3Type2ItemNo(Sub3ItemType11Kbtc_);
|
||
static const ExamItemCode Sub3ItemType12Dtxx = sub3Type2ItemNo(Sub3ItemType12Dtxx_);
|
||
static const ExamItemCode Sub3ItemType13Yjxs = sub3Type2ItemNo(Sub3ItemType13Yjxs_);
|
||
static const ExamItemCode Sub3ItemType14Jjdw = sub3Type2ItemNo(Sub3ItemType14Jjdw_);
|
||
static const ExamItemCode Sub3ItemType15Lkzz = sub3Type2ItemNo(Sub3ItemType15Lkzz_);
|
||
static const ExamItemCode Sub3ItemType16Lkyz = sub3Type2ItemNo(Sub3ItemType16Lkyz_);
|
||
static const ExamItemCode Sub3ItemType41Mndg = sub3Type2ItemNo(Sub3ItemType41Mndg_);
|
||
static const ExamItemCode Sub3ItemType44Xxxx = sub3Type2ItemNo(Sub3ItemType44Xxxx_);
|
||
static const ExamItemCode Sub3ItemType56Jwxx = sub3Type2ItemNo(Sub3ItemType56Jwxx_);
|
||
static const ExamItemCode Sub3ItemType58Gqxx = sub3Type2ItemNo(Sub3ItemType58Gqxx_);
|
||
static const ExamItemCode Sub3ItemType71Lstc = sub3Type2ItemNo(Sub3ItemType71Lstc_);
|
||
static const ExamItemCode Sub3ItemType69Xxxx = sub3Type2ItemNo(Sub3ItemType69Xxxx_);
|
||
|
||
|
||
//扣分代码定义
|
||
#define MARK_SUB2_ZJZW_201 "201"
|
||
#define MARK_SUB2_ZJZW_202 "202"
|
||
#define MARK_SUB2_ZJZW_203 "203"
|
||
#define MARK_SUB2_ZJZW_41 "41"
|
||
#define MARK_SUB2_ZJZW_61 "61"
|
||
#define MARK_SUB2_ZJZW_62 "62"
|
||
#define MARK_SUB2_ZJZW_63 "63"
|
||
#define MARK_SUB2_ZJZW_64 "64"
|
||
//0-未到达直角入口阶段 1-到达直角入口阶段 2-到达转弯处(3-6)阶段 3-后轮到达结束线阶段(结束项目)
|
||
#define EnumMakeSub2ZjzwStage(declare) \
|
||
declare(Sub2ZjzwStage0, "", XCharacter("未到达直角入口阶段")) \
|
||
declare(Sub2ZjzwStage1, "", XCharacter("到达直角入口阶段")) \
|
||
declare(Sub2ZjzwStage2, "", XCharacter("到达直角转弯处")) \
|
||
declare(Sub2ZjzwStage3, "", XCharacter("结束项目阶段(后轮到达结束线阶段)"))
|
||
enum Sub2ZjzwStage{ EnumMakeSub2ZjzwStage(ENUM_SELECT_1_CMD_3) Sub2ZjzwStageUnknown };
|
||
JUDGE_CXX_API const char* stage2Describe(Sub2ZjzwStage code);
|
||
|
||
|
||
#define MARK_SUB2_QXXS_01 "01"
|
||
#define MARK_SUB2_QXXS_02 "02"
|
||
#define MARK_SUB2_QXXS_201 "201"
|
||
#define MARK_SUB2_QXXS_202 "202"
|
||
#define MARK_SUB2_QXXS_41 "41"
|
||
#define MARK_SUB2_QXXS_61 "61"
|
||
#define MARK_SUB2_QXXS_62 "62"
|
||
//0-未到达曲线行驶入口阶段 1-到达曲线行驶入口阶段 2-结束项目阶段(后轮到达结束线阶段)
|
||
#define EnumMakeSub2QxxsStage(declare) \
|
||
declare(Sub2QxxsStage0, "", XCharacter("未到达曲线行驶入口阶段")) \
|
||
declare(Sub2QxxsStage1, "", XCharacter("到达曲线行驶入口阶段")) \
|
||
declare(Sub2QxxsStage2, "", XCharacter("结束项目阶段(后轮到达结束线阶段)"))
|
||
enum Sub2QxxsStage{ EnumMakeSub2QxxsStage(ENUM_SELECT_1_CMD_3) Sub2QxxsStageUnknown };
|
||
JUDGE_CXX_API const char* stage2Describe(Sub2QxxsStage code);
|
||
|
||
|
||
#define MARK_SUB2_CFTC_01 "01"
|
||
#define MARK_SUB2_CFTC_02 "02"
|
||
#define MARK_SUB2_CFTC_03 "03"
|
||
#define MARK_SUB2_CFTC_04 "04"
|
||
#define MARK_SUB2_CFTC_201 "201"
|
||
#define MARK_SUB2_CFTC_203 "203"
|
||
//#define MARK_SUB2_CFTC_204 "204"
|
||
#define MARK_SUB2_CFTC_205 "205"
|
||
#define MARK_SUB2_CFTC_41 "41"
|
||
//#define MARK_SUB2_CFTC_62 "62"
|
||
//#define MARK_SUB2_CFTC_63 "63"
|
||
//#define MARK_SUB2_CFTC_64 "64"
|
||
//#define MARK_SUB2_CFTC_65 "65"
|
||
//#define MARK_SUB2_CFTC_66 "66"
|
||
#define EnumMakeSub2CftcStage(declare) \
|
||
declare(Sub2CftcStage0, "", XCharacter("前进至停车线停车(至少后轮要过上库位线才能倒车)")) \
|
||
declare(Sub2CftcStage1, "", XCharacter("倒库阶段(至少后轮要过上库位线并且开始倒车进入倒车阶段)")) \
|
||
declare(Sub2CftcStage2, "", XCharacter("出库阶段(后轮进入库位在前进就是出库阶段)"))
|
||
enum Sub2CftcStage{ EnumMakeSub2CftcStage(ENUM_SELECT_1_CMD_3) Sub2CftcStageUnknown };
|
||
JUDGE_CXX_API const char* stage2Describe(Sub2CftcStage code);
|
||
|
||
|
||
#define MARK_SUB2_PDQB_01 "01"
|
||
#define MARK_SUB2_PDQB_02 "02"
|
||
#define MARK_SUB2_PDQB_03 "03"
|
||
#define MARK_SUB2_PDQB_04 "04"
|
||
#define MARK_SUB2_PDQB_05 "05"
|
||
#define MARK_SUB2_PDQB_06 "06"
|
||
#define MARK_SUB2_PDQB_07 "07"
|
||
#define MARK_SUB2_PDQB_201 "201"
|
||
#define MARK_SUB2_PDQB_202 "202"
|
||
#define MARK_SUB2_PDQB_203 "203"
|
||
#define MARK_SUB2_PDQB_41 "41"
|
||
#define EnumMakeSub2PdqbStage(declare) \
|
||
declare(Sub2PdqbStage0, "", XCharacter("距离停车标杆大于8米")) \
|
||
declare(Sub2PdqbStage1, "", XCharacter("到达标杆8米处,未停车")) \
|
||
declare(Sub2PdqbStage2, "", XCharacter("停车未起步阶段")) \
|
||
declare(Sub2PdqbStage3, "", XCharacter("坡道起步阶段(后轮到达8,9位置结束)"))
|
||
enum Sub2PdqbStage{ EnumMakeSub2PdqbStage(ENUM_SELECT_1_CMD_3) Sub2PdqbStageUnknown };
|
||
JUDGE_CXX_API const char* stage2Describe(Sub2PdqbStage code);
|
||
|
||
|
||
#define MARK_SUB2_DCRK_01 "01"
|
||
#define MARK_SUB2_DCRK_02 "02"
|
||
#define MARK_SUB2_DCRK_03 "03"
|
||
#define MARK_SUB2_DCRK_04 "04"
|
||
#define MARK_SUB2_DCRK_201 "201"
|
||
#define MARK_SUB2_DCRK_202 "202"
|
||
#define MARK_SUB2_DCRK_203 "203"
|
||
#define MARK_SUB2_DCRK_61 "61"
|
||
#define MARK_SUB2_DCRK_62 "62"
|
||
#define MARK_SUB2_DCRK_63 "63"
|
||
#define MARK_SUB2_DCRK_64 "64"
|
||
#define MARK_SUB2_DCRK_65 "65"
|
||
#define MARK_SUB2_DCRK_66 "66"
|
||
#define MARK_SUB2_DCRK_67 "67"
|
||
#define MARK_SUB2_DCRK_68 "68"
|
||
#define MARK_SUB2_DCRK_69 "69"
|
||
#define MARK_SUB2_DCRK_70 "70"
|
||
#define MARK_SUB2_DCRK_71 "71"
|
||
#define MARK_SUB2_DCRK_72 "72"
|
||
#define MARK_SUB2_DCRK_73 "73"
|
||
#define EnumMakeSub2DcrkStage(declare) \
|
||
declare(Sub2DcrkStage0, "", XCharacter("***")) \
|
||
declare(Sub2DcrkStage1, "", XCharacter("初始前进状态")) \
|
||
declare(Sub2DcrkStage2, "", XCharacter("初始停车阶段")) \
|
||
declare(Sub2DcrkStage3, "", XCharacter("倒车阶段-->未碰9")) \
|
||
declare(Sub2DcrkStage4, "", XCharacter("倒车阶段-->后轮未入库")) \
|
||
declare(Sub2DcrkStage5, "", XCharacter("倒车阶段-->前轮未入库")) \
|
||
declare(Sub2DcrkStage6, "", XCharacter("倒库阶段-->库内未停车")) \
|
||
declare(Sub2DcrkStage7, "", XCharacter("库内停车阶段")) \
|
||
declare(Sub2DcrkStage8, "", XCharacter("出库-->车身未碰7")) \
|
||
declare(Sub2DcrkStage9, "", XCharacter("出库-->车身未碰8")) \
|
||
declare(Sub2DcrkStage10, "", XCharacter("出库-->车身未碰10"))
|
||
enum Sub2DcrkStage{ EnumMakeSub2DcrkStage(ENUM_SELECT_1_CMD_3) Sub2DcrkStageUnknown };
|
||
JUDGE_CXX_API const char* stage2Describe(Sub2DcrkStage code);
|
||
|
||
|
||
//通用评判扣分代码
|
||
#define MARK_SUB2_COMM_01 "01"
|
||
#define MARK_SUB2_COMM_02 "02"
|
||
#define MARK_SUB2_COMM_03 "03"
|
||
#define MARK_SUB2_COMM_04 "04"
|
||
#define MARK_SUB2_COMM_05 "05"
|
||
#define MARK_SUB2_COMM_06 "06"
|
||
#define MARK_SUB2_COMM_07 "07"
|
||
#define MARK_SUB2_COMM_08 "08"
|
||
#define MARK_SUB2_COMM_09 "09"
|
||
#define MARK_SUB2_COMM_101 "101"
|
||
#define MARK_SUB2_COMM_102 "102"
|
||
#define MARK_SUB2_COMM_103 "103"
|
||
#define MARK_SUB2_COMM_104 "104"
|
||
#define MARK_SUB2_COMM_105 "105"
|
||
#define MARK_SUB2_COMM_106 "106"
|
||
#define MARK_SUB2_COMM_107 "107"
|
||
#define MARK_SUB2_COMM_108 "108"
|
||
#define MARK_SUB2_COMM_109 "109"
|
||
#define MARK_SUB2_COMM_11 "11"
|
||
#define MARK_SUB2_COMM_110 "110"
|
||
#define MARK_SUB2_COMM_111 "111"
|
||
#define MARK_SUB2_COMM_112 "112"
|
||
#define MARK_SUB2_COMM_113 "113"
|
||
#define MARK_SUB2_COMM_114 "114"
|
||
#define MARK_SUB2_COMM_115 "115"
|
||
#define MARK_SUB2_COMM_116 "116"
|
||
#define MARK_SUB2_COMM_20 "20"
|
||
#define MARK_SUB2_COMM_201 "201"
|
||
#define MARK_SUB2_COMM_202 "202"
|
||
#define MARK_SUB2_COMM_21 "21"
|
||
#define MARK_SUB2_COMM_301 "301"
|
||
#define MARK_SUB2_COMM_33 "33"
|
||
#define MARK_SUB2_COMM_40 "40"
|
||
#define MARK_SUB2_COMM_41 "41"
|
||
#define MARK_SUB2_COMM_42 "42"
|
||
#define MARK_SUB2_COMM_43 "43"
|
||
#define MARK_SUB2_COMM_81 "81"
|
||
#define MARK_SUB2_COMM_91 "91"
|
||
#define MARK_SUB2_COMM_92 "92"
|
||
#define MARK_SUB2_COMM_94 "94"
|
||
#define MARK_SUB2_COMM_95 "95"
|
||
#define MARK_SUB2_COMM_96 "96"
|
||
#define MARK_SUB2_COMM_97 "97"
|
||
|
||
|
||
|
||
|
||
#endif // HBEAN_H
|