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.
Diff: app.cpp
- Revision:
- 21:53c2a598dda1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app.cpp Tue Dec 01 13:18:49 2015 +0000 @@ -0,0 +1,25 @@ +#include "app.h" +#include "mbed.h" + +App::App(string name, Serial* serialPort) // Constructor - Names the app and allocates the Serial Port info. +{ + this -> name = name; + this -> serialPort = serialPort; +} + +string App::getName() // returns the Applications name +{ + return this -> name; +} + +void App::start() +{ + string message = "Application " + this->name + " has Started. \r\n"; + this->serialPort -> puts(message.c_str()); +} + +void App::stop() +{ + string message = "Application " + this->name + " terminated. \r\n"; + this->serialPort -> puts(message.c_str()); +} \ No newline at end of file