fork of StatusReporter with specific changes for the changeover to the support personnel database

Dependencies:   ID12RFID SalesforceCaseGenerator-df2014 SalesforceInterface SupportPersonnelDB

Dependents:   df-2014-rfid-case-gen-k64f-complete df-2014-rfid-case-gen-k64f-exercise

Fork of StatusReporter by Doug Anson

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Thu Oct 09 04:06:12 2014 +0000
Parent:
24:324d739f9a22
Commit message:
updates for renamed support personnel database

Changed in this revision

ReportDB.lib Show diff for this revision Revisions of this file
SalesforceCaseGenerator.lib Show annotated file Show diff for this revision Revisions of this file
StatusReporter.cpp Show annotated file Show diff for this revision Revisions of this file
StatusReporter.h Show annotated file Show diff for this revision Revisions of this file
SupportPersonnelDB.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 324d739f9a22 -r 4a49843cd881 ReportDB.lib
--- a/ReportDB.lib	Tue Oct 07 22:12:19 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/users/ansond/code/ReportDB/#ea6ac7464011
diff -r 324d739f9a22 -r 4a49843cd881 SalesforceCaseGenerator.lib
--- a/SalesforceCaseGenerator.lib	Tue Oct 07 22:12:19 2014 +0000
+++ b/SalesforceCaseGenerator.lib	Thu Oct 09 04:06:12 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/ansond/code/SalesforceCaseGenerator/#1e06a3a4740d
+http://developer.mbed.org/users/ansond/code/SalesforceCaseGenerator-df2014/#f9847b7d314a
diff -r 324d739f9a22 -r 4a49843cd881 StatusReporter.cpp
--- a/StatusReporter.cpp	Tue Oct 07 22:12:19 2014 +0000
+++ b/StatusReporter.cpp	Thu Oct 09 04:06:12 2014 +0000
@@ -78,22 +78,22 @@
         int rfid = this->m_rfid_reader.read();
         LOG_CONSOLE("RFID: ID %d found...\r\nProcessing...",rfid);
         
-        // look it up in our ReportDB... proceed only if we find something we know about...
-        char *name = this->m_db.lookupReportName(rfid);
+        // look the RFID tag value up to identify which support person is on site... proceed only if we find a registered technician...
+        char *name = this->m_db.lookupName(rfid);
         if (name != NULL) {
             // build out a simple subject for the case
             char subject[DB_MAX_NAME_LENGTH+1];
             memset(subject,0,DB_MAX_NAME_LENGTH+1);
-            sprintf(subject,"%s case update",name);
+            sprintf(subject,"Technician: %s",name);
             
             // create and dispatch a case
             this->m_logger->turnLEDPurple();
-            char *description = this->m_db.lookupReportDescription(rfid);
-            char *condition = this->m_db.lookupReportCondition(rfid);
+            char *description = this->m_db.lookupDescription(rfid);
+            char *status = this->m_db.lookupStatus(rfid);
             int temperature = this->getLocalTemperature();
-            char *latitude = this->m_db.lookupReportLatitude(rfid);
-            char *longitude = this->m_db.lookupReportLongitude(rfid);
-            bool success = this->m_case_generator.createAnonymousCase(subject,description,condition,temperature,latitude,longitude);
+            char *latitude = this->m_db.lookupLocationLatitude(rfid);
+            char *longitude = this->m_db.lookupLocationLongitude(rfid);
+            bool success = this->m_case_generator.createAnonymousCase(subject,description,status,temperature,latitude,longitude);
             if (success == true) {
                 LOG_CONSOLE("Case Generated!\r\nScanning...");
                 this->m_logger->turnLEDGreen();
diff -r 324d739f9a22 -r 4a49843cd881 StatusReporter.h
--- a/StatusReporter.h	Tue Oct 07 22:12:19 2014 +0000
+++ b/StatusReporter.h	Thu Oct 09 04:06:12 2014 +0000
@@ -24,13 +24,13 @@
  #include "Definitions.h"
  #include "Logger.h"
  #include "SalesForceCaseGenerator.h"
- #include "ReportDB.h"
+ #include "SupportPersonnelDB.h"
  #include "ID12RFID.h"
  
  class StatusReporter {
      private:
         Logger                  *m_logger;
-        ReportDB                 m_db;
+        SupportPersonnelDB       m_db;
         SalesForceCaseGenerator  m_case_generator;
         ID12RFID                 m_rfid_reader;
         
diff -r 324d739f9a22 -r 4a49843cd881 SupportPersonnelDB.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SupportPersonnelDB.lib	Thu Oct 09 04:06:12 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/ansond/code/SupportPersonnelDB/#90df92778e77