Oscar Schofield / Mbed 2 deprecated Elec350_OBS

Dependencies:   mbed

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