BLE fota Lamp Demo
Dependencies: mbed-rtos mbed mbed_fota_fan_control
Fork of mbed_fota_fan_control by
Diff: ext_fota/MsgQueue.cpp
- Revision:
- 9:fcf91f563147
- Parent:
- 8:9eec2c246a85
diff -r 9eec2c246a85 -r fcf91f563147 ext_fota/MsgQueue.cpp --- a/ext_fota/MsgQueue.cpp Thu Aug 20 05:16:55 2015 +0000 +++ b/ext_fota/MsgQueue.cpp Mon Aug 24 02:29:16 2015 +0000 @@ -18,18 +18,33 @@ **************************************************************************************** */ namespace sevencore_fota{ - +/** + **************************************************************************************** + * @brief Ble Message Queue Constructor. + * @param[in] Message Queue Size. + * @detail Default size is 512 + **************************************************************************************** + */ MsgQueue::MsgQueue(int MaxSize):MaxNum(MaxSize) { Front = NULL; Rear = NULL; ElemCnt = 0; } - +/** + **************************************************************************************** + * @brief Ble Message Queue Destructor. + **************************************************************************************** + */ MsgQueue::~MsgQueue(void) { } - +/** + **************************************************************************************** + * @brief Add message in queue. + * @param[in] Ble message void pointer. + **************************************************************************************** + */ void MsgQueue::EnQueue(void *vData) { Element *tmp = new Element; @@ -46,7 +61,12 @@ Rear = tmp; } } - +/** + **************************************************************************************** + * @brief Remove message in queue. + * @return void pointer(*void) + **************************************************************************************** + */ void *MsgQueue::DeQueue(void) { void *tmp; @@ -63,12 +83,22 @@ return tmp; } - +/** + **************************************************************************************** + * @brief Return queue element count. + * @return Integer element count. + **************************************************************************************** + */ int MsgQueue::GetElementCount(void) { return ElemCnt; } - +/** + **************************************************************************************** + * @brief Boolean that queue is empty. + * @return Boolean. + **************************************************************************************** + */ bool MsgQueue::IsEmpty(void) { if( Front == NULL) @@ -78,3 +108,4 @@ } }//namespace +/// @} ext_fota module \ No newline at end of file