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

Revision:
25:4a49843cd881
Parent:
24:324d739f9a22
--- 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();