This short block of code added to TactonicNums.cpp, along with a later call to <code>mg_poll_server(milliseconds_per_poll)</code> in an infinite loop, sets up a server, sets its hosting information, and adds three request handlers that allow us to work with different URIs from within the file calling the server itself.
This is the result.
![]() |
| Human-Readable Data |
![]() |
| Machine-Readable Data |
![]() |
| Center of Pressure |
These three are accessed by navigating to the server's IP and listening port while it is running.
They are, respectively
- <ServerIP>:<ListeningPort>/
- <ServerIP>:<ListeningPort>/data
- <ServerIP>:<ListeningPort>/center
A significant issue so far has been response time. Requests can take up to 30 seconds to complete, and that performance is not good enough for our needs. Cesanta has given Mongoose its own threading API, so that can be implemented to make a concurrent server if necessary.
The updated files are zipped in Box with one big improvement: a Makefile! No longer is some huge compilation command involving no less than 7 filenames necessary!




No comments:
Post a Comment