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 ExperimentServer by
Revision 10:47927a20c04d, committed 2017-09-25
- Comitter:
- benkatz
- Date:
- Mon Sep 25 19:33:17 2017 +0000
- Parent:
- 9:5a1f3abfca66
- Commit message:
- lab3;
Changed in this revision
ExperimentServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
ExperimentServer.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ExperimentServer.cpp Mon Sep 14 14:28:07 2015 +0000 +++ b/ExperimentServer.cpp Mon Sep 25 19:33:17 2017 +0000 @@ -6,7 +6,7 @@ _data_cnt = 0; } -void ExperimentServer::attachTerminal( Serial & terminal) { +void ExperimentServer::attachTerminal( RawSerial & terminal) { _terminal = &terminal; } @@ -43,7 +43,6 @@ _terminal->printf("\r\n========================\r\nNew Experiment\r\n"); _terminal->printf("...Waiting for parameters...\r\n"); } - int n = _server.receiveFrom(_client,(char *) params, num_params*sizeof(float)); if ( (n% 4) > 0 ) { if(_terminal!=NULL) {
--- a/ExperimentServer.h Mon Sep 14 14:28:07 2015 +0000 +++ b/ExperimentServer.h Mon Sep 25 19:33:17 2017 +0000 @@ -26,7 +26,7 @@ * * @param terminal Serial terminal to be used for debugging messages */ - void attachTerminal( Serial & terminal); + void attachTerminal( RawSerial & terminal); /** * Initialize the server. @@ -92,7 +92,7 @@ EthernetInterface _eth; // Low level ethernet object Endpoint _client; // Stores client connected to server UDPSocket _server; // Low level UDP server object - Serial * _terminal; // Pointer to attached terminal for debugging + RawSerial * _terminal; // Pointer to attached terminal for debugging float _buffer[_MAX_BUFFER_SIZE]; // Buffer for batch data storage before sending int _data_cnt; // Current occupied length of the buffer