MiddleWare GUS

Dependents:   MainTaskGus

Files at this revision

API Documentation at this revision

Comitter:
RoHe
Date:
Wed Dec 09 04:44:37 2015 +0000
Parent:
0:d1ff330c5128
Child:
2:a56763667f20
Commit message:
ok

Changed in this revision

Ether.h Show annotated file Show diff for this revision Revisions of this file
Initial.h Show annotated file Show diff for this revision Revisions of this file
SensorPIR.cpp Show diff for this revision Revisions of this file
SensorPIR.h Show diff for this revision Revisions of this file
Sensors.cpp Show annotated file Show diff for this revision Revisions of this file
Sensors.h Show annotated file Show diff for this revision Revisions of this file
StringManager.cpp Show annotated file Show diff for this revision Revisions of this file
StringManager.h Show annotated file Show diff for this revision Revisions of this file
Threads.cpp Show annotated file Show diff for this revision Revisions of this file
Threads.h Show diff for this revision Revisions of this file
--- a/Ether.h	Sat Dec 05 17:43:29 2015 +0000
+++ b/Ether.h	Wed Dec 09 04:44:37 2015 +0000
@@ -24,7 +24,7 @@
 //#include "Initial.h"
 
 static const char* ECHO_SERVER_ADDRESS1= "192.168.1.83";
-static const int ECHO_SERVER_PORT1 = 7;
+static const int ECHO_SERVER_PORT1 = 4010;
 static bool _isConnectedServer1= false;
 
 
--- a/Initial.h	Sat Dec 05 17:43:29 2015 +0000
+++ b/Initial.h	Wed Dec 09 04:44:37 2015 +0000
@@ -16,16 +16,20 @@
 
 #include "mbed.h"
 #include "EthernetInterface.h"
+#include "StringManager.h"
 
 static Serial pc(USBTX, USBRX);
 static DigitalOut ledRED(LED1);
-static  DigitalOut ledGREEN(LED2);
+static DigitalOut ledGREEN(LED2);
 static DigitalOut ledBLUE(LED3);
 static DigitalIn enable1(D8);
 static InterruptIn sw2(SW2);
+static EthernetInterface eth;
+static TCPSocketServer serverTCP;
 static TCPSocketConnection socketTCP1;
 static TCPSocketConnection socketTCP2;
 static UDPSocket socketUDP;
+static StringManager stringManager;
 //sstatic TCPSocketConnection socket;
 static char *cad;
 static char *s_myIP;
@@ -33,5 +37,24 @@
 static char *s_end="\n\r";
 static bool bo_somethingWrong=false;
 
+/*Extern Variables*/
+//START PIR SENSOR INPUT INIT
+static DigitalIn PIR1(D0);
+static DigitalIn PIR2(D1);
+//END PIR SENSOR INPUT INIT
+//START WINDOW SENSOR INPUT
+static DigitalIn W1(D2);
+static DigitalIn W2(D3);
+static DigitalIn W3(D4);
+//END WINDOW SENSOR INPUT INIT
+//START DOOR SENSOR INPUT
+static DigitalIn DOORSensor(D5);
+//END DOOR SENSOR INPUT INIT
+//START LIGHT CONTROL OUTPUT
+static DigitalOut LightControl(D6);
+//END LIGHT CONTROL OUTPUT
+
+
+
 
 #endif
\ No newline at end of file
--- a/SensorPIR.cpp	Sat Dec 05 17:43:29 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
-
-Drivers.cpp
-
-Only to improve the clarity of main .cpp
-This don't have any new classes
-
-All the multiple task are here 
-for Smart Room project asked by 
-Gustavo Torres 
-
-Last update by RoHe 16/11/2015
-
-*/
-
-#include "SensorPIR.h"
-
-Drivers::Drivers()
-{
-    varInt=5;
-}
-
-bool Drivers::is_good(void)
-{
-    return true;
-}
-
-int Drivers::getVar(void)
-{
-    return varInt;
-}
-
-char* Drivers::echo(void)
-{
-    return "Hello from Library";
-}
- 
-/*Defines*/
-//Serial UARTPIR(USBTX, USBRX);
-//DigitalOut dout(LED1);
-//DigitalIn enable2(D1);
-//DigitalIn enable3(D2);
-//DigitalIn enable4(D3);
- 
-/*Functions*/
-int GetPersonStatus(int RoomPrescence) {
-    bool print = 0;
-    bool RoomStatus = 0;   
-    wait(2); //Wait for sensor to take snap shot of still room
-    
-    switch(RoomPrescence)
-    {
-      case 1:
-            if(enable1==1 /*|| enable2==1 || enable3==1 || enable4==1*/)
-            {
-                RoomStatus = 1;
-                ledGREEN=1;
-                if(print == 0)
-                {
-                    pc.printf("Presencia detectada\n\r");
-                    print = 1;
-                }
-            }
-            else
-            {
-                RoomStatus = 0;
-                ledGREEN=0;
-                if(print == 1)
-                {
-                    pc.printf("Ninguna presencia detectada\n\r");
-                    print = 0;
-                }
-            }
-            break;
-            
-        case 2:
-        /*ADD NEW ROOM*/
-            break;
-            
-        default:
-        /*Do Nothing*/
-            break;
-    }
-    return RoomStatus;
-}
\ No newline at end of file
--- a/SensorPIR.h	Sat Dec 05 17:43:29 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-
-Database.cpp
-
-Only to improve the clarity of main .cpp
-This don't have any new classes
-
-All the multiple task are here 
-for Smart Room project asked by 
-Gustavo Torres 
-
-Last update by RoHe 16/11/2015
-
-*/
-#include "mbed.h"
-#include "Initial.h"
-
-#ifndef SENSORPIR_H_
-#define SENSORPIR_H_
-
-class Drivers {
-   
-public:  
-    Drivers();    
-    bool is_good(void);
-    int getVar(void);
-    char* echo(void);
-    
-private:  
-     int varInt; 
-};
-
-
- 
-/*Extern Defines*/
- 
-/*Extern Variables*/
- 
-/*Extern Functions*/
-extern int GetPersonStatus(int RoomPrescence);
-
-
-
-#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sensors.cpp	Wed Dec 09 04:44:37 2015 +0000
@@ -0,0 +1,100 @@
+#include "Sensors.h"
+#include "Initial.h"
+
+
+/*Functions*/
+
+//PRESCENCE DETECTION FUNCTION
+bool GetPrescenceStatus(){
+    static bool RoomStatus = FALSE;   
+
+    if(PIR1==TRUE || PIR2==TRUE)
+    {
+        RoomStatus = TRUE;
+    }
+    else
+    {
+        RoomStatus = FALSE;
+    }
+            
+    return RoomStatus;
+}
+
+//DOOR STATUS FUNCION
+bool GetDoorStatus(){
+    static bool DoorStatus = CLOSED;   
+
+    if(DOORSensor == TRUE)
+        DoorStatus = OPEN;
+    else
+        DoorStatus = CLOSED;
+    
+    return DoorStatus;
+}
+
+
+//WINDOW STATUS FUNCTION
+int GetWindowStatus(int window){
+    static int WindowStatus = CLOSED;   
+
+    switch(window)
+    {
+    case 1:
+        if(W1)
+            WindowStatus = OPEN;
+        else
+            WindowStatus = CLOSED;
+        break;
+    case 2:
+        if(W2)
+            WindowStatus = OPEN;
+        else
+            WindowStatus = CLOSED;
+        break;
+    case 3:
+        if(W3)
+            WindowStatus = OPEN;
+        else
+            WindowStatus = CLOSED;
+        break;
+    default:
+        WindowStatus = BAD_PARAMETER;
+        break;
+    }
+            
+    return WindowStatus;
+}
+
+//LIGHT CONTROL FUNCTION
+int SetLight(bool Light){
+    static int LightStatus = 0;   
+
+    switch(Light)
+    {
+    case 0:
+        LightStatus = OFF;
+        LightControl = OFF;
+        break;
+    case 1:
+        LightStatus = ON;
+        LightControl = ON;
+        break;
+    default:
+        LightStatus = BAD_PARAMETER;
+        break;
+    }
+    
+    return LightStatus;
+}
+
+//PERSON COUNTER FUNCTION
+unsigned int GetPersonStatus(){
+    static unsigned int PersonNumber = 0;   
+    
+    //TODO Insert code here
+    /***      TODO      ***/
+    /***      TODO      ***/
+    /***      TODO      ***/
+    
+    return PersonNumber;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sensors.h	Wed Dec 09 04:44:37 2015 +0000
@@ -0,0 +1,58 @@
+#include "mbed.h"
+
+/*Macros*/
+#define BAD_PARAMETER (-1)
+#define OFF 0
+#define ON 1
+#define FALSE 0
+#define TRUE 1
+#define CLOSED 0
+#define OPEN 1
+
+
+
+
+/*Extern Functions*/
+////////////////////////////////////////////////////
+extern bool GetPrescenceStatus();
+/* GetPrescenceStatus:
+Input parameters  -> void
+Output parameters -> bool RoomStatus;   0-> No Prescence Detected
+                                        1-> Prescence Detected
+*/
+
+////////////////////////////////////////////////////
+extern bool GetDoorStatus();
+/* GetDoorStatus:
+Input parameters  -> void
+Output parameters -> bool DoorStatus;   0-> Door Closed
+                                        1-> Door Open
+*/
+
+////////////////////////////////////////////////////
+extern int GetWindowStatus(int window);
+/* GetWindowStatus:
+Input parameters  -> int window
+Output parameters -> int WindowStatus; -1-> Bad parameter or error
+                                        0-> Window Closed
+                                        1-> Window Open
+*/
+
+////////////////////////////////////////////////////
+extern int SetLight(bool Light);
+/* SetLight:
+Input parameters  -> bool Light;    0-> Light is OFF
+                                    1-> Light is ON
+
+Output parameters -> int WindowStatus; -1-> Bad parameter or error
+                                        0-> Light is OFF
+                                        1-> Light is ON
+*/
+
+////////////////////////////////////////////////////
+extern unsigned int GetPersonStatus();
+/* GetPersonStatus:
+Input parameters  -> void
+
+Output parameters -> unsigned int PersonNumber; 0 - 4294967296.
+*/
\ No newline at end of file
--- a/StringManager.cpp	Sat Dec 05 17:43:29 2015 +0000
+++ b/StringManager.cpp	Wed Dec 09 04:44:37 2015 +0000
@@ -10,4 +10,263 @@
 Last update by RoHe 16/11/2015
 */
 
-#include <string.h>
\ No newline at end of file
+#include <string.h>
+#include "StringManager.h"
+
+StringManager::StringManager()
+{
+    varInt=5;
+}
+
+bool StringManager::is_good(void)
+{
+    return true;
+}
+
+int StringManager::getVar(void)
+{
+    return varInt;
+}
+
+char* StringManager::echo(void)
+{
+    return "Hello from Library";
+}
+
+char* StringManager::processString(char* cadena, char* ipServer)
+{
+
+    /*
+    //cadena = "set\n\r\0";
+    int comp = strncmp(cadena,"set",strlen(cadena)-2);
+    //no comparo las ultimos dos caracteres
+    if(comp<0) {
+        //0 si las cadenas son iguales s1<s2 = -X   s1>s2 = X
+        return "cadena is less than Str Received";
+    } else if(comp>0){ La cadena dos es menor
+        return "Str Received is less than cadena";
+    }else{
+        return "String equals XD";
+        }
+        */
+
+    /*
+    largo = strlen(cadena) // Para obtener el largo de una cadena
+    strcpy(destino, origen) // Copia el contenido de origen en destino
+                            // destino debe ser lo suficientemente grande
+    strcat(destino, origen) // Agrega el contenido de origen al final de destino
+                            // destino debe ser lo suficientemente grande
+    resultado = strcmp(cadena1, cadena2) // Compara dos cadenas
+                // devuelve un valor menor, igual o mayor que 0 según si cadena1 es menor,
+                // igual o mayor que cadena2, respectivamente.
+    posicion = strchr(cadena, caracter) // Devuelve la posición en memoria de la primer
+                // aparición de caracter dentro de cadena
+    posicion = strstr(cadena,subcadena) // Devuelve la posición en memoria de la primer
+                // aparición de subcadena dentro de cadena
+    */
+
+    //Case: "set:light:1" -> light ON
+    //if(strncmp(cadena,"set:light:1",strlen(cadena)-2)) {
+    if(strcmp(cadena,"set:light:1\r\n")==0) {
+        int set_light = SetLight(true);
+        //bool isOKLight = getLight();
+        return "reply:set:light:1:192.168.1.82:success";
+        //Case: "set:light:1" -> light ON
+    } else if(strcmp(cadena,"set:light:0\r\n")==0) {
+        int set_light = SetLight(false);
+        //bool isOKLight = readLight();
+        return "reply:set:light:0:192.168.1.82:succes";
+    }
+    //Case: "get:people"
+    else if(strcmp(cadena,"get:people\r\n")==0) {
+        return stringMakerGetPeople(ipServer);
+    }
+    //Case: "get:presence"
+    else if(strcmp(cadena,"get:presence\r\n")==0) {
+        return stringMakerGetPresence(ipServer);
+    }
+    //Case: "get:door" -> 1 = open , 0 = close
+    else if(strcmp(cadena,"get:door\r\n")==0) {
+        return stringMakerGetDoor(ipServer);
+    }
+    //Case: "get:light" -> 1 = ON , 0 = OFF
+    else if(strcmp(cadena,"get:light\r\n")==0) {
+        return stringMakerGetLight(ipServer);
+    }
+    //Case: "get:window:1"
+    else if(strcmp(cadena,"get:window:1\r\n")==0) {
+        return stringMakerGetWindow1(ipServer);
+    }
+    //Case: "get:window:2"
+    else if(strcmp(cadena,"get:window:2\r\n")==0) {
+        return stringMakerGetWindow2(ipServer);
+    }
+    //Case: "get:window:3"
+    else if(strcmp(cadena,"get:window:3\r\n")==0) {
+        return stringMakerGetWindow3(ipServer);
+    }
+    //Case: "get:room:<IPbroker>"
+    else if(strcmp(cadena,"get:room\r\n")==0) {
+        return stringMakerGetRoom(ipServer);
+    }
+    return "Error,it does NOT in the correct format...";
+}
+
+char* StringManager::stringMakerGetLight(char* ipServer)
+{
+    bool get_light /*= getLight()*/;
+    get_light=true; //HARDCODED please remove
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    if(get_light) {
+        strcat(initialString,":light:1");
+    } else {
+        strcat(initialString,":light:0");
+    }
+    return initialString;
+}
+
+char* StringManager::stringMakerGetDoor(char* ipServer)
+{
+    bool get_door = GetDoorStatus();
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    if(get_door) {
+        strcat(initialString,":door:1");
+    } else {
+        strcat(initialString,":door:0");
+    }
+    return initialString;
+}
+
+char* StringManager::stringMakerGetPresence(char* ipServer)
+{
+    bool get_presence = GetPrescenceStatus();
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    if(get_presence) {
+        strcat(initialString,":presence:1");
+    } else {
+        strcat(initialString,":presence:0");
+    }
+    return initialString;
+}
+char* StringManager::stringMakerGetWindow1(char* ipServer)
+{
+    int get_window1 = GetWindowStatus(1);
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    if(get_window1==1) {
+        strcat(initialString,":window:1:1");
+    } else {
+        strcat(initialString,":window:1:0");
+    }
+    return initialString;
+}
+char* StringManager::stringMakerGetWindow2(char* ipServer)
+{
+    int get_window2 = GetWindowStatus(2);
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    if(get_window2==1) {
+        strcat(initialString,":window:2:1");
+    } else {
+        strcat(initialString,":window:2:0");
+    }
+    return initialString;
+}
+char* StringManager::stringMakerGetWindow3(char* ipServer)
+{
+    int get_window3 = GetWindowStatus(3);
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    if(get_window3==1) {
+        strcat(initialString,":window:3:1");
+    } else {
+        strcat(initialString,":window:3:0");
+    }
+    return initialString;
+}
+
+char* StringManager::stringMakerGetPeople(char* ipServer)
+{
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    if(true) {
+        strcat(initialString,":people:12");
+    } else {
+        strcat(initialString,":people:0");
+    }
+    return initialString;
+}
+
+char* StringManager::stringMakerGetRoom(char* ipServer)
+{
+    bool get_light /*= getLight()*/;
+    bool get_door = GetDoorStatus();
+    bool get_presence = GetPrescenceStatus();
+    int get_persons = GetPersonStatus();
+    int get_window1 = GetWindowStatus(1);
+    int get_window2 = GetWindowStatus(2);
+    int get_window3 = GetWindowStatus(3);
+    strcpy(initialString,"reply:get:status:");
+    strcat(initialString,ipServer);
+    //GET DOOR
+    if(get_door) {
+        strcat(initialString,":door:1");
+    } else {
+        strcat(initialString,":door:0");
+    }
+    //GET LIGHT
+    get_light=true; //HARDCODED please remove
+    if(get_light) {
+        strcat(initialString,":light:1");
+    } else {
+        strcat(initialString,":light:0");
+    }
+    //GET WINDOW 1
+    if(get_window1==1) {
+        strcat(initialString,":window:1:1");
+    } else {
+        strcat(initialString,":window:1:0");
+    }
+    //GET WINDOW 2
+    if(get_window2==1) {
+        strcat(initialString,":2:1");
+    } else {
+        strcat(initialString,":2:0");
+    }
+    //GET WINDOW 3
+    if(get_window3==1) {
+        strcat(initialString,":3:1");
+    } else {
+        strcat(initialString,":3:0");
+    }
+    //GET PEOPLE
+    if(true) {
+        strcat(initialString,":people:12");
+    } else {
+        strcat(initialString,":people:0");
+    }
+    //GET PRESENCE
+    if(get_presence) {
+        strcat(initialString,":presence:1");
+    } else {
+        strcat(initialString,":presence:0");
+    }
+
+    return initialString;
+
+    /*
+    bool get_door = GetDoorStatus();
+        bool get_presence = GetPrescenceStatus();
+        int get_persons = GetPersonStatus();
+        int get_window1 = GetWindowStatus(1);
+        int get_window2 = GetWindowStatus(2);
+        int get_window3 = GetWindowStatus(3);
+
+        return "reply:get:status:192.168.1.82:
+        door:1:light:1:window:1:1:2:1:3:1:people:12:presence:1";
+
+    */
+}
--- a/StringManager.h	Sat Dec 05 17:43:29 2015 +0000
+++ b/StringManager.h	Wed Dec 09 04:44:37 2015 +0000
@@ -11,6 +11,34 @@
 */
 
 #include <string.h>
+#include "Sensors.h" // se movieron las declaraciones de las variables 
+//por que decia que se encontraban definidas mas de una vez
+#include "Initial.h"
 
-static char * joinString(char* str1, char* str2, char* str3);
-static void splitString(char* str1); // it mus return seven strings
\ No newline at end of file
+#ifndef STRINGMANAGER_H_
+#define STRINGMANAGER_H_
+
+class StringManager {
+   
+public:  
+    StringManager();    
+    bool is_good(void);
+    int getVar(void);
+    char* echo(void);    
+    char* processString(char* cadena, char* ipClient);
+    int stringLenght(char* cadena);
+    char initialString[100];
+    
+private:  
+     int varInt; 
+     char* stringMakerGetLight(char* ipClient);
+     char* stringMakerGetDoor(char* ipClient);
+     char* stringMakerGetPresence(char* ipClient);
+     char* stringMakerGetPeople(char* ipClient);
+     char* stringMakerGetWindow1(char* ipClient);
+     char* stringMakerGetWindow2(char* ipClient);
+     char* stringMakerGetWindow3(char* ipClient);
+     char* stringMakerGetRoom(char* ipClient);
+};
+
+#endif
\ No newline at end of file
--- a/Threads.cpp	Sat Dec 05 17:43:29 2015 +0000
+++ b/Threads.cpp	Wed Dec 09 04:44:37 2015 +0000
@@ -12,8 +12,6 @@
 Last update by RoHe 16/11/2015
 
 */
-#include "Threads.h"
-
 #include "Initial.h"
 #include "rtos.h"
 #include "Ether.h"
@@ -21,7 +19,7 @@
 
 static void sw2_press(void)
 {
-    ledGREEN= !ledGREEN;
+    ledBLUE= !ledBLUE;
 
 }
 
@@ -33,17 +31,7 @@
             ledRED=1;//OFF
             ledBLUE=1;//OFF
             ledGREEN = !ledGREEN;
-        } else if(_isConnectedServer1 == true && _isConnectedServer2 == false) {
-            //Color BLUE
-            ledGREEN=1;//OFF
-            ledRED = 1; //OFF
-            ledBLUE = !ledBLUE;
-        } else if(_isConnectedServer1 == false && _isConnectedServer2 == true) {
-            //Color YELLOW  = RED and GREEN
-            ledBLUE =1; //OFF
-            ledRED = !ledRED;
-            ledGREEN = !ledGREEN;
-        } else if(_isConnectedServer1 == false && _isConnectedServer2 == false) {
+        } else {
             //Color RED
             ledGREEN=1;//OFF
             ledBLUE =1; //OFF
@@ -53,36 +41,38 @@
     }
 }
 
-/*
-static bool conect_Server(void)
-{
- ////////////////////// Body of the funtion////////////////////////
-     while (socketTCP1.connect(ECHO_SERVER_ADDRESS1, ECHO_SERVER_PORT1) < 0) {
-         wait(0.5);
-         return false;
-    }
-return true;
- ////////////////////// end if the funtion////////////////////////
-}
-*/
-static void receivedFromServer1(void const *argument)
+
+static void messsageFromClient(void const *argument)
 {
 
     while (true) {
-        // Receive message from server1
-        n1 = socketTCP1.receive(buf1, 256);
-        buf1[n1] = '\0';
+        pc.printf("Wait for new connection...\n\r");
+        TCPSocketConnection client;
+        serverTCP.accept(client);
+        client.set_blocking(false, 1500); // Timeout after (1.5)s
+
+        pc.printf("Connection from: %s\n\r", client.get_address());
+        char buffer[256];
+        while (true) {
+            int n = client.receive(buffer, sizeof(buffer));
+            if (n <= 0) break;
 
-        if(n1>0) {
-            //pc.printf("Received message from server1 IF: '%s'\n\r", buf1);
-            socketTCP1.close();
-            //isConnectedServer1=false;
-        } else {
-            //_isConnectedServer1==false; //quiere decir que se desconecto del servidor
-            //pc.printf("Not received1 ELSE value of lenght: '%u'\n\r",strlen(buf1));
-            socketTCP1.close();
-            //isConnectedServer1=false;
+            // print received message to terminal
+            buffer[n] = '\0';
+            pc.printf("Received message from Client :'%s'\n\r",buffer);
+
+            // printing message sending to terminal
+            //char* bufferReply = "reply:get:status";
+            // strcat(bufferReply, ":");
+            char* bufferReply = stringManager.processString(buffer,eth.getIPAddress()); //eth.getIPAddress() = address server
+            //char* bufferReply="reply:get:status:192.168.1.71:window:1:0\0";
+            pc.printf("Sending message to Client: '%s'\n\r",bufferReply);
+
+            //Sending to Client
+            client.send_all(bufferReply, strlen(bufferReply));
+            if (n <= 0) break;
         }
+        client.close();
         Thread::wait(500);
     }
 
--- a/Threads.h	Sat Dec 05 17:43:29 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-
-Thread.h
-
-Only to improve the clarity of main .cpp
-This don't have any new classes
-
-All the multiple task are here 
-for Smart Room project asked by 
-Gustavo Torres 
-
-Last update by RoHe 16/11/2015
-
-*/
-//#include "Initial.h"
-
-/*
-#ifndef THREADS_H_
-#define THREADS_H_
- 
-  #include "Initial.h"
-  #include "rtos.h"
-  //#include "Threads.cpp"
-  
-#endif
-*/