#ifndef OCC_SIMULATETRAIN_NET_MESSAGE_DEFINE_HEADER_FILE #define OCC_SIMULATETRAIN_NET_MESSAGE_DEFINE_HEADER_FILE //虚拟车///////////////////////////////////////////////////////////////////////////// #define SIMULATETRAIN_TRACK_Occupied 60001 #define CMD_SIGNAL_CBTC_STOPTRAIN 6100 //停稳标志 #define CMD_SIGNAL_CBTC_TURNBACKFLAG 6101 //折返标志 #define CMD_SIGNAL_CBTC_OPENTRAINDOOR 6102 //开门标志 #define CMD_SIGNAL_CBTC_EMER_STOP 6103 //紧急停车标志(修改紧急停车) //#define CMD_SIGNAL_CBTC_REAL_DATA 6103 //紧急停车标志 #define SIGNAL_NUM 20 #define NET_STATIONNUM 10 #define STATIONTIMETABLEDATANUM 4 //时刻表对应内容个数 #define STATIONPEPLEDATANUM 3 //车站人数控制内容个数 #define SHIELDDOORNUM 96 #define LIMITSPEEDTRACKNUMFORCLIENT 20 #define TRAINBODDYMAXNUM 50 #define MAINCONTROLROUTEINFONUM 100 #define LevelCBTC 0 //CBTC列车 #define LevelBM 1 //点式ATP列车 #define LevelCBI 2 //联锁等级 #define LevelNone 3 //级别未知 #define Ctrl_RM 0 #define Ctrl_EUM 1 #define Ctrl_ATP 2 #define Ctrl_ATB 3 #define Ctrl_ATO 4 #define Ctrl_None 5 #define LENGTH_TYPEA 24 //满足8字节对齐方式 //视景协同发送给行调的命令 #define View_To_XD_Cmd_EmergencyStopButton 1 //站台紧急停车按钮按下或抬起:nIntPara[0]:区段号,nIntPara[1]:方向:1向右2向左nIntPara[2]:按下抬起状态(1:按下0:抬起) typedef struct tag_date { BYTE year; //只取后两位(如2013即为13) BYTE month; BYTE day; }CIRDATE, *LPCIRDATE; typedef struct tag_time { BYTE hour; BYTE minute; BYTE second; }CIRTIME, *LPCIRTIME; typedef struct tag_DATE_TIME { CIRDATE date; CIRTIME time; }DATE_TIME; enum REGIST_TYPE { REGISTER = 0, //注册 CANCEL = 1 //注销 }; typedef struct tagCoursetoCIR : public tgBaseNetPacket { UCHAR szLineName[32]; //线路名称 ---- 根据线路读出来的,格式是: 京哈线 北京--哈尔滨 UCHAR szTrainNo[7]; //车次号 ---- 教员给定车次号,用于自动注册 UCHAR ucNeedRegist; //自动/手动注册车次号标识 --- 车次号注册分手动和自动,这里是主控里增加了一个配置项配置的,1--自动注册,0--手动注册 int nTailNo; //列尾编号 --- 列尾编号用于机车,动车无列尾,增加一个配置项或者默认一个编号就行,一个6位整形数字 UCHAR ucNetType; //网络制式0~100属于450M频率,101属于G网,102及以后属于800M频率 --- 网络制式是由线路决定,这里建议把这个作为线路数据中的一个设备看待,因为一条线路可能存在多种制式 UCHAR ucReserve1; //预留1 UCHAR ucReserve2; //预留2 UCHAR ucReserve3; //预留23 /*tagCoursetoCIR() { memset(this, 0, sizeof(tagCoursetoCIR)); }*/ }CoursetoCIR,*LPCoursetoCIR; //CIR注册车次号的结构 typedef struct tagRegistTrainNo : public tgBaseNetPacket//CIR注册车次号的结构 { BYTE regist; //注册或者注销 0注册 1注销 BYTE type; //本务机 0x30 char szTrainNo[7]; //车次号 char szLocoNo[8]; //机车号 BYTE erroecode; //错误代号 /*tagRegistTrainNo() { memset(this, 0, sizeof(tagRegistTrainNo)); }*/ }RegistTrainNo,*LPRegistTrainNo; enum REGIST_RESULT //注册结果代码反馈 { REGIST_SUCCESS = 0, //注册成功 REGIST_SERVICE_INVALID = 1, //业务无效 REGIST_FUNCTION_INVALID = 2, //功能号非法 REGIST_FUNCTION_IN_USE = 3, //功能号已被其他用户注册 REGIST_OTHER_FAILED = 4 //其他原因 }; //列车功能类型 enum eTrainFuncType { eTrainFuncType_Real = 1, //真车 eTrainFuncType_CoupleVT = 2, //联挂虚拟车 eTrainFuncType_MeetingVT = 3, //会车虚拟车 eTrainFuncType_CollisionVT = 4, //列车冲突虚拟车 eTrainFuncType_Invalid = 0 }; //定义:调度命令回执 typedef struct tag_CALLBACK_TRANS : public tgBaseNetPacket { BYTE code; //信息名称 BYTE functionCode; //功能码信息名称 DATE_TIME date_time; //BCD 码 CHAR train_sn[7]; //车次号 CHAR train_id[8]; //机车号 BYTE commander_num; //发令处所编号 CHAR tran_command_num[6]; //调度命令信息编号 BYTE gong_li_biao[3]; //签收地点公里标 BYTE gps_long[5]; //签收地点卫星定位系统经度 BYTE gps_lat[4]; //签收地点卫星定位系统纬度 BYTE unused[5]; //预留5个字节 BYTE pg; //包号 }CALLBACK_TRANS,*LPCALLBACK_TRANS; #define CIR_REGINFO_TYPE_TRAINNUM 0x01 //train number is available #define CIR_REGINFO_TYPE_TRAINID 0x02 //train ID is available #define CIR_REGINFO_TYPE_REGIN 0x00010000 //registrationoperation typedef struct tagPRAM_CIR_REGINFO_RSP : public tgBaseNetPacket { __int32 nFlags; //组合定义 BYTE szTrainNum[16]; BYTE szTrainID[48]; }PRAM_CIR_REGINFO_RSP,*LPPRAM_CIR_REGINFO_RSP; typedef struct gMAXNETSTRUCT : public tgBaseNetPacket { char maxinfo[1000]; bool operator ==(gMAXNETSTRUCT &other) { if(memcmp(maxinfo,other.maxinfo,1000) == 0) { return true; } return false; } }MAXNETSTRUCT,*LPMAXNETSTRUCT; typedef struct tag_cmd_data : public tgBaseNetPacket { BYTE cmdType; BYTE sendDate[3]; BYTE createTime[3]; BYTE sendTime[3]; BYTE trainNum[7]; BYTE trainID[8]; BYTE cmdForm; BYTE cmdNum[6]; BYTE dispatcher[8]; BYTE cmdStatus; BYTE defdate[5]; BYTE totalPack; BYTE packNum; CHAR buffer[900]; /*tag_cmd_data() { memset(this, 0, sizeof(tag_cmd_data)); }*/ bool STR2BCD(CHAR *pASCII, CHAR *pBCD) { if (pASCII == NULL || pBCD == NULL) return false; size_t len = 0; size_t count = strlen(pASCII); for (size_t index = 0; index < count; ++index) { len = index >> 1; if (index % 2 == 0) pBCD[len] = (pASCII[index] << 4) & 0xF0; else pBCD[len] = pBCD[len] | (pASCII[index] & 0x0F); } return true; } void SetDateTime(CIRDATE date, CIRTIME time) { CHAR buffer[20] = { 0 }; //sprintf_s(buffer, "%02d%02d%02d%02d%02d%02d%02d%02d%02d", date.year, date.month // , date.day, time.hour, time.minute, time.second, time.hour, time.minute, time.second); sprintf(buffer, "%02d%02d%02d%02d%02d%02d%02d%02d%02d", date.year, date.month , date.day, time.hour, time.minute, time.second, time.hour, time.minute, time.second); STR2BCD(buffer, (CHAR *)sendDate); } void SetTrainNum(const char *number) { memset(trainNum, 0x20, 7); for (int index = 0; index < 7; ++index) { if (number[index] == '\0') break; trainNum[index] = number[index]; } } void SetTrainID(CHAR *id) { if (id == NULL || id[0] == 0x00) return; memcpy(trainID, id, 8); } void SetCMDNum(int cmdID) { CHAR buffer[7] = { 0 }; //sprintf_s(buffer, "%06d", cmdID); sprintf(buffer, "%06d", cmdID); memcpy(cmdNum, buffer, 6); } void SetDispatcher(const char *name) { memset(dispatcher, 0x20, 8); size_t len = strlen(name); if (len > 6) len = 8; memcpy(dispatcher, name, len); } void SetPack(BYTE total, BYTE curPack) { totalPack = total; packNum = curPack; } void SetCmdContext(int type, unsigned char stationID, const char* station, char* context) { cmdType = type; cmdForm = stationID; std::string Str_CmdName = ""; switch (cmdType) { case 0x01: Str_CmdName = "调度命令"; break; case 0x02: Str_CmdName = "路票"; break; case 0x03: Str_CmdName = "绿色许可证"; break; case 0x04: Str_CmdName = "红色许可证"; break; case 0x05: Str_CmdName = "出站调车跟踪通知书"; break; case 0x07: Str_CmdName = "列车进路预告信息"; break; case 0x11: Str_CmdName = "调车作业通知单"; break; case 0x12: Str_CmdName = "调车请求确认"; break; case 0x18: Str_CmdName = "其它信息"; break; case 0x20: Str_CmdName = "出入库检测"; break; default: Str_CmdName = "其它信息"; break; } //sprintf_s(buffer, 900, "%s\r\n%s\r\n%s\r\n", Str_CmdName.c_str(), station, context); sprintf(buffer, "%s\r\n%s\r\n%s\r\n", Str_CmdName.c_str(), station, context); } int GetValidLen() { size_t len = strlen((CHAR *)buffer); if (len > 900) len = 900; return (int)(48 + len); } }CIRCMDDATA, *LPCIRCMDDATA; //移动授权 typedef struct tgSimulateTrainCBTCMA : public tgBaseNetPacket { int lineid; //当前最远授权对应的线路段id float exute; //当前最远授权对应的线路段偏移 }SIMULATATRAINCBTCMA,*LPSIMULATATRAINCBTCMA; //虚拟列车轨道电路码更新 typedef struct tgSimulateTrainCode : public tgBaseNetPacket { int codea ; //当前正常显示码 int codeb ; //下一个正常显示码 int codeall[TRAINNUM_LEN]; //codeall[0]:代表当前正常运行计算码codeall[1]:代表当前正常运行计算码codeall[2]:当前发送码载频方向codeall[3]:不同载频对应码 codeall[4]:当前轨道下一个闭塞分区的码序(新添加) char codeinfo[TRAINNUM_LEN]; }SimulateTrainCode,*LPSimulateTrainCode; //虚拟车实时数据更新 typedef struct tgSimulateTrainUpdate : public tgBaseNetPacket { int trainID; //列车号 int NoceCircuitryID; //列车当前所在轨道电路编号 float NoceCircuitryExute; //列车在当前轨道电路上的偏移 int NoceLineSecID; //列车当前所在线路段编号 float NoceLineSecExute; //列车在当前线路段上的偏移 int RunArrow; //运行方向 int NowTime; //当前时间 int AlreadyRuntime; //已运行时间 float NoceSpeed; //列车当前速度 float A; //当前加速度 char TrainNum[TRAINNUM_LEN]; //车次号 int Net_V; //网压 int TrainEndPosLineSecID; //列车尾端线路段编号 float TrainEndPosLineSecExcur;//列车尾端线路段偏移 float PowerRate; //功率(电调用) float NoceLimitSpeed; //当前列车限速 int MainCtrID; //主空号 没有为-1 int nTrainEqpmentState; //列车设备状态【0:正常 1:轻微故障 2:严重故障 101:无法动车】 int nTrainElectryState; //列车电力状态 int Electricbow; //受电弓 int trainstoplefttime; //列车停站时间 int trainlatetime; //列车晚点时间 }SIMULATETRAINUPDATE,*LPSIMULATETRAINUPDATE; typedef struct tgSimulateTrainInfoUpdate : public tgBaseNetPacket { int trainid; //列车编号 char TrainNum[TRAINNUM_LEN]; //车次号(用于确定当前列车唯一运行的内容,老车次号沿用.) int trainnum; //车组号 int signalrunnum; //单程号 int servicenum; //服务号 int trainrunmode; //列车运行类型,人工,头马,目的地 int availablerunarrow; // int destionationid; //目的地号 int chauffeurnum; //司机号 int activestation; //当前车站 int trainatsmodel; //列车跟踪模式 int atpstatus; //atp状态 int stopstationstatus; //停站状态 int runmodel; //运行模式(驾驶模式) int atcstatus; //atc状态(1:ATC切除,0:ATC没有切除) int stationstoptrainstatus; //列车在车站的停车状态 int runarrow; //列车运行方向 int destinationnum; //列车的目的地码 int intendingstationplat; //预计到达车站id int intendinggettime; //预计到达时间 int factstationplat; //实际到达车站id int factgetttime; //世纪到达时间 int intendingleavingstationplat;//预计离开车站id int intendingleavingtime; //预计离开时间 int factleavingstationplat; //实际离开车站id int factleavingtime; //预计离开时间 char Register_TrainNum[TRAINNUM_LEN]; //CIR注册的车次号 int Stop_SteadyFlag; //列车停稳标记 }SimulateTrainInfoUPDATE,*LPSimulateTrainInfoUPDATE; typedef struct tgSimulateTrainInfoUpdateB :public tgBaseNetPacket //与国铁合并时调整了部分属性的顺序 { int trainid; //列车编号 int holdtrainflag; //扣车标志 int conkoutflag; //列车故障标志 int nEmergencyStopFlag; //紧急停车标志 int escipedoorstatus; //逃生门状态 int stopto; //停车到? int evacuatestatus; //疏散状态 int nComletePropertyFlag; //列车完整性 int concatenation; //连续状态 int skipstationflag; //跳停标志 int traindoorstatus; //列车车门状态 int clickflag; //列车冲突标志 int commulacateState; //列车通迅状态(1:正常,0:故障)——新添加 BYTE szTrainID[48]; //机车号 int nTrainPosFlag; //列车定位状态 BOOL bTrainDelFlag; //列车删除标记(TRUE:删除标记,FAlSE:未删除) int nTID; //列车追踪号 added by zhangjiahua char cTrainB_AnotherName[50];//车型别名 }SimulateTrainInfoUpdateB, * LPSimulateTrainInfoUpdateB; //主控发给虚拟车实时数据 typedef struct tagMainControlTrainData { int trainID; //列车号 int nSegID ; //线路段编号 float ffloat; //列车在线路段偏移 int bTrainDirection;//车头方向 float nocespeed; //列车当前速度 float Power; //列车功率 int trainlevel; //列车运行模式 int controlmode; //列车的控制模式 int num; //发送计数 }MAINCONTROLTRAINDATA,*LPMAINCONTROLTRAINDATA; typedef struct tagINFOSIGNCONTROLINFO { int infosignid; //id int coukoutflag; //故障状态 0正常 1:故障 int intinfo[10]; float floatinfo[10]; double doubleinfo[10]; char charinfo[200]; }INFOSIGNCONTROLINFO,*LPINFOSIGNCONTROLINFO; typedef struct tgDELETEXIETONGTRAIN { int trainid; //列车编号 }DELETEXIETONGTRAIN,*LPDELETEXIETONGTRAIN; typedef struct tgGT_Llineinfo { int lineid; //线路段编号 int status[20]; //0代表线路段占用状态(111占用 110出清) bool statusb[20]; float statusc[20]; }GT_Llineinfo,*LPGT_Llineinfo; //行调更新线路段相关数据 typedef struct tgClineInfoFromOCC_XD { int nSegID; //唯一编号 int nOccupy; //占用状态 int nPara_Int[10]; //整形参数 float fPara_Float[10]; //浮点参数【0:系统临时限速,其他:预留】 char cPara_Char[TRAINNUM_LEN]; //字符参数 }ClineInfoFromOCC_XD,*LPClineInfoFromOCC_XD; //主控发给虚拟车实时数据 typedef struct tagMainControlTrainDataALL { int trainID; //列车号 int nSegID ; //线路段编号 float ffloat; //列车在线路段偏移 int bTrainDirection; //车头方向 float nocespeed; //列车当前速度 float Power; //列车功率 int trainlevel; //列车运行模式 int controlmode; int num; //发送计数 int traintype; //列车类型 int beginendflag; //1代表开始 0代表结束 int traininfo[10]; //备用 float trainfloatinfo[10]; //备用 double traindoubleinfo[10]; //备用 char traincharinfo[200]; //备用 }MAINCONTROLTRAINDATAALL,*LPMAINCONTROLTRAINDATAALL; typedef struct tgMaincontrolRes : public tgBaseNetPacket { int train_id; //列车编号 int loc_segs[5]; //列车占压的线路段序列(车头至车尾) float loc_head_offset; //车头偏移 float loc_tail_offset; //车尾偏移 int direction; //运行方向 int time; //当前时间 float speed; //速度 float acceleration; //加速度 char train_num[TRAINNUM_LEN]; //车次号 int voltage; //网压 }MAINCONTROLRES,*LPMAINCONTROLRES; //主控接管列车命令 typedef struct tgMaincontrolOrder { int TrainID; int nMCType; //【本公司|外公司】 }MAINCONTROLORDER,*LPMAINCONTROLORDER; //点式ATP虚拟车数据更新 typedef struct tgSimulateTrainUpdate_iATP : public tgBaseNetPacket { int trainID; //列车号 int Nowtime; //当前时间 int NoceCircuitryID; //列车当前所在轨道电路编号 int RunArrow; //运行方向 int Early_Latetime; //早晚点时间 char TrainNum[TRAINNUM_LEN]; //列车车次号 }SIMULATETRAINUPDATE_iATP,*LPSIMULATETRAINUPDATE_iATP; //虚拟车跟踪标识符更新 typedef struct tgSimulateTrainTrackFlagUpdate: public tgBaseNetPacket { int TrainID; //列车号 int TrackFlag; //跟踪标识符//矩形框 }TRACKFLAGUPDATE,*LPTRACKFLAGUPDATE; //虚拟车目的地码更新 typedef struct tgSimulateTrainDesNoUpdate: public tgBaseNetPacket { int TrainID; //列车号 int DestinationNo; //列车目的地码 }DESNOUPDATE,*LPDESNOUPDATE; typedef struct tgSimulateTrainStopStation : public tgBaseNetPacket { int type; //代表:停车 、屏蔽门控制指令等 bool StopInfo; //列车停车对标的消息 bool data1; //打开屏蔽门指令 bool data2; //关闭屏蔽门指令 int data3; //列车紧急制动标志0:未紧急 1:紧急 int data4; //车门关好状态 0:代表未关好 1:代表关好 int data5; //开左右门标志1:左门 2:右门 float data6; float data7; float data8; }SimulateTrainStopStation,*LPSimulateTrainStopStation; //轨道电路占用状态更新 typedef struct tgTrackcirstateUpdate: public tgBaseNetPacket { int TrackID; //轨道电路编号 int TrackOccupiedState; //轨道电路占用状态 int CounterOccupiedState; //计轴器占用状态 int Direction; //该轨道上列车运行方向 int Early_Latetime; //该轨道上列车早晚点时间 int codea; //码 int codeb; char codeinfo[TRAINNUM_LEN]; char TrainNum[TRAINNUM_LEN]; //该轨道上列车车次 int coukoutsatus; //故障状态 如atc切除,计轴轨道电路故障等(列车追踪类型) int data1; //代表1(true)代表棕光带 0(false) 正常(1:ATC切除,0:ATC正常) int data2; //区段跟踪切除【1:切除,0:激活】 int data3; //故障占用标记【1:是 0:否】 int data4; int data5; int data6; int data7; //NOTE:部分模块用作逻辑占用 int data8; //计轴复位状态 int data9; //列车停稳标志(1:停稳,0:没有停稳)[NOTE:部分模块用作故障占用标识,后续移动至data3] int virtuallinenum; //虚拟小区段个数 char virtualline[20]; //虚拟小区段 轨道电路中对应编号 char virtuallinestatus[20]; //虚拟小区段状态 }TRACKCIRCUITRYUPDATE,*LPTRACKCIRCUITRYUPDATE; //ATS发送至联锁的排路命令 typedef struct tgRouteOrder_LS: public tgBaseNetPacket { int beginsignalid; int RouteId; //排fleeting进路时发送接近轨道电路ID 排侧线进路时发始端信号机编号 int Stationid; int IsCBTCRoute; //是否为CBTC进路(1:是CBTC进路,0不是CBTC进路) char TrainNum[TRAINNUM_LEN]; int nIsTurnBackRoute; //是否为折返进路(1:是 0:不是) int nIsSetTurnBack; //是否设置折返 added by zhangjiahua int nOverLapRouteID; //延续防护进路编号 }ROUTEORDER,*LPROUTEORDER; //ATS发送至联锁的列车CBTC进路命令 typedef struct tgRouteCmd2LS_TrainC : public tgBaseNetPacket { int nTrainID; //列车ID int nDirect; //列车方向 int nSegCnt; //区段数量(进路) int nSegList_R[50]; //区段列表(进路) }ROUTECMD2LS_TRAINC,*LPROUTECMD2LS_TRAINC; //更新车站数据 typedef struct tgStation_Updata :public tgBaseNetPacket { int StationID; int UpdataType; int RouteMode; //进路模式 int nStaIndLCWATS; //控制转换开关(ATS\LCW 控制 开关) int CommunicationState; //通信状态(ATS) int nStaIndValidateMode; //联锁验证模式 int ControlPope; //车站权限 int RequestControlMode; //车站请求的控制模式 int PlatFormID; //显示站台编号 int EmergencyStopState; //紧急停车状态 int HoldTrainState; //扣车状态 int TurnBackMode; //折返模式 int FireAlarmState; //火灾状态 int AlarmSigFilaWarn; //信号机灯丝报警 int RequestCtrlSys; //请求控制系统(主要是车站还是调度) int VersaGame; //变通策略编号 int nUnLockFaultStatus; //车站联锁状态 int nAllStaBlock; //全站封锁状态 int nPowerLock; //上电锁闭 int nAxleCntReset; //计轴复位 int nStaATS_Fault; //车站ATS故障 int nCurCtrlUserID; //当前控制用户ID int nRequestUserID; //请求控制用户ID int nTrainTestStatus; //洗车状态 added by zhangjiahua int nAllStaForceLight; //全站点灯状态,之前名称为:nAllStaOpenSig int nSendPlanSTAstate; //车站接收计划状态 int nPlanCtrl; //计划控制 int nAllowReturnFlag; //允许转回标记 int nFZComWithInterLock; //自律机与联锁通信 int nEmerCtrlBtnStatus; //非常站控按钮状态 int nPowerSupply; //车站电源状态 int nAutoStopTrain; //车站自动停车【自动停车:看信号 非自动停车:不看信号】 }STATION_UPDATA,*LPSTATION_UPDATA; //更新集中站3 typedef struct tgCenSta_Updata3 :public tgBaseNetPacket { int nCenStaID; //集中站编号 int nSignalSysMode; //信号模式:(原名:nSignalMode) int nAxleCntPreResetEnable; //计轴预复位使能 int nIntPara[20]; //0:信号系统切换进程,1:SCOM故障状态,2:MEI故障,3:MAU故障,4:MAU重启状态,5、SCOM重启状态,其他:预留Int float fFloatPara[20]; //预留Float }CENSTA_UPDATE3,*LPCENSTA_UPDATE3; typedef struct tgROUTEINT : public tgBaseNetPacket { int index; int segID; float offset; int num; int signalid[SIGNAL_NUM]; }ROUTEINT,*LPROUTEINT; typedef struct tgTrainEndLinePs : public tgBaseNetPacket { int lineid; //目标线路段id float excuse; //目标线路段偏移 float limiespeed; //目标限速 int stationstoplineid; //到车站停车线路段id float stationstopexcuse; //对应偏移 int skipstationstatus; //当前列车跳停状态 int stationholdtrainstatus; //当前车站扣车状态 int sendtrainimmediately; //提前发车状态 int trainrungrade; //列车运行等级 int stationtrainslimit; //车站区间列车限制 int stationclearpeople; //车站清客状态 int data1; //停站时间 int data2; //折返标志 int data3; //掉头标志 int data4; //扣车标志 int data5; //无限状态标志 int data6; //对应屏蔽们状态 int data7; //发车时间 int data8; //下一站 int data9; //终点站 float data10; //暂无 float data11; //代表rbc是否连接上 float data12; //信号机颜色 float data13; //允许atb标志 }TrainEndLinePs,*LPTrainEndLinePs; typedef struct tgTrainEndLinePs_DC : public tgBaseNetPacket { int lineid; //目标线路段id float excuse; //目标线路段偏移 float limiespeed; //目标限速 int stationstoplineid; //到车站停车线路段id float stationstopexcuse; //对应偏移 int skipstationstatus; //当前列车跳停状态 int stationholdtrainstatus; //当前车站扣车状态 int sendtrainimmediately; //提前发车状态 int trainrungrade; //列车运行等级 int stationtrainslimit; //车站区间列车限制 int stationclearpeople; //车站清客状态 int data1; //停站时间 int data2; //折返标志 int data3; //掉头标志 int data4; //扣车标志 int data5; //无限状态标志 int data6; //对应屏蔽们状态 int data7; //发车时间 int data8; //下一站 int data9; //终点站 float data10; //暂无 float data11; //代表rbc是否连接上 float data12; //信号机颜色 float data13; //允许atb标志 int nTimeToNextSta; //到下站的区间停站时间 float fDistanceToPreTrain; //距离前车的距离 float fDistanceToNextTrain; //距离后车的距离 }TrainEndLinePs_DC,*LPTrainEndLinePs_DC; typedef struct tgTIMETABLEINIT : public tgBaseNetPacket { int index; int stationnum; int data[NET_STATIONNUM][STATIONTIMETABLEDATANUM]; //data[A][B] B=0代表车站id B=1代表到站时间 B=2代表发车时间 }TIMETABLEINIT,*LPTIMETABLEINIT; typedef struct tgPEOPLEINIT : public tgBaseNetPacket { int index; int stationnum; int data[NET_STATIONNUM][STATIONPEPLEDATANUM]; //data[A][B] B=0代表车站id B=1代表上车人数 B=2代表下车人数 }PEOPLEINIT,*LPPEOPLEINIT; typedef struct tgInitTest : public tgBaseNetPacket// { int data[10]; }INITTEST,*LPINITTEST; typedef struct tgSys_ShijingXietong : public tgBaseNetPacket// { int ViewSysID; }Sys_ShijingXietong,*LPSys_ShijingXietong; typedef struct tgEventToUnityReal : public tgBaseNetPacket { int nID; //事件编号 UCHAR Type; //事件类型 UCHAR SubType; //事件子类型 UCHAR ucDestination; //事件目的地 UCHAR rank; //事件难度 int lParameter[4]; //整形参数 UCHAR ucParameter[8]; //字符参数 double dParameter[10]; //浮点参数 }EventToUnityReal,*LPEventToUnityReal; typedef struct CarInfo { short bType; //车型 short bNum; //数量 unsigned char bVacate; //是否是空车(空车:true ; 重车:Flase) unsigned char bShutDownCar; //是否是关门车(关门车:true ; 非关门车:Flase) unsigned char blocomotive; //是机车还是车辆(机车:true ; 车辆:Flase) }CARINFO,*LPCARINFO; //列车编组信息 typedef struct tgMainMarshalling : public tgBaseNetPacket { int nSize; //步长CarInfo大小 int nTrainID; //车ID char TrainNum[TRAINNUM_LEN]; //车次号 int nNum; //编组数 CarInfo pCarInfo[TRAINBODDYMAXNUM]; }MAINMARSHALLING,*LPMAINMARSHALLING; typedef struct tgLimitSpeedInfo : public tgBaseNetPacket { short num; short lineid[35]; char limitspeed[35]; }LimitSpeedInfo,*LPMLimitSpeedInfo; typedef struct tgLimitSpeedInfoForInfoSignOfGT : public tgBaseNetPacket { int infosignid; short pagenum; short thispagenum; int lineid; }LimitSpeedInfoForInfoSignOfGT,*LPLimitSpeedInfoForInfoSignOfGT; typedef struct tgMainControlOntimeInfoB : public tgBaseNetPacket { int nRouteOpenFlag; //进路状态--1:进路开放 0:进路取消 int nRouteLimitType ; //进路类型 -- 1:侧线18号道岔的进,出站进路 2:侧线12号道岔的进,出站进路 3:正线进路 4:引导进路 int nSegCnt; //有效数组大小 int SegID[MAINCONTROLROUTEINFONUM]; //对应区段 int nReverseSegCnt; //反向区段个数 int SegReseveID[MAINCONTROLROUTEINFONUM]; //对应反向线路段id int IntInfo[10]; //intinfo[0]:代表反向进路标志 1反向 0正向 }MainControlOntimeInfoB,*LPMainControlOntimeInfoB; typedef struct tgMainControlOntimeInfo : public tgBaseNetPacket { bool arrowroutflag; //该方向进路建立标示 没有建立进路为false int arrowroutid; //该方向进路号 没有建立进路为-1 bool flag1; bool flag2; bool flag3; bool flag4; bool flag5; int paramint1; int paramint2; int paramint3; int paramint4; int paramint5; int paramint6; int paramint7; int paramint8; int paramint9; int paramint10; float paramfloat1; float paramfloat2; float paramfloat3; float paramfloat4; float paramfloat5; float paramfloat6; float paramfloat7; float paramfloat8; float paramfloat9; float paramfloat10; char paraminfo1[25]; char paraminfo2[25]; char paraminfo3[25]; char paraminfo4[25]; char paraminfo5[25]; }MainControlOntimeInfo,*LPMainControlOntimeInfo; typedef struct Onboard_TempLimit { int SegID; //区段 NOTE:之前为long,国产化后修改为int float limit; //限速 }ONBOARDTEMPLIMIT,*ONBOARDLPTEMPLIMIT; //临时限速状态更新 typedef struct tgTEMPSPEEDLIMITFroMain: public tgBaseNetPacket { int SegNUM; //临时限速数组大小 ONBOARDTEMPLIMIT pTempLimit[50]; //临时限速数组 没有临时限速为-1 }TEMPSPEEDLIMITFroMain,*LPTEMPSPEEDLIMITFroMain; //临时限速给客户段 typedef struct tgTEMPSPEEDLIMITToClinet: public tgBaseNetPacket { int SegNUM; //临时限速数组大小 int trackid[LIMITSPEEDTRACKNUMFORCLIENT]; //临时限速数组 没有临时限速为-1 short speed[LIMITSPEEDTRACKNUMFORCLIENT]; //临时限速数组 没有临时限速为-1 short status[LIMITSPEEDTRACKNUMFORCLIENT]; //临时限速数组 没有临时限速为-1 char Reason[LENGTH_TYPEA]; //限速原因 int beginkilo; //开始公里标 int endkilo; //结束公里标 char csinfoa[LENGTH_TYPEA]; //限速命令号 char csinfob[LENGTH_TYPEA]; char csinfoc[LENGTH_TYPEA]; int paraminta; int paramintb; int paramintc; float paramfloata; float paramfloatb; float paramfloatc; }TEMPSPEEDLIMITToClinet,*LPTEMPSPEEDLIMITToClinet; //给行调发送的计划检查命令 typedef struct tgPlanCheckAlarm : public tgBaseNetPacket { int Level; //告警级别 int StationID; //车站编号 char AlarmMsg[255]; //报警内容 }PLANCHECKALARM,*PPLANCHECKALARM; typedef struct tgXD_Ontimerdata : public tgBaseNetPacket { int curtime; //当前时间 【仿真时间(单位:秒)】 int int1; //当前时间 【系统时间(单位:秒)】 int int2; //当前日期 【例:20230809表示2023年8月9号】 int int3; //星期 【-1:无效,0:星期日,1:星期1,2:星期2 ...】 int int4; //训练倒计时【单位:秒,-1:无效】 int int5; //预留 bool tmpbool[20]; //预留 float fTmpFloat[10]; //预留【0:快进倍数,其他:预留】 char tmpchar[40]; //预留 }XD_Ontimerdata,*LPXD_Ontimerdata; //列车前方设备信息 typedef struct tgTrainFrontEqmptInfo : public tgBaseNetPacket { int nFrontSignalID; //前方信号机编号 int nFrontSignalColor; //前方信号机颜色 }TrainFrontEqmptInfo,*LPTrainFrontEqmptInfo; typedef struct tgMCShieldDoor : public tgBaseNetPacket { bool status[SHIELDDOORNUM]; }MCShieldDoor,*LPMCShieldDoor; //主控列车-设置定速 typedef struct tgMAINCTRLTRAIN_SETSPEED :public tgBaseNetPacket { __int32 nSetSpeedMode; //是否定速运行, 1-定速, 0-取消定速 __int32 nSpeed; //设定速度 }MAINCTRLTRAIN_SETSPEED; typedef struct tgViewUpdataEquipment_new : public tgBaseNetPacket { int none; int noneb; int equipmentid; int status; }ViewUpdataEquipment_new,*LPViewUpdataEquipment_new; //救援车信息 typedef struct tgRescueTrainInfo : public tgBaseNetPacket { int nTrainID; //救援车ID int nSysID; //系统ID float fDis; //到本车的距离 int nLineSecID; //区段编号 float fLineSecOff; //区段偏移 }RESCUE_TRAIN_INFO,*LPRESCUE_TRAIN_INFO; //发送时刻表信息 typedef struct tgTimeTabInfo : public tgBaseNetPacket { int nJourneyID; //单程号 int nPlanID; //计划号 int nLineID; //线路号 int nStaNum; //车站数量 int nStaID[50]; //车站编号 int nArriveTime[50]; //到达时间 int nLeaveTime[50]; //发车时间 char Str_TrainNum[50]; //车次号 }TimeTabInfo,*LPTimeTabInfo; //虚拟列车控制命令 typedef struct tgTrain_CtrlCmd : public tgBaseNetPacket { int nType; int nTrainID; int Int_Para[100]; float Float_Para[100]; }TRAIN_CTRLCMD, * LPTRAIN_CTRLCMD; //客户端向行调发送命令 typedef struct tgCMD_TO_TRAFFICCONTROL_SYS :public tgBaseNetPacket { int nType; //命令类型 int nInt_Para[20]; //整形参数 float fFloat_Para[20]; //浮点形参数 }CMD_TO_TRAFFICCONTROL_SYS,*LPCMD_TO_TRAFFICCONTROL_SYS; //车次窗向行调客户端发送命令结构体-第一包 typedef struct tgTrainWndDataUpdate :public tgBaseNetPacket { int nTrainGroupID; //车组号 int nJourneyID; //单程号 int nServerID; //服务号 int nXLID; //序列号 int nDestinationID; //目的地号 int nType; //类型 int nDriverID; //司机号 int nStaID; //车站号 int nTraceMode; //跟踪模式 int nATPCutFlag; //ATP切除标记 int nRunRank; //运行等级 int nRunStatus; //运行状态 int nStatus; //状态(计划状态:准点) int nPlanStopTime; //计划停站时间 int nPlanArriveStaID; //计划到达站 int nPlanArriveTime; //计划到达时间 int nPlanLeaveTime; //计划发车时间 int nRealStopTime; //实际停站时间 int nEndSendPlatFormID; //终端站发车站台 int nEndSendTime; //终端站发车时间 int nPreLeavePlatFormID; //预计发车站台 int nPreLeaveTime; //预计发车时间 int nPreArrivePlatFormID; //预计到达站台 int nPreArriveTime; //预计到达时间 int nTimeOfQJ; //区间运行时间 int nRunDir; //运行方向 int nEffectDriveMode; //有效驾驶模式 float fSpeed; //速度 int nATCStatus; //ATC状态 int nHoldTrainStatus; //扣车状态 int nSkipStopStatus; //跳停状态 int nDoorStatus; //车门状态 int nDriveMode; //驾驶模式 int nTrainDesID; //车载目的地号 int nRealArrivePlatFormID; //实际到达站台 int nRealArriveTime; //实际到达时间 int nRealLeavePlatFormID; //实际发车站台 int nRealLeaveTime; //实际发车时间 int nCmdLeavePlatFormID; //命令出站台 int nCmdLeaveTime; //命令出时间 int nCmdArrivePlatFormID; //命令到站台 int nCmdArriveTime; //命令到时间 int nCmdHoldTrain; //命令扣车 int nCmdDoorCtrl; //命令车门控制 int nDecrease; // int nEmergencyStop; //紧急停车 int nStopTo; //停站到 int nLifeDoor; //逃生门 int SSStatus; //疏散状态 int nWZX; //完整性 int nLXStatus; //连续性 int nAlarmStatus; //车辆报警状态 int nConflitStatus; //列车冲突状态 int nLaterTime; //早晚点时间 int nMainCtrlID; //主控系统号 //位置信息 int nHeadLineSecID; //头部线路段编号 float fHeadLineSecOff; //头部线路段偏移 int nTailLineSecID; //尾部线路段编号 float fTailLineSecOff; //尾部线路段偏移 int nHeadATPSecID; //车头ATP区段编号 int nTailATPSecID; //车尾ATP区段编号 //移动授权MA信息 int nMALineSecID; //移动授权区段编号 float fMALineSecOff; //移动授权区段偏移 float fMADistance; //移动授权距离 float fRouteLength; //剩余进路长度 float fBreakDis; //制动距离 float fATPLimitSpeed; //ATP限速 float fNet_V; //列车网压 //车站信息 int nNextStaID; //下一站 int nEndStaID; //终点站 //运行线及偏离信息 int nRunLineID; //运行线ID int nDisartRunLineID; //偏离-运行线ID int nDisartStartPlatFormID; //偏离-开始站台 int nDisartEndPlatFormID; //偏离-结束站台 int nRunType; //运行类型 int nAccElerate; //加速度/制动率 int nSerMode; //列车服务模式 int nUpdateViateValue; //更新偏差值 int nAssignShift; //待分配的班次 int nAssignRunLine; //待分配的运行线 int nStopSteadyFlag; //列车停稳标记 int nTrainNum; //列车车次号 char cTrainNum[50]; //车次号 }TRAINWND_DATAUPDATE,*LPTRAINWND_DATAUPDATE; //车次窗向行调客户端发送命令结构体-第二包 typedef struct tgTrainWndDataUpdate_2 :public tgBaseNetPacket { int nTrainWndID; //车次窗编号 int nTrainGroupID; //车组号 int nWakeUpOrSleepStatus; //唤醒/休眠状态 int nServiceType; //服务类型 int nDoorIsolate; //车门隔离状态 int nDoorAntiPinch; //车门防夹状态 int nDoorEmerRelease; //车门紧急解锁 int nDoorCommulate; //车门通信状态 int nEmerBreakType; //列车紧急类型 int nNeedAssinDesMan; //是否需要人工分配头码 int nSendRequest; //发车申请 int nMeasureWheelStatus; //较轮状态 int nAllowWakeUp; //允许唤醒 int nAllowSleep; //允许休眠 int nFAMAuthorize; //全自动驾驶授权 int nBeaboutToOutBound; //列车即将出库 int nSleepTimeCount; //休眠倒计时 int nBreakStatus; //车辆制动状态 int nElcBowStatus[2]; //受电弓状态 0:前弓 1:后弓 其他:预留 int nDriveCoverSlab[2]; //司机盖板 int nCarriageFireAlarm[16]; //火灾报警 int nPassengerEmerCall[16]; //乘客紧急呼叫 int nInsidePlanTrain; //是否计划内列车 int nPassengerEmerShake; //乘客紧急手柄 }TRAINWND_DATAUPDATE_2, * LPTRAINWND_DATAUPDATE_2; //高铁车次窗数据更新结构体 typedef struct tgHSRTrainWndDataUpdate :public tgBaseNetPacket { int nTrainWndID; //车次窗编号 int nTrainID; //列车ID int nDriverID; //司机号 int nStaID; //车站号 int nRunRank; //运行等级 int nRunDir; //运行方向 float fSpeed; //速度 int nLaterTime; //早晚点时间 int nMainCtrlID; //主控系统号 int nElcTrain; //电力机车 int nMachineID; //机车号 int nStopSteadyFlag; //停稳标记 int nTrainOccupyLost; //列车占用丢失 int nEmerTraceFlag; //紧追踪标记 int nTrainKind; //列车种类 int nTrainType; //列车(运行)类型 int nTrainWndType; //车次窗类型 //位置信息 int nHeadLineSecID; //头部线路段编号 float fHeadLineSecOff; //头部线路段偏移 int nTailLineSecID; //尾部线路段编号 float fTailLineSecOff; //尾部线路段偏移 //移动授权MA信息 int nMALineSecID; //移动授权区段编号 float fMALineSecOff; //移动授权区段偏移 float fMADistance; //移动授权距离 float fRouteLength; //剩余进路长度 float fBreakDis; //制动距离 float fATPLimitSpeed; //ATP限速 float fNet_V; //列车网压 //车站信息 int nNextStaID; //下一站 int nEndStaID; //终点站 char Str_TrainNum[25]; //车次号 int nTrainBodyCnt; //列车数量【编组】 int nTrainTaskType; //作业类型【列车|调车|停留】 }HSRTRAINWND_DATAUPDATE, * LPHSRTRAINWND_DATAUPDATE; //列车车次窗操作命令结构体定义 typedef struct tgTrainWndOperCmd : public tgBaseNetPacket { int nType; int nIntPara[10]; char Char_Para[50]; char Char_Para2[50]; }TRAINWND_OPER_CMD,*LPTRAINWND_OPER_CMD; //视景协同发送给行调系统的命令 typedef struct tgViewSysToXD_CMD : public tgBaseNetPacket { int nType; int nIntPara[10]; float fFloatPara[10]; }VIEW_CMD_TO_XD,*LPVIEW_CMD_TO_XD; //给评价的列车数据 typedef struct tgTrainDataToEvalue : public tgBaseNetPacket { int nTrainID; //列车编号 int nCurTrackID; //列车当前的轨道电路 int nNextTrackID; //列车下一段轨道电路 }TRAINDATA_TO_EVALUE,*LPTRAINDATA_TO_EVALUE; //信号给列车的数据 typedef struct tgSIGNAL_TO_TRAIN_DATA : public tgBaseNetPacket { int nTrainID; //列车编号 int nHoldTrainCmd; //扣车命令 int nDesStaID; //目的地站 int nLeaveStaID; //离站ID int nFrontStaID; //前方车站ID int nStaStopTime; //本站停站时间 int nSkipStopCmd; //跳停命令 int nNextStaID; //下站ID int nPSD_Status; //屏蔽门状态 int nMA_SegID; //移动授权LinkID int nZCStatus; //ZC状态 int nRunLevel; //运行等级 char Str_TrainNum[20]; //车次号 float fNet_V; //列车网压 float nMA_SegOff; //移动授权偏移 float fSpeed; //列车速度 int nStartLinkID; //起始区段 float fStartLinkOff; //起始区段偏移 int nStartDirect; //起始方向 float fMA_Distance; //到前方MA的距离 int nFront_LinkID[6]; //前方序列ID }SIGNAL_TO_TRAIN_DATA,*LPSIGNAL_TO_TRAIN_DATA; //真车发送给OCC的数据 typedef struct tgREALTRAIN_TO_OCC_DATA : public tgBaseNetPacket { int nTrainID; //列车编号 int nDir; //列车方向 int nLinkID; //区段号 float fLinkOff; //区段偏移 int nRunLevel; //运行等级 int nRunMode; //运行模式 float fSpeed; //列车速度 }REALTRAIN_TO_OCC_DATA,*LPREALTRAIN_TO_OCC_DATA; //更新ATP区段状态 typedef struct tgATPSecStatus_Update : public tgBaseNetPacket { int nCnt; //更新的ATP区段数量 int nID[50]; //编号列表 int nOccupyStatus[50]; //占用状态 int nOccupyTrainID[50]; //关联列车编号(占用) int nOccupyTrainDir[50];//关联列车方向(占用) }ATPSECSTATUS_UPDATE,*LPATPSECSTATUS_UPDATE; //更新ATP区段扩展状态信息 typedef struct tgATPSecExStatus_Update:public tgBaseNetPacket { int ATPSecID; int UpdateType; float fTempLimitSpeed; //ATP临时限速-限速值 float fCITempLimitSpeed; //CI临时限速 int UpdateStatus; //区段状态更新 int LogicOccupyStatus; //区段逻辑占用更新 int AxleCountResetStatus; //区段计轴预复位更新 int ATPSecConkOut; //区段故障状态 int LockStatus; //锁闭状态 int OccupyStatus; //区段占用更新 int nLineDisaster; //线路灾害 int nTmpLimitS_StartID; //ATP临时限速-起始区段 int nTmpLimitS_EndID; //ATP临时限速-结束区段 }ATPSECEXSTATUS_UPDATE,*LPATPSECEXSTATUS_UPDATE; typedef struct tgTrainDebugMsg : public tgBaseNetPacket { int nTrainID; //列车编号 float fSpeed; //列车速度 float fAcc; //列车加速度 float fRouteLength; //列车进路长度 float fMA; //列车移动授权 int nGK; //列车工况 int nJW; //列车级位 int nMaLineSecID; //列车MA区段号 float fMaLineOff; //列车MA区段偏移 }TrainDebugMsg,*LPTrainDebugMsg; //发送给视景协同的列车数据:新添加 typedef struct tgTRAINDATA2VIEWSYS : public tgBaseNetPacket { int nTrainID; //列车ID char Str_TrainNum[20]; //车次号 int nIntPara[10]; //预留整形参数 float fFloatPara[10]; //预留浮点参数 }TRAINDATA2VIEWSYS,*LPTRAINDATA2VIEWSYS; //发送给视景协同的列车数据:新添加 typedef struct tgMORETRAIN2VIEWSYS : public tgBaseNetPacket { int nTrainCnt; //列车数量 int nTrainID[30]; //列车编号 int nSegID[30]; //区段编号 float fSegOff[30]; //区段偏移 float fSpeed[30]; //速度 float fAcc[30]; //加速度 }MORETRAIN2VIEWSYS,*LPMORETRAIN2VIEWSYS; typedef struct tgCHANGEHEADCMD_TO_VIEWSYS : public tgBaseNetPacket { int nTrainID; //列车编号 int nIsShowScreen; //屏幕是否显示(0:不显示 1:显示) }CHANGEHEADCMD_TO_VIEWSYS, * LPCHANGEHEADCMD_TO_VIEWSYS; //防灾系统协议 typedef struct tgDisasterPrevent_SYS : public tgBaseNetPacket { int nID; int nStatus; }DISASTER_PREVENT, * LPDISASTER_PREVENT; //客户端评价条目命令 typedef struct tgClientEvalueItem :public tgBaseNetPacket { int OperItemType; //条目类型 int OperItemSubType1; //条目子类型1 int OperItemSubType2; //条目子类型2 int OperItemObject; //条目对应评价对象 char AssociPara1[64]; //关联参数1 //20210730-与教员同步修改数据反馈接口,128->64 char AssociPara1Name[64]; //关联参数1名称 //20210730-与教员同步修改数据反馈接口,128->64 char AssociPara2[64]; //关联参数2 //20210730-与教员同步修改数据反馈接口,128->64 char AssociPara2Name[64]; //关联参数2名称 //20210730-与教员同步修改数据反馈接口,128->64 char AssociPara3[64]; //关联参数3 //20210730-与教员同步增加数据反馈接口 char AssociPara3Name[64]; //关联参数3名称 //20210730-与教员同步增加数据反馈接口 char AssociPara4[64]; //关联参数4 //20210730-与教员同步增加数据反馈接口 char AssociPara4Name[64]; //关联参数4名称 //20210730-与教员同步增加数据反馈接口 char AssociPara5[64]; //关联参数5 //20210730-与教员同步增加数据反馈接口 char AssociPara5Name[64]; //关联参数5名称 //20210730-与教员同步增加数据反馈接口 }CLIENT_EVALUE_ITEM, * LPCLIENT_EVALUE_ITEM; //限速命令(重构) typedef struct tgMainCtrl_LimitSpeed_New : public tgBaseNetPacket { int nSegCnt; //区段数量 int nType; //限速类型(1:临时限速 2:道岔限速) int nSegID[50]; //区段编号 float fSegOff[50]; //区段偏移 float fLimitSpeed[50]; //限速值 }MAINCTRL_LIMITSPEED_NEW, * LPMAINCTRL_LIMITSPEED_NEW; //运行线更新 typedef struct tgRUNLINE_UPDATE : public tgBaseNetPacket { int nRunLineID; //运行线编号RUNLINE_UPDATE int nDisartRunLineID; //偏离-运行线编号 int nDisartStartPlatFormID; //偏离-开始站台 int nDisartEndPlatFormID; //偏离-结束站台 }RUNLINE_UPDATE,*LPRUNLINE_UPDATE; //正线接入点-状态更新 typedef struct tgINPOINT_UPDATE : public tgBaseNetPacket { int nID; //接入点-编号 int nAllowAutoRoute; //接入点-允许自动进路标记 int nAutoAssignShift; //接入点-自动分配-班次 int nShift_AllowFlag; //接入点-自动分配-班次-允许标记 int nAutoAssignRunLine; //接入点-自动分配-运行线 int nRunLine_AllowFlag; //接入点-自动分配-运行线-允许标记 }INPOINT_UPDATE,*LPINPOINT_UPDATE; //列车移动授权-更新 typedef struct tgTRAIN_MA_UPDATE : public tgBaseNetPacket { int nTrainID; //MA-列车编号 int nCnt; //MA-障碍物数量 int nType; //1:预留MA 2:LMA 3:取消MA int nLineSecID[20]; //MA-障碍物区段编号 float fLineSecOff[20]; //MA-障碍物区段偏移 int nSubType; //预留MA(-1;无效), LMA(1:自动授权LMA,2:人工授权AMT) int nMA_ATPSecID_S; //MA_ATP表示_起点ID int nMA_ATPSecID_E; //MA_ATP表示_终点ID float fMA_ATPSecOff_S; //MA_ATP表示_起点偏移 float fMA_ATPSecOff_E; //MA_ATP表示_终点偏移 int nMA_LineSegID_S; //MA_线路段表示_起点ID int nMA_LineSegID_E; //MA_线路端表示_终点ID float fMA_LineSegOff_S; //MA_线路段表示_起点偏移 float fMA_LineSegOff_E; //MA_线路段表示_终点偏移 }TRAIN_MA_UPDATE,*LPTRAIN_MA_UPDATE; /**********************************视景系统相关******************************************/ typedef struct tgCMD2VIEW_TAINCONNECT : public tgBaseNetPacket { int Type; //类型--1:撞毁、2:连挂、3:换端中、5:解编、6:恢复运行、7:换端完成 int TrainID; //本车ID int OtherTrainID; //其他车ID int CollisionTrainPartID; //碰撞车厢号 : 按0开始表示车头 依次类推7:表示第八节车厢 }CMD2VIEW_TRAINCONNECT; //电子沙盘视点控制 typedef struct tgSANDTABLE_VIEWPOINT_CTRL : public tgBaseNetPacket { int nSystemID; int nCameraType; //相机类型(1:列车相机,2:FPS<漫游视角>,3:GOD<上帝视角>) int nViewPointType; int nSubType; int Int32Valuel; int LongValuel; //NOTE:之前类型为long int nDataLength; char pDataBuf[500]; }SANDTABLE_VIEWPOINT_CTRL; //定义: 视景系统线路预测开关控制 typedef struct tgVIEWSYS_FORECAST_CTRL { int nCtrlSwitch; //线路预测控制开关(1:开启,0:关闭<默认>) }VIEWSYS_FORECAST_CTRL; //定义:沙盘列车视点控制 typedef struct tgSANDTABLE_TRAINVIEWPORT_CTRL : public tgBaseNetPacket { int nTrainID; //列车编号 int nViewPortType; //视点类型(1:前向相机 2:左侧向相机 3:右侧向相机 9:顶视角相机) }SANDTABLE_TRAINVIEWPORT_CTRL,*LPSANDTABLE_TRAINVIEWPORT_CTRL; //定义:沙盘漫游视点控制 typedef struct tgSANDTABLE_FPS_VIEWPORT : public tgBaseNetPacket { int nSegID; //区段编号 double dSegOff; //区段偏移 char cViewPortName[100]; //漫游视点名称 }SANDTABLE_FPS_VIEWPORT, * LPSANDTABLE_FPS_VIEWPORT; //定义:沙盘漫游视角参数更新 typedef struct tgSANDTABLE_FPSDATA_UPDATE : public tgBaseNetPacket { float fPosDeltaX; //位移变化量_X方向 float fPosDeltaY; //位移变化量_Y方向 float fAngleDeltaX; //角度变化量_X方向 float fAngleDeltaY; //角度变化量_Y方向 int nIsJump; //是否在跳跃(0:不跳 1:跳) }SANDTABLE_FPSDATA_UPDATE, * LPSANDTABLE_FPSDATA_UPDATE; //定义:沙盘上帝视角控制 typedef struct tgSANDTABLE_GOD_VIEWPORT : public tgBaseNetPacket { int nSegID; //区段编号 double dSegOff; //区段偏移 float fInitPosOffX; //初始位置偏移_X方向(顺着轨道方向) float fInitPosOffY; //初始位置偏移_Y方向(垂直地面方向,重要:一旦设定不可修改) float fInitPosOffZ; //初始位置偏移_Z方向(垂直轨道方向) float fInitAngleX; //初始旋转角度偏移_X方向(俯仰角) float fInitAngleY; //初始旋转角度偏移_Y方向(视角朝向) }SANDTABLE_GOD_VIEWPORT,*LPSANDTABLE_GOD_VIEWPORT; //定义:沙盘上帝视角参数更新 typedef struct tgSANDTABLE_GODDATA_UPDATE : public tgBaseNetPacket { float fPosDeltaX; //位移变化量_X方向 float fPosDeltaY; //位移变化量_Y方向 float fAngleDeltaX; //角度变化量_X方向 float fAngleDeltaY; //角度变化量_Y方向 float fDistanceDelta; //距离变化量 }SANDTABLE_GODDATA_UPDATE, * LPSANDTABLE_GODDATA_UPDATE; //定义:视景虚拟人员操作反馈【协同->OCC】 typedef struct tgViewVirPerson_OperFeedBack { int nStaID; //车 站 号 int nSysID; //终 端 号 int nRole; //角 色 号【1:站务员。其他:预留】 int nOperPos; //操作地点【见地点定义表】 int nOperType; //操作类型【见操作定义表】 int nSelTool; //选择工具【见工具定义表】 int nTimeS; //开始时间【单位:秒】 int nTimeE; //结束时间【单位:秒】 }VIEWVIRPERSON_OPERFEEDBACK,*LPVIEWVIRPERSON_OPERFEEDBACK; //定义:视景虚拟人员位置切换【OCC->协同】 typedef struct tgViewVirPerson_PosChange { int nTmpID; //车 站 号/列 车 号 int nSysID; //终 端 号 int nRole; //角 色 号【1:站务员,2:乘务员, 其他:预留】 int nOperPos; //操作地点【站务员:视景定义,乘务员:车厢号】 }VIEWVIRPERSON_POSCHANGE,*LPVIEWVIRPERSON_POSCHANGE; //定义:视景列车火灾状态反馈【协同->OCC】 typedef struct tgViewTrainFire_FeedBack { int nTrainID; //列 车 号 int nTrainPartID; //车 厢 号 int nFireLevel; //火灾等级 int nPara_Int[50]; //预留参数_整形 float fPara_Float[50]; //预留参数_浮点 }VIEWTRAINFIRE_FEEDBACK,*LPVIEWTRAINFIRE_FEEDBACK; //定义:ATS系统状态更新 typedef struct tgATSSYS_STATUS_UPDATE : public tgBaseNetPacket { int nWorkStationStatus[5]; //中心ATS工作站状态 int nAppServerStatus; //中心ATS服务器状态 int nDBServerStatus; //数据库服务器状态 int nNetComputerStatus; //网关计算机状态 int nCommulateMashineStatus; //通信计算机状态 int nLineControlStatus; //线路控制器状态 int nTimeTabPlanStatus; //时刻表计划状态 }ATSSYS_STATUS_UPDATE,*LPATSSYS_STATUS_UPDATE; //定义:车库时刻表状态更新 typedef struct tgDEPOTTIMETAB_STATUS_UPDATE : public tgBaseNetPacket { int nSvrID; //服务号 int nTrainGroupID; //车组号 int nInDepotStatus; //入库状态 int nOutDepotStatus; //出库状态 int nOnLineTime; //上线时间 int nOffLineTime; //下线时间 int nOnLineDriverID; //上线司机号 int nOffLineDriverID; //下线司机号 }DEPOTTIMETAB_STATUS_UPDATE, *LPDEPOTTIMETAB_STATUS_UPDATE; //定义:区域控制器状态更新 typedef struct tgZONECTRL_STATUS_UPDATE : public tgBaseNetPacket { int nZCID; int nStaID; int nZCStatus; }ZONECTRL_STATUS_UPDATE,*LPZONECTRL_STATUS_UPDATE; //定义:终端站发车列表条目更新 typedef struct tgENDSTA_SENDTLIST_I : public tgBaseNetPacket { int nSvrID; //服务号 int nOrderID; //序列号 int nSendTrackID; //发车轨道 int nEndDesID; //目的地号 int nDirect; //发车方向 int nDate; //发车日期【20240416:2024年04月16日】 int nTime; //发车时间【114139:11时41分39秒】 int nStatus; //分配状态 }ENSSTA_SENDTLIST_I, * LPENSSTA_SENDTLIST_I; /**********************************态势模型******************************************/ //定义:态势车站模型数据更新 typedef struct tgTS_StationMode_Update : public tgBaseNetPacket { int nStaID; //车站编号 float fAverWaterHeight; //平均水位高度 }TS_STATIONMODE_UPDATE,*LPTS_STATIONMODE_UPDATE; //定义:虚拟处置操作命令 typedef struct tgTSVirtualDispose_Cmd : public tgBaseNetPacket { int nCmdType; //命令类型 int nIntPara[10]; //命令参数:含义参见命令类型定义 float fFloatPara[10]; //命令参数:含义参见命令类型定义 }TS_VIRTUALDISPOSE_CMD,*LPTS_VIRTUALDISPOSE_CMD; //定义:区域水状态更新 typedef struct tgTSZoneWater_Update : public tgBaseNetPacket { int nZoneID; //区域编号 int nInZoneCnt; //输入区域数量 int nInZoneID[30]; //输入区域编号 float fInSpeed[30]; //输入速度(单位:m3/s) int nOutZoneCnt; //输出区域数量 int nOutZoneID[30]; //输出区域编号 float fOutSpeed[30]; //输出速度(单位:m3/s) float fAvrWaterHeight; //平均水位高度(单位:m) }TS_ZONEWATER_UPDATE, * LPTS_ZONEWATER_UPDATE; //定义:区域水状态反馈(视景) typedef struct tgTSZoneWater_FeedBack : public tgBaseNetPacket { int nID; //区域编号 int nWaterPointCnt; //水位采样点数量 int nWaterPointID[30]; //水位采样点编号(相邻区域点) float fWaterHeight[30]; //水位采样点水位高度 }TS_ZONEWATER_FEEDBACK, * LPTS_ZONEWATER_FEEDBACK; //定义:水池水状态更新 typedef struct tgPool_WaterStatus_Update : public tgBaseNetPacket { char PoolStrID[GUID_LEN]; //水池编号 float fWaterHeightValue; //水位高度值(单位:m) float fWaterHeightPercent; //水位高度比 }TS_POOL_WATERSTATUS_UPDATE,* LPTS_POOL_WATERSTATUS_UPDATE; //定义:区域临时排水设备状态更新 typedef struct tgTS_TempOutWaterEqmpt_Update : public tgBaseNetPacket { int nZoneID; //区域编号 int nEqmptCnt; //临时设备数量 int nEqmptID[30]; //临时设备编号 int nStatus [30]; //临时设备状态 }TS_TEMP_OUTWATEREQMPT_UPDATE, *LPTS_TEMP_OUTWATEREQMPT_UPDATE; //定义:区域水位采样点更新(态势->客户端) typedef struct tgTS_WaterPoint_Update : public tgBaseNetPacket { int nZoneID; //区域编号 int nWaterPointCnt; //水位采样点数量 int nWaterPointID[30]; //水位采样点编号 float fSandBagHeight[30]; //水位采样点沙袋高度(单位:m) float fWaterHeight[30]; //水位采样点水位高度(单位:m) float fAvrWaterHeight; //平均水位高度(单位:m) }TS_WATERPOINT_UPDATE, * LPTS_WATERPOINT_UPDATE; /**********************************无人驾驶******************************************/ //定义:列车唤醒流程更新 typedef struct tgTrainWakeUp_Process : public tgBaseNetPacket { int nTrainID; //列车编号 int nNodeID; //节点编号(定义见接口表) int nCnt; //数量 int nStatus[100]; //状态:0:未自检; 1:自检中; 2:自检通过; 3:自检未通过(含义见接口表) }TRAINWAKEUP_PROCESS,*LPTRAINWAKEUP_PROCESS; //定义:列车VOBC数据更新(地铁) typedef struct tgMetroTrain_VOBC_Update { int nTrainID; //列车编号 float fGoalDistance; //目标距离 float fTrainSpeed; //列车速度 float fLimitSpeed; //限制速度 float fRocomendSpeed; //推荐速度 float fGoalSpeed; //目标速度 float fAlertSpeed; //报警速度 float fEmergencySpeed; //紧制速度 int nRunMode; //运行模式 int nRunLevel; //运行级别 int nATPFault; //ATP故障 int nATOFault; //ATO故障 int nRadioFault; //无线通信故障 int nDoorCtrlMode; //车门控制模式 int nDoorStatus; //车门状态(全部) int nPreSelectMode; //预选驾驶模式(最高) int nTrainIntegrity; //列车完整性状态 int nATOWorkStatus; //牵引/制动工况(ATO) int nAllPSDClose; //屏蔽门关闭(全部) int nTrainDoorAllow[2]; //车门允许(0:左 1:右) int nTurnBackStatus; //折返状态(0:不折返 1:即将折返 2:正在折返) int nWheelSlip; //打滑(0:无 1:打滑) int nStaPlatFormCtrl; //车站站台控制(0:正常运行 1:扣车 2:跳停) int nInStopWnd; //进入停车窗(0:无 1:停车区域无对标 2:停车对标) int nSnowMode; //雨雪模式(1:是 0:否) int nReqSendTrain; //发车请求 int nCloseDoorPre; //关门提示 int nVOBCStatus[2]; //VOBC状态【0:本端 1:远端】(0:无 1:正常 2:部分故障 3:完全故障) int nInCarDepot; //车辆回库 int nNotOnMainLine; //车辆非正线运营 int nITCRelease; //点式释放 int nNextStaID; //下一站 int nEndStaID; //终点站 int nDriverID; //司机号 int nDesID; //目的地号 char cTrainNum[20]; //车次号 int nWakeUpSleepStatus; //唤醒/休眠状态 int nDriverCoverSlab[2]; //司机盖板(0:本端 1:远端) int nWorkStatus; //列车工况(牵引制动) int nEmerBreakType; //列车紧制类型 int nMeasureWheel; //较轮状态(0:正常,1:错误,2:跳跃) int nPassengerEmerShake; //乘客紧急手柄(1:拉下 0:抬起) }METROTRAIN_VOBC_UPDATE,*LPMETROTRAIN_VOBC_UPDATE; //定义:施工符号转调度命令 typedef struct tgCONSTRUCTSIGN_2DISPATCHCMD { int nType; //施工符号类型:封锁股道|区间封锁等,运行图提供 int nDirRoadID; //方向线路号 int nStaID_S; //开始车站 int nStaID_E; //结束车站【车站时,此项:-1】 int nDate_S; //开始日期【eg:20241015:2024年10月15日】 int nDate_E; //结束日期【eg:20241015:2024年10月15日】 int nTime_S; //开始时间【单位:秒】 int nTime_E; //结束时间【单位:秒】 int nDesSysID; //目标系统【-1:全部调度命令终端】 float fMeterF_S; //开始公里标 float fMeterF_E; //结束公里标 float fLimitValue; //要求限速值【-1:无效】 char cReason[50]; //执行原因 char cPara[400]; //字符参数【字符串1;字符串2】 }CONSTRUCTSIGN_2DISPATCHCMD, *LPCONSTRUCTSIGN_2DISPATCHCMD; /**********************************操作记录相关******************************************/ //定义:主控列车(模驾)操作记录 typedef struct tgMC_TRAIN_OPERRECORD { int nTrainID; int nMCSysID; int nSimTime; int nSysTime; int nType; int nDataIndex; char pDataBuf[800]; }MC_TRAIN_OPERRECORD,*LPMC_TRAIN_OPERRECORD; //定义:调度系统通用操作记录 typedef struct tgDISPATCH_SYS_OPERRECORD { int nSrcSysID; int nSimTime; int nSysTime; int nDataLen; int nCmdType; int nCmdResult; char cCmdPara[950]; }DISPATCH_SYS_OPERRECORD,*LPDISPATCH_SYS_OPERRECORD; /**********************************运营指标统计******************************************/ //定义:运营指标 typedef struct tgOPERATION_INDEX { int nTrainCnt_LaterT[5]; //晚点列车-统计【0:1~2分钟,1:2-5分钟 3:5分钟以上】 int nTrainCnt_SecStop[5]; //区间停车-统计【0:1~2分钟,1:2-5分钟 3:5分钟以上】 int nTrainCnt_LoseStopS[5]; //列车欠标-统计【0:总数,其他:预留】 int nTrainCnt_OverStopS[5]; //列车冲标-统计【0:总数,其他:预留】 int nTrainCnt_StopRun; //停运列车-统计 int nTrainCnt_Damage; //损毁列车-统计 int nTouchEmerBreakCnt; //紧急次数-统计 int nPersonCnt_Dead; //死亡人数-统计 int nPersonCnt_Insured; //受伤人数-统计 int nPersonCnt_ComPlaint; //投诉人数-统计 int nPersonCnt_NotInTrain; //滞留乘客-统计 float fDXL; //兑现率 float fZDL; //准点率 float fEnergy_Spend; //电力能耗-统计 }OPERATION_INDEX,*LPOPERTION_INDEX; /**********************************语音电话通讯相关******************************************/ //定义:通话记录 typedef struct TELEPHONE_TALK_RECORD { int nTrainingID; //训练号【记录及文件:由训练号、主叫号码、开始时间组合】 int nTelNumber_Active; //电话号码-主叫 int nTelNumber_Passive[50]; //电话号码-被叫 int nTimeS_Sys; //开始时间-系统(单位:秒) int nTimeE_Sys; //结束时间-系统(单位:秒) int nTimeS_Sim; //开始时间-仿真(单位:秒) int nTimeE_Sim; //结束时间-仿真(单位:秒) }TELEPHONE_TALK_RECORD,*LPTELEPHONE_TALK_RECORD; //定义:电话语音识别 typedef struct TELEPHONE_SPEECH_RECOGNIZE { int nTrainingID; //训练号【记录及文件:由训练号、主叫号码、开始时间组合】 int nTelNumber_Active; //电话号码-主叫 int nTimeS_Sys; //开始时间-系统(单位:秒) char cSpeechText[900]; }TELEPHONE_SPEECH_RECOGNIZE,*LPTELEPHONE_SPEECH_RECOGNIZE; //定义:IP电话核心会话结构体(整合单拨/多拨/对讲)【语音-》OCC-》语音】 typedef struct TELEPHONE_SESSION :public tgBaseNetPacket { int session_id; //全局唯一会话ID int caller_id; //发起方标识 int target_id; //目标标识(如电话号、设备ID、角色ID) int target_media_port; //媒体端口 int session_state; //会话状态[0:空闲,1:呼叫中,2:通信中,3:已终止] char caller_ip[16]; //发起方IP char target_ip[16]; //目标IP }TELEPHONE_SESSION, *LPTELEPHONE_SESSION; //定义:对讲专属控制结构体(仅CallType::INTERCOM时生效)【语音-》OCC-》语音】 typedef struct TELEPHONE_INTERCOM : public tgBaseNetPacket { int state; //对讲信道状态[0:信道空闲,1:信道占用(发言中)] int speaker_id; //当前发言人标识 int talk_timeout; //发言超时(秒,避免信道占用) }TELEPHONE_INTERCOM, *LPTELEPHONE_INTERCOM; /**********************************文本提示信息******************************************/ //定义:OCC系统【文本+语音】提示(延用主控) typedef struct TEXTANDSPEECH_PROMPT : public tgBaseNetPacket { int nType; //类型【主控定义】 char cPromptText[800]; //文本 }TEXTANDSPEECH_PROMPT,*LPTEXTANDSPEECH_PROMPT; //定义:操作指导提示【教员-》服务器-》语音/文本提示终端】 typedef struct tgOperGuid_Prompt : public tgBaseNetPacket { int nID; //流程步骤 int nType; //操作类型【1:操作,2:语音】 int nOperSysID; //操作系统 char cOperTitle[100]; //操作标题 char cOperStep[200]; //操作步骤【语音操作时:传参考语句】 }OPERGUID_PROMPT, * LPOPERGUID_PROMPT; /**********************************系统服务报警******************************************/ //定义:语音识别服务报警 typedef struct SPEECHRECOGNIZE_SVR_ALARM { int nFaultCodeID; //故障码 }SPEECHRECOGNIZE_SVR_ALARM,*LPSPEECHRECOGNIZE_SVR_ALARM; struct tgTimeTab_Item { int nTime_R; //到达时间 int nTime_S; //发车时间 short nRunLineID; //线路编号 short nStopT_R; //到达股道 short nStopT_S; //发车股道 short nStaID_Cur; //当前站 short nSigID_I; //出入口_入口 short nSigID_E; //出入口_出口 BYTE bByte[60]; //0:过站次数,1:自触_接,2:自触_发,3:通过类型 }; //定义:阶段计划下达_车次表 typedef struct tgSTAGEPLAN_TRAINNUM : public tgBaseNetPacket { short nID; short nTrainID; short nLineID; short nTimeTabID; short nTrainKind; short nTrainType; short nBaseTT_ID; short nDirect; short nLineIndex; short nTrainNumType; short nRouteID; short nCnt_C; short nCnt_A; short nStaCnt; char cTrainNum[128]; char cNextTrainNum[128]; }STAGEPLAN_TRAINNUM, *LPSTAGEPLAN_TRAINNUM; //定义:阶段计划下达_时刻表 typedef struct tgSTAGEPLAN_TIMETAB : public tgBaseNetPacket { short nID; short nCnt_C; short nCnt_A; tgTimeTab_Item TT_I[10]; }STAGEPLAN_TIMETAB,*LPSTAGEPLAN_TIMETAB; #define EQPMENT_COUKOUT_NORMAL 0 #define EQPMENT_COUKOUT_LOW 1 #define EQPMENT_COUKOUT_HIGH 2 //列车行驶方式 #define TRAIN_RUNNING_PLANTTIMETABLERAIN 1 //计划车 #define TRAIN_RUNNING_NOPLANTTIMETABLEDESTINATIONTRAIN 2 //头码车 #define TRAIN_RUNNING_NOPLANTTIMETABLEMANCONTROLTRAIN 3 //人工车 //蔽塞方式 #define iATP 1 //点式ATP ,固定闭塞 #define CBTCMODE 2 //CBTC模式,移动闭赛 //列车状态 #define TRAIN_STATE_RUNNING 1 //区间运行 #define TRAIN_STATE_STATIONSTOP 2 //车站停站 #define TRAIN_STATE_TURNBACK 3 //列车折返 #define TRAIN_STATE_OUTCARBARN 4 //列车出库 #define TRAIN_STATE_INCARBARN 5 //列车入库 #define TRAIN_STATE_MANUAL 6 //人工控制 #define TRAIN_STATE_TURNBACKSTATIONSTOP 7 //折返停站 #define TRAIN_STATE_BEING_INCARBARN 8 //已入库 #define TRAIN_STATE_STORE 9 //存车 #define TRAIN_STATE_CHANGEHEAD 10 //列车掉头 #define TRAIN_STATE_OUTSTATION 11 //列车出站 #define TRAIN_STATE_INSTATION 12 //列车进站 //#define TRAIN_STATE_OUTSTATIONSTOP 13 //列车即将出站 #define TRAIN_STATE_DISPATCH 14 //调车模式 //标记ATP内容 #define TRAIN_ATPSTATUS_ON 1 //标记ATP恢复 #define TRAIN_ATPSTATUS_OFF 2 //标记ATP关闭 #define TRAIN_ATPSTATUS_CONKOUT 3 //标记ATP故障 #endif