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.
Dependencies: BufferedSerial C12832 EndpointMain-rfid EthernetInterface Logger StatusReporter-df2014 mbed-rtos mbed
Fork of df-2014-workshop-rfid-case-generator-k64f by
Diff: main.cpp
- Revision:
- 8:fefcecb66463
- Parent:
- 7:5d6e03557246
- Child:
- 13:2561e3855a81
diff -r 5d6e03557246 -r fefcecb66463 main.cpp
--- a/main.cpp Wed Aug 27 18:51:59 2014 +0000
+++ b/main.cpp Wed Aug 27 20:30:37 2014 +0000
@@ -73,11 +73,14 @@
// create the Salesforce Case Generator
SalesForceCaseGenerator case_generator(&logger);
+ // entering main loop
+ logger.log("Entering Main Loop...\r\nScanning...");
+
// Enter the main loop
while(true) {
#if ID12_ENABLE
// look for a readable RFID tag
- logger.log("RFID: Scanning...");
+ //logger.log("RFID: Scanning...");
if(rfid_reader.readable()) {
// capture the RFID id...
logger.log("RFID: Found RFID.\r\nReading...");
@@ -90,20 +93,20 @@
// build out a simple subject for the case
char subject[MAX_NAME_LENGTH+1];
memset(subject,0,MAX_NAME_LENGTH+1);
- sprintf(subject,"Widget %s detected",name);
+ sprintf(subject,"%s case update",name);
// create and dispatch a case
bool success = case_generator.createCase(subject,db.lookupWidgetDescription(rfid));
if (success == true) {
- logger.log("Case Generated!");
+ logger.log("Case Generated!\r\nScanning...");
}
else {
- logger.log("Case Generation FAILED");
+ logger.log("Case Generation FAILED\r\nScanning...");
}
}
else {
// unrecognized RFID
- logger.log("RFID unknown. Ignoring...");
+ logger.log("RFID unk-ignored.\r\nScanning...");
}
}
#else

