Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SerialServer.h
00001 /* 00002 * SerialServer.h 00003 * Copyright (c) 2018, ZHAW 00004 * All rights reserved. 00005 */ 00006 00007 #ifndef SERIAL_SERVER_H_ 00008 #define SERIAL_SERVER_H_ 00009 00010 #include <cstdlib> 00011 #include <string> 00012 #include <mbed.h> 00013 #include "LIDAR.h" 00014 #include "Controller.h" 00015 00016 using namespace std; 00017 00018 /** 00019 * This class implements a communication server using a serial interface. 00020 */ 00021 class SerialServer { 00022 00023 public: 00024 00025 SerialServer(RawSerial& serial, LIDAR& lidar, Controller& controller); 00026 virtual ~SerialServer(); 00027 00028 private: 00029 00030 static const float PERIOD; 00031 static const char INT_TO_CHAR[]; 00032 static const int BUFFER_SIZE = 64; 00033 00034 RawSerial& serial; 00035 LIDAR& lidar; 00036 Controller& controller; 00037 string input; 00038 string output; 00039 Ticker ticker; 00040 00041 void receive(); 00042 void transmit(); 00043 }; 00044 00045 #endif /* SERIAL_SERVER_H_ */ 00046
Generated on Wed Jul 27 2022 09:04:32 by
1.7.2