Bluetooth Low Energy based Firmware Over The Air with Mbed. Mbed part is a external processor of the IoT devices and communicate with a Bluetooth module. The Bluetooth module have to support BLE and implement BLE FOTA profile designed by ours. BLE FOTA profile specification is available from our GIT hub wiki(https://github.com/sevencore/BLEFOTA).

Dependencies:   mbed

Fork of mbed_fota by KIM HyoengJun

Bluetooth Low Energy based Firmware Over The Air with Mbed. Mbed part is a external processor of the IoT devices and communicate with a Bluetooth module. The Bluetooth module have to support BLE and implement BLE FOTA profile designed by ours. BLE FOTA profile specification is available from our GIT hub wiki.

Revision:
0:a1f6b1ba8a1e
Child:
1:5cf3a6c969be
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ext_fota/MsgQueue.cpp	Mon Jun 22 07:19:59 2015 +0000
@@ -0,0 +1,64 @@
+#include "msg_queue.h"
+#include "mbed.h"
+
+namespace sevencore_fota{
+    
+Msg_Queue::Msg_Queue(int MaxSize):MaxNum(MaxSize)
+{
+    Front = NULL;
+    Rear = NULL;
+    ElemCnt = 0;
+}
+
+Msg_Queue::~Msg_Queue(void)
+{
+}
+
+void Msg_Queue::EnQueue(void *vData)
+{
+    Element *tmp = new Element;
+    tmp->Data = vData;
+    tmp->Next = NULL;
+    ElemCnt++;
+    if( Front == NULL)
+    {
+        Front = tmp;
+        Rear = tmp;
+    }else
+    {
+        Rear->Next = tmp;
+        Rear = tmp;
+    }    
+}
+
+void *Msg_Queue::DeQueue(void)
+{
+    void *tmp;
+    Element *tmpElem;
+    
+    if(Front == NULL)
+        return NULL;
+    
+    ElemCnt--;
+    tmpElem = Front;
+    Front = tmpElem->Next;
+    tmp = tmpElem->Data;
+    free(tmpElem);
+    
+    return tmp;
+}   
+
+int Msg_Queue::GetElementCount(void)
+{
+    return ElemCnt;
+}
+
+bool Msg_Queue::IsEmpty(void)
+{
+    if( Front == NULL)
+        return false;
+    else
+        return true;
+}
+
+}//namespace