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:
Thu Oct 09 04:10:42 2014 +0000
Revision:
56:d03cbd53bb34
Parent:
53:344e2d3de190
updated with new status report with support personnel database

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 56:d03cbd53bb34 23
ansond 56:d03cbd53bb34 24 // SUPPORT PERSON #1 (this will be dispatched as a Case if the first RFID tag is swiped)
ansond 56:d03cbd53bb34 25 #define FIRST_SUPPORT_PERSON_RFID 1234567
ansond 56:d03cbd53bb34 26 #define FIRST_SUPPORT_PERSON_NAME "James T. Kirk"
ansond 56:d03cbd53bb34 27 #define FIRST_SUPPORT_PERSON_DESCRIPTION "Federation Technician #NCC-1701"
ansond 56:d03cbd53bb34 28 #define FIRST_SUPPORT_PERSON_STATUS "On site/servicing"
ansond 56:d03cbd53bb34 29 #define FIRST_SUPPORT_PERSON_LATITUDE "37.404120"
ansond 56:d03cbd53bb34 30 #define FIRST_SUPPORT_PERSON_LONGITUDE "-121.973195"
ansond 48:0ff25290cce3 31
ansond 56:d03cbd53bb34 32 // SUPPORT PERSON #2 (this will be dispatched as a Case if the second RFID tag is swiped)
ansond 56:d03cbd53bb34 33 #define SECOND_SUPPORT_PERSON_RFID 1234567
ansond 56:d03cbd53bb34 34 #define SECOND_SUPPORT_PERSON_NAME "Harry Potter"
ansond 56:d03cbd53bb34 35 #define SECOND_SUPPORT_PERSON_DESCRIPTION "Hogwarts Technician #WIZ-1234"
ansond 56:d03cbd53bb34 36 #define SECOND_SUPPORT_PERSON_STATUS "On site/servicing"
ansond 56:d03cbd53bb34 37 #define SECOND_SUPPORT_PERSON_LATITUDE "37.404120"
ansond 56:d03cbd53bb34 38 #define SECOND_SUPPORT_PERSON_LONGITUDE "-121.973195"
ansond 48:0ff25290cce3 39
ansond 56:d03cbd53bb34 40 // SUPPORT PERSON #3 (this will be dispatched as a Case if the third RFID tag is swiped)
ansond 56:d03cbd53bb34 41 #define THIRD_SUPPORT_PERSON_RFID 1234567
ansond 56:d03cbd53bb34 42 #define THIRD_SUPPORT_PERSON_NAME "Kramer"
ansond 56:d03cbd53bb34 43 #define THIRD_SUPPORT_PERSON_DESCRIPTION "UNKNOWN Technician #-1"
ansond 56:d03cbd53bb34 44 #define THIRD_SUPPORT_PERSON_STATUS "Off site/action unsure"
ansond 56:d03cbd53bb34 45 #define THIRD_SUPPORT_PERSON_LATITUDE "37.404120"
ansond 56:d03cbd53bb34 46 #define THIRD_SUPPORT_PERSON_LONGITUDE "-121.973195"
ansond 1:5c7d6b24a773 47
ansond 1:5c7d6b24a773 48 // ----------------- WORKSHOP TUNABLES -----------------
ansond 1:5c7d6b24a773 49
ansond 1:5c7d6b24a773 50 // mbed
ansond 0:df2aa79c64f2 51 #include "mbed.h"
ansond 0:df2aa79c64f2 52
ansond 0:df2aa79c64f2 53 // Our App version
ansond 56:d03cbd53bb34 54 #define APP_VERSION "1.0.0"
ansond 3:03108e424931 55
ansond 3:03108e424931 56 // DF2014 CaseGenerator Relay for mbed - ties into the Salesforce APEX host for case generation
ansond 56:d03cbd53bb34 57 #define DF_CASE_GEN_URL "https://df2014-arm-developer-edition.na15.force.com/services/apexrest/CaseService"
ansond 0:df2aa79c64f2 58
ansond 6:427c387b10e7 59 // Enable/Disable RFID ID12 usage
ansond 56:d03cbd53bb34 60 #define ID12_ENABLE true // true - enable, false - disable
ansond 6:427c387b10e7 61
ansond 51:5cd56a48084a 62 // Enable/Disable verbose debugging
ansond 56:d03cbd53bb34 63 #define ENABLE_DEBUG_LOGGING false // true - enabled, false - disabled (default)
ansond 51:5cd56a48084a 64
ansond 51:5cd56a48084a 65 // maximum memory buffer chunk
ansond 56:d03cbd53bb34 66 #define MAX_BUFFER_LENGTH 2048
ansond 51:5cd56a48084a 67
ansond 51:5cd56a48084a 68 // small buffer chunk
ansond 56:d03cbd53bb34 69 #define MAX_SMALL_BUFFER_LENGTH 256
ansond 51:5cd56a48084a 70
ansond 0:df2aa79c64f2 71 // What platform we are compiling on
ansond 56:d03cbd53bb34 72 #define _K64F_PLATFORM true
ansond 0:df2aa79c64f2 73
ansond 27:9bb430dd6c07 74 // K64F needs to launch the task in a thread with a large stack size...
ansond 56:d03cbd53bb34 75 #define STACK_SIZE 40000
ansond 51:5cd56a48084a 76
ansond 0:df2aa79c64f2 77 // Wait Time for iterations (ms)
ansond 56:d03cbd53bb34 78 #define WAIT_TIME_MS 500
ansond 0:df2aa79c64f2 79
ansond 19:341ce6a43a84 80 // Blink Time
ansond 56:d03cbd53bb34 81 #define BLINK_TIME 250
ansond 19:341ce6a43a84 82
ansond 56:d03cbd53bb34 83 // Memory tunables for SupportPersonnelDB
ansond 56:d03cbd53bb34 84 #define DB_MAX_NAME_LENGTH 64
ansond 56:d03cbd53bb34 85 #define DB_MAX_DESCRIPTION_LENGTH 128
ansond 56:d03cbd53bb34 86 #define DB_MAX_STATUS_LENGTH 128
ansond 56:d03cbd53bb34 87 #define DB_MAX_LATLONG_LENGTH 32
ansond 56:d03cbd53bb34 88 #define DB_MAX_NUM_SUPPORT_PERSONS 3
ansond 0:df2aa79c64f2 89
ansond 56:d03cbd53bb34 90 // convenience definitions for SupportPersonnelDB... 3 RFID tags/workshop station
ansond 56:d03cbd53bb34 91 #define FIRST_SUPPORT_PERSON 0
ansond 56:d03cbd53bb34 92 #define SECOND_SUPPORT_PERSON 1
ansond 56:d03cbd53bb34 93 #define THIRD_SUPPORT_PERSON 2
ansond 0:df2aa79c64f2 94
ansond 53:344e2d3de190 95 // PINS for RFID Reader Shield - ID12 RFID sensor + TMP36 temperature sensor
ansond 56:d03cbd53bb34 96 #define RFID_TX_PIN D1
ansond 56:d03cbd53bb34 97 #define RFID_RX_PIN D0
ansond 56:d03cbd53bb34 98 #define TEMP_PIN A3
ansond 22:1b9e29933ab3 99
ansond 0:df2aa79c64f2 100 #endif // _DEFINITIONS_H_