Dreamforce 2014 Workshop Exercise - RFID Case Generator

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

Fork of df-2014-workshop-rfid-case-generator-k64f 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  // SUPPORT PERSON #1 (this will be dispatched as a Case if the first RFID tag is swiped)
00025  #define FIRST_SUPPORT_PERSON_RFID         1234567
00026  #define FIRST_SUPPORT_PERSON_NAME         "James T. Kirk"
00027  #define FIRST_SUPPORT_PERSON_DESCRIPTION  "Federation Technician #NCC-1701"
00028  #define FIRST_SUPPORT_PERSON_STATUS       "On site/servicing"
00029  #define FIRST_SUPPORT_PERSON_LATITUDE     "37.404120"
00030  #define FIRST_SUPPORT_PERSON_LONGITUDE    "-121.973195"
00031  
00032  // SUPPORT PERSON #2 (this will be dispatched as a Case if the second RFID tag is swiped)
00033  #define SECOND_SUPPORT_PERSON_RFID        1234567
00034  #define SECOND_SUPPORT_PERSON_NAME        "Harry Potter"
00035  #define SECOND_SUPPORT_PERSON_DESCRIPTION "Hogwarts Technician #WIZ-1234"
00036  #define SECOND_SUPPORT_PERSON_STATUS      "On site/servicing"
00037  #define SECOND_SUPPORT_PERSON_LATITUDE    "37.404120"
00038  #define SECOND_SUPPORT_PERSON_LONGITUDE   "-121.973195"
00039  
00040  // SUPPORT PERSON #3 (this will be dispatched as a Case if the third RFID tag is swiped)
00041  #define THIRD_SUPPORT_PERSON_RFID         1234567
00042  #define THIRD_SUPPORT_PERSON_NAME         "Kramer"
00043  #define THIRD_SUPPORT_PERSON_DESCRIPTION  "UNKNOWN Technician #-1"
00044  #define THIRD_SUPPORT_PERSON_STATUS       "Off site/action unsure"
00045  #define THIRD_SUPPORT_PERSON_LATITUDE     "37.404120"
00046  #define THIRD_SUPPORT_PERSON_LONGITUDE    "-121.973195"
00047  
00048  // ----------------- WORKSHOP TUNABLES ----------------- 
00049  
00050  // mbed 
00051  #include "mbed.h"
00052  
00053  // Our App version
00054  #define APP_VERSION                "1.0.0"
00055   
00056  // DF2014 CaseGenerator Relay for mbed - ties into the Salesforce APEX host for case generation
00057  #define DF_CASE_GEN_URL            "https://df2014-arm-developer-edition.na15.force.com/services/apexrest/CaseService"
00058  
00059  // Enable/Disable RFID ID12 usage
00060  #define ID12_ENABLE                true    // true - enable, false - disable
00061  
00062  // Enable/Disable verbose debugging
00063  #define ENABLE_DEBUG_LOGGING       false         // true - enabled, false - disabled (default)
00064      
00065  // maximum memory buffer chunk
00066  #define MAX_BUFFER_LENGTH          2048
00067   
00068  // small buffer chunk
00069  #define MAX_SMALL_BUFFER_LENGTH    256
00070 
00071  // What platform we are compiling on
00072  #define _K64F_PLATFORM             true
00073  
00074  // K64F needs to launch the task in a thread with a large stack size...
00075  #define STACK_SIZE                 40000
00076    
00077  // Wait Time for iterations (ms)
00078  #define WAIT_TIME_MS               500
00079  
00080  // Blink Time
00081  #define BLINK_TIME                 250
00082  
00083  // Memory tunables for SupportPersonnelDB
00084  #define DB_MAX_NAME_LENGTH         64
00085  #define DB_MAX_DESCRIPTION_LENGTH  128
00086  #define DB_MAX_STATUS_LENGTH       128
00087  #define DB_MAX_LATLONG_LENGTH      32
00088  #define DB_MAX_NUM_SUPPORT_PERSONS 3
00089  
00090  // convenience definitions for SupportPersonnelDB... 3 RFID tags/workshop station  
00091  #define FIRST_SUPPORT_PERSON       0
00092  #define SECOND_SUPPORT_PERSON      1
00093  #define THIRD_SUPPORT_PERSON       2
00094  
00095  // PINS for RFID Reader Shield - ID12 RFID sensor + TMP36 temperature sensor
00096  #define RFID_TX_PIN                D1
00097  #define RFID_RX_PIN                D0
00098  #define TEMP_PIN                   A3
00099  
00100  #endif // _DEFINITIONS_H_