![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
BLE fota Lamp Demo
Dependencies: mbed-rtos mbed mbed_fota_fan_control
Fork of mbed_fota_fan_control by
ext_fota/MsgQueue.h
- Committer:
- dudnwjs
- Date:
- 2015-10-13
- Revision:
- 13:e714e2971c49
- Parent:
- 8:9eec2c246a85
File content as of revision 13:e714e2971c49:
/** * @file MsgQueue.h * @brief Ble message queue * Copyright 2015 SEVENCORE Co., Ltd. * * @author HyeongJun Kim * @version 1.0.0 * @date 2015-08-19 */ #ifndef MSGQUEUE_H #define MSGQUEUE_H /** **************************************************************************************** * @addtogroup ext_fota module * @brief Ble message Queue Class Header. * * @{ **************************************************************************************** */ namespace sevencore_fota{ struct Element { void *Data; struct Element *Next; }; class MsgQueue { public: /** **************************************************************************************** * @brief Ble message queue constructor **************************************************************************************** */ MsgQueue(int MaxSize = 512); /** **************************************************************************************** * @brief Ble message queue destructor **************************************************************************************** */ ~MsgQueue(void); /** **************************************************************************************** * @brief Add message in queue **************************************************************************************** */ void EnQueue(void *vData); /** **************************************************************************************** * @brief Remove message in queue **************************************************************************************** */ void *DeQueue(void); /** **************************************************************************************** * @brief Return queue element count **************************************************************************************** */ int GetElementCount(void); /** **************************************************************************************** * @brief Boolean that queue is empty **************************************************************************************** */ bool IsEmpty(void); private: Element *Front; Element *Rear; const int MaxNum; int ElemCnt; }; }//namespace /// @} ext_fota module #endif //MSG_QUEUE_H