?? main.h
字號:
#ifdef __SRC
#define EXTERN
#else
#define EXTERN extern
#endif
#define TRUE 1
#define FALSE 0
///////////////////////////卡的類型//////////////////////////////////
#define PROD_CARD 0 //貨物標簽卡
#define ADMI_CARD 3 //管理員卡
#define DELI_CARD 2 //發貨者卡
#define RECV_CARD 1 //接收者卡
#define BIAOSHI_ERR 1 //標識錯誤 1
#define QIXIAN_ERR 2 //期限錯誤 2
#define WARING_TYPE_NO 0 //沒有警告
#define WARING_TYPE_OUT_TIME 1 //貨物已經超出保質期
#define WARING_TYPE_SECUR 2 //安全
#define WARING_TYPE_FULL 3 //安全
#define LNMAX 32
#define GUIGENUM 5//規格的型號數
#define RECVIDINDEXNUM 100//簡單索引的最大容量
#define ADMIHISNUM 20//管理員的記錄條數
#define MACHHISNUM 20
#define DELIHISNUM 500
#define PINBASE 198265
#define PINWEISHU 6//密碼的位數為6位
/////////////////////////////變量和結構體////////////////////////////////
typedef struct
{
uint16 year;
uint8 month;
uint8 day;
uint8 hour;
uint8 minute;
uint8 second;
}TIME;//時間結構的數據結構定義
typedef struct
{
uint32 ProductBarCode;//tiao xing ma
uint8 Weight;//unit of 100g;0 means <100g,255 means >25.4kg;123 means 12.3kg=<x<12.4kg
uint8 Height;//unit of centimeter
uint8 Width;//unit of centimeter
uint8 Depth;//unit of centimeter
TIME StoreTime;//保存時間,產品的質保時間
TIME ArriveTime;//產品要求到中轉站的時間
}PPT;//產品的屬性結構
typedef struct
{
uint8 TypeofCard;//use ProductCard or DeliveryCard;//用來表識是什么卡送進來的
uint32 ProductCardID;
uint32 ReceiverCardID;
uint32 DeliveryID;//as tagProductCard
uint32 DeliveryPouintID;
PPT ProductProperty;
TIME ArriveTime;//貨物到中轉站的時間
}PR;//產品需要記錄的結構
typedef struct
{
uint8 Height;//unit of centimeter
uint8 Width;//unit of centimeter
uint8 Depth;//unit of centimeter
}GZRJ;//閣子的容積結構
typedef struct
{
uint8 Use_Flg;//是否被使用了的標志,為1表示已經被使用
GZRJ GeZiRongJi;//閣子的容積
PR ProductRecord;//產品的記錄
}GEZI;//閣子的結構體
struct StructTermilog
{
uint32 TermilogID;//本機器的ID號
TIME TermilogSetuptime;//setup the lattice time;
TIME TermilogRunTime;//the start time of one run sequnce from reset;
uint8 StoreProductNum;//0=empty;=LN means full;
uint8 Waring_Type;//報警的類型//0=no warning;1=product out of time;2=termilog security warning
GEZI GeZiList[LNMAX];
};
struct RecvIndexList
{
uint16 Index;
uint32 ID;
};
struct GuiGeList
{
uint8 GuigeNum;
uint8 Depth;
uint8 Width;
uint8 Height;
};
struct tagAdminHistoryFormat
{
TIME OpenTime;
uint8 LatticeID;//from 1 toLatticeNum;0 means open all lattice;
};
struct tagMachineHistoryFormat
{
uint8 waringtype;
/* bOPName define as
LOWM low memory;
RUNT start machine
OUTT some product outof time;
*/
TIME time;
};
struct tagDeliveryHistoryFormat
{
uint8 TypeofCard;
uint32 DeliveryID;///此次送貨的ID號
uint32 DeliveryPouintID;//發貨的機具號碼
//TIME tDeliveryTime;
TIME ReceiveTime;//at the door open;
uint32 RecvCardID;//may be the card of lAdminCardID;
};//這個記錄是在接貨員把貨物接了以后再記錄的
struct BaoZhiTimeOut
{
uint8 FLG_TimeOut;//為1表示過期了,為0表示沒有過期
uint8 FLG_record;//為1表示被記錄下來了,為0表示還沒有被記錄下來
};
EXTERN void DealWithMifareCard(void);
EXTERN void ShowMainPic(void);
EXTERN void ReadAndDisplayTime(void);
EXTERN void CheckAndDisplayOutTimeIfo(void);
EXTERN void CheckAndDealDataTransMode(void);
EXTERN void EnablePCF8563_IIC_INT(void);
EXTERN void DisablePCF8563_IIC_INT(void);
EXTERN void Delay_n100MS(uint32 dly);
EXTERN void Delay_n10MS(uint32 dly);
EXTERN void Modify_pin(uint32 id,uint8 * p);
//計算并且修改密碼放到緩存中
EXTERN void ClrPinBuf(uint8 * p);
//清除密碼緩存區
EXTERN uint8 Check_Pin(uint8 x,uint8 y,uint8 * p);
EXTERN void MaoPaoPaiXu(uint8 * p,uint8 Count);
EXTERN uint8 Compare_vol(uint8 G_a,uint8 G_b,uint8 G_c,uint8 P_x,uint8 P_y,uint8 P_z);
#undef EXTERN
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -