fork of ReportDB customized and renamed as a trivial support personnel database
Fork of ReportDB by
SupportPersonnelDB.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 _SUPPORT_PERSONNEL_DB_H_ 00020 #define _SUPPORT_PERSONNEL_DB_H_ 00021 00022 #include "Definitions.h" 00023 00024 // trivial support personal db entry... 00025 typedef struct { 00026 int rfid; 00027 char name[DB_MAX_NAME_LENGTH+1]; 00028 char description[DB_MAX_DESCRIPTION_LENGTH+1]; 00029 char status[DB_MAX_STATUS_LENGTH+1]; 00030 char latitude[DB_MAX_LATLONG_LENGTH+1]; 00031 char longitude[DB_MAX_LATLONG_LENGTH+1]; 00032 00033 } SupportPersonEntry; 00034 00035 // trivial database of support personnel who can generate cases 00036 class SupportPersonnelDB { 00037 private: 00038 SupportPersonEntry m_db[DB_MAX_NUM_SUPPORT_PERSONS]; 00039 00040 public: 00041 SupportPersonnelDB(); 00042 virtual ~SupportPersonnelDB(); 00043 00044 char *lookupName(int rfid); 00045 char *lookupDescription(int rfid); 00046 char *lookupStatus(int rfid); 00047 char *lookupLocationLatitude(int rfid); 00048 char *lookupLocationLongitude(int rfid); 00049 00050 private: 00051 void initDB(); 00052 SupportPersonEntry *lookup(int rfid); 00053 }; 00054 00055 #endif // _SUPPORT_PERSONNEL_DB_H_
Generated on Thu Jul 28 2022 02:27:20 by 1.7.2