summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Bozhinovski <aleksandar.bozhinovski@seavus.com>2012-04-02 16:56:05 +0200
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2012-05-25 14:45:10 +0200
commit9f79e7a9892b5e8a3db704e3632ea118d314b250 (patch)
treee95bebf7e33070ac6c93cc61f577860e354884d3
parentdf8a6edd480dccb8a43c8acd2bea50e5167f3e2c (diff)
Improve error handling
New LCD function added which for received error code number returns its short and long description. ST-Ericsson ID: 321379 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204 Change-Id: I9537fc920696e718e35127875ad8441405af8ed2 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/54515 Reviewed-by: QATEST Reviewed-by: Viktor MLADENOVSKI <viktor.mladenovski@stericsson.com> Tested-by: Vlatko STENKOSKI Tested-by: Aleksandar BOZHINOVSKI <aleksandar.bozhinovski@seavus.com> Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
-rw-r--r--Makefile13
-rw-r--r--lcmodule/Makefile2
-rw-r--r--lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml2
-rw-r--r--source/LCDriver.cpp6
-rw-r--r--source/LCDriver.h12
-rw-r--r--source/config/error_codes_desc_cpp.xsl140
-rw-r--r--source/config/lcdriver_error_codes.xml28
-rw-r--r--source/error_codes_desc.h11
8 files changed, 195 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 4beeaf4..9b8c826 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ MINGW_X64_CC:=amd64-mingw32msvc-
XALAN_PATH:=./lcmodule/tools/xalan-j_2_7_1/
LCD_CONFIG:=./source/config/
LCD_DIR:=./
+LCM_ERR_DESC_PATH:=../../lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
ifneq ($(shell which $(MINGW_X32_CC)g++), )
USE_MINGW_X32 := 1
@@ -55,7 +56,8 @@ LIBSRC := \
source/security_algorithms/SecurityAlgorithms.cpp\
source/security_algorithms/sha/sha2.cpp\
$(AUTO_DIR_LIB)/commands_marshal.cpp\
- $(AUTO_DIR_LIB)/a2_commands_marshal.cpp
+ $(AUTO_DIR_LIB)/a2_commands_marshal.cpp\
+ $(AUTO_DIR_LIB)/error_codes_desc.cpp
ifeq ($(BUILD_WIN),)
LIBSRC += \
source/api_wrappers/linux/CThreadWrapper.cpp\
@@ -85,7 +87,8 @@ AUTOGEN_FILES := $(AUTO_DIR_LIB)/command_ids.h\
$(AUTO_DIR_LIB)/a2_command_ids.h\
$(AUTO_DIR_LIB)/a2_commands.h\
$(AUTO_DIR_LIB)/a2_commands_impl.h\
- $(AUTO_DIR_LIB)/a2_commands_marshal.cpp
+ $(AUTO_DIR_LIB)/a2_commands_marshal.cpp\
+ $(AUTO_DIR_LIB)/error_codes_desc.cpp
#include directories
@@ -113,7 +116,7 @@ ifeq ($(BUILD_WIN),)
CXXFLAGS := -c -O2 -Wall -fPIC -fvisibility=hidden -fno-strict-aliasing -DLCDRIVER_EXPORTS -D_FILE_OFFSET_BITS=64
else
# For Windows x32 and x64 version compile flags
-CXXFLAGS := -D__WIN32__ -mwindows -mthreads -fno-strict-aliasing -Wall $(BYTE_ORDER) -DWIN32 -DWIN32_LEAN_AND_MEAN -DNDEBUG -D_WINDOWS -D_USRDLL -DLCDRIVER_EXPORTS -D_FILE_OFFSET_BITS=64
+CXXFLAGS := -D__WIN32__ -O2 -mwindows -mthreads -fno-strict-aliasing -Wall $(BYTE_ORDER) -DWIN32 -DWIN32_LEAN_AND_MEAN -DNDEBUG -D_WINDOWS -D_USRDLL -DLCDRIVER_EXPORTS -D_FILE_OFFSET_BITS=64
endif
ifeq ($(BUILD_WIN),)
@@ -309,6 +312,10 @@ $(AUTO_DIR_LIB)/a2_commands_marshal.cpp: $(LCD_CONFIG)a2_commands.xml $(LCD_CONF
@echo "Generating autogen $(AUTO_DIR_LIB)/a2_commands_marshal.cpp..."
@java -classpath $(XALAN_PATH)xalan.jar org.apache.xalan.xslt.Process -in $(LCD_CONFIG)a2_commands.xml -xsl $(LCD_CONFIG)a2_commands_marshal_cpp.xsl -out $(AUTO_DIR_LIB)/a2_commands_marshal.cpp
+$(AUTO_DIR_LIB)/error_codes_desc.cpp: $(LCD_CONFIG)lcdriver_error_codes.xml $(LCD_CONFIG)error_codes_desc_cpp.xsl | setup_folders
+ @echo "Generating autogen $(AUTO_DIR_LIB)/error_codes_desc.cpp..."
+ @java -classpath $(XALAN_PATH)xalan.jar org.apache.xalan.xslt.Process -in $(LCD_CONFIG)lcdriver_error_codes.xml -xsl $(LCD_CONFIG)error_codes_desc_cpp.xsl -out $@ -PARAM errorCodesLcmXml $(LCM_ERR_DESC_PATH)
+
#setting up needed folders
$(BUILDFOLDER): | configfile
@mkdir -p $@ 2> /dev/null
diff --git a/lcmodule/Makefile b/lcmodule/Makefile
index e464e8b..2834db2 100644
--- a/lcmodule/Makefile
+++ b/lcmodule/Makefile
@@ -119,7 +119,7 @@ ifeq ($(BUILD_WIN),)
CFLAGS := -g -O2 -Wall -fPIC -fvisibility=hidden -DUINT64_SUPPORTED -DSINT64_SUPPORTED -DINT64_BASE_TYPE="long long" -DCFG_ENABLE_A2_FAMILY -DLCM_EXPORTS
else
# For Windows x32 and x64 version compile flags
-CFLAGS := -Wall -D__WIN32__ -mthreads -mwindows -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DLCM_EXPORTS
+CFLAGS := -Wall -O2 -D__WIN32__ -mthreads -mwindows -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DLCM_EXPORTS
endif
build:
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
index 459edac..68b9da3 100644
--- a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
+++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml
@@ -222,7 +222,7 @@
<value number="1251" name="E_NONEXIST_TIMER" fatal="false" short="Timer with the specified index does not exist.">Internal error.Report this problem</value>
<value number="1252" name="E_FAILED_TO_SET_TIMER" fatal="false" short="Failed to start the timer.">Internal error. Report this problem</value>
<value number="1253" name="E_TIMER_INIT_FAILED" fatal="false" short="Timer initialization failed.">Internal error. Report this problem</value>
- <value number="1254" name="E_TIMER_IRQ_CONF_FAILED" fatal="false"> short="Timer interrupt configure failed.">Internal error. Report this problem</value>
+ <value number="1254" name="E_TIMER_IRQ_CONF_FAILED" fatal="false" short="Timer interrupt configure failed.">Internal error. Report this problem</value>
<!--
* Parameter Fatal 1300-1350
diff --git a/source/LCDriver.cpp b/source/LCDriver.cpp
index 9af739e..a979d1d 100644
--- a/source/LCDriver.cpp
+++ b/source/LCDriver.cpp
@@ -7,6 +7,7 @@
#include "lcdriver_error_codes.h"
#include "LCDriverInterface.h"
#include "Error.h"
+#include "error_codes_desc.h"
#define VERIFY_CONTEXT(c) \
do { \
@@ -195,6 +196,11 @@ LCDRIVER_API int __cdecl CancelCurrentLoaderCommand(LCDContext Context)
return 0;
}
+LCDRIVER_API void __cdecl GetLoaderErrorDescription(uint32 ErrorNr, uint8 *ShortDescription, uint8 *LongDescription, uint32 ShorDescrBufLen, uint32 LongDescrBufLen)
+{
+ GetLoaderErrorDescription_Call(ErrorNr, ShortDescription, LongDescription, ShorDescrBufLen, LongDescrBufLen);
+}
+
/************************************************************************************************
* API functions for loader commands
************************************************************************************************/
diff --git a/source/LCDriver.h b/source/LCDriver.h
index 314a8fd..80be9d7 100644
--- a/source/LCDriver.h
+++ b/source/LCDriver.h
@@ -34,6 +34,7 @@ typedef unsigned int uint32;
#error "Unknown platform"
#endif
+typedef unsigned char uint8;
typedef struct CLCDriverInterface *LCDContext;
/// <summary>
@@ -282,6 +283,17 @@ extern "C"
LCDRIVER_API int __cdecl CancelCurrentLoaderCommand(LCDContext Context);
/// <summary>
+ /// Provides short and long description for given error code number.
+ /// </summary>
+ /// <param name="ErrorNr">Number of error code.</param>
+ /// <param name="ShortDescription">Buffer for the short description of the error.</param>
+ /// <param name="LongDescription">Buffer for the long description of the error.</param>
+ /// <param name="ShorDescrBufLen">Maximum size of ShortDescription buffer.</param>
+ /// <param name="ShorDescrBufLen">Maximum size of LongDescription buffer.</param>
+ /// <returns>Void.</returns>
+ LCDRIVER_API void __cdecl GetLoaderErrorDescription(uint32 ErrorNr, uint8 *ShortDescription, uint8 *LongDescription, uint32 ShorDescrBufLen, uint32 LongDescrBufLen);
+
+ /// <summary>
/// The Loader Start-up Status command is sent by the ME to notify the host that it has started. The Status parameter indicates in what mode the loader started.
/// </summary>
/// <param name="Context">LCD context on which to execute the operation.</param>
diff --git a/source/config/error_codes_desc_cpp.xsl b/source/config/error_codes_desc_cpp.xsl
new file mode 100644
index 0000000..b25b941
--- /dev/null
+++ b/source/config/error_codes_desc_cpp.xsl
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+* Copyright (C) ST-Ericsson SA 2012
+* License terms: 3-clause BSD license
+-->
+<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
+
+<output method="text"/>
+<strip-space elements="*"/>
+<param name="target"/>
+<param name="errorCodesLcmXml" />
+<variable name="lcm_error_codes" select="document($errorCodesLcmXml)/commandspec"/>
+
+<template match="/commandspec">/* $Copyright ST-Ericsson 2012$ */
+/* NOTE: This is an automatically generated file. DO NOT EDIT! */
+
+/*******************************************************************************
+ * Includes
+ ******************************************************************************/
+#include &lt;string&gt;
+#include &lt;map&gt;
+
+#include "String_s.h"
+#include "LCDriver.h"
+#include "error_codes_desc.h"
+
+/*******************************************************************************
+ * Types, constants
+ ******************************************************************************/
+std::map &lt;int, desc&gt; err_desc;
+static uint32 func_call_once = 0;
+
+/****************************************************************************/
+/* NAME : Init_map_err_desc */
+/*--------------------------------------------------------------------------*/
+/* DESCRIPTION: Declares the map err_desc with short and long description */
+/* of errors. */
+/* */
+/* PARAMETERS : */
+/* */
+/* RETURN : void */
+/****************************************************************************/
+void Init_map_err_desc()
+{
+ desc desc_;
+
+/**
+ * Description of error codes for LCDriver.
+ */
+<apply-templates select="status"/>
+/**
+ * Description of error codes for Loader.
+ */
+<apply-templates select="$lcm_error_codes/status"/>
+}
+
+/****************************************************************************/
+/* NAME : GetLoaderErrorDescription_Call */
+/*--------------------------------------------------------------------------*/
+/* DESCRIPTION: For a given error code number it returns its short and */
+/* long description. */
+/* */
+/* PARAMETERS : */
+/* IN : uint32 ErrorNr:Error code number. */
+/* OUT : uint8 ShortDescription:Buffer for short description. */
+/* OUT : uint8 LongDescription:Buffer for long description. */
+/* IN : uint32 ShorDescrBufLen:Max length of ShortDescription. */
+/* IN : uint32 LongDescrBufLen:Max length of LongDescription. */
+/* */
+/* RETURN : void */
+/****************************************************************************/
+void GetLoaderErrorDescription_Call(uint32 ErrorNr, uint8 *ShortDescription, uint8 *LongDescription, uint32 ShorDescrBufLen, uint32 LongDescrBufLen)
+{
+ std::map &lt;int, desc&gt;::iterator it;
+ uint32 str_len = 0;
+
+ // Define the map err_desc on the first call of this function
+ if (!func_call_once){
+ Init_map_err_desc();
+ func_call_once = 1;
+ }
+
+ it=err_desc.find(ErrorNr);
+ if(err_desc.end() == it){
+ std::string temp = "There is no LCM/LCD error with this number";
+
+ if((temp.length()+1) &gt; ShorDescrBufLen){
+ str_len = ShorDescrBufLen-1;
+ }
+ else{
+ str_len = temp.length();
+ }
+ strcpy_s((char *)ShortDescription, str_len, temp.c_str());
+ ShortDescription[str_len] = '\0';
+
+ if((temp.length()+1) &gt; LongDescrBufLen){
+ str_len = LongDescrBufLen-1;
+ }
+ else{
+ str_len = temp.length();
+ }
+ strcpy_s((char *)LongDescription, str_len, temp.c_str());
+ LongDescription[str_len] = '\0';
+ }
+ else{
+
+ if(((*it).second.short_desc.length()+1) &gt; ShorDescrBufLen){
+ str_len = ShorDescrBufLen-1;
+ }
+ else{
+ str_len = (*it).second.short_desc.length();
+ }
+
+ strcpy_s((char *)ShortDescription, str_len, (*it).second.short_desc.c_str());
+ ShortDescription[str_len] = '\0';
+
+ if(((*it).second.long_desc.length()+1) &gt; LongDescrBufLen){
+ str_len = LongDescrBufLen-1;
+ }
+ else{
+ str_len = (*it).second.long_desc.length();
+ }
+
+ strcpy_s((char *)LongDescription, str_len, (*it).second.long_desc.c_str());
+ LongDescription[str_len] = '\0';
+ }
+}
+</template>
+
+<template match="status">
+<apply-templates select="value"/>
+</template>
+
+<template match="value">
+ <text> </text><if test="position() != last()"></if>desc_.short_desc = "<value-of select="@short"/>";
+ desc_.long_desc = "<value-of select="./text()"/>";
+ err_desc[<value-of select="@number"/>] = desc_;
+</template>
+
+</stylesheet>
diff --git a/source/config/lcdriver_error_codes.xml b/source/config/lcdriver_error_codes.xml
index 412a9e9..2f7720c 100644
--- a/source/config/lcdriver_error_codes.xml
+++ b/source/config/lcdriver_error_codes.xml
@@ -9,7 +9,7 @@
* General Fatal 10001-10025
* General Non-Fatal 10026-10050
-->
- <value number="10001" name="TIMEOUT" fatal="false" short="Timeout event occured.">Timeout for previously sent request has occured. Request could be Protrom Command, Bulk transfer, or R15 Command.</value>
+ <value number="10001" name="TIMEOUT" fatal="false" short="Timeout event occurred.">Timeout for previously sent request has occurred. Request could be Protrom Command, Bulk transfer, or R15 Command.</value>
<value number="10002" name="INVALID_INPUT_PARAMETERS" fatal="false" short="Invalid parameter during Context initialization.">Invalid parameter found during executing LCDriver initialization functions. Failed to initialize Context.</value>
<!--
@@ -18,10 +18,10 @@
-->
<value number="10051" name="INTERFACE_COULD_NOT_ADD_OBJECT_TO_LIST" fatal="true" short="Failed to create context for connected device.">Failed to add the LCDriver context for the new device in the devices list. Try to reconnect the device, if the problem is still present report it.</value>
<value number="10052" name="INTERFACE_COULD_NOT_CREATE_OBJECT" fatal="true" short="Failed to create loader interface.">Failed to create interface for loader methods, possibly not enough memory to perform the operation. Try to reconnect the device, if the problem is still present report it.</value>
- <value number="10053" name="INTERFACE_UNKNOWN_EXECPTION_WHILE_ADDING_OBJECT" fatal="true" short="Failed to create context for connected device.">Unknown exception occured while trying to create context for the connected device. Try to reconnect the device, if the problem is still present report it.</value>
+ <value number="10053" name="INTERFACE_UNKNOWN_EXECPTION_WHILE_ADDING_OBJECT" fatal="true" short="Failed to create context for connected device.">Unknown exception occurred while trying to create context for the connected device. Try to reconnect the device, if the problem is still present report it.</value>
<value number="10054" name="INTERFACE_COULD_NOT_CREATE_IFC_OBJECT" fatal="true" short="Failed to create context for connected device.">Failed to create LCDriver context for the connected device, possibly not enough memory to perform the operation. Try to reconnect the device, if the problem is still present report it.</value>
<value number="10055" name="INTERFACE_OBJECT_POINTER_TO_POINTER_NULL" fatal="true" short="Invalid pointer to interface.">Tried to create LCDriver interface with invalid pointer.</value>
- <value number="10056" name="INTERFACE_OBJECT_POINTER_NULL" fatal="true" short="Invalid pointer to LCDriver context.">Tried to configure device with invalid pointer to LCDriver interface. Create the LCDriver interface for the conneceted device and try to configure the device later. If the problem is still present report it.</value>
+ <value number="10056" name="INTERFACE_OBJECT_POINTER_NULL" fatal="true" short="Invalid pointer to LCDriver context.">Tried to configure device with invalid pointer to LCDriver interface. Create the LCDriver interface for the connected device and try to configure the device later. If the problem is still present report it.</value>
<value number="10076" name="INTERFACE_OBJECT_ALREADY_EXISTS" fatal="false" short="LCDriver interface for the device already exists.">The context for the device was previously created.</value>
<value number="10077" name="INTERFACE_LC_METHODS_OBJECT_NULL" fatal="false" short="Interface for loader methods is not created.">Tried to execute loader method without creating loader method interface. Create the interface first and retry the same operation. If the problem is still present report it.</value>
<value number="10078" name="INTERFACE_INTERFACEID_POINTER_NULL" fatal="false" short="Failed to create LCDriver context.">Tried to create LCDriver context with invalid ID for the context. Try to create context with different context ID, if the problem is still present report it.</value>
@@ -31,7 +31,7 @@
* System Thread Fatal 10101-10125
* System Thread Non-Fatal 10126-10150
-->
- <value number="10126" name="LCDRIVER_THREAD_UNKNOWN_EXCEPTION" fatal="false" short="Unexpexted exit of LCDriver thread.">The LCDriver thread exited in unexpected way. The error is not recognized, if the problem persists report it.</value>
+ <value number="10126" name="LCDRIVER_THREAD_UNKNOWN_EXCEPTION" fatal="false" short="Unexpected exit of LCDriver thread.">The LCDriver thread exited in unexpected way. The error is not recognized, if the problem persists report it.</value>
<!--
* Bulk Fatal 10151-10175
@@ -44,7 +44,7 @@
* Hardware Fatal 10201-10225
* Hardware Non-Fatal 10226-10250
-->
- <value number="10201" name="PROTROM_STATUS_NOT_OK" fatal="true" short="ROM Code Failure.">Error occured while communicating the ROM code. Possibly there is some security issue with the used SW/HW.</value>
+ <value number="10201" name="PROTROM_STATUS_NOT_OK" fatal="true" short="ROM Code Failure.">Error occurred while communicating the ROM code. Possibly there is some security issue with the used SW/HW.</value>
<value number="10226" name="TIMEOUT_NO_CHIP_ID_DETECTED" fatal="false" short="Failed to initialize HW.">The HW failed to respond during the initialization sequence. Try with other HW, if the problem still exist report it, otherwise probably it faulty HW.</value>
<value number="10227" name="TIMEOUT_NO_Z_DETECTED" fatal="false" short="Failed to start HW initialization.">The HW initialization failed to start. Try with other HW, if the problem still exist report it, otherwise probably it faulty HW.</value>
@@ -53,10 +53,10 @@
* Loader Command Execution Non-Fatal 10276-10300
-->
<value number="10276" name="PARALLEL_COMMAND_EXECUTION_NOT_SUPPORTED" fatal="false" short="Command execution failed.">Failed to execute command because there is other active command. Try to execute command again. If the problem persists probably there is some blocked command. Restart the HW.</value>
- <value number="10277" name="CALLBACKS_NOT_CONFIGURED_CORRECTLY" fatal="false" short="Communication driver configuration failure.">Callbacks for communication decvice are not configured. Try to configure device driver callbacks. If the problem persists report it.</value>
- <value number="10278" name="GENERAL_RESPONSE_COMMAND_NUMBER_ERROR" fatal="false" short="Failure during command execution.">Recived response for command other than it was expected. Probably there is communication error. Restart the HW, if the problem persists report it.</value>
+ <value number="10277" name="CALLBACKS_NOT_CONFIGURED_CORRECTLY" fatal="false" short="Communication driver configuration failure.">Callbacks for communication device are not configured. Try to configure device driver callbacks. If the problem persists report it.</value>
+ <value number="10278" name="GENERAL_RESPONSE_COMMAND_NUMBER_ERROR" fatal="false" short="Failure during command execution.">Received response for command other than it was expected. Probably there is communication error. Restart the HW, if the problem persists report it.</value>
<value number="10279" name="COMMAND_NUMBER_ERROR" fatal="false" short="Failure during command execution.">Command received from ME other than it was expected. Probably there is communication error. Restart the HW, if the problem persists report it.</value>
- <value number="10280" name="CANCEL_EVENT_RECEIVED" fatal="false" short="Operation execution is canceled.">Canceled execution of active command/communication due to reciving of cancel event.</value>
+ <value number="10280" name="CANCEL_EVENT_RECEIVED" fatal="false" short="Operation execution is canceled.">Canceled execution of active command/communication due to receiving of cancel event.</value>
<value number="10281" name="UNEXPECTED_EVENT_RECEIVED" fatal="false" short="Unexpected event during execution.">Unexpected event was received during command execution.</value>
<value number="10282" name="INVALID_EXECUTION_MODE" fatal="false" short="Invalid execution mode.">Unexpected event was received during command execution.</value>
@@ -81,8 +81,8 @@
* LCM DLL Fatal 10401-10425
* LCM DLL Non-Fatal 10426-10450
-->
- <value number="10401" name="LCM_DLL_LOAD_LOADLIBRARY_ERROR" fatal="true" short="Failed to load LCM library.">Loading of dependant library failed. Make sure that it is placed on correct location.</value>
- <value number="10402" name="LCM_DLL_LOAD_FUNCTION_NOT_FOUND" fatal="true" short="Failed to import LCM functionality.">Some of dependend functions was not found in the given LCM library. Make sure that the version that is used is compatible.</value>
+ <value number="10401" name="LCM_DLL_LOAD_LOADLIBRARY_ERROR" fatal="true" short="Failed to load LCM library.">Loading of dependent library failed. Make sure that it is placed on correct location.</value>
+ <value number="10402" name="LCM_DLL_LOAD_FUNCTION_NOT_FOUND" fatal="true" short="Failed to import LCM functionality.">Some of dependent functions was not found in the given LCM library. Make sure that the version that is used is compatible.</value>
<value number="10426" name="LCM_LOAD_INCOMPATIBLE_PC_VERSION" fatal="true" short="Incompatible PC LCM version.">Some of functions may not work in the given LCM library. Make sure that the PC LCM version that is used is compatible.</value>
<value number="10427" name="LCM_LOAD_INCOMPATIBLE_LDR_VERSION" fatal="false" short="Incompatible LDR LCM version.">Some of functions may not work in the given LCM library. Make sure that the LDR LCM version that is used is compatible.</value>
@@ -90,9 +90,9 @@
* Exceptions Fatal 10451-10475
* Exceptions Non-Fatal 10476-10500
-->
- <value number="10451" name="UNKNOWN_EXCEPTION" fatal="true" short="Unknown error has stopped the operation.">The active operation was stopped by uknown exception. Repeat the failure procedure, if the problem persists report it.</value>
- <value number="10476" name="UNKNOWN_WAIT_RETURN_VALUE" fatal="false" short="Operation execution failed.">The activity didn't complete properly. Unhandled event was recieved during execution of command/activity.</value>
- <value number="10477" name="UNKNOWN_BULK_TRANSFER_EXCEPTION" fatal="false" short="Bulk transfer failed.">The transfer of bulk data was interrpted by unknown exception. Data was not transferred successfuly.</value>
+ <value number="10451" name="UNKNOWN_EXCEPTION" fatal="true" short="Unknown error has stopped the operation.">The active operation was stopped by unknown exception. Repeat the failure procedure, if the problem persists report it.</value>
+ <value number="10476" name="UNKNOWN_WAIT_RETURN_VALUE" fatal="false" short="Operation execution failed.">The activity didn't complete properly. Unhandled event was received during execution of command/activity.</value>
+ <value number="10477" name="UNKNOWN_BULK_TRANSFER_EXCEPTION" fatal="false" short="Bulk transfer failed.">The transfer of bulk data was interrupted by unknown exception. Data was not transferred successfully.</value>
<value number="10478" name="UNKNOWN_INTERFACE_EXCEPTION" fatal="false" short="LCDriver context operation failed.">Failed to perform desired operation on the LCDriver context due to unknown exception.</value>
<!--
@@ -102,7 +102,7 @@
<value number="10526" name="LCDRIVER_THREAD_KILLED" fatal="false" short="LCDriver thread stopped.">Execution of LCDriver thread has stopped because the thread was killed with unknown reason.</value>
<value number="10527" name="LCDRIVER_THREAD_KILLED_WITH_CANCEL" fatal="false" short="LCDriver thread stopped.">Execution of LCDriver thread has stopped because the thread was killed by cancel event.</value>
<value number="10528" name="LCDRIVER_THREAD_KILLED_WITH_SIGNAL_DEATH" fatal="false" short="LCDriver thread stopped.">Execution of LCDriver thread has stopped with shutdown request.</value>
- <value number="10529" name="LCDRIVER_THREAD_NOT_STARTED" fatal="false" short="Failed to start LCDriver thread.">Starting of LCDriver thread has failed. An error has occured during initialization. Reconnect the device, if the problem persist report it.</value>
+ <value number="10529" name="LCDRIVER_THREAD_NOT_STARTED" fatal="false" short="Failed to start LCDriver thread.">Starting of LCDriver thread has failed. An error has occurred during initialization. Reconnect the device, if the problem persist report it.</value>
<value number="10530" name="LCDRIVER_THREAD_STOPPED_AFTER_LCM_ERROR" fatal="false" short="LCDriver thread stopped after receiving LCM error.">LCDriver thread must be stopped due to unrecoverable error state in the LCM. Reconnect the device, if the problem persist report it.</value>
<!--
diff --git a/source/error_codes_desc.h b/source/error_codes_desc.h
new file mode 100644
index 0000000..2b39fe6
--- /dev/null
+++ b/source/error_codes_desc.h
@@ -0,0 +1,11 @@
+/*******************************************************************************
+ * Copyright (C) ST-Ericsson SA 2012
+ * License terms: 3-clause BSD license
+ ******************************************************************************/
+
+typedef struct {
+ std::string short_desc;
+ std::string long_desc;
+} desc;
+
+void GetLoaderErrorDescription_Call(uint32 ErrorNr, uint8 *ShortDescription, uint8 *LongDescription, uint32 ShorDescrBufLen, uint32 LongDescrBufLen);