Garmin Fleet Management Controller  2.19.0
fmi_CustomForms.cpp
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * MODULE NAME:
4 * fmi_CustomForms.cpp
5 *
6 * Copyright 2008-2013 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #include "stdafx.h"
11 #include "fmi_CustomForms.h"
12 
13 #if( FMI_SUPPORT_A612 )
14 
15 const char * getCustomFormErrorMsg
16  (
17  const FMI_cf_rcode code
18  )
19 {
20  switch ( code )
21  {
22  case FMI_CF_RCODE_OK: return "OK";
23  case FMI_CF_RCODE_GFS_ERROR: return "GFS error result code";
24  case FMI_CF_RCODE_SQL_ERROR: return "SQL error result code";
25  case FMI_CF_RCODE_SQL_PREPARE_FAILED: return "SQL prepare statement failed";
26  case FMI_CF_RCODE_SQL_BIND_FAILED: return "SQL bind parameters failed";
27  case FMI_CF_RCODE_SQL_EXEC_FAILED: return "SQL step (query/execution) failed";
28  case FMI_CF_RCODE_SQL_TRANSACTION_ALREADY_STARTED: return "SQL transaction has already been started";
29  case FMI_CF_RCODE_SQL_NUMBER_OF_FORMS_LIMIT_EXCEEDED: return "SQL number of forms exceeded supported limit";
30  case FMI_CF_RCODE_SQL_POSITION_FREE_FAILED: return "SQL free form position failed";
31  case FMI_CF_RCODE_SQL_POSITION_PACK_FAILED: return "SQL pack form positions failed";
32  case FMI_CF_RCODE_SQL_ITEM_EXTRAS_NULL_TYPE: return "SQL item extras data type is NULL and cannot be used for query";
33  case FMI_CF_RCODE_SQL_ITEM_EXTRAS_UNEXPECTED_SIZE: return "SQL item extras blob and type sizes are not the same";
34  case FMI_CF_RCODE_SQL_OLDEST_SAVED_DELETE_FAILED: return "SQL oldest saved form deletion failed";
35  case FMI_CF_RCODE_SQL_NO_UNSENT_FORMS: return "SQL no unsent forms are in the database";
36  case FMI_CF_RCODE_SQL_SUBMITTED_STRING_POINTER_NULL: return "SQL submitted string pointer is NULL and cannot be used for query";
37  case FMI_CF_RCODE_SQL_SUBMITTED_STRING_UNEXPECTED_SIZE: return "SQL data blob and submitted string sizes are not the same";
38  case FMI_CF_RCODE_SQL_FORM_TEMPLATE_NOT_FOUND: return "SQL form template is not found in the database";
39 
40  case FMI_CF_RCODE_SCHEMA_FORM_ELMT_INCOMPLETE: return "Form element is incomplete - required values are missing";
41  case FMI_CF_RCODE_SCHEMA_ITEM_ELMT_INCOMPLETE: return "Item element is incomplete - required values are missing";
42  case FMI_CF_RCODE_SCHEMA_ITEM_PARENT_INVALID: return "An item elements parent is not a form element";
43  case FMI_CF_RCODE_SCHEMA_ITEM_ID_REUSE: return "Item ID is used more than one time";
44  case FMI_CF_RCODE_SCHEMA_ITEM_CNT_OUT_OF_RANGE: return "Item count is out of range for a form";
45  case FMI_CF_RCODE_SCHEMA_TYPE_PARENT_INVALID: return "A type elements parent is not an item element";
46  case FMI_CF_RCODE_SCHEMA_TYPE_CNT_OUT_OF_RANGE: return "Type count is out of range for an item (> 1)";
47  case FMI_CF_RCODE_SCHEMA_TEXT_LEN_OUT_OF_RANGE: return "Text length is out of range";
48  case FMI_CF_RCODE_SCHEMA_INT_LEN_OUT_OF_RANGE: return "Integer length is out of range";
49  case FMI_CF_RCODE_SCHEMA_INT_MIN_OUT_OF_RANGE: return "Minimum integer value is out of range";
50  case FMI_CF_RCODE_SCHEMA_INT_MAX_OUT_OF_RANGE: return "Maximum integer value is out of range";
51  case FMI_CF_RCODE_SCHEMA_INT_MIN_GRT_THAN_MAX: return "Minimum integer value is greater than the maximum integer value";
52  case FMI_CF_RCODE_SCHEMA_OPT_ELMT_INCOMPLETE: return "Option element is incomplete - required values are missing";
53  case FMI_CF_RCODE_SCHEMA_OPT_PARENT_INVALID: return "An option elements parent is not a single select or multiple select element";
54  case FMI_CF_RCODE_SCHEMA_OPT_ID_REUSE: return "Option ID is used more than one time for a given item";
55  case FMI_CF_RCODE_SCHEMA_OPT_CNT_OUT_OF_RANGE: return "Option count is out of range for an item";
56  case FMI_CF_RCODE_SCHEMA_MONTH_OUT_OF_RANGE: return "Month value is out of range";
57  case FMI_CF_RCODE_SCHEMA_DAY_OUT_OF_RANGE: return "Day value is out of range";
58  case FMI_CF_RCODE_SCHEMA_YEAR_OUT_OF_RANGE: return "Year value is out of range";
59  case FMI_CF_RCODE_SCHEMA_INVALID_DAYS_IN_MONTH: return "Number of days in the month is not valid";
60  case FMI_CF_RCODE_SCHEMA_NO_DATE_SET: return "Use current is set to false and no date was specified";
61  case FMI_CF_RCODE_SCHEMA_HOUR_OUT_OF_RANGE: return "Hour value is out of range";
62  case FMI_CF_RCODE_SCHEMA_MINUTE_OUT_OF_RANGE: return "Minute value is out of range";
63  case FMI_CF_RCODE_SCHEMA_SECOND_OUT_OF_RANGE: return "Second value is out of range";
64  case FMI_CF_RCODE_SCHEMA_NO_TIME_SET: return "Use current is set to false and no time was specified";
65  case FMI_CF_RCODE_SCHEMA_UNKNOWN_ITEM_TYPE: return "Unknown form item type";
66 
67  case FMI_CF_RCODE_XSP_NO_MEMORY: return "Out of memory";
68  case FMI_CF_RCODE_XSP_SYNTAX: return "Syntax error";
69  case FMI_CF_RCODE_XSP_NO_ELEMENTS: return "No element found";
70  case FMI_CF_RCODE_XSP_INVALID_TOKEN: return "Not well-formed (invalid token)";
71  case FMI_CF_RCODE_XSP_UNCLOSED_TOKEN: return "Unclosed token";
72  case FMI_CF_RCODE_XSP_PARTIAL_CHAR: return "Partial character";
73  case FMI_CF_RCODE_XSP_TAG_MISMATCH: return "Mismatched tag";
74  case FMI_CF_RCODE_XSP_DUPLICATE_ATTRIBUTE: return "Duplicate attribute";
75  case FMI_CF_RCODE_XSP_JUNK_AFTER_DOC_ELEMENT: return "Junk after document element";
76  case FMI_CF_RCODE_XSP_PARAM_ENTITY_REF: return "Illegal parameter entity reference";
77  case FMI_CF_RCODE_XSP_UNDEFINED_ENTITY: return "Undefined entity";
78  case FMI_CF_RCODE_XSP_RECURSIVE_ENTITY_REF: return "Recursive entity reference";
79  case FMI_CF_RCODE_XSP_ASYNC_ENTITY: return "Asynchronous entity";
80  case FMI_CF_RCODE_XSP_BAD_CHAR_REF: return "Rreference to invalid character number";
81  default: return "Unknown Error";
82  }
83 }
84 
85 #endif
[58] Text length is out of range
[211] 11 - Undefined entity
[70] Number of days in the month is not valid
[65] Option ID is used more than one time for a given item
[67] Month value is out of range
[52] Item element is incomplete - required values are missing
[214] 14 - Rreference to invalid character number
[62] Minimum integer value is greater than the maximum integer value
[202] 2 - Syntax error
[207] 7 - Mismatched tag
[66] Option count is out of range for an item
[0] OK result code
[1] GFS error result code
[5] SQL step (query/execution) failed
[10] SQL item extras data type is NULL and cannot be used for query
[55] Item count is out of range for a form
const char * getCustomFormErrorMsg(const FMI_cf_rcode code)
Lookup for custom forms transmission error codes.
[72] Hour value is out of range
[209] 9 - Junk after document element
[61] Maximum integer value is out of range
[54] Item ID is used more than one time
[64] An option elements parent is not a single select or multiple select element
[76] Unknown form item type
[71] Use current is set to false and no date was specified
[59] Integer length is out of range
[7] SQL number of forms exceeded supported limit
[213] 13 - Asynchronous entity
[8] SQL free form position failed
[2] SQL error result code
[73] Minute value is out of range
[16] SQL form template is not found in the database
[75] Use current is set to false and no time was specified
[9] SQL pack form positions failed
[12] SQL oldest saved form deletion failed
[3] SQL prepare statement failed
[210] 10 - Illegal parameter entity reference
[208] 8 - Duplicate attribute
[53] An item elements parent is not a form element
[56] A type elements parent is not an item element
[68] Day value is out of range
[14] SQL submitted string pointer is NULL and cannot be used for query
[13] SQL no unsent forms are in the database
[201] 1 - Out of memory
[74] Second value is out of range
[204] 4 - Not well-formed (invalid token)
[15] SQL data blob and submitted string sizes are not the same
[57] Type count is out of range for an item (> 1)
[60] Minimum integer value is out of range
FMI_cf_rcode
[51] Form element is incomplete - required values are missing
[11] SQL item extras blob and type sizes are not the same
[63] Option element is incomplete - required values are missing
[6] SQL transaction has already been started
[205] 5 - Unclosed token
[69] Year value is out of range
[206] 6 - Partial character
[4] SQL bind parameters failed
[212] 12 - Recursive entity reference
[203] 3 - No element found