?? datatype.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 + -