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 Doug Anson

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Definitions.h Source File

Definitions.h

00001 /* Copyright C2014 ARM, MIT License
00002  *
00003  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
00004  * and associated documentation files the "Software", to deal in the Software without restriction,
00005  * including without limitation the rights to use, copy, modify, merge, publish, distribute,
00006  * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
00007  * furnished to do so, subject to the following conditions:
00008  *
00009  * The above copyright notice and this permission notice shall be included in all copies or
00010  * substantial portions of the Software.
00011  *
00012  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
00013  * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00014  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
00015  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00016  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00017  */
00018  
00019  #ifndef _DEFINITIONS_H_
00020  #define _DEFINITIONS_H_
00021  
00022  // ----------------- WORKSHOP TUNABLES -----------------  
00023  
00024  // 3 Reports for RFID-tag based support/repair conditions
00025  #define FIRST_REPORT_RFID         7550993
00026  #define FIRST_REPORT_NAME         "Tech 49"
00027  #define FIRST_REPORT_DESCRIPTION  "Light Out"
00028  #define FIRST_REPORT_CONDITION    "Investigating Issue"
00029  #define FIRST_REPORT_LATITUDE     "37.404120"
00030  #define FIRST_REPORT_LONGITUDE    "-121.973195"
00031  
00032  #define SECOND_REPORT_RFID        7567145
00033  #define SECOND_REPORT_NAME        "Tech 49"
00034  #define SECOND_REPORT_DESCRIPTION "Light Out"
00035  #define SECOND_REPORT_CONDITION   "Resolved - lightbulb burned out"
00036  #define SECOND_REPORT_LATITUDE    "37.404120"
00037  #define SECOND_REPORT_LONGITUDE   "-121.973195"
00038  
00039  #define THIRD_REPORT_RFID         7559217
00040  #define THIRD_REPORT_NAME         "Tech 49"
00041  #define THIRD_REPORT_DESCRIPTION  "Light Out"
00042  #define THIRD_REPORT_CONDITION    "Unresolved - escalate"
00043  #define THIRD_REPORT_LATITUDE     "37.404120"
00044  #define THIRD_REPORT_LONGITUDE    "-121.973195"
00045  
00046  // ----------------- WORKSHOP TUNABLES ----------------- 
00047  
00048  // mbed 
00049  #include "mbed.h"
00050  
00051  // Our App version
00052  #define APP_VERSION               "1.0.0"
00053   
00054  // DF2014 CaseGenerator Relay for mbed - ties into the Salesforce APEX host for case generation
00055  #define DF_CASE_GEN_URL           "https://df2014-arm-developer-edition.na15.force.com/services/apexrest/CaseService"
00056  
00057  // Enable/Disable RFID ID12 usage
00058  #define ID12_ENABLE               true    // true - enable, false - disable
00059  
00060  // Enable/Disable verbose debugging
00061  #define ENABLE_DEBUG_LOGGING      false         // true - enabled, false - disabled (default)
00062      
00063  // maximum memory buffer chunk
00064  #define MAX_BUFFER_LENGTH         2048
00065   
00066  // small buffer chunk
00067  #define MAX_SMALL_BUFFER_LENGTH   256
00068 
00069  // What platform we are compiling on
00070  #define _K64F_PLATFORM            true
00071  
00072  // K64F needs to launch the task in a thread with a large stack size...
00073  #define STACK_SIZE                40000
00074    
00075  // Wait Time for iterations (ms)
00076  #define WAIT_TIME_MS              500
00077  
00078  // Blink Time
00079  #define BLINK_TIME                250
00080  
00081  // Tunables for ReportDB
00082  #define DB_MAX_NAME_LENGTH        64
00083  #define DB_MAX_DESCRIPTION_LENGTH 128
00084  #define DB_MAX_CONDITION_LENGTH   128
00085  #define DB_MAX_LATLONG_LENGTH     32
00086  #define DB_MAX_NUM_REPORTS        3
00087  
00088  // convenience definitions for ReportDB... 3 RFID tags/station  
00089  #define FIRST_REPORT              0
00090  #define SECOND_REPORT             1
00091  #define THIRD_REPORT              2
00092  
00093  // PINS for RFID Reader Shield - ID12 RFID sensor + TMP36 temperature sensor
00094  #define RFID_TX_PIN               D1
00095  #define RFID_RX_PIN               D0
00096  #define TEMP_PIN                  A3
00097  
00098  #endif // _DEFINITIONS_H_