Machine Cloud

Dependencies:   XBee mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
ddollar
Date:
Fri Aug 16 16:49:34 2013 +0000
Parent:
1:f5eafb42e9e4
Commit message:
model handling

Changed in this revision

MachineCloud.cpp Show annotated file Show diff for this revision Revisions of this file
MachineCloud.h Show annotated file Show diff for this revision Revisions of this file
--- a/MachineCloud.cpp	Thu Aug 15 23:54:25 2013 +0000
+++ b/MachineCloud.cpp	Fri Aug 16 16:49:34 2013 +0000
@@ -1,22 +1,20 @@
 #include <string.h>
 #include "MachineCloud.h"
 
-MachineCloud::MachineCloud(char *model) {
-    init(model, 0x1000);
+MachineCloud::MachineCloud() {
+    init(0x1000);
 }
 
-MachineCloud::MachineCloud(char *model, uint16_t router) {
-    init(model, router);
+MachineCloud::MachineCloud(uint16_t router) {
+    init(router);
 }
 
-void MachineCloud::init(char *model, uint16_t router) {
-    m_model = model;
+void MachineCloud::init(uint16_t router) {
     m_router = router;
 }
 
 int MachineCloud::connect() {
     m_xbee = new XBee(p9, p10);
-    send("model", m_model);
     return 0;
 }
 
--- a/MachineCloud.h	Thu Aug 15 23:54:25 2013 +0000
+++ b/MachineCloud.h	Fri Aug 16 16:49:34 2013 +0000
@@ -35,8 +35,8 @@
     public:
 
         // constructor
-        MachineCloud(char *model);
-        MachineCloud(char *model, uint16_t router);
+        MachineCloud();
+        MachineCloud(uint16_t router);
         
         // connect to the machine cloud
         int connect();
@@ -54,11 +54,10 @@
                 
     private:
         
-        void init(char *model, uint16_t router);
+        void init(uint16_t router);
         void receive(char *key, char *value);
         
         Mutex m_lock;
-        char *m_model;
         MachineCloudCallback *m_receiverFunction;
         MachineCloudReceiver *m_receiverObject;
         uint16_t m_router;