BA / SerialCom

Fork of OmniWheels by Gustav Atmel

Revision:
2:798925c9e4a8
Parent:
1:9c5af431a1f1
diff -r 9c5af431a1f1 -r 798925c9e4a8 SerialServerRes.h
--- a/SerialServerRes.h	Tue May 01 15:47:08 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * SerialServer.h
- * Copyright (c) 2017, ZHAW
- * All rights reserved.
- *
- *  Created on: 05.06.2017
- *      Author: Marcel Honegger
- */
-
-#ifndef SERIAL_SERVER_RES_H_
-#define SERIAL_SERVER_RES_H_
-
-#include <cstdlib>
-#include <string>
-#include <vector>
-#include <mbed.h>
-#include "Signal.h"
-
-using namespace std;
-
-
-
-/**
- * This class implements a communication server using a serial interface.
- */
-class SerialServerRes {
-    
-    public:
-        
-                    SerialServerRes(RawSerial& serial);
-        virtual     ~SerialServerRes();
-        
-    private:
-        
-        static const uint32_t   STACK_SIZE = 2048 ;      // stack size of thread, given in [bytes]
-        static const float      PERIOD;                 // the period of the timer interrupt, given in [s]
-        static const char       DELIM;
-        
-        RawSerial&      serial;
-        string          input;
-        string          output;
-        vector<string>  tokens;
-        Signal          signal;
-        Thread          thread;
-        Ticker          ticker;
-        bool            sendData;
-        int             runCount;
-
-        void            sendSignal();
-        void            run();
-        void            splitString();
-};
-
-#endif /* SERIAL_SERVER_H_ */