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.
Fork of ROME2_P3 by
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 "IMU.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(Serial& serial, IMU& imu, Controller& controller); 00026 virtual ~SerialServer(); 00027 00028 private: 00029 00030 static const float PERIOD; 00031 static const int BUFFER_SIZE = 64; 00032 00033 Serial& serial; 00034 IMU& imu; 00035 Controller& controller; 00036 string input; 00037 string output; 00038 Ticker ticker; 00039 00040 void receive(); 00041 void transmit(); 00042 }; 00043 00044 #endif /* SERIAL_SERVER_H_ */ 00045
Generated on Thu Jul 14 2022 22:37:02 by
