Dreamforce 2014 Workshop RFID Case Generator - FRDM-K64F
Dependencies: EndpointMain-rfid EthernetInterface StatusReporter BufferedSerial mbed-rtos mbed Logger C12832
Fork of df-2014-workshop-rfid-case-generator-ublox by
Definitions.h@48:0ff25290cce3, 2014-09-24 (annotated)
- Committer:
- ansond
- Date:
- Wed Sep 24 18:53:33 2014 +0000
- Revision:
- 48:0ff25290cce3
- Parent:
- 46:68fc0a636266
- Child:
- 50:6e6b8351ee60
updates for temp and lat/long inclusion into case
Who changed what in which revision?
User | Revision | Line number | New 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 | 48:0ff25290cce3 | 25 | #define FIRST_REPORT_RFID 9909120 |
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 | 48:0ff25290cce3 | 39 | #define THIRD_REPORT_RFID 9909122 |
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 | 46:68fc0a636266 | 60 | // maximum memory buffer chunk (including HTTPS requests) |
ansond | 48:0ff25290cce3 | 61 | #define MAX_BUFFER_LENGTH 512 |
ansond | 46:68fc0a636266 | 62 | |
ansond | 0:df2aa79c64f2 | 63 | // What platform we are compiling on |
ansond | 23:3632b2578c74 | 64 | #define _NXP_PLATFORM false |
ansond | 22:1b9e29933ab3 | 65 | #define _UBLOX_PLATFORM false |
ansond | 23:3632b2578c74 | 66 | #define _K64F_PLATFORM true |
ansond | 0:df2aa79c64f2 | 67 | |
ansond | 27:9bb430dd6c07 | 68 | // K64F needs to launch the task in a thread with a large stack size... |
ansond | 27:9bb430dd6c07 | 69 | #if _K64F_PLATFORM |
ansond | 46:68fc0a636266 | 70 | #define STACK_SIZE 40000 |
ansond | 27:9bb430dd6c07 | 71 | #endif |
ansond | 27:9bb430dd6c07 | 72 | |
ansond | 0:df2aa79c64f2 | 73 | // Wait Time for iterations (ms) |
ansond | 0:df2aa79c64f2 | 74 | #define WAIT_TIME_MS 500 |
ansond | 0:df2aa79c64f2 | 75 | |
ansond | 19:341ce6a43a84 | 76 | // Blink Time |
ansond | 19:341ce6a43a84 | 77 | #define BLINK_TIME 250 |
ansond | 19:341ce6a43a84 | 78 | |
ansond | 48:0ff25290cce3 | 79 | // Tunables for ReportDB |
ansond | 17:67eeffe10934 | 80 | #define DB_MAX_NAME_LENGTH 64 |
ansond | 17:67eeffe10934 | 81 | #define DB_MAX_DESCRIPTION_LENGTH 128 |
ansond | 48:0ff25290cce3 | 82 | #define DB_MAX_CONDITION_LENGTH 128 |
ansond | 48:0ff25290cce3 | 83 | #define DB_MAX_LATLONG_LENGTH 32 |
ansond | 48:0ff25290cce3 | 84 | #define DB_MAX_NUM_REPORTS 3 |
ansond | 0:df2aa79c64f2 | 85 | |
ansond | 48:0ff25290cce3 | 86 | // convenience definitions for ReportDB... 3 RFID tags/station |
ansond | 48:0ff25290cce3 | 87 | #define FIRST_REPORT 0 |
ansond | 48:0ff25290cce3 | 88 | #define SECOND_REPORT 1 |
ansond | 48:0ff25290cce3 | 89 | #define THIRD_REPORT 2 |
ansond | 0:df2aa79c64f2 | 90 | |
ansond | 22:1b9e29933ab3 | 91 | // PINS for RFID Reader |
ansond | 22:1b9e29933ab3 | 92 | #if _NXP_PLATFORM |
ansond | 22:1b9e29933ab3 | 93 | #define RFID_TX_PIN p13 |
ansond | 22:1b9e29933ab3 | 94 | #define RFID_RX_PIN p14 |
ansond | 48:0ff25290cce3 | 95 | #define TEMP_PIN p15 |
ansond | 22:1b9e29933ab3 | 96 | #endif |
ansond | 22:1b9e29933ab3 | 97 | #if _UBLOX_PLATFORM |
ansond | 48:0ff25290cce3 | 98 | #define RFID_TX_PIN D1 |
ansond | 48:0ff25290cce3 | 99 | #define RFID_RX_PIN D0 |
ansond | 48:0ff25290cce3 | 100 | #define TEMP_PIN A3 |
ansond | 22:1b9e29933ab3 | 101 | #endif |
ansond | 22:1b9e29933ab3 | 102 | #if _K64F_PLATFORM |
ansond | 29:a1067f9eb41c | 103 | #define RFID_TX_PIN D1 |
ansond | 29:a1067f9eb41c | 104 | #define RFID_RX_PIN D0 |
ansond | 48:0ff25290cce3 | 105 | #define TEMP_PIN A3 |
ansond | 22:1b9e29933ab3 | 106 | #endif |
ansond | 22:1b9e29933ab3 | 107 | |
ansond | 0:df2aa79c64f2 | 108 | #endif // _DEFINITIONS_H_ |