Dreamforce 2014 Workshop RFID Case Generator - Completed Exercise

Dependencies:   BufferedSerial C12832 EndpointMain-rfid EthernetInterface Logger StatusReporter-df2014 mbed-rtos mbed

Fork of df-2014-workshop-rfid-case-generator-k64f by Doug Anson

Committer:
ansond
Date:
Mon Oct 06 03:15:28 2014 +0000
Revision:
53:344e2d3de190
Parent:
51:5cd56a48084a
Child:
56:d03cbd53bb34
updates for DF

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 0:df2aa79c64f2 1 /* Copyright C2014 ARM, MIT License
ansond 0:df2aa79c64f2 2 *
ansond 0:df2aa79c64f2 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ansond 0:df2aa79c64f2 4 * and associated documentation files the "Software", to deal in the Software without restriction,
ansond 0:df2aa79c64f2 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
ansond 0:df2aa79c64f2 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ansond 0:df2aa79c64f2 7 * furnished to do so, subject to the following conditions:
ansond 0:df2aa79c64f2 8 *
ansond 0:df2aa79c64f2 9 * The above copyright notice and this permission notice shall be included in all copies or
ansond 0:df2aa79c64f2 10 * substantial portions of the Software.
ansond 0:df2aa79c64f2 11 *
ansond 0:df2aa79c64f2 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ansond 0:df2aa79c64f2 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ansond 0:df2aa79c64f2 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ansond 0:df2aa79c64f2 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ansond 0:df2aa79c64f2 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ansond 0:df2aa79c64f2 17 */
ansond 0:df2aa79c64f2 18
ansond 0:df2aa79c64f2 19 #ifndef _DEFINITIONS_H_
ansond 0:df2aa79c64f2 20 #define _DEFINITIONS_H_
ansond 0:df2aa79c64f2 21
ansond 1:5c7d6b24a773 22 // ----------------- WORKSHOP TUNABLES -----------------
ansond 1:5c7d6b24a773 23
ansond 48:0ff25290cce3 24 // 3 Reports for RFID-tag based support/repair conditions
ansond 50:6e6b8351ee60 25 #define FIRST_REPORT_RFID 7550993
ansond 48:0ff25290cce3 26 #define FIRST_REPORT_NAME "Tech 49"
ansond 48:0ff25290cce3 27 #define FIRST_REPORT_DESCRIPTION "Light Out"
ansond 48:0ff25290cce3 28 #define FIRST_REPORT_CONDITION "Investigating Issue"
ansond 48:0ff25290cce3 29 #define FIRST_REPORT_LATITUDE "37.404120"
ansond 48:0ff25290cce3 30 #define FIRST_REPORT_LONGITUDE "-121.973195"
ansond 48:0ff25290cce3 31
ansond 48:0ff25290cce3 32 #define SECOND_REPORT_RFID 7567145
ansond 48:0ff25290cce3 33 #define SECOND_REPORT_NAME "Tech 49"
ansond 48:0ff25290cce3 34 #define SECOND_REPORT_DESCRIPTION "Light Out"
ansond 48:0ff25290cce3 35 #define SECOND_REPORT_CONDITION "Resolved - lightbulb burned out"
ansond 48:0ff25290cce3 36 #define SECOND_REPORT_LATITUDE "37.404120"
ansond 48:0ff25290cce3 37 #define SECOND_REPORT_LONGITUDE "-121.973195"
ansond 48:0ff25290cce3 38
ansond 50:6e6b8351ee60 39 #define THIRD_REPORT_RFID 7559217
ansond 48:0ff25290cce3 40 #define THIRD_REPORT_NAME "Tech 49"
ansond 48:0ff25290cce3 41 #define THIRD_REPORT_DESCRIPTION "Light Out"
ansond 48:0ff25290cce3 42 #define THIRD_REPORT_CONDITION "Unresolved - escalate"
ansond 48:0ff25290cce3 43 #define THIRD_REPORT_LATITUDE "37.404120"
ansond 48:0ff25290cce3 44 #define THIRD_REPORT_LONGITUDE "-121.973195"
ansond 1:5c7d6b24a773 45
ansond 1:5c7d6b24a773 46 // ----------------- WORKSHOP TUNABLES -----------------
ansond 1:5c7d6b24a773 47
ansond 1:5c7d6b24a773 48 // mbed
ansond 0:df2aa79c64f2 49 #include "mbed.h"
ansond 0:df2aa79c64f2 50
ansond 0:df2aa79c64f2 51 // Our App version
ansond 5:606c2b0be78b 52 #define APP_VERSION "1.0.0"
ansond 3:03108e424931 53
ansond 3:03108e424931 54 // DF2014 CaseGenerator Relay for mbed - ties into the Salesforce APEX host for case generation
ansond 5:606c2b0be78b 55 #define DF_CASE_GEN_URL "https://df2014-arm-developer-edition.na15.force.com/services/apexrest/CaseService"
ansond 0:df2aa79c64f2 56
ansond 6:427c387b10e7 57 // Enable/Disable RFID ID12 usage
ansond 7:5d6e03557246 58 #define ID12_ENABLE true // true - enable, false - disable
ansond 6:427c387b10e7 59
ansond 51:5cd56a48084a 60 // Enable/Disable verbose debugging
ansond 51:5cd56a48084a 61 #define ENABLE_DEBUG_LOGGING false // true - enabled, false - disabled (default)
ansond 51:5cd56a48084a 62
ansond 51:5cd56a48084a 63 // maximum memory buffer chunk
ansond 51:5cd56a48084a 64 #define MAX_BUFFER_LENGTH 2048
ansond 51:5cd56a48084a 65
ansond 51:5cd56a48084a 66 // small buffer chunk
ansond 51:5cd56a48084a 67 #define MAX_SMALL_BUFFER_LENGTH 256
ansond 51:5cd56a48084a 68
ansond 0:df2aa79c64f2 69 // What platform we are compiling on
ansond 23:3632b2578c74 70 #define _K64F_PLATFORM true
ansond 0:df2aa79c64f2 71
ansond 27:9bb430dd6c07 72 // K64F needs to launch the task in a thread with a large stack size...
ansond 51:5cd56a48084a 73 #define STACK_SIZE 40000
ansond 51:5cd56a48084a 74
ansond 0:df2aa79c64f2 75 // Wait Time for iterations (ms)
ansond 0:df2aa79c64f2 76 #define WAIT_TIME_MS 500
ansond 0:df2aa79c64f2 77
ansond 19:341ce6a43a84 78 // Blink Time
ansond 19:341ce6a43a84 79 #define BLINK_TIME 250
ansond 19:341ce6a43a84 80
ansond 48:0ff25290cce3 81 // Tunables for ReportDB
ansond 17:67eeffe10934 82 #define DB_MAX_NAME_LENGTH 64
ansond 17:67eeffe10934 83 #define DB_MAX_DESCRIPTION_LENGTH 128
ansond 48:0ff25290cce3 84 #define DB_MAX_CONDITION_LENGTH 128
ansond 48:0ff25290cce3 85 #define DB_MAX_LATLONG_LENGTH 32
ansond 48:0ff25290cce3 86 #define DB_MAX_NUM_REPORTS 3
ansond 0:df2aa79c64f2 87
ansond 48:0ff25290cce3 88 // convenience definitions for ReportDB... 3 RFID tags/station
ansond 48:0ff25290cce3 89 #define FIRST_REPORT 0
ansond 48:0ff25290cce3 90 #define SECOND_REPORT 1
ansond 48:0ff25290cce3 91 #define THIRD_REPORT 2
ansond 0:df2aa79c64f2 92
ansond 53:344e2d3de190 93 // PINS for RFID Reader Shield - ID12 RFID sensor + TMP36 temperature sensor
ansond 51:5cd56a48084a 94 #define RFID_TX_PIN D1
ansond 51:5cd56a48084a 95 #define RFID_RX_PIN D0
ansond 51:5cd56a48084a 96 #define TEMP_PIN A3
ansond 22:1b9e29933ab3 97
ansond 0:df2aa79c64f2 98 #endif // _DEFINITIONS_H_