#ifndef __GPRS_MESSAGE_QUEUE_H #define __GPRS_MESSAGE_QUEUE_H #include "datatype.h" //#include "typedefdata.h" typedef struct GPRS_SEND_MESS{ u8 message_head1; //Êý¾ÝÍ· u8 message_head2; //Êý¾ÝÍ· u8 message_length; //ЭÒ鳤¶È u8 month; //Ô u8 date; //ÈÕ u8 hour; //Сʱ u8 min; //·Ö u8 sec; //Ãë u16 device_id; //É豸ID u16 year; //Äê float mid_flow; //ÖмäÁ÷Á¿ float up_flow; //ÉÏÁ÷Á¿ float down_flow; //ÏÂÁ÷Á¿ double total_flow ; //×ÜÁ÷Á¿ float temperature; //ÎÂ¶È float pressure; //ѹÁ¦ }GPRS_SEND_MESSAGE; typedef struct queuet { GPRS_SEND_MESSAGE * memory_block; u8 head; u8 tail; u8 queue_num; } queue_t; // ¶ÓÁеĽṹ #define QUEUE_FULL 1 #define QUEUE_OK 2 #define QUEUE_EMPTY 3 /*Êý¾Ý·¢ËͶÓÁÐ*/ #define MESSAGE_NUM 10 void initQueue(queue_t * queue_eg, GPRS_SEND_MESSAGE * message_addr) ; u8 enQueue(queue_t *hq, GPRS_SEND_MESSAGE ins) ; u8 outQueue(queue_t * hq, GPRS_SEND_MESSAGE * ins) ; void clearQueue(queue_t * hq, GPRS_SEND_MESSAGE * message_addr); #endif