#ifndef _QUEUE_H
#define _QUEUE_H

typedef signed   int        INT32;
typedef unsigned int        UINT32;
typedef unsigned char       UINT8;
#define     MAX_QUEUE      10000          // 最大队列元素个数

typedef struct
{
    uint32_t tagname;  
    uint16_t battery; 
    uint16_t reserve; 
} T_StructInfo;

typedef struct
{
    char payload[1024];  
} M_StructInfo;

void PutDataIntoQueue(uint32_t tagname,uint16_t battery,uint16_t reserve);
int GetDataFromQueue(uint32_t *tagname,uint16_t *battery,uint16_t *reserve);
INT32 EnQueue(T_StructInfo tQueueData);
INT32 DeQueue(T_StructInfo *tDqueueData);

void PutDataIntoMQueue(char *payload);
int GetDataFromMQueue(char *payload);
INT32 EnMQueue(M_StructInfo mQueueData);
INT32 DeMQueue(M_StructInfo *mDqueuetData);

void Sleep(UINT32 iCountMs);

#endif
