⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rx.x

📁 中国石油二期加油站IC系统后台通讯软件
💻 X
📖 第 1 页 / 共 2 页
字号:
/*
***********************************************************************************************************
													  Amos
										  The Real_Time Operation System
												   Multi Task
								 (c) Copyright 1998-2002, ShangYaoHui, Shenzhen
											  All Right Reserved
												  VERSION 6.01

" By  : 商耀挥(ShangYaoHui)
 create time: 2002-7-2 0:41:40  
***********************************************************************************************************
*/

#ifndef __RX_X_H__
#define __RX_X_H__

#ifdef __cplusplus
extern "C" {
#endif


	#include "cm_hash.x"

	#include "rx_msg.h"
#include "rx_msg.x"

#include "lb_cm.h"
#include "lb_cm.x"

#include "lb_recv.h"
#include "lb_recv.x"
#include "lb_xmit.h"
#include "lb_xmit.x"
#include "lb_msg.h"
#include "lb_msg.x"

#include "lb_bdy1.h"
#include "lb_bdy1.x"
#include "lb_bdy2.h"
#include "lb_bdy2.x"
#include "lb_bdy4.h"
#include "lb_bdy3.h"
#include "lb_bdy3.x"
#include "lb_bdy4.h"
#include "lb_bdy4.h"
#include "lb_bdy4.x"
#include "lb_bdy5.h"
#include "lb_bdy5.x"

/**** const define ****/

/**** macro handle define ****/

/**** type define ****/

	typedef struct
	{
		U8 tId[6];
		U8 asn[10];
		U8 recKind;
		U8 fillAccount[4];
		U8 ttc[4];
		U8 date[7];
		U8 ctc[2];
		U8 ballence[4];
		U8 tac[4];
		U8 workerCode;
		U8 oilType;
		U8 gunId;
		U8 price[2];
		U8 volume[3];
		U8 totleVolume[4];
		U8 areaCode;
		U8 keyIdx;
		U8 reserve;
		U8 mac[4];
		U8 ver;
	} Record_s;



	typedef struct
	{
		U8 year[2];
		U8  month;
		U8  date;
		U8  hour;
		U8  min;
		U8  sec;
	} Time_s;

	typedef struct
	{
		CmLList node;

		U8 cmdType;
		CmLListCp tranList;
		U8 rqstId;
		S16 stat;

		U8 errCode;

	} RxCmdEntry_s;


	typedef struct
	{
		U8 provCode;		//205	加油站省代码
		U8 cityCode;			//206	加油站地区代码
		U8 stationCode[3];		//207-209	加油站代码
		Bool enableIBankApp;		//210 	启用工商银行的钱包应用标记(1启用0停止)
		U8 enableIBankAppTime[7];	//211-217	启用工商银行的钱包应用日期
		Bool enableUse2IBankCard;		//218 	启用工商银行二期交通卡标记(1启用 0停止)
		U8 enableUse2Time[7];		//219-225	启用工商银行二期交通卡日期
		U8  bankId[2];		//226 227 银行标识
		U8 crrntKeyIndex;		//228	当前密钥索引
		U8 crrntKeyVer;		//229	当前传输密钥版本
		U8 crrntTranKey[16];			//230-245	传输密钥
		U8 tranKeyVer;			//246	传输密钥版本
	} RxCfg_s;


	typedef U32 Mac_s;
	typedef struct
	{
		CmTqCp tqCp;
		CmTqType tqType[LB_TMR_LEN];
	} LbTmrCb_s;

	typedef struct
	{
		CmTimer tmr;

		U32 machId;
		U32 next;


	} LbTmrEntry_s;


	typedef struct
	{
		U8 cardType;
		U32 cardValue;
		U8 cardStat;
		U8 cardBallencStat;
		U32 cardBallencValue;
	} CardInfo_s;


	typedef struct
	{
		struct equCfgEntry_s *  equ;
		Txt  commName[10];
		HANDLE comm;
		COMMTIMEOUTS timeOut;
		U8 crrntSide;
//		CmLListCp tranLst;
		OVERLAPPED overlap;

	} ScCommCb_s;
	
	typedef struct
	{
		U8 gunId;
		U8 oilType;
		U8 channelId;
		U8 pGunId;
		U8 pumpId;
		U8 machId;
		U8 sideId;
	} EquCfg_s;


	typedef struct
	{
		U8 gunId[2];
		U8 oilType[2];
		U8 channelId[2];
		U8 pGunId[2];
		U8 pumpId[2];
		U8 machId[2];
		U8 sideId[2];
		U8 lineEnd;
	} EquCfgFileEntry_s;

	typedef U16 SpecCode_s;

	typedef struct
	{
		U8 specCodeFile[4];
		U8 lineEnd;
	} SpecCodeFileEntry_s;

	typedef struct equCfgEntry_s
	{
		CmLList node;
		EquCfg_s entry;
        U8 stat	;
		U8 lastStat;

		ScCommCb_s * scCommCb;
		U32 totleVolume;
		U32 duringVolume;
        U32 crrntVolume;
		U32 crrntAcount;
        U8 readOilType;

		Bool cardInStat;
		U8 workerCardNo[10];
		U8 crrntCardNo[10];
		CardInfo_s crrntCardInfo;
		U16 crrntPrice;

		U8 cmdProcErrCode;

		U8 cfmStat;
		U8 grey[28];
		Record_s record;

		CmLListCp histroy;
		Bool first;

	}EquCfgEntry_s;


	typedef struct
	{
		CmLList node;

		CmLListCp cmdLst;
		U8  transStat;
		EquCfgEntry_s * equ;
		RxCmdEntry_s * entry;
	} TranCb_s;






	typedef struct
	{
		RxCfg_s	cfg;

		CmLListCp rqstList;

		CmLListCp pEquCfgList;
		LbTmrEntry_s indTmr;
		LbTmrEntry_s rqstTmr;
		LbTmrEntry_s queryTmr;
		U8 provinceCode;
		U8 cityCode;
		U8 stationCode[3];

		U8 tranKeyTbl[2][16];

		CmHashListCp BlkListHl;

		CmHashListCp GreyListIBankHl;
		CmHashListCp GreyListProteroHl;
		CmHashListCp GreyListPoneyHl;

		Bool first;
		
	} RxCb_s;
	

	typedef struct
	{
		CmLList node;
		Buffer * msg;
		U8 msgCode;
		U32 action;
		U8 rqstType;
		TranCb_s * tran;
		U8 dir;

		U32 machId;
		U8  sideId;
        U8  pGunId;
		U8  gunId;

		U8 chId;

		U8 stat;

		U32 timer;
		U32 loadTimer;
		U32 retry;

		U32 indSeq;
		U8 alRqstCfmType;

		U8 rqstParam;

	} CmdMsg_s;


	typedef struct
	{
		U8 indCode;
		U8 gunId;
	} GunUpIndMsg_s;



	typedef struct
	{
		U8 ackStat;
		U8 provinceCode;
		U8 cityCode;
		U8 stationCode[3];
		U8 mac[4];
		U8 ver;
	} GetStationCodeIndAck_s;



	typedef struct
	{
		U8 cmdCode;
		U8 val;
	} CommonIndMsg_s;





	typedef struct
	{	 
        CmHashListEnt node;
		U8 asn[10];
	} CardAsn_s;

	typedef struct 
	{
		U8 asn[104];
	} BlkCardLine_s;

	typedef struct
	{
		U8 asnFile[208];
	} BlkCardLineFile_s;


	typedef struct
	{
		U8 reserve[3];
		U8 oilType;
		U16 price;
	} PriceEntry_s;


	typedef struct
	{
        U8 asn[10];
		U8 account[4];
		U8 time[7];
		U8 ctc[2];
		U8 ballence[4];
		U8 mark;
	} GreyRecord_s;

	typedef struct
	{
		U8 asn[20];
		U8 account[8];
		U8 time[14];
		U8 ctc[4];
		U8 ballenc[8];
		U8 mark[2];
	} GreyRecordFile_s;

	typedef struct
	{
		CmHashListEnt node;
		GreyRecord_s record;
	} GreyRecordEnt_s;

	
	typedef U16 SpecCode_s ;

	typedef struct
	{
		S16 frameStart;
		U8  dataLen;
		U8  sideId;
	} MsgHdr_s;


	typedef struct
	{
		MsgHdr_s hdr;
		U8  cmd;
	} MsgA_s;

	typedef struct
	{
		MsgHdr_s hdr;
		U8  cmd;
		U8  val;
	} MsgB_s;

	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmd;
		U8 itemStat;
		CardAsn_s asnArray[10];
		U32 mac;
	}BlkWriteCmd_s;

	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmd;
		U8 gunId;
		U8 oilType;
	} WriteOilTypeCmd_s;

	typedef struct 
	{
		MsgHdr_s hdr;
		U8 cmd;
		U8 grey[28];
	} WriteGreyCmd_s;

	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmd;
		RxCfg_s cfg;
	} SysCfgCmd_s;

	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmd;
		U8 gunId;
		U16 price;
		Time_s time;

	} SetPriceCmd_s;

	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmd;
		U8 time[7];
	} SetTimeCmd_s;

	typedef struct
	{
 		MsgHdr_s hdr;
		U8 cmd;
		U8 cnt;
		U16 itemNum;
	} SpecCodeCmd_s;
	#ifndef UP_LAYER_UNSECRET
	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmd;
		U8 type;
		U16 cnt;
		BlkCardLine_s line;
	} BlkListCmd_s;

	#else
	
	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmd;
		U8 type;
		U16 cnt;
	    U8 asnNum;
	} BlkListCmd_s;

	#endif

	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmdCode;
		U8 ackCode;
	} CommonAck_s;
	
	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmdCode;
		U8 ackCode;
		Record_s rec;


	} GetRecAck_s;

	typedef struct
	{
		MsgHdr_s hdr;

		U8 cmdCode;
		U8 ackCode;
		U8 errStat;
		U8 stat;

		U8 crrntGunId;
		U8 workstationStat;
		U8 rqstFlag;
		U8 cardNotInSta;

		U32 volume;
		U32 account;

		U8 cardStat;
		U8 cmdCondition;
		U16 crc;
	} RqstStatAck_s;

	typedef struct
	{
		MsgHdr_s hdr;
		U8 cmdCode;
		U8 ackCode;
		GreyRecord_s record;

	}GetGreyAck_s;

	typedef struct
	{
		MsgHdr_s hdr;

		U8 cmdCode;
		U8 ackCode;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -