ROME_P5
Dependencies: mbed
SerialServer.h
- Committer:
- Inaueadr
- Date:
- 2018-04-27
- Revision:
- 0:29be10cb0afc
File content as of revision 0:29be10cb0afc:
/* * SerialServer.h * Copyright (c) 2018, ZHAW * All rights reserved. */ #ifndef SERIAL_SERVER_H_ #define SERIAL_SERVER_H_ #include <cstdlib> #include <string> #include <mbed.h> #include "LIDAR.h" #include "Controller.h" using namespace std; /** * This class implements a communication server using a serial interface. */ class SerialServer { public: SerialServer(RawSerial& serial, LIDAR& lidar, Controller& controller); virtual ~SerialServer(); private: static const char INT_TO_CHAR[]; static const int BUFFER_SIZE = 64; RawSerial& serial; LIDAR& lidar; Controller& controller; string input; string output; Ticker ticker; void receive(); void transmit(); }; #endif /* SERIAL_SERVER_H_ */