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

📄 datatype.pas

📁 ah 209型通用读卡器驱动程序源码
💻 PAS
字号:
unit DataType;

interface
const MAX_POS  = 16; //最大控制箱数
const MAX_VALVE = 32;//一个控制箱最多控制阀数
const MAX_LONG = (MAX_POS * MAX_VALVE);
const MAX_SCAN_TIME = 16; //最大扫描时间 dwMilliseconds
const MAX_TIMEOUT = (MAX_SCAN_TIME div MAX_POS); //最大延时 dwMilliseconds
const MAX_SIGN = 80;  //最大等信号延时  dwMilliseconds
const MAXBUF = 1024;
const MAX_RC = 10;
const MAX_RC_TIME = 10;
const MAX_RC_TIMEOUT = (MAX_RC_TIME div MAX_RC);
const MAX_RC_SIGN = 80;
const MAX_JH = 255;
const MAX_CISHU = 20; //连续发送次数
const MAX_CISHUD = 20;//读卡器等待次数
const MAX_CISHUk = 20;//控制箱等待次数
const MAX_CISHUJ = 12;//最大结帐次数
type
  PRec_Send_Message = ^Rec_Send_Message;
  Rec_Send_Message = Record
     RSMP : Pointer;        //发送数据
     RSML : Word;           //发送数据长度
  end;
  PStateByte = ^StateByte;
  StateByte = Record
     bs0 : Byte;    //D0(D4) 1:启用 0:空闲
     bs1 : Byte;    //D1(D5) 1:阀门开 0:阀门关
     bs2 : Byte;    //D2(D6) 1:故障 0:正常
     bs3 : Byte;    //保留
  end;
  PValveState = ^ValveState;
  ValveState = Record
     StartTime : TDateTime; //开始时间
     mEndTime : TDateTime;  //中间结束时间
     mStartTime : TDateTime;//中间开始时间
     EndTime : TDateTime;   //结束时间
     State : StateByte;     //状态(4位)
  end;
  POpenInfo = ^OpenInfo;
  OpenInfo = Record
     Pos_No : Byte;      //控制箱号 1..16
     Valve_No : Byte;    //阀门号   1..32
  end;
  POpenCard = ^OpenCard;
  OpenCard = Record
     PN : Byte;
     VN : Byte;
     CardN : Integer;
  end;
  PJiHao = ^JiHao;
  JiHao = Record
     JiNo : array[1..MAX_JH] of byte;
     JL : Word;
  end;
  PJiFa = ^JiFa;
  JiFa = Record
     HJ : byte;
     HF : byte;
  end;
  PFaHao = ^FaHao;
  FaHao = Record
     FaNo : array[1..MAX_LONG] of JiFa;
     FL : Word;
  end;
  PCardCheck = ^CardCheck;
  CardCheck = Record
     CardClose : array[1..MAXBUF] of integer;
     CardL : Word;
  end;
  POpenCheck = ^OpenCheck;
  OpenCheck = Record
     CardOpen : array[1..MAXBUF] of OpenCard;
     OpenL : Word;
  end;
  PStateB = ^StateB;
  StateB = Record
     B1 : StateByte;     //状态(4位)
     B2 : StateByte;     //状态(4位)
  end;
  PObstacle = ^Obstacle;
  Obstacle = Record
     ComNum : Word; //通讯连续障碍次数
     WaitNum : Word;//查一次,需等次数
  end;
  PObstacleCase = ^ObstacleCase;
  ObstacleCase = Record
     OCase : array[16..25] of Obstacle;
  end;
  PObstacleCaseK = ^ObstacleCaseK;
  ObstacleCaseK = Record
     OCaseK : array[0..15] of Obstacle;
  end;
  PStateArray = ^StateArray;
  StateArray = Record
     SArray : array[1..MAX_LONG] of OpenInfo;
     SArrayL : Word;
  end;

implementation

end.

⌨️ 快捷键说明

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