![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
external fota service implementation
ext_fota/msg_queue.h@0:bab3be8d31cf, 2015-06-19 (annotated)
- Committer:
- dudnwjs
- Date:
- Fri Jun 19 06:49:20 2015 +0000
- Revision:
- 0:bab3be8d31cf
add GAPM,GAPC header
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dudnwjs | 0:bab3be8d31cf | 1 | #ifndef __MSG_QUEUE_H__ |
dudnwjs | 0:bab3be8d31cf | 2 | #define __MSG_QUEUE_H__ |
dudnwjs | 0:bab3be8d31cf | 3 | |
dudnwjs | 0:bab3be8d31cf | 4 | struct Element |
dudnwjs | 0:bab3be8d31cf | 5 | { |
dudnwjs | 0:bab3be8d31cf | 6 | void *Data; |
dudnwjs | 0:bab3be8d31cf | 7 | struct Element *Next; |
dudnwjs | 0:bab3be8d31cf | 8 | }; |
dudnwjs | 0:bab3be8d31cf | 9 | |
dudnwjs | 0:bab3be8d31cf | 10 | class Msg_Queue |
dudnwjs | 0:bab3be8d31cf | 11 | { |
dudnwjs | 0:bab3be8d31cf | 12 | public: |
dudnwjs | 0:bab3be8d31cf | 13 | |
dudnwjs | 0:bab3be8d31cf | 14 | Msg_Queue(int MaxSize = 512); |
dudnwjs | 0:bab3be8d31cf | 15 | ~Msg_Queue(void); |
dudnwjs | 0:bab3be8d31cf | 16 | void EnQueue(void *vData); |
dudnwjs | 0:bab3be8d31cf | 17 | void *DeQueue(void); |
dudnwjs | 0:bab3be8d31cf | 18 | int GetElementCount(void); |
dudnwjs | 0:bab3be8d31cf | 19 | bool IsEmpty(void); |
dudnwjs | 0:bab3be8d31cf | 20 | |
dudnwjs | 0:bab3be8d31cf | 21 | private: |
dudnwjs | 0:bab3be8d31cf | 22 | Element *Front; |
dudnwjs | 0:bab3be8d31cf | 23 | Element *Rear; |
dudnwjs | 0:bab3be8d31cf | 24 | const int MaxNum; |
dudnwjs | 0:bab3be8d31cf | 25 | int ElemCnt; |
dudnwjs | 0:bab3be8d31cf | 26 | |
dudnwjs | 0:bab3be8d31cf | 27 | }; |
dudnwjs | 0:bab3be8d31cf | 28 | |
dudnwjs | 0:bab3be8d31cf | 29 | |
dudnwjs | 0:bab3be8d31cf | 30 | #endif //__MSG_QUEUE_H__ |