diff options
author | XVSALGE <aleksandar.gerasimovski@seavus.com> | 2012-02-22 08:14:11 +0100 |
---|---|---|
committer | Viktor Mladenovski <viktor.mladenovski@seavus.com> | 2012-05-25 14:44:00 +0200 |
commit | 9dc2897fef041426347e80385707b7c86324c63e (patch) | |
tree | b7525770a2da28553426465f47a6d65efaa22c3b | |
parent | 828be7d08c886347641d8bba675993caf5a13d1a (diff) |
Sync lcm with CC source
Synchronize loader_communication with clearcase source
ST-Ericsson ID: 413947
ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204
Change-Id: Ib23b84360b351a2598190d9d6b510895cc892436
Depends-On: I4b049943fc2acc63ed5f94dff6d4bc0e36fde1cf
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/48934
Reviewed-by: QABUILD
Reviewed-by: QATEST
Reviewed-by: Zoran ANCEVSKI <zoran.ancevski@seavus.com>
Tested-by: Aleksandar GASOSKI <aleksandar.gasoski@seavus.com>
Tested-by: Cvetko MLADENOVSKI <cvetko.mladenovski@seavus.com>
Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
72 files changed, 656 insertions, 1484 deletions
diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc index 0993ba4..180fe54 100644 --- a/lcmodule/source/LCM.rc +++ b/lcmodule/source/LCM.rc @@ -77,7 +77,7 @@ BEGIN VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2012"
VALUE "PrivateBuild", "Change-Id: I70835353a592d1f1ad40743640a1d0827e56fd2e"
VALUE "ProductName", "CXA1104507 Loader Communication Module"
- VALUE "ProductVersion", "P3Y"
+ VALUE "ProductVersion", "P4Y"
END
END
BLOCK "VarFileInfo"
diff --git a/lcmodule/source/LCM.vcproj b/lcmodule/source/LCM.vcproj index 7283845..86b8f4c 100644 --- a/lcmodule/source/LCM.vcproj +++ b/lcmodule/source/LCM.vcproj @@ -744,7 +744,7 @@ > </File> <File - RelativePath=".\legacy_compatibility\c_system.h" + RelativePath=".\legacy_compatibility\c_system_v2.h" > </File> <File diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_a2_transport.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_a2_transport.h index 7d90384..bdabd8f 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_a2_transport.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_a2_transport.h @@ -17,9 +17,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "t_a2_transport.h" -#include "t_communication_service.h" -#include "error_codes.h" +#include "error_codes.h" /******************************************************************************* * Declaration of functions diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_bulk_protocol.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_bulk_protocol.h index fa3f4ee..7943354 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_bulk_protocol.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_bulk_protocol.h @@ -11,7 +11,7 @@ * @{ * @addtogroup bulk_protocol Bulk Protocol * Functionalities for handling bulk protocol. Receiving/Sending bulk - * commands and state machines for receivin and sending bulk data chunks. + * commands and state machines for receiving and sending bulk data chunks. * * @{ */ @@ -19,7 +19,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include "t_bulk_protocol.h" #include "t_r15_transport_layer.h" #include "t_r15_network_layer.h" diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_protocol.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_protocol.h index 2dac437..e057a17 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_protocol.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_protocol.h @@ -18,10 +18,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "t_protrom_protocol.h" #include "error_codes.h" -#include "t_communication_service.h" -#include "t_r15_network_layer.h" /******************************************************************************* * Declaration of functions diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_transport.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_transport.h index ad47f6e..3a5e21e 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_transport.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_protrom_transport.h @@ -11,7 +11,7 @@ * @{ * @addtogroup ldr_protrom_transport_layer PROTROM Transport Layer * PROTROM functionalities for sending PROTROM packets and - * polling receiver and transmiter. + * polling receiver and transmitter. * * @{ */ @@ -19,7 +19,6 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "t_protrom_transport.h" #include "t_communication_service.h" #include "error_codes.h" diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_r15_transport_layer.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_r15_transport_layer.h index 904eb8b..bd832b0 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_r15_transport_layer.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_r15_transport_layer.h @@ -11,7 +11,7 @@ * @{ * @addtogroup ldr_r15_transport_layer R15 Transport layer * R15 functionalities for sending R15 packets and - * polling receiver and transmiter. + * polling receiver and transmitter. * * @{ */ @@ -19,9 +19,8 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "t_r15_transport_layer.h" #include "t_communication_service.h" -#include "error_codes.h" +#include "error_codes.h" /******************************************************************************* * Declaration of functions @@ -60,9 +59,9 @@ ErrorCode_e R15_Transport_Poll(Communication_t *Communication_p); * Function for sending packet in R15 protocol family. * * @param [in] Communication_p Communication module context. - * @param [in] InputDataIn_p Pointer to the input data. + * @param [in] InputDataIn_p Pointer to the input data. * - * @retval E_SUCCESS After successful execution. + * @retval E_SUCCESS After successful execution. * @retval E_FAILED_TO_ALLOCATE_COMM_BUFFER Failed to allocate communication * buffer. */ diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_protocol.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_protocol.h index f4e9055..755899c 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_protocol.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_protocol.h @@ -11,7 +11,7 @@ * @{ * @addtogroup z_protocol Z Protocol * Functionalities for handling Z commands. All Z commands are not decoded - * in this layer, it is resent to teh application layer for decoding + * in this layer, it is resent to the application layer for decoding * and executing. * * @{ diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_transport.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_transport.h index 6de0225..6169022 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_transport.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/r_z_transport.h @@ -11,7 +11,7 @@ * @{ * @addtogroup ldr_z_transport_layer Z Transport layer * TI functionalities for sending Z packets, Initialization and - * polling receiver and transmiter. + * polling receiver and transmitter. * * @{ */ diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_bulk_protocol.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_bulk_protocol.h index 38ca8b4..95c4dbd 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_bulk_protocol.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_bulk_protocol.h @@ -64,14 +64,14 @@ TYPEDEF_ENUM { WAIT_TX_DONE = 9, /**< Wait all chunks to be sent. */ WRITE_BULK_FINISH = 10, /**< Bulk acknowledge has been received, finish the write bulk process. */ - WAIT_WRITE_REQUEST = 11, /**< Wait bulk request command. */ + WAIT_WRITE_REQUEST = 11, /**< Wait bulk request command. */ CANCEL_BULK = 12 } ENUM8(TL_BulkProtocolState_t); /** Defined bulk process states. */ TYPEDEF_ENUM { BULK_SESSION_IDLE = 0x00, /**< Bulk transfer is closed and ready - for starting. */ + for starting. */ BULK_SESSION_OPEN = 0x01, /**< Bulk transfer is opened. */ BULK_SESSION_PROCESSING = 0x02, /**< Processing the bulk transfer. */ BULK_SESSION_FINISHED = 0x04, /**< Bulk transfer is finished. */ diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_command_protocol.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_command_protocol.h index 2ca51c6..5896727 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_command_protocol.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_command_protocol.h @@ -30,9 +30,9 @@ */ typedef enum { COMMAND_TYPE, /**< Command type of the packet.*/ - COMMAND_ACK, /**< Acknwoledge type of the packet.*/ + COMMAND_ACK, /**< Acknowledge type of the packet.*/ GENERAL_RESPONSE, /**< General response type of the packet.*/ - GENERAL_RESPONSE_ACK /**< General response acknwoledge type of the packet.*/ + GENERAL_RESPONSE_ACK /**< General response acknowledge type of the packet.*/ } CommandType_t; @@ -52,7 +52,7 @@ typedef struct Buffer_s { typedef struct Result_s { ErrorCode_e Status; /**< Status send by the general response. */ Buffer_t *Response_p; /**< Buffer holding data that should be - returned trough the general response */ + returned trough the general response */ } Result_t; /** @@ -62,7 +62,7 @@ typedef struct CommandData_s { uint8 CommandNr; /**< Number of the command. */ uint8 ApplicationNr;/**< Number of the application (command) group. */ uint16 SessionNr; /**< Number of the session in which this command - was received.*/ + was received.*/ CommandType_t Type; /**< Command type. */ Buffer_t Payload; /**< Holds the data received with the command.*/ } CommandData_t; diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_protocol.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_protocol.h index 2bc544b..8813b87 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_protocol.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_protocol.h @@ -16,7 +16,6 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "t_protrom_header.h" #include "t_protrom_network.h" #include "t_protrom_transport.h" diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_transport.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_transport.h index 20eef29..25ef644 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_transport.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_protrom_transport.h @@ -17,7 +17,6 @@ * Includes ******************************************************************************/ #include "t_basicdefinitions.h" -#include "t_protrom_network.h" /******************************************************************************* * Types, constants and external variables diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_r15_transport_layer.h b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_r15_transport_layer.h index 75007b8..80bef19 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_r15_transport_layer.h +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/include/t_r15_transport_layer.h @@ -32,7 +32,7 @@ typedef struct { void *Payload_p; /**< Pointer to payload data.*/ uint32 Time; /**< Used time for retransmission.*/ HandleFunction_t TimerCallBackFn_p; /**< Timer call back function for - retransmission.*/ + retransmission.*/ } SendData_LP_t; /** R15 Transport context. */ @@ -55,6 +55,7 @@ typedef struct { void *BulkDataCallback_p; /** Callback function pointer for handling end of bulk transfer.*/ void *EndOfDump_p; + /** Callback function pointer for handling releasing of bulk buffers.*/ void *BulkBufferRelease_p; } R15_TransportContext_t; diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_transport.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_transport.c index cee9aa3..9ae5f18 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_transport.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_transport.c @@ -14,7 +14,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include "r_a2_network.h" #include "r_a2_transport.h" #include <stdlib.h> diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c index feff254..4e4a1fb 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c @@ -14,7 +14,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include "r_basicdefinitions.h" #include <stdlib.h> #include <stdio.h> @@ -908,7 +908,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect } #endif - C_(printf("bulk_protocol.c(%d) Sent chunk (%d) session (%d)\n", __LINE__, ChunkId, BulkVector_p->SessionId);) + C_(printf("bulk_protocol.c(%d) Sent chunk (%d) session (%d)\n", __LINE__, BulkVector_p->SendingChunkId, BulkVector_p->SessionId);) } break; @@ -955,12 +955,12 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect } #endif - C_(printf("bulk_protocol.c(%d) Sent chunk (%d) session (%d)\n", __LINE__, ChunkId, BulkVector_p->SessionId);) + C_(printf("bulk_protocol.c(%d) Sent chunk (%d) session (%d)\n", __LINE__, BulkVector_p->SendingChunkId, BulkVector_p->SessionId);) } } #ifdef CFG_ENABLE_MEASUREMENT_TOOL - ReturnValue = MP(Measurement_p, ChunkId, RECEIVED_CHUNK_TIME); + ReturnValue = MP(Measurement_p, BulkVector_p->SendingChunkId, RECEIVED_CHUNK_TIME); #endif break; @@ -979,7 +979,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect pcbf(Communication_p->Object_p, BulkVector_p->SessionId, BulkVector_p->ChunkSize, BulkVector_p->Offset, BulkVector_p->Length, TRUE); // close the current bulk session - (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); //TODO: da se hendla return vrednosta! + (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); //TODO: return value should be handled BulkExtendedHeader_t *PendingHeader_p = R15_TRANSPORT(Communication_p)->BulkHandle.PendingBulkHeader_p; @@ -1030,7 +1030,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect #ifndef CFG_ENABLE_LOADER_TYPE ErrExit: -#endif +#endif //CFG_ENABLE_LOADER_TYPE Do_CriticalSection_Leave(R15_TRANSPORT(Communication_p)->BulkHandle.BulkTransferCS); return ReturnValue; @@ -1302,9 +1302,9 @@ static uint32 R15_Bulk_GetChunkId(const PacketMeta_t *const Packet_p) { BulkExtendedHeader_t BulkExtendedHeader = {0}; + //lint -e(413,826) R15_DeserializeBulkExtendedHeader(&BulkExtendedHeader, Packet_p->ExtendedHeader_p); - //lint -e(413,826) return BulkExtendedHeader.AcksChunk; } @@ -1457,7 +1457,7 @@ static ErrorCode_e R15_Bulk_ReadRequestHandler(Communication_t *Communication_p, pcbf(Communication_p->Object_p, BulkVector_p->SessionId, BulkVector_p->ChunkSize, BulkVector_p->Offset, BulkVector_p->Length, TRUE); // close the current bulk session - (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); //TODO: da se hendla return vrednosta! + (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); //TODO: return value should be handled // set bulk parameters for new bulk session ACK_Read = FALSE; @@ -1494,7 +1494,7 @@ static ErrorCode_e R15_Bulk_ReadRequestHandler(Communication_t *Communication_p, /* Try to release the timer for the bulk session acknowledge */ if (R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey > 0) { - (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey); // LCM MB bug fix: Timer should be released on request for retransmission + (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey); // LCM bug fix: Timer should be released on request for retransmission R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey = 0; } @@ -1510,7 +1510,7 @@ static ErrorCode_e R15_Bulk_ReadRequestHandler(Communication_t *Communication_p, pcbf = (BulkCommandReqCallback_t)R15_TRANSPORT(Communication_p)->BulkCommandCallback_p; pcbf(Communication_p->Object_p, BulkVector_p->SessionId, BulkVector_p->ChunkSize, BulkVector_p->Offset, BulkVector_p->Length, TRUE); - (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); //TODO: da se hendla return vrednosta! + (void)Do_R15_Bulk_CloseSession(Communication_p, BulkVector_p); //TODO: return value should be handled } else { /* Clean the previous saved data if there is any */ BUFFER_FREE(R15_TRANSPORT(Communication_p)->BulkHandle.PendingBulkHeader_p); @@ -1532,7 +1532,7 @@ static ErrorCode_e R15_Bulk_ReadRequestHandler(Communication_t *Communication_p, /* Try to release the timer for the bulk session acknowledge */ if (R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey > 0) { - (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey); // LCM MB bug fix: Timer should be released on request for retransmission + (void)TIMER(Communication_p, TimerRelease_Fn)(OBJECT_TIMER(Communication_p), R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey); // LCM bug fix: Timer should be released on request for retransmission R15_TRANSPORT(Communication_p)->BulkHandle.TimerKey = 0; } } @@ -1602,7 +1602,7 @@ static ErrorCode_e R15_Bulk_DataRequestHandler(Communication_t *Communication_p, BulkVector_p->TransferedLength += BulkVector_p->ChunkSize; pcbf = (BulkDataReqCallback_t)R15_TRANSPORT(Communication_p)->BulkDataCallback_p; pcbf(Communication_p->Object_p, BulkVector_p->SessionId, ExtendedHeader.ChunkSize, BulkVector_p->Offset, BulkVector_p->Length, BulkVector_p->TotalLength, BulkVector_p->TransferedLength); - C_(printf("S(%d) L(%d) CS(%d)\n", BulkVector_p->SessionId, BulkVector_p->Length, BulkVector_p->ChunkSize);) + C_(printf("S(%d) L(%d) CS(%d)\n", BulkVector_p->SessionId, BulkVector_p->Length, ExtendedHeader.ChunkSize);) } } diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/command_protocol.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/command_protocol.c index 08b4819..311ca2b 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/command_protocol.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/command_protocol.c @@ -54,7 +54,7 @@ static ErrorCode_e DispatchCommand(Communication_t *Communication_p, PacketMeta_ */ ErrorCode_e Do_R15_Command_ResetSessionCounters(const Communication_t *const Communication_p) { - /* Iintialize the session counters */ + /* Initialize the session counters */ R15_TRANSPORT(Communication_p)->SessionStateIn = 0; R15_TRANSPORT(Communication_p)->SessionStateOut = 0; diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/protrom_transport.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/protrom_transport.c index 6ea08d4..8f9ba0f 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/protrom_transport.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/protrom_transport.c @@ -17,7 +17,7 @@ #include <stdlib.h> #include <string.h> -#include "c_system.h" +#include "c_system_v2.h" #include "t_basicdefinitions.h" #include "r_debug.h" #include "r_debug_macro.h" diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c index 893412f..dcc5a3a 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/r15_transport_layer.c @@ -14,7 +14,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include "r_r15_transport_layer.h" #include <stdlib.h> #include <string.h> @@ -37,7 +37,9 @@ ******************************************************************************/ static Timer_t *TimerSet(PacketMeta_t *Packet_p, const SendData_LP_t *const InputData_p, Communication_t *Communication_p); static void R15_Transport_OutHashCallback(const void *const Data_p, uint32 Length, const uint8 *const Hash_p, void *Param_p); - +#ifdef CFG_ENABLE_LOADER_TYPE +static ErrorCode_e ConfigureDeviceTimeouts(Communication_t *Communication_p); +#endif /******************************************************************************* * File scope types, constants and variables ******************************************************************************/ @@ -57,6 +59,7 @@ static void R15_Transport_OutHashCallback(const void *const Data_p, uint32 Lengt */ ErrorCode_e R15_Transport_Initialize(const Communication_t *const Communication_p) { + ErrorCode_e ReturnValue = E_SUCCESS; int VectorCounter; /* Initialize the session counters for command protocol*/ @@ -67,9 +70,14 @@ ErrorCode_e R15_Transport_Initialize(const Communication_t *const Communication_ R15_TRANSPORT(Communication_p)->BulkSessionCounter = 0; /* Initialize the default timeouts */ +#ifndef CFG_ENABLE_LOADER_TYPE R15_TIMEOUTS(Communication_p)->TCACK = ACK_TIMEOUT_IN_MS; R15_TIMEOUTS(Communication_p)->TBCR = BULK_COMMAND_RECEIVING_TIMEOUT; R15_TIMEOUTS(Communication_p)->TBDR = BULK_DATA_RECEIVING_TIMEOUT; +#else + ReturnValue = ConfigureDeviceTimeouts((Communication_t *)Communication_p); + VERIFY(E_SUCCESS == ReturnValue, ReturnValue); +#endif for (VectorCounter = 0; VectorCounter < MAX_BULK_TL_PROCESSES; VectorCounter++) { R15_TRANSPORT(Communication_p)->BulkVectorList[VectorCounter].Status = BULK_SESSION_IDLE; @@ -80,7 +88,10 @@ ErrorCode_e R15_Transport_Initialize(const Communication_t *const Communication_ R15_TRANSPORT(Communication_p)->BulkHandle.BulkTransferCS = Do_CriticalSection_Create(); R15_TRANSPORT(Communication_p)->BulkHandle.PendingBulkHeader_p = NULL; - return E_SUCCESS; +#ifdef CFG_ENABLE_LOADER_TYPE +ErrorExit: +#endif + return ReturnValue; } /* @@ -314,6 +325,31 @@ static Timer_t *TimerSet(PacketMeta_t *Packet_p, const SendData_LP_t *const Inpu return Timer_p; } + +#ifdef CFG_ENABLE_LOADER_TYPE +/* + * Function for configuration of timeouts for communication device. + * + * @param [in] Communication_p Communication module context. + * + * @return E_SUCCESS If is successfully executed. + */ +static ErrorCode_e ConfigureDeviceTimeouts(Communication_t *Communication_p) +{ + ErrorCode_e ReturnValue = E_INVALID_INPUT_PARAMETERS; + R15_Timeouts_t NewTimeoutData = {0}; + + ReturnValue = Communication_p->CommunicationDevice_p->SetTimeouts((void *)&NewTimeoutData, (void *)Communication_p); + VERIFY(E_SUCCESS == ReturnValue, ReturnValue); + + ReturnValue = R15_SetProtocolTimeouts(Communication_p, (void *)&NewTimeoutData); + VERIFY(E_SUCCESS == ReturnValue, ReturnValue); + +ErrorExit: + return ReturnValue; +} +#endif + /** @} */ /** @} */ /** @} */ diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/test_cases/ADbg_cnh1605204.c b/lcmodule/source/cnh1605204_ldr_transport_layer/test_cases/ADbg_cnh1605204.c index 8453acf..7c95361 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/test_cases/ADbg_cnh1605204.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/test_cases/ADbg_cnh1605204.c @@ -25,7 +25,9 @@ #include "r_adbg_case.h" #include "r_adbg_module.h" #include "r_adbg_command.h" +#ifndef CFG_ENABLE_LOADER_TYPE #include "r_a2_protocol.h" +#endif // CFG_ENABLE_LOADER_TYPE #include "r_bulk_protocol.h" #include "r_command_protocol.h" #include "r_r15_transport_layer.h" @@ -34,7 +36,9 @@ /******************************************************************************* * The test case functions declarations ******************************************************************************/ +#ifndef CFG_ENABLE_LOADER_TYPE static void ADbg_Do_A2_Command_Send(ADbg_Case_t *Case_p); +#endif // CFG_ENABLE_LOADER_TYPE static void ADbg_Do_R15_Bulk_OpenSession(ADbg_Case_t *Case_p); static void ADbg_Do_R15_Bulk_CreateVector(ADbg_Case_t *Case_p); @@ -58,9 +62,11 @@ static void ADbg_R15_GetProtocolTimeouts(ADbg_Case_t *Case_p); /******************************************************************************* * The test case definitions ******************************************************************************/ +#ifndef CFG_ENABLE_LOADER_TYPE // A2_protocol static uint8 Parameters1_1[4] = {3, WORDPTR, WORDPTR, WORD}; ADBG_CASE_DEFINE(Test_Do_A2_Command_Send, 1, 8, ADbg_Do_A2_Command_Send, Parameters1_1); +#endif // CFG_ENABLE_LOADER_TYPE // Bulk_protocol static uint8 Parameters3_1[5] = {4, WORDPTR, SHORT, WORD, WORD}; @@ -107,7 +113,9 @@ ADBG_CASE_DEFINE(Test_R15_GetProtocolTimeouts, 18, 8, ADbg_R15_GetProtocolTimeou ******************************************************************************/ ADBG_SUITE_DEFINE_BEGIN(TestCase_CNH1605204, 0, 8) +#ifndef CFG_ENABLE_LOADER_TYPE ADBG_SUITE_ENTRY(Test_Do_A2_Command_Send) +#endif // CFG_ENABLE_LOADER_TYPE ADBG_SUITE_ENTRY(Test_Do_R15_Bulk_OpenSession) ADBG_SUITE_ENTRY(Test_Do_R15_Bulk_CreateVector) @@ -141,6 +149,7 @@ void Do_CNH1605204_Module_Test_Run(ADbg_MainModule_t *MainModule_p) /******************************************************************************* * Test cases ******************************************************************************/ +#ifndef CFG_ENABLE_LOADER_TYPE /** * This function will test function: * CNH1605204_TestedFunction1. @@ -171,6 +180,7 @@ static void ADbg_Do_A2_Command_Send(ADbg_Case_t *Case_p) free(CmdData_p); } } +#endif // CFG_ENABLE_LOADER_TYPE /** * This function will test function: diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h index fd6efb7..a4007e5 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_a2_network.h @@ -58,7 +58,7 @@ ErrorCode_e A2_Network_Shutdown(const Communication_t *const Communication_p); ErrorCode_e A2_Network_CancelRetransmission(const Communication_t *const Communication_p, uint32 UniqueKey); /** - * Handler for received packets in A2 protocl family. + * Handler for received packets in A2 protocol family. * * This callback function handles the received packets. * diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h index 8165430..1462f12 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_header.h @@ -19,7 +19,6 @@ * Includes ******************************************************************************/ #include <t_basicdefinitions.h> -#include "t_protrom_header.h" #include "t_protrom_network.h" /******************************************************************************* diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h index a6e897c..c18108d 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_protrom_network.h @@ -51,7 +51,7 @@ ErrorCode_e Protrom_Network_Shutdown(const Communication_t *const Communication_ * * @param [in] Data_p Pointer to the received data. * @param [in] Length Length of the received data. - * @param [in] Param_p Extra parameteres. + * @param [in] Param_p Extra parameters. * * @return none. */ diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h index cf739b5..9a2c53f 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_r15_network_layer.h @@ -22,7 +22,6 @@ #include "error_codes.h" #include "t_basicdefinitions.h" #include "t_r15_network_layer.h" -#include "t_communication_service.h" /******************************************************************************* * Declaration of functions @@ -66,14 +65,14 @@ ErrorCode_e R15_Network_CancelRetransmission(const Communication_t *const Commun * combination of protocol type, session number and command. * * @param [in] Packet_p Pointer to the packet. - * @param [in] ExternalKey External key for marking the packet for retransmision. + * @param [in] ExternalKey External key for marking the packet for retransmission. * * @return Unique key. */ uint32 R15_Network_CreateUniqueKey(const PacketMeta_t *const Packet_p, const uint8 ExternalKey); /** - * Handler for received packets in R15 protocl family. + * Handler for received packets in R15 protocol family. * * This callback function handles the received packets. * @@ -114,7 +113,7 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p); /** * Handler for sending data. * - * This function checks if new data is available for sending and handles the transmision. + * This function checks if new data is available for sending and handles the transmission. * * @param [in,out] Communication_p Communication module context. * diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h index c8450e5..892eb6f 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/r_z_network.h @@ -49,7 +49,7 @@ ErrorCode_e Z_Network_Initialize(Communication_t *Communication_p); ErrorCode_e Z_Network_Shutdown(const Communication_t *const Communication_p); /** - * Handler for received packets in Z protcol family. + * Handler for received packets in Z protocol family. * * This callback function handles the received packets. * @@ -77,7 +77,7 @@ void Z_Network_ReadCallback(const void *Data_p, const uint32 Length, void *Param void Z_Network_WriteCallback(const void *Data_p, const uint32 Length, void *Param_p); /** - * Handler for receiving new data in Z protcol family. + * Handler for receiving new data in Z protocol family. * * This function checks if new data has been received. * @@ -89,9 +89,9 @@ void Z_Network_ReceiverHandler(Communication_t *Communication_p); /** - * Handler for sending new data in Z protcol family. + * Handler for sending new data in Z protocol family. * - * This function checks if new data has been transmited. + * This function checks if new data has been transmitted. * * @param [in] Communication_p Communication module context. * @param [in] SendingContent_p Pointer to the sending context. diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h index 63ae6ef..a434e79 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_header.h @@ -32,8 +32,6 @@ #define PROTROM_HEADER_LENGTH 7 /** Value of the reserved field */ #define PROTROM_RESERVED_FIELD 0x00 -/** Offset of the header in the buffer */ -#define HEADER_OFFSET_IN_BUFFER 8 /** * Header search results @@ -52,7 +50,7 @@ typedef struct { uint8 HeaderPattern; /**< Header pattern for marking header start.*/ uint8 Protocol; /**< Protocol type. */ uint8 SourceAddress; /**< Source address. */ - uint8 DestinationAddress; /**< Destionation address. */ + uint8 DestinationAddress; /**< Destination address. */ uint8 ReservedField; /**< Reserved field. */ uint16 PayloadLength; /**< Payload length. */ } Protrom_Header_t; diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h index b29a65a..fe693f4 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_protrom_network.h @@ -39,11 +39,11 @@ typedef enum { /** Defined state of the transmitter */ typedef enum { - PROTROM_SEND_IDLE, /**< Transmiter idle state.*/ - PROTROM_SEND_HEADER, /**< Transmiter send header. */ - PROTROM_SEND_PAYLOAD, /**< Transmiter send payload. */ - PROTROM_SENDING_HEADER, /**< Transmiter is in process sending header.*/ - PROTROM_SENDING_PAYLOAD /**< Transmiter is in process sending payload.*/ + PROTROM_SEND_IDLE, /**< Transmitter idle state.*/ + PROTROM_SEND_HEADER, /**< Transmitter send header. */ + PROTROM_SEND_PAYLOAD, /**< Transmitter send payload. */ + PROTROM_SENDING_HEADER, /**< Transmitter is in process sending header.*/ + PROTROM_SENDING_PAYLOAD /**< Transmitter is in process sending payload.*/ } Protrom_OutboundState_t; /** Structure for the packet meta data type. */ @@ -52,8 +52,8 @@ typedef struct Protrom_Packet { uint8 *Buffer_p; /**< Temporary buffer for receiving data.*/ uint16 CRC; /**< Calculated CRC of received packet. */ Communication_t *Communication_p; /**< The communication over which this - packet has been/is to be transferred - over */ + packet has been/is to be transferred + over */ } Protrom_Packet_t; /** Structure for handling incoming PROTROM packets.*/ @@ -62,9 +62,9 @@ typedef struct { Protrom_InboundState_t State; /**< Number of requested data for receiving from communication device. */ uint32 ReqData; - /**< Number of receivied data from communication device. */ + /**< Number of received data from communication device. */ uint32 RecData; - /**< Number of receivied data from backup buffer used for switching the + /**< Number of received data from backup buffer used for switching the * protocol family. */ uint32 RecBackupData; /**< Offset in the buffer for next data that should be received. */ @@ -73,7 +73,7 @@ typedef struct { uint8 *Target_p; /**< Temporary buffer for receiving data. */ uint8 Scratch[PROTROM_HEADER_LENGTH]; - /** Number of packets before receiver is stoped. */ + /** Number of packets before receiver is stopped. */ uint8 PacketsBeforeReceiverStop; /** Indicator for stopping the receiver. */ boolean StopTransfer; diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h index e31ca8c..4b5cc70 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_header.h @@ -69,7 +69,7 @@ typedef struct { uint8 HeaderPattern; /**< Header pattern for marking header start.*/ uint8 Protocol; /**< Protocol type. */ uint16 HeaderPatternExtension; /**< Header pattern extension.*/ - uint8 Flags; /**< Flasgs for the header.*/ + uint8 Flags; /**< Flags for the header.*/ uint8 ExtendedHeaderLength; /**< Extended header length.*/ uint8 ExtendedHeaderChecksum; /**< Extended header checksum.*/ uint32 PayloadLength; /**< Payload length. */ diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h index 0bd2944..408fdf9 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_r15_network_layer.h @@ -71,8 +71,8 @@ /** Size of a buffer used for commands. */ #define COMMAND_BUFFER_SIZE 0x00010000 -/** Size of a buffer used for bulk transfer, - * must be biger than buffer for commands. */ +/** Size of a payload buffer used for bulk transfer, + * must be larger than buffer for commands. */ #define BULK_BUFFER_SIZE 0x00100000 @@ -86,7 +86,7 @@ #define SESSION_MASK 0xFFFC /** - * Defines all posible types of buffers that can be created (allocated). + * Defines all possible types of buffers that can be created (allocated). * * It is used to specified the type of the buffer * when allocating a new buffer. Also it is used when @@ -108,7 +108,7 @@ TYPEDEF_ENUM { BUF_TX_SENT = 0x00000008, /**< The buffer is sent and wait ACK. */ BUF_TX_DONE = 0x00000010, /**< The buffer has been sent and can be deallocated. */ - BUF_TX_TIMEOUT = 0x00000020, /**< The timeout ocure when buffer is + BUF_TX_TIMEOUT = 0x00000020, /**< The timeout occur when buffer is sending. */ BUF_RX_READY = 0x00000040, /**< The buffer is filled with received data and is ready for @@ -201,7 +201,7 @@ typedef void (*PacketCallBack_t)(Communication_t *Communication_p, const void *D /** Structure for the packet meta data. */ typedef struct PacketMeta { - PacketCallBack_t CallBack_p; /**< Cllback function used after + PacketCallBack_t CallBack_p; /**< Callback function used after sending packet.*/ uint32 Flags; /**< Field is a bit-field. Flags for the Packet state. */ @@ -209,9 +209,9 @@ typedef struct PacketMeta { corresponding buffer used in the packet. */ R15_Header_t Header; /**< Structure of the header. */ - uint32 Resend; /**< Resend counter. */ + uint32 Resend; /**< Resent counter. */ Timer_t *Timer_p; /**< Timer data used for - sending/reciving packet. */ + sending/receiving packet. */ uint8 *ExtendedHeader_p; /**< Pointer to the extended header located in the packet. */ uint8 *Payload_p; /**< Pointer to the payload data @@ -234,8 +234,7 @@ typedef struct { uint32 Timeout; /**< Defined timeout for retransmission. */ uint32 TimerKey; /**< Timer identification number.*/ uint32 Key; /**< Generated unique key, used for marking packet for - retransmission or removing from - retransmission list. */ + retransmission or removing from retransmission list. */ PacketMeta_t *Packet_p; /**< Pointer to the packet for retransmission. */ } RetransmissionContext_t; @@ -246,9 +245,9 @@ typedef struct { R15_InboundState_t State; /**< Number of requested data for receiving from communication device. */ uint32 ReqData; - /**< Number of receivied data from communication device. */ + /**< Number of received data from communication device. */ uint32 RecData; - /**< Number of receivied data from backup buffer used for switching the + /**< Number of received data from backup buffer used for switching the * protocol family. */ uint32 RecBackupData; /**< Offset in the buffer for next data that should be received. */ @@ -259,9 +258,9 @@ typedef struct { uint8 Scratch[ALIGNED_HEADER_LENGTH + ALIGNED_BULK_EXTENDED_HEADER_LENGTH]; /** Temporary structure for handling R15 packet.*/ R15_Header_t Header; - /** Poiter to meta data for allocated buffer for handling R15 packet.*/ + /** Pointer to meta data for allocated buffer for handling R15 packet.*/ PacketMeta_t *Packet_p; - /** Number of packets before receiver is stoped. */ + /** Number of packets before receiver is stopped. */ uint8 PacketsBeforeReceiverStop; /** Indicator for stopping the receiver. */ boolean StopTransfer; diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h index 09fe771..0eab5d2 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_header.h @@ -10,7 +10,7 @@ * @addtogroup z_family * @{ * @addtogroup ldr_z_header Z header - * Functionalities for analizing header from Z protocol family. + * Functionalities for analyzing header from Z protocol family. * * @{ */ diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h index 7f66e67..fa189f1 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h +++ b/lcmodule/source/cnh1605205_ldr_network_layer/include/t_z_network.h @@ -34,9 +34,9 @@ typedef enum { /** Defined state of the transmitter */ typedef enum { - Z_SEND_IDLE, /**< Transmiter idle state.*/ - Z_SEND_PACKET, /**< Transmiter send packet. */ - Z_SENDING_PACKET /**< Transmiter is in process sending packet.*/ + Z_SEND_IDLE, /**< Transmitter idle state.*/ + Z_SEND_PACKET, /**< Transmitter send packet. */ + Z_SENDING_PACKET /**< Transmitter is in process sending packet.*/ } Z_OutboundState_t; /** Structure for handling incoming Z packets.*/ @@ -45,11 +45,11 @@ typedef struct { Z_InboundState_t State; /**< Number of requested data for receiving from communication device. */ uint32 ReqData; - /**< Number of receivied data from communication device. */ + /**< Number of received data from communication device. */ uint32 RecData; /**< Temporary pointer to buffer for handling received data.*/ uint8 *Target_p; - /** Number of packets before receiver is stoped. */ + /** Number of packets before receiver is stopped. */ uint8 PacketsBeforeReceiverStop; /** Indicator for stopping the receiver. */ boolean StopTransfer; diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c index fd48503..6215372 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_header.c @@ -14,7 +14,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include <string.h> #include "t_basicdefinitions.h" #include "r_a2_header.h" diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c index 1aa32a3..bfc0f97 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c @@ -17,7 +17,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#include "c_system.h" +#include "c_system_v2.h" #include "r_basicdefinitions.h" #include "r_a2_family.h" #include "r_a2_transport.h" @@ -29,10 +29,6 @@ #include "r_debug_macro.h" #include "r_critical_section.h" -#ifdef WIN32 -#include <windows.h> -#endif - /******************************************************************************* * Declaration of file local functions ******************************************************************************/ diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c index acc7836..acb8806 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_header.c @@ -14,7 +14,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include <string.h> #include "t_basicdefinitions.h" #include "r_protrom_header.h" diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c index 11410e2..47602a6 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c @@ -16,7 +16,7 @@ ******************************************************************************/ #include <stdlib.h> #include <string.h> -#include "c_system.h" +#include "c_system_v2.h" #include "t_basicdefinitions.h" #include "r_protrom_family.h" #include "r_protrom_transport.h" @@ -28,10 +28,6 @@ #include "r_debug_macro.h" #include "r_critical_section.h" -#ifdef WIN32 -#include <windows.h> -#endif - /******************************************************************************* * Declaration of file local functions ******************************************************************************/ @@ -393,7 +389,7 @@ static ErrorCode_e Protrom_Network_TransmiterHandler(Communication_t *Communicat Out_p->Packet_p = (Protrom_Packet_t *)QUEUE(Communication_p, FifoDequeue_Fn)(OBJECT_QUEUE(Communication_p), Communication_p->Outbound_p); if (NULL != Out_p->Packet_p) { - /* get next packet for transmiting */ + /* get next packet for transmitting */ Out_p->State = PROTROM_SEND_HEADER; } else { break; diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c index be504e5..5687bcf 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_header.c @@ -14,7 +14,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include <string.h> #include "t_basicdefinitions.h" #include "r_r15_header.h" @@ -224,8 +224,12 @@ boolean R15_IsReceivedHeader(R15_Inbound_t *In_p) In_p->ReqBuffOffset = In_p->RecData - StartHeaderInBuffer; } } else { - In_p->ReqData = ALIGNED_HEADER_LENGTH; + /* Sync the header. */ + In_p->RecData = 0; In_p->ReqBuffOffset = 0; + In_p->State = RECEIVE_HEADER; + In_p->ReqData = ALIGNED_HEADER_LENGTH; + In_p->Target_p = In_p->Scratch; } } diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c index e5afef2..509e8cf 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/r15_network_layer.c @@ -14,13 +14,13 @@ /******************************************************************************* * Includes ******************************************************************************/ +#include <stdlib.h> +#include <string.h> #include "r_r15_network_layer.h" #include "r_basicdefinitions.h" -#include <stdlib.h> #include "r_debug.h" #include "r_debug_macro.h" -#include <string.h> -#include "c_system.h" +#include "c_system_v2.h" #include "r_r15_transport_layer.h" #include "r_r15_family.h" #include "r_r15_header.h" @@ -466,7 +466,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) * Cancel retransmission of packets. * * @param [in,out] Communication_p Communication module context. - * @param [in] UniqueKey Unique key used for identification of packet + * @param [in] UniqueKey Unique key used for identification of packet * for retransmission. * * @return none. @@ -729,6 +729,7 @@ static ErrorCode_e R15_Network_ReceiveHeader(const Communication_t *const Commun if (print_header) { uint32 Counter = 0; + print_header = 0; printf("Invalid header! \n"); for (Counter = 0; Counter < 16; Counter++) { @@ -818,7 +819,7 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat } else { A_( uint32 Counter = 0; - printf("Invalid exheader! \n"); + printf("Invalid extended header! \n"); for (Counter = 0; Counter < 16; Counter++) { printf(" %02X", In_p->Target_p[Counter]); diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c b/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c index 4ec23eb..6ed92c2 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/z_network.c @@ -16,7 +16,7 @@ ******************************************************************************/ #include <stdlib.h> #include <string.h> -#include "c_system.h" +#include "c_system_v2.h" #include "t_basicdefinitions.h" #include "r_z_family.h" #include "r_z_transport.h" @@ -26,10 +26,6 @@ #include "r_communication_service.h" #include "r_critical_section.h" -#ifdef WIN32 -#include <windows.h> -#endif - /******************************************************************************* * Declaration of file local functions ******************************************************************************/ diff --git a/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c b/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c index 68455bf..ddce514 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/test_cases/ADbg_cnh1605205.c @@ -25,8 +25,10 @@ #include "r_adbg_case.h" #include "r_adbg_module.h" #include "r_adbg_command.h" +#ifndef CFG_ENABLE_LOADER_TYPE #include "r_a2_header.h" #include "r_a2_network.h" +#endif // CFG_ENABLE_LOADER_TYPE #include "r_r15_header.h" #include "r_r15_network_layer.h" #include <stdlib.h> @@ -34,6 +36,7 @@ /******************************************************************************* * The test case functions declarations ******************************************************************************/ +#ifndef CFG_ENABLE_LOADER_TYPE static void ADbg_A2_GetPacketLength(ADbg_Case_t *Case_p); static void ADbg_A2_IsValidHeader(ADbg_Case_t *Case_p); static void ADbg_A2_IsReceivedHeader(ADbg_Case_t *Case_p); @@ -42,6 +45,7 @@ static void ADbg_A2_Network_Initialize(ADbg_Case_t *Case_p); static void ADbg_A2_Network_Shutdown(ADbg_Case_t *Case_p); static void ADbg_A2_Network_PacketAllocate(ADbg_Case_t *Case_p); static void ADbg_A2_Network_PacketRelease(ADbg_Case_t *Case_p); +#endif // CFG_ENABLE_LOADER_TYPE static void ADbg_R15_GetPacketLength(ADbg_Case_t *Case_p); static void ADbg_R15_IsValidHeader(ADbg_Case_t *Case_p); @@ -57,6 +61,7 @@ static void ADbg_R15_Network_PacketRelease(ADbg_Case_t *Case_p); /******************************************************************************* * The test case definitions ******************************************************************************/ +#ifndef CFG_ENABLE_LOADER_TYPE static uint8 Parameters1_1[3] = {2, WORDPTR, WORD}; ADBG_CASE_DEFINE(Test_A2_GetPacketLength, 1, 9, ADbg_A2_GetPacketLength, Parameters1_1); static uint8 Parameters1_2[3] = {2, VOIDPTR, BYTE}; @@ -72,6 +77,7 @@ static uint8 Parameters2_3[4] = {3, WORDPTR, WORD, WORDPTR}; ADBG_CASE_DEFINE(Test_A2_Network_PacketAllocate, 6, 9, ADbg_A2_Network_PacketAllocate, Parameters2_3); static uint8 Parameters2_4[4] = {3, WORDPTR, WORD, WORDPTR}; ADBG_CASE_DEFINE(Test_A2_Network_PacketRelease, 7, 9, ADbg_A2_Network_PacketRelease, Parameters2_4); +#endif // CFG_ENABLE_LOADER_TYPE static uint8 Parameters3_1[3] = {2, WORDPTR, WORD}; ADBG_CASE_DEFINE(Test_R15_GetPacketLength, 8, 9, ADbg_R15_GetPacketLength, Parameters3_1); @@ -98,6 +104,7 @@ ADBG_CASE_DEFINE(Test_R15_Network_PacketRelease, 16, 9, ADbg_R15_Network_PacketR ******************************************************************************/ ADBG_SUITE_DEFINE_BEGIN(TestCase_CNH1605205, 0, 9) +#ifndef CFG_ENABLE_LOADER_TYPE ADBG_SUITE_ENTRY(Test_A2_GetPacketLength) ADBG_SUITE_ENTRY(Test_A2_IsValidHeader) ADBG_SUITE_ENTRY(Test_A2_IsReceivedHeader) @@ -106,6 +113,7 @@ ADBG_SUITE_ENTRY(Test_A2_Network_Initialize) ADBG_SUITE_ENTRY(Test_A2_Network_Shutdown) ADBG_SUITE_ENTRY(Test_A2_Network_PacketAllocate) ADBG_SUITE_ENTRY(Test_A2_Network_PacketRelease) +#endif // CFG_ENABLE_LOADER_TYPE ADBG_SUITE_ENTRY(Test_R15_GetPacketLength) ADBG_SUITE_ENTRY(Test_R15_IsValidHeader) @@ -132,6 +140,7 @@ void Do_CNH1605205_Module_Test_Run(ADbg_MainModule_t *MainModule_p) /******************************************************************************* * Test cases ******************************************************************************/ +#ifndef CFG_ENABLE_LOADER_TYPE /** * This function will test function: * A2_GetPacketLength. @@ -315,6 +324,7 @@ static void ADbg_A2_Network_PacketRelease(ADbg_Case_t *Case_p) free(Meta_p); } } +#endif // CFG_ENABLE_LOADER_TYPE /** * This function will test function: diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/a2_commands.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/a2_commands.xml index 171df8f..6da32f0 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/a2_commands.xml +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/a2_commands.xml @@ -32,9 +32,6 @@ <!-- Predefine generic type of data are: uint32, string and buffer. All A2 commands use only one buffer as an input and one buffer as an output parametar. - !!!!! IMPORTANT !!!!! - All new types of data (structures or vectors of structures) that need to be defined should first be reviewed and approved by: - Hans Holmberg (QHANHOL) for loaders, Mikael Sjolen XX for PTK and Daniel Chong for PA. --> <group number="1" name="A2 System group"> diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_c.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_c.xsl index f9b577b..f4d8849 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_c.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_c.xsl @@ -81,7 +81,7 @@ </otherwise> </choose> <choose> - <when test="$supported_commands/group[@number=$group]/command[@number=$command]/permissions"> PermArray_<value-of select="concat(../interface [@type='loader']/@name, '_', ./interface[@type='loader']/@name)" />, + <when test="$supported_commands/group[@number=$group]/command[@number=$command]/permissions"> PermArray_<value-of select="concat(../interface[@type='loader']/@name, '_', ./interface[@type='loader']/@name)" />, </when> <otherwise> NULL, </otherwise> diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_h.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_h.xsl index 064f27a..24da528 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_h.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/audit_h.xsl @@ -60,11 +60,11 @@ TYPEDEF_ENUM { </template> <template match="value"> -<text> </text><value-of select="@name" /> = <value-of select="@number" />, /**< <value-of select="text()" /> */ +<text> </text><value-of select="@name" /> = <value-of select="@number" />, /**< <value-of select="text()" /> */ </template> <template match="value[last()]"> -<text> </text><value-of select="@name" /> = <value-of select="@number" /> /**< <value-of select="text()" /> */ +<text> </text><value-of select="@name" /> = <value-of select="@number" /> /**< <value-of select="text()" /> */ </template> </stylesheet> diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/ces_commands_c.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/ces_commands_c.xsl index 19971b9..da5f5ec 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/ces_commands_c.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/ces_commands_c.xsl @@ -18,18 +18,12 @@ <variable name="command" select="@number" />
<if test='$target="lcm" or $supported_commands/group[@number=$group]/command[@number=$command]'>
<if test='contains(@supportedcmdtype, "longrunning")'>
-<if test='$group=2 and $command=5'>
-#ifdef DISABLE_SECURITY
-</if>
<text> </text> {
<text> </text> NULL,
<text> </text><value-of select="../interface/@name"/>_<value-of select="interface/@name"/>Repeat,
<text> </text><call-template name="commandid"/>,
<text> </text> 1
<text> </text> },
-<if test='$group=2 and $command=5'>
-#endif
-</if>
</if>
</if>
</template>
diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/command_ids_h.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/command_ids_h.xsl index 325b598..f0fd533 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/command_ids_h.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/command_ids_h.xsl @@ -19,6 +19,7 @@ #ifndef _COMMAND_IDS_H #define _COMMAND_IDS_H #include "t_basicdefinitions.h" +<apply-templates select="group/command" mode="define"/> TYPEDEF_ENUM { <apply-templates select="group" mode="id"/>} ENUM8(GroupId_e); @@ -38,15 +39,15 @@ typedef struct <value-of select="interface/@name" />_s { <template match="value"> <text> </text> <choose> - <when test="@type='uint64'"> - <value-of select="@type" /><text> </text><value-of select="@name" />; /**< <value-of select="text()" /> */ - </when> <when test="@type='string'"> char *<text></text><value-of select="@name" />; /**< <value-of select="text()" /> */ </when> <when test="@type='uint32'"> <value-of select="@type" /><text> </text><value-of select="@name" />; /**< <value-of select="text()" /> */ </when> + <when test="@type='uint64'"> + <value-of select="@type" /><text> </text><value-of select="@name" />; /**< <value-of select="text()" /> */ + </when> </choose> <if test="position() = last()"><text></text> </if> @@ -82,4 +83,12 @@ typedef struct <value-of select="interface/@name" />_s { </if> </template> +<template match="command" mode="define"> +<variable name="group" select="../@number"/> +<variable name="command" select="@number"/> +<if test='$target="lcm" or $supported_commands/group[@number=$group]/command[@number=$command]'> +#define <call-template name="commandsupported"/> +</if> +</template> + </stylesheet> diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl index ce47482..d4a8672 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/command_marshal.xsl @@ -138,7 +138,7 @@ A_(printf("command_marshal.c (%d): ** memory allocation failed! **\n",__LINE__);)\ return E_ALLOCATE_FAILED;\ }\ - + #define COMMANDDATAOUT(TypeP,ApplicationP,CommandP,SizeP)\ memset((uint8*)&CmdData, 0x00, sizeof(CommandData_t));\ CmdData.Type = TypeP;\ @@ -335,7 +335,7 @@ ErrorCode_e <value-of select="concat('Done_', ../interface[@type='loader']/@name </if> </template> -<template match="group/command" mode="unmarshal"> +<template match="group/command" mode="unmarshal"> <variable name="group" select="../@number" /> <variable name="command" select="@number" /> <if test='$target="lcm" or $supported_commands/group[@number=$group]/command[@number=$command]'> diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml index 52b76e2..ead8078 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml @@ -42,24 +42,21 @@ </typedef> <AuthenticationList> - <value number="1" name=" A1">A1</value> - <value number="2" name=" CA">CA</value> + <value number="1" name="A1">A1</value> + <value number="2" name="CA">CA</value> </AuthenticationList> <PermissionList> - <value number="0" name=" ServiceModeLevel">ServiceModeLevel</value> - <value number="1" name=" FlashModeLevel">FlashModeLevel</value> - <value number="64" name=" AdvanceServiceModeLevel">AdvanceServiceModeLevel</value> - <value number="65" name=" LimitedProductionModeLevel">LimitedProductionModeLevel</value> - <value number="66" name=" VeryLimitedProductionModeLevel">VeryLimitedProductionModeLevel</value> - <value number="127" name=" ProductionModeLevel">ProductionModeLevel</value> + <value number="0" name="ServiceModeLevel">ServiceModeLevel</value> + <value number="1" name="FlashModeLevel">FlashModeLevel</value> + <value number="64" name="AdvanceServiceModeLevel">AdvanceServiceModeLevel</value> + <value number="65" name="LimitedProductionModeLevel">LimitedProductionModeLevel</value> + <value number="66" name="VeryLimitedProductionModeLevel">VeryLimitedProductionModeLevel</value> + <value number="127" name="ProductionModeLevel">ProductionModeLevel</value> </PermissionList> <!-- Predefine generic type of data are: uint32, string and buffer. - !!!!! IMPORTANT !!!!! - All new types of data (structures or vectors of structures) that need to be defined should first be reviewed and approved by: - Hans Holmberg (QHANHOL) for loaders, Mikael Sjolen XX for PTK and Daniel Chong for PA. --> <group number="01" name="System application" supportedcmdtype="longrunning,shortrunning"> @@ -67,17 +64,17 @@ System commands group (0x01) </documentation> <interface type="loader" name="System"/> - + <command number="1" name="Loader Start-up Status" ADbg="false" source="ME"> <interface type="loader" name="LoaderStartUpStatus"/> <documentation> 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. </documentation> - <input> + <input> <value type="uint32" name="Status">0 = started successfully, 1 = failed to start (lack of permissions), 2 = software module failed to initialize</value> <value type="string" name="LoaderVersion_p">Loader version identifier</value> <value type="string" name="ProtocolVersion_p">Protocol version identifier</value> - </input> + </input> <output> </output> </command> @@ -117,14 +114,14 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -138,16 +135,16 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -163,16 +160,16 @@ <value type="SupportedCommand" name="Commands" length="CommandCount">An array of command identifiers. The Permitted field indicates whether the command can be executed at the current time (non-zero value means allowed)</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -189,12 +186,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -204,21 +201,21 @@ This command is used to escalate the privileges of the operator. Two modes of authentication are available by default; Control Key authentication and Certificate based authentication. The authentication command sets the loader in a specific authentication context when it takes control over the command flow. After receiving the authentication command, the Loader will send the appropriate request for information to the PC. </documentation> <input> - <value type="uint32" name="Type">Authentication type: 0 = Control Key authentication, 1 = Certificate authentication.</value> + <value type="uint32" name="Type">Authentication type: 0 = Control Key authentication; 1 = Certificate authentication; 2 = Permanent authentication; 3 = Control Key permanent authentication; 4 = Certificate permanent authentication; 5 = Get authentication type.</value> </input> <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -273,12 +270,12 @@ <value type="buffer" name="CollectedData_p" length="DataLenght">Output data buffer. Contain debug data (printouts) or measurement data.</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -293,16 +290,16 @@ <value type="uint32" name="ProgressStatus">Command progress status presented in percent.</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -317,11 +314,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -337,16 +334,16 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -358,8 +355,8 @@ <input> </input> <output> - <value type="uint32" name="iDataSize">Length of output buffer.</value> - <value type="buffer" length="iDataSize" name="SIMLockKeysData_p">Data buffer with all SIMLock keys.</value> + <value type="uint32" name="DataSize">Length of output buffer.</value> + <value type="buffer" length="DataSize" name="SIMLockKeysData_p">Data buffer with all SIMLock keys.</value> </output> </command> @@ -376,16 +373,16 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -395,7 +392,7 @@ This command is used by the Loader to deauthenticates the ME from prior authentications to prevent unauthorized access. </documentation> <input> - <value type="uint32" name="Type">Deauthentication type: 1 = permanent deauthentication, 0 = deauthenticate until next reboot of the ME.</value> + <value type="uint32" name="Type">Deauthentication type: 0 = Deauthenticate until next reboot of the ME; 1 = Permanent deauthentication.</value> </input> <output> </output> @@ -420,13 +417,13 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -442,13 +439,13 @@ <value type="ListDevice" name="Devices" length="DeviceCount">Absolute device path, Type of the device, Block Size, Start address of the device, Length of the device</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -467,11 +464,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -488,11 +485,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -510,11 +507,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref =" A1"/> - <value ref =" CA"/> + <value ref ="A1"/> + <value ref ="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -538,6 +535,7 @@ <value ref="ProductionModeLevel"/> </permissions> </command> + </group> <group number="03" name="File system operations" supportedcmdtype="longrunning,shortrunning"> @@ -559,12 +557,12 @@ <value type="uint64" name="Free">Available space (in bytes)</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -580,11 +578,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -601,12 +599,12 @@ <value type="DirEntry" name="Entries" length="EntriesCount">Name and Size of file or directory, Mode as indicator if it is file or directory, Time of last modification</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -622,11 +620,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -641,12 +639,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -662,12 +660,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -682,11 +680,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -706,16 +704,16 @@ <value type="uint32" name="CTime">Creation time stamp</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -731,11 +729,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -750,12 +748,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -786,16 +784,16 @@ <value type="buffer" name="LockStatus_p" length="LockStatusLength">A left-adjusted buffer of the lock status of each read bit. Padded with zeroes. Length of returned value (in bytes), equal to floor((Length + 7) / 8). </value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -814,11 +812,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -834,11 +832,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -854,11 +852,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -884,12 +882,12 @@ <value type="buffer" name="DataBuff_p" length="DataBuffLength">The read data</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -907,12 +905,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -928,12 +926,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -950,12 +948,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -970,11 +968,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -997,11 +995,11 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ProductionModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -1016,16 +1014,16 @@ <value type="uint32" name="CurrentDomain">The ME Domain</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -1042,16 +1040,16 @@ <value type="buffer" name="DataBuff_p" length="DataBuffLength">The unit data</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -1068,12 +1066,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -1087,12 +1085,12 @@ <output> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> </permissions> </command> @@ -1139,16 +1137,16 @@ <value type="buffer" name="CmdDataPayLoad_p" length="CmdDataLength">CmdData</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -1164,16 +1162,16 @@ <value type="buffer" name="CmdDataPayLoad_p" length="CmdDataLength">CmdData</value> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -1195,16 +1193,16 @@ </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -1223,16 +1221,16 @@ </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -1252,16 +1250,16 @@ </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> @@ -1278,18 +1276,18 @@ <value type="uint32" name="ProtocolTestStatus"/> </output> <authentication depandancy="or" factory="TRUE" rd="TRUE" product="TRUE" service="TRUE"> - <value ref=" A1"/> - <value ref=" CA"/> + <value ref="A1"/> + <value ref="CA"/> </authentication> <permissions> - <value ref=" ServiceModeLevel"/> - <value ref=" FlashModeLevel"/> - <value ref=" AdvanceServiceModeLevel"/> - <value ref=" ProductionModeLevel"/> - <value ref=" LimitedProductionModeLevel"/> - <value ref=" VeryLimitedProductionModeLevel"/> + <value ref="ServiceModeLevel"/> + <value ref="FlashModeLevel"/> + <value ref="AdvanceServiceModeLevel"/> + <value ref="ProductionModeLevel"/> + <value ref="LimitedProductionModeLevel"/> + <value ref="VeryLimitedProductionModeLevel"/> </permissions> </command> </group> -</commandspec> +</commandspec>
\ No newline at end of file diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl index 9739298..9919b3d 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/common.xsl @@ -25,6 +25,11 @@ <value-of select="translate(concat('COMMAND_', $path/../interface[@type='loader']/@name, '_', $path/interface[@type='loader']/@name),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /> </template> +<template name="commandsupported"> + <param name="path" select="." /> + <value-of select="translate(concat('COMMAND_', $path/../interface[@type='loader']/@name, '_', $path/interface[@type='loader']/@name, '_SUPPORTED'),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')" /> +</template> + <template match="value" mode="deserialize"> <choose> <when test="@type='uint32'"><text> </text><value-of select="@name" /> = get_uint32_le(&Data_p); 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 af1048f..22251d4 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/error_codes.xml @@ -86,16 +86,16 @@ * Services Fatal 400-450 * Services non-fatal 451-499 --> - <value number="451" name="E_CYCLIC_GRAPH" fatal="false" short="Cyclic graph in services detected."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="452" name="E_SERVICE_NOT_SUPPORTED" fatal="false" short="The service is not supported."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="453" name="E_INCONSISTENCY_IN_SERVICES" fatal="false" short="Inconsistency in services is detected."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="454" name="E_SERVICE_IN_USE" fatal="false" short="The service is in use and can't be stopped."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="455" name="E_UNREGISTER_BDM_SERVICE_FAILED" fatal="false" short="Unregistering of Block Device Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="456" name="E_UNREGISTER_BAM_SERVICE_FAILED" fatal="false" short="Unregistering of Boot Area Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="457" name="E_UNREGISTER_COPS_SERVICE_FAILED" fatal="false" short="Unregistering of COPS Data Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="458" name="E_UNREGISTER_FS_SERVICE_FAILED" fatal="false" short="Unregistering of File System Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="459" name="E_UNREGISTER_FPD_SERVICE_FAILED" fatal="false" short="Unregistering of Flash Physical Driver Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> - <value number="460" name="E_UNREGISTER_GD_SERVICE_FAILED" fatal="false" short="Unregistering of Global Data Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behaviour.</value> + <value number="451" name="E_CYCLIC_GRAPH" fatal="false" short="Cyclic graph in services detected."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="452" name="E_SERVICE_NOT_SUPPORTED" fatal="false" short="The service is not supported."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="453" name="E_INCONSISTENCY_IN_SERVICES" fatal="false" short="Inconsistency in services is detected."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="454" name="E_SERVICE_IN_USE" fatal="false" short="The service is in use and can't be stopped."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="455" name="E_UNREGISTER_BDM_SERVICE_FAILED" fatal="false" short="Unregistering of Block Device Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="456" name="E_UNREGISTER_BAM_SERVICE_FAILED" fatal="false" short="Unregistering of Boot Area Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="457" name="E_UNREGISTER_COPS_SERVICE_FAILED" fatal="false" short="Unregistering of COPS Data Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="458" name="E_UNREGISTER_FS_SERVICE_FAILED" fatal="false" short="Unregistering of File System Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="459" name="E_UNREGISTER_FPD_SERVICE_FAILED" fatal="false" short="Unregistering of Flash Physical Driver Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> + <value number="460" name="E_UNREGISTER_GD_SERVICE_FAILED" fatal="false" short="Unregistering of Global Data Manager Service failed."> Some internal error occurred and you need to reset the loader to avoid further unpredictable behavior.</value> <!-- * Zip Parser Fatal 500-550 @@ -110,10 +110,10 @@ * System non-fatal 651-699 --> <value number="600" name="E_FILESYS_APP_INIT_FAILURE" fatal="true" short="Failed to initialize the file system application.">Internal error.Reset loader.Report if problem still exist.</value> - <value number="601" name="E_NO_FILESYSTEM_PROPERTY" fatal="true" short="Failed to start file system."> Verify that archive is successfuly flashed.Reset loader. Report if problem still exist.</value> - <value number="602" name="E_UNDEFINED_AUTHENTICATION_TYPE" fatal="true" short="Undefined authentication type.">Check the authentication type. The loader supports authentication with CA certificate and control keyes.Repeat authentiacton. Report if problem still exist.</value> + <value number="601" name="E_NO_FILESYSTEM_PROPERTY" fatal="true" short="Failed to start file system."> Verify that archive is successfully flashed.Reset loader. Report if problem still exist.</value> + <value number="602" name="E_UNDEFINED_AUTHENTICATION_TYPE" fatal="true" short="Undefined authentication type.">Check the authentication type. The loader supports authentication with CA certificate and control keyes.Repeat authenticaton. Report if problem still exist.</value> <value number="651" name="E_RTC_TIME_NOT_ACCURATE" fatal="false" short="System Time is not properly set."> Default system time is used.Set the Time properly. Report if problem still exist.</value> - <value number="652" name="E_RTC_INTIALIZATION_FAILED" fatal="false" short="Hardware error ocure during initialization of RTC."> Report this problem</value> + <value number="652" name="E_RTC_INTIALIZATION_FAILED" fatal="false" short="Hardware error occurred during initialization of RTC."> Report this problem</value> <value number="653" name="E_UNDEFINED_DEAUTHENTICATION_TYPE" fatal="false" short="Undefined deauthentication type."> Check input parameters and repeat operation. Report if problem still exist.</value> <value number="654" name="E_COPS_DEVICE_STATE_FULL" fatal="false" short="Indicate that ME is in full security mode,Full authentication is needed prior to use COPS functionalities."> Perform RSA or SIMLOCK authentication prior to use COPS functionalities.</value> <value number="655" name="E_COPS_DEVICE_STATE_RELAXED" fatal="false" short="Indicate that ME is in authenticate security mode, Permanent type authentication is needed prior to use COPS functionalities."> Perform permanent authentication prior to use COPS functionalities.</value> @@ -127,13 +127,13 @@ <value number="753" name="E_UNKNOWN_COMM_DEVICE" fatal="false" short="Unknown communication device was detected."> Try to restart the loader and if still exist the problem, report this error.</value> <value number="754" name="E_FLASH_APP_INTERNAL_ERROR" fatal="false" short="Internal during execution of flash commands."> Try to erase flash and restart the loader and if problem still exist, report it.</value> <value number="755" name="E_DEVICE_NAME_TOO_LONG" fatal="false" short="Device name is too long."> Try to erase flash and restart the loader and if problem still exist, report it.</value> - <value number="756" name="E_FLASH_ARCHIVE_MISMATCH" fatal="false" short="Mismatch between archieve that is flashed and previosly flashed one."> During previous flashing some fail condition occurs. Reflash same archieve again before try a new one.</value> + <value number="756" name="E_FLASH_ARCHIVE_MISMATCH" fatal="false" short="Mismatch between archive that is flashed and previously flashed one."> During previous flashing some fail condition occurs. Re-flash same archive again before try a new one.</value> <value number="757" name="E_UNSUPPORTED_FLASH_TYPE" fatal="false" short="Flash memory device type is not supported."> Try to use loaders with support for memory device attached to DBB. If loaders does not exist, fire CR in FIDO to get loaders that support that memory.</value> <value number="758" name="E_FPD_NOT_CONFIGURED" fatal="false" short= "Flash physical driver is not configured."> Check MEMCONF settings in flash archive.</value> <value number="759" name="E_INVALID_SIZE_IN_MEMCONF" fatal="false" short= "MEMCONF boot record contain invalid TotalSize field."> Check MEMCONF settings in flash archive. Very likely flash archive is built for ME with flash device with larger capacity</value> <value number="760" name="E_ARCHIVE_TO_LARGE" fatal="false" short= "Flash archive larger than available space in BDM."> Check CABS settings in flash archive. Very likely flash archive is built for ME with flash device with larger capacity</value> <value number="761" name="E_ENTRY_NOT_FOUND_IN_FLASHLAYOUT" fatal="false" short="Entry not found in flashlayout file.">Entry stated in manifest file is not found in flashlayout file. All entries in manifest must be defined in flashlayout file.</value> - <value number="762" name="E_MISMATCH_MANIFEST_FLASHLAYOUT" fatal="false" short="Mismatch between manifest and flashlayout.">Entry start address in manifest and flashlayout are not equal.</value> + <value number="762" name="E_MISMATCH_MANIFEST_FLASHLAYOUT" fatal="false" short="Mismatch between manifest and flash layout.">Entry start address in manifest and flash layout are not equal.</value> <value number="763" name="E_INVALID_SUBTOC_PARAMETERS" fatal="false" short="SUBTOC is invalid.">SUBTOC parameters are not valid.</value> <value number="764" name="E_FAILED_TO_READ_SUBTOC" fatal="false" short="Reading SUBTOC from flash failed.">Reading SUBTOC from flash failed.</value> <value number="765" name="E_OVERLAPPING_PARTITIONS_FOUND" fatal="false" short="Overlapping partitions found in the archive.">Overlapping partitions found in the archive.</value> @@ -210,7 +210,7 @@ <value number="1003" name="E_UNSUPPORTED_GROUP" fatal="true" short="The loader does not support the requested group."> Check your authentication level. Verify that you are sending command from existing group.</value> <value number="1051" name="E_INVALID_COMMAND_SIZE" fatal="false" short="The size of the command is invalid."> Check the command payload. If payload is fine, report this problem</value> <value number="1052" name="E_OVERLOAD_COMMAND_TABLE" fatal="false" short="Too many commands are registered."> It is not allowed more than 5 commands to be registered.</value> - <value number="1053" name="E_COMMAND_ALREADY_REGISTERED" fatal="false" short="Command has already registered in execution queue.">It is not allowed the command to be registerd more than once in execution queue</value> + <value number="1053" name="E_COMMAND_ALREADY_REGISTERED" fatal="false" short="Command has already registered in execution queue.">It is not allowed the command to be registered more than once in execution queue</value> <value number="1054" name="E_AUDITING_FAILED" fatal="false" short=" Command auditing failed."> You should be authenticate with appropriate permission level in order to execute this command.</value> <!-- @@ -370,7 +370,7 @@ <value number="1601" name="E_BAM_ONLD_CRITICAL_ERROR" fatal="false" short="BAM ONLD: Critical error."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1602" name="E_BAM_ONLD_INVALID_PARAMS" fatal="false" short="BAM ONLD: Invalid parameters."> Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved.</value> - <value number="1603" name="E_BAM_ONLD_INITIALISATION_ERROR" fatal="false" short="BAM ONLD: Initialisation error."> Internal error. Reset loader. Report if problem still exist.</value> + <value number="1603" name="E_BAM_ONLD_INITIALISATION_ERROR" fatal="false" short="BAM ONLD: Initialization error."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1604" name="E_BAM_ONLD_READ_ERROR" fatal="false" short="BAM ONLD: An error occurred while reading."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1605" name="E_BAM_ONLD_WRITE_ERROR" fatal="false" short="BAM ONLD: An error occurred while writing."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1606" name="E_BAM_ONLD_ERASE_ERROR" fatal="false" short="BAM ONLD: An error occurred while erasing."> Internal error. Reset loader. Report if problem still exist.</value> @@ -382,10 +382,10 @@ * Cops data Fatal 1620-1650 * Cops data non-fatal 1651-1699 --> - <value number="1621" name="E_COPS_RC_ASYNC_CALL" fatal="false" short="COPS: Asyncronous call initiated."> Internal error. Reset loader. Report if problem still exist.</value> + <value number="1621" name="E_COPS_RC_ASYNC_CALL" fatal="false" short="COPS: Asynchronous call initiated."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1622" name="E_COPS_RC_IPC_ERROR" fatal="false" short="COPS: IPC failed."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1623" name="E_COPS_RC_INTERNAL_IPC_ERROR" fatal="false" short="COPS: Internal IPC lib error."> Internal error. Reset loader. Report if problem still exist.</value> - <value number="1624" name="E_COPS_RC_ASYNC_IPC_ERROR" fatal="false" short="COPS: Asyncronous IPC is not supported/setup for this function."> Internal error. Reset loader. Report if problem still exist.</value> + <value number="1624" name="E_COPS_RC_ASYNC_IPC_ERROR" fatal="false" short="COPS: Asynchronous IPC is not supported/setup for this function."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1625" name="E_COPS_RC_ARGUMENT_ERROR" fatal="false" short="COPS: Incorrect arguments for function."> Check input arguments. Report if problem still exist.</value> <value number="1626" name="E_COPS_RC_STORAGE_ERROR" fatal="false" short="COPS: Storage error (read/write flash failed)."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1627" name="E_COPS_RC_MEMORY_ALLOCATION_ERROR" fatal="false" short="COPS: Failed to allocate memory."> Internal error. Reset loader. Report if problem still exist.</value> @@ -409,7 +409,7 @@ <value number="1651" name="E_COPS_MEMORY_ALLOC_FAILED" fatal="false" short="COPS: Memory allocation failed."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1652" name="E_COPS_DATA_TAMPERED" fatal="false" short="COPS: Data is tempered."> Check the file that you want to bind. Repeat operation. Report if problem still exist.</value> - <value number="1653" name="E_COPS_IMEI_MISSMATCH" fatal="false" short="COPS: IMEI missmatch.">IMEI in the OTP differs from the IMEI in the COPS data.</value> + <value number="1653" name="E_COPS_IMEI_MISSMATCH" fatal="false" short="COPS: IMEI mismatch.">IMEI in the OTP differs from the IMEI in the COPS data.</value> <value number="1654" name="E_COPS_OTP_LOCKED" fatal="false" short="COPS: OTP is locked.">It is not allowed to write in already locked OTP area</value> <value number="1655" name="E_COPS_MAC_FUNCTION_LOCKED_DOWN" fatal="false" short="COPS: Function for calculating MAC is locked down."> Restart loader. Report if problem still exist.</value> <value number="1656" name="E_COPS_AUTHENTICATION_FAILED" fatal="false" short="COPS: Authentication failed.">Be sure that authentication is performed with valid data.(Correct Certificate, Domain, Control Keys)</value> @@ -417,19 +417,19 @@ <value number="1658" name="E_COPS_IMEI_UPDATE_NOT_ALLOWED" fatal="false" short="COPS: IMEI update is not allowed."> Check if IMEI changeable is set in OTP. Report this issue if IMEI changeable is set and requested operation can not be executed.</value> <value number="1659" name="E_COPS_LOCK_PERMANENTLY_DISABLED" fatal="false" short="COPS: Locking of SIMLocks is disabled.">lock is disabled or already locked.</value> <value number="1660" name="E_COPS_NO_ATTEMPTS_LEFT" fatal="false" short="COPS: No more attempts for verification left."> Check the validation of the certificate or control keys.</value> - <value number="1661" name="E_COPS_INCORRECT_CONTROLKEY" fatal="false" short="COPS: Control key is not correct."> Control keys that you try to authenticate and control keys from Default Data missmach.</value> + <value number="1661" name="E_COPS_INCORRECT_CONTROLKEY" fatal="false" short="COPS: Control key is not correct."> Control keys that you try to authenticate and control keys from Default Data mismatch.</value> <value number="1662" name="E_COPS_TOO_SHORT_CONTROLKEY" fatal="false" short="COPS: Control key is too short."> Valid length is 8-16 bytes. Repeat operation with valid control keys. Report if problem still exist.</value> <value number="1663" name="E_COPS_TOO_LONG_CONTROLKEY" fatal="false" short="COPS: Control key is too long.">Valid length is 8-16 bytes. Repeat operation with valid control keys. Report if problem still exist.</value> <value number="1664" name="E_COPS_INVALID_CONTROLKEY" fatal="false" short="COPS: Control key is not valid."> Check the control keys. Repeat operation with valid control keys. Report if problem still exist.</value> - <value number="1665" name="E_COPS_TIMER_RUNNING" fatal="false" short="COPS: Timer is running.">For the appropiate LockType timer is already running.</value> + <value number="1665" name="E_COPS_TIMER_RUNNING" fatal="false" short="COPS: Timer is running.">For the appropriate LockType timer is already running.</value> <value number="1666" name="E_COPS_SIM_ERROR" fatal="false" short="COPS: SIM error.">Check that the SIM is active. If the SIM is active be sure that you are entering correct SIM Pin. Report if problem still exist</value> - <value number="1667" name="E_COPS_LOCKING_FAILED" fatal="false" short="COPS: Locking failed.">Be sure that the SIM data conatains valid data for IMSI, GID1 and GID2</value> + <value number="1667" name="E_COPS_LOCKING_FAILED" fatal="false" short="COPS: Locking failed.">Be sure that the SIM data contains valid data for IMSI, GID1 and GID2</value> <value number="1668" name="E_COPS_OTA_UNLOCK_IMEI_MISMATCH" fatal="false" short="COPS: OTA unlock IMEI mismatch.">IMEI in the OTP differs from the IMEI in the COPS data.</value> <value number="1669" name="E_COPS_INCORRECT_IMSI" fatal="false" short="COPS: Incorrect IMSI.">IMSI on interface doesn't match SIM IMSI</value> <value number="1670" name="E_COPS_PARAMETER_ERROR" fatal="false" short="COPS: Parameter error."> Check the input parameters. Repeat operation. Report if problem still exist.</value> <value number="1671" name="E_COPS_BUFFER_TOO_SMALL" fatal="false" short="COPS: Memory buffer is too small."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1672" name="E_COPS_FORBIDDEN_PARAMETER_ID" fatal="false" short="COPS: Parameter is not allowed."> Check the input parameters. Repeat operation. Report if problem still exist.</value> - <value number="1673" name="E_COPS_UNKNOWN_PARAMETER_ID" fatal="false" short="COPS: Parameter can not be recognised."> Check the input parameters. Repeat operation. Report if problem still exist.</value> + <value number="1673" name="E_COPS_UNKNOWN_PARAMETER_ID" fatal="false" short="COPS: Parameter can not be recognized."> Check the input parameters. Repeat operation. Report if problem still exist.</value> <value number="1674" name="E_COPS_ARGUMENT_ERROR" fatal="false" short="COPS: Argument error!"> Verify the input parameters. Repeat operation. Report if problem still exist.</value> <value number="1698" name="E_COPS_VERIFY_FAILED" fatal="false" short="COPS: Failed to verify internal data.">Reset loader. Report if problem still exist.</value> <value number="1699" name="E_COPS_UNDEFINED_ERROR" fatal="false" short="COPS: Undefined error."> Internal error. Reset loader. Report if problem still exist.</value> @@ -454,12 +454,12 @@ <value number="1851" name="E_GD_TA_BASE" fatal="false" short="GD/TA: TA base."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1852" name="E_GD_TA_UNKNOWN_PARTITION" fatal="false" short="GD/TA: Unknown partition."> Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist.</value> <value number="1853" name="E_GD_TA_UNKNOWN_CONFIG" fatal="false" short="GD/TA: Unknown configuration."> Possible wrong or missing configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem.</value> - <value number="1854" name="E_GD_TA_ILLOGICAL_CONFIGURATION" fatal="false" short="GD/TA: Ilogical configuration."> Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem.</value> + <value number="1854" name="E_GD_TA_ILLOGICAL_CONFIGURATION" fatal="false" short="GD/TA: Illogical configuration."> Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem.</value> <value number="1855" name="E_GD_TA_UNKNOWN_MEMORY_TYPE" fatal="false" short="GD/TA: Unknown memory type."> Possible wrong configuration in flash archive. Check the archive. Flash the correct archive. If problem still exist report the problem.</value> <value number="1856" name="E_GD_TA_WRONG_PARAMETER" fatal="false" short="GD/TA: Wrong parameter."> Check input parameters. Repeat operation with the correct input parameters. Report if problem still exist.</value> <value number="1857" name="E_GD_TA_OUT_OF_MEMORY" fatal="false" short="GD/TA: Out of memory."> Internal error. Reset loader. Report if problem still exist.</value> - <value number="1858" name="E_GD_TA_INVALID_ADRESS" fatal="false" short="GD/TA: Invalid adress."> Internal error. Reset loader. Report if problem still exist.</value> - <value number="1859" name="E_GD_TA_UNUSED_ADRESS" fatal="false" short="GD/TA: Unused adress."> Internal error. Reset loader. Report if problem still exist.</value> + <value number="1858" name="E_GD_TA_INVALID_ADRESS" fatal="false" short="GD/TA: Invalid address."> Internal error. Reset loader. Report if problem still exist.</value> + <value number="1859" name="E_GD_TA_UNUSED_ADRESS" fatal="false" short="GD/TA: Unused address."> Internal error. Reset loader. Report if problem still exist.</value> <value number="1860" name="E_GD_TA_UNIT_NOT_FOUND" fatal="false" short="GD/TA: Unit not found."> No data was written in the specified unit. Write data to the unit and than perform read operation. Report if problem still exist.</value> <value number="1861" name="E_GD_TA_NOT_IMPLEMENTED" fatal="false" short="GD/TA: TA is not supported."></value> <value number="1862" name="E_GD_TA_FAIL" fatal="false" short="GD/TA: TA fail."> Internal error. Reset loader. Report if problem still exist.</value> @@ -512,7 +512,7 @@ <value number="2100" name="E_INIT_OTP_PD_FAILED" fatal="true" short="Failed to initialize OTD driver."> Internal error. Reset loader. Report if problem still exist</value> <value number="2101" name="E_READING_OTP_FAILED" fatal="true" short="Failed to read data from OTP."> Internal error. Reset loader. Report if problem still exist</value> <value number="2102" name="E_WRITTING_OTP_FAILED" fatal="true" short="Failed to write data in OTP."> Internal error.Possible hardware malfunction. Please report this problem immediately</value> - <value number="2103" name="E_INVALID_CID_VALUE" fatal="true" short="Trying to write invalid CID in OTP."> The value for CID must be in the range from 19 to 16384.0 value is also alowed CID value</value> + <value number="2103" name="E_INVALID_CID_VALUE" fatal="true" short="Trying to write invalid CID in OTP."> The value for CID must be in the range from 19 to 16384.0 value is also allowed CID value</value> <value number="2104" name="E_INIT_OTP_LD_FAILED" fatal="true" short="Failed to initialize OTD logical driver."> Internal error. Reset loader. Report if problem still exist</value> <value number="2105" name="E_OTP_AREA_LOCKED" fatal="true" short="Requested OTP area is already locked."> It is not allowed to write in already locked OTP area</value> @@ -527,9 +527,9 @@ <value number="2255" name="E_SEC_APP_ROM_ERROR_CRITICAL" fatal="true" short="Critical error in ROM has occurred.">Reset loader. Report if problem still exist.</value> <value number="2256" name="E_SEC_APP_ROM_ERROR" fatal="true" short="Unexpected ROM error.">Reset loader. Report if problem still exist.</value> <value number="2257" name="E_SEC_APP_PATCH_EXISTS" fatal="true" short="ROM Patch is already installed.">If you are trying to install flash patch ,please make sure that version of ROM patch is greater than already installed. Reinstallation of OTP patch is not allowed.</value> - <value number="2258" name="E_SEC_APP_PATCH_REINSTALLED" fatal="true" short="Operation successful."> ROM Patch in Flash is successfuly reinstalled.</value> + <value number="2258" name="E_SEC_APP_PATCH_REINSTALLED" fatal="true" short="Operation successful."> ROM Patch in Flash is successfully reinstalled.</value> <value number="2259" name="E_SEC_APP_ROOTKEY_EXISTS" fatal="true" short="RootKey is already installed.">.Please make sure that version of Root key is the same with already installed</value> - <value number="2260" name="E_SEC_APP_ROOTKEY_REINSTALLED" fatal="true" short="Operation successful."> Root Key is successfuly reinstalled.</value> + <value number="2260" name="E_SEC_APP_ROOTKEY_REINSTALLED" fatal="true" short="Operation successful."> Root Key is successfully reinstalled.</value> <!-- * Trim Area Fatal 2300-2350 @@ -580,7 +580,7 @@ <value number="2701" name="E_HSI_BSC_RESULT_FAILED" fatal="true" short="General Error.">It is possible to failed to initialize the communication device.Reset loader.Report if problem still exist</value> <value number="2702" name="E_HSI_BSC_RESULT_FAILED_INVALIDARGS" fatal="true" short="Invalid arguments.">.Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved.</value> <value number="2703" name="E_HSI_BSC_RESULT_FAILED_NOTSUPPORTED" fatal="true" short="Implementation is removed."> Implementation it is not supported anymore.</value> - <value number="2704" name="E_HSI_BSC_RESULT_FAILED_HSIERR" fatal="true" short="HSI internal error.">Buffer with unaligned length is requested to be transfered or device driver is confiured to use unsupported frame size.</value> + <value number="2704" name="E_HSI_BSC_RESULT_FAILED_HSIERR" fatal="true" short="HSI internal error.">Buffer with unaligned length is requested to be transfered or device driver is configured to use unsupported frame size.</value> <value number="2705" name="E_HSI_BSC_RESULT_FAILED_BUSY" fatal="true" short="Communication device is busy.">Current transfer is not finished.</value> <!-- @@ -599,8 +599,8 @@ * Communication Relay Fatal 2800-2849 * Communication Relay Non-Fatal 2850-2899 --> - <value number="2850" name="E_CR_INVALID_STATE" fatal="false" short="Invalid state for commnication relay detected.">Wrong value passed as state for the communication relay and hence it can't be used. Try setting some of predifined communication relay states.</value> - <value number="2851" name="E_CR_NOT_RUNNING" fatal="false" short="Communication Relay is not running.">Communication relay is set in error state or it is not configured properly. Check the relay state. If error occured restart the loader, otherwise try reconfiguring the relay.</value> + <value number="2850" name="E_CR_INVALID_STATE" fatal="false" short="Invalid state for communication relay detected.">Wrong value passed as state for the communication relay and hence it can't be used. Try setting some of predefined communication relay states.</value> + <value number="2851" name="E_CR_NOT_RUNNING" fatal="false" short="Communication Relay is not running.">Communication relay is set in error state or it is not configured properly. Check the relay state. If error occurred restart the loader, otherwise try reconfiguring the relay.</value> <!-- * SDIO Driver SDIO_BSC_Result_t - Error codes for all functions (offset 2900) @@ -610,7 +610,7 @@ <value number="2901" name="E_SDIO_BSC_RESULT_FAILED" fatal="true" short="General Error.">It is possible to failed to initialize the communication device.Reset loader.Report if problem still exist</value> <value number="2902" name="E_SDIO_BSC_RESULT_FAILED_INVALIDARGS" fatal="true" short="Invalid arguments.">.Check input parameters. Retry operation. If problem still exist reset loader. Report if problem doesn't solved.</value> <value number="2903" name="E_SDIO_BSC_RESULT_FAILED_NOTSUPPORTED" fatal="true" short="Implementation is removed."> Implementation it is not supported anymore.</value> - <value number="2904" name="E_SDIO_BSC_RESULT_FAILED_SDIOERR" fatal="true" short="SDIO internal error.">Buffer with unaligned length is requested to be transfered or device driver is confiured to use unsupported frame size.</value> + <value number="2904" name="E_SDIO_BSC_RESULT_FAILED_SDIOERR" fatal="true" short="SDIO internal error.">Buffer with unaligned length is requested to be transfered or device driver is configured to use unsupported frame size.</value> <value number="2905" name="E_SDIO_BSC_RESULT_FAILED_BUSY" fatal="true" short="Communication device is busy.">Current transfer is not finished.</value> <!-- @@ -647,7 +647,7 @@ <value number="3068" name="E_BAM_HASH_ERROR" fatal="true" short="The hash callback function failed unexpectedly.">.</value> <value number="3069" name="E_BAM_UPDATE_IN_PROGRESS" fatal="true" short="An update is already in progress.">.</value> <value number="3070" name="E_BAM_BUF_TOO_SMALL" fatal="true" short="The supplied buffer is to small.The image will not be written.">.</value> - <value number="3071" name="E_BAM_EXTERNAL_ERROR" fatal="true" short="An external error occured.">.</value> + <value number="3071" name="E_BAM_EXTERNAL_ERROR" fatal="true" short="An external error occurred.">.</value> <value number="3072" name="E_BAM_NOT_INSTANTIATED" fatal="true" short="The requested function is not compiled into the loadmodule that supplies the service.">.</value> <value number="3073" name="E_BAM_UPDATE_NOT_POSSIBLE" fatal="true" short="The state in the flash prevents BAM from performing any updates.">.</value> @@ -665,41 +665,41 @@ <value number="4150" name="E_LOADER_SEC_LIB_INIT_CALLED_TWICE" fatal="true" short="The security library init function has been called 2 times.">Restart the loader.</value> <value number="4180" name="E_LOADER_SEC_LIB_MEMORY_RELEASE_FAILED" fatal="true" short="Memory release failed.">Restart the loader.</value> <value number="4181" name="E_LOADER_SEC_LIB_MEMORY_ALLOCATION_FAILED" fatal="true" short="Memory allocation failed.">Restart the loader.</value> - <value number="4182" name="E_LOADER_SEC_LIB_DATA_BLOCK_EXIST" fatal="true" short="Data block exist in the linked list.">nternal error. Reset loader. Report if problem still exist.</value> - <value number="4183" name="E_LOADER_SEC_LIB_DATA_BLOCK_DO_NOT_EXIST" fatal="true" short="Data block do not exist in the linked list.">nternal error. Reset loader. Report if problem still exist.</value> + <value number="4182" name="E_LOADER_SEC_LIB_DATA_BLOCK_EXIST" fatal="true" short="Data block exist in the linked list.">Internal error. Reset loader. Report if problem still exist.</value> + <value number="4183" name="E_LOADER_SEC_LIB_DATA_BLOCK_DO_NOT_EXIST" fatal="true" short="Data block do not exist in the linked list.">Internal error. Reset loader. Report if problem still exist.</value> <value number="4184" name="E_LOADER_SEC_LIB_INVALID_AUTHENTICATION_TYPE" fatal="true" short="Invalid authentication type."> Try to use the appropriate authentication type (control key or CA certificate).</value> - <value number="4185" name="E_LOADER_SEC_LIB_EXCEEDED_NUMBER_OF_AUTHENTICATION" fatal="true" short="Exceeded number of authentication. Loader will be shut downed.">Restart the laoder and use the correct control keys or CA certificate to authenticate.</value> + <value number="4185" name="E_LOADER_SEC_LIB_EXCEEDED_NUMBER_OF_AUTHENTICATION" fatal="true" short="Exceeded number of authentication. Loader will be shut downed.">Restart the loader and use the correct control keys or CA certificate to authenticate.</value> <value number="4186" name="E_LOADER_SEC_LIB_ESB_MAC_INIT_FAILED" fatal="true" short="Initialization of ESB block for MAC calculation failed.">Possible error in hardware configuration, or hardware malfunction.Reset loader. Report if problem still exist.</value> <value number="4187" name="E_LOADER_SEC_LIB_ESB_MAC_UPDATE_FAILED" fatal="true" short="MAC update with ESB block failed.">Internal error. Reset loader. Report if problem still exist.</value> <value number="4188" name="E_LOADER_SEC_LIB_ESB_MAC_FINAL_FAILED" fatal="true" short="MAC finalize with ESB block failed.">Internal error. Reset loader. Report if problem still exist.</value> <value number="4189" name="E_LOADER_SEC_LIB_ESB_MAC_NOT_VERIFIED" fatal="true" short="MAC verification with ESB block failed.">Internal error. Reset loader. Report if problem still exist.</value> <value number="4190" name="E_LOADER_SEC_LIB_ESB_DOWNLOCK_FAILED" fatal="true" short="ESB downlock failed.">Internal error. Reset loader. Report if problem still exist.</value> <value number="4191" name="E_LOADER_SEC_LIB_CONTROL_KEY_VERIFICATION_FAILURE" fatal="true" short="Control key verification failed."> Verify that authentication is performed with correct control keys, otherwise report this error.</value> - <value number="4192" name="E_LOADER_SEC_LIB_CA_CERTIFICATE_VERIFICATION_FAILURE" fatal="true" short="CA certificate verification failed.">Verify that CA certifiacte which is used is valid and appropiate for the HW on which authentication is performed,otherwise report this error.</value> - <value number="4193" name="E_LOADER_SEC_LIB_X509_ERROR_IN_CERTIFICATE" fatal="true" short="X509 certificate error.">An error ocured while parsing X.509 certificate. Check that certificate structure is valid.</value> - <value number="4194" name="E_LOADER_SEC_LIB_COPS_INIT_FAILED" fatal="true" short="COPS initialization failed.">Internal error. Reset loader. Report if problem still exist</value> - <value number="4195" name="E_LOADER_SEC_LIB_COPS_PROTECT_DATA_INIT_FAILED" fatal="true" short="COPS protect data initialization failed.">Internal error. Reset loader. Report if problem still exis</value> - <value number="4196" name="E_LOADER_SEC_LIB_COPS_DATA_READ_FAILED" fatal="true" short="COPS data read failed.">Verify that Bind properties is already performed. Report if problem still exist</value> - <value number="4197" name="E_LOADER_SEC_LIB_COPS_DATA_WRITE_FAILED" fatal="true" short="COPS data write failed.">Verify that the data is correct and flash is not corupted. Report if problem still exist</value> + <value number="4192" name="E_LOADER_SEC_LIB_CA_CERTIFICATE_VERIFICATION_FAILURE" fatal="true" short="CA certificate verification failed.">Verify that CA certificate which is used is valid and appropriate for the HW on which authentication is performed,otherwise report this error.</value> + <value number="4193" name="E_LOADER_SEC_LIB_X509_ERROR_IN_CERTIFICATE" fatal="true" short="X509 certificate error.">An error occurred while parsing X.509 certificate. Check that certificate structure is valid.</value> + <value number="4194" name="E_LOADER_SEC_LIB_COPS_INIT_FAILED" fatal="true" short="COPS initialization failed.">Internal error. Reset loader. Report if problem still exist.</value> + <value number="4195" name="E_LOADER_SEC_LIB_COPS_PROTECT_DATA_INIT_FAILED" fatal="true" short="COPS protect data initialization failed.">Internal error. Reset loader. Report if problem still exist.</value> + <value number="4196" name="E_LOADER_SEC_LIB_COPS_DATA_READ_FAILED" fatal="true" short="COPS data read failed.">Verify that Bind properties is already performed. Report if problem still exist.</value> + <value number="4197" name="E_LOADER_SEC_LIB_COPS_DATA_WRITE_FAILED" fatal="true" short="COPS data write failed.">Verify that the data is correct and flash is not corrupted. Report if problem still exist.</value> <value number="4198" name="E_LOADER_SEC_LIB_READ_OTP_FAILED" fatal="true" short="Reading OTP data failed.">Internal error.Please reset the loader and try again.Please report if problem still exist.</value> <value number="4199" name="E_LOADER_SEC_LIB_WRITE_OTP_FAILED" fatal="true" short="Writing OTP data failed.">Internal error. Possible hardware malfunction. Please report this problem immediately.</value> <value number="4200" name="E_LOADER_SEC_LIB_LOCK_OTP_FAILED" fatal="true" short="Locking OTP data failed.">Internal error.Possible hardware malfunction. Please report this problem immediately.</value> <value number="4201" name="E_LOADER_SEC_LIB_UNPACKING_IMEI_FAILED" fatal="true" short="Unpacking IMEI data failed.">Internal error. Reset loader. Report if problem still exist</value> <value number="4202" name="E_LOADER_SEC_LIB_PACKING_IMEI_FAILED" fatal="true" short="Packing IMEI data failed.">Internal error. Reset loader. Report if problem still exist></value> <value number="4203" name="E_LOADER_SEC_LIB_OTP_ALREADY_LOCKED" fatal="true" short="OTP is already locked.">You are not allowed to write in already locked OTP area.</value> - <value number="4204" name="E_LOADER_SEC_LIB_INVALID_CID_VALUE" fatal="true" short="CID value is out of range.">The value for CID must be in the range from 19 to 16384.0 value is also alowed CID value.</value> + <value number="4204" name="E_LOADER_SEC_LIB_INVALID_CID_VALUE" fatal="true" short="CID value is out of range.">The value for CID must be in the range from 19 to 16384.0 value is also allowed CID value.</value> <value number="4205" name="E_LOADER_SEC_LIB_OTP_LOCKBITS_MISSMATCH" fatal="true" short="OTP lock bits have different values.">Reset loader. Report if problem still exist</value> <value number="4206" name="E_LOADER_SEC_LIB_WRITING_BOOTRECORD_FAILED" fatal="true" short="Failed to write in boot records.">Internal error. Reset loader. Report if problem still exist</value> <value number="4207" name="E_LOADER_SEC_LIB_UNSUPPORTED_NO_DEBUG_HW" fatal="true" short="No debug hardware detected.">Internal error. Reset loader. Report if problem still exist</value> <value number="4208" name="E_LOADER_SEC_LIB_CHANGE_OPERATION_NOT_SUPPORTED" fatal="true" short="Requested change operation is not supported or not allowed.">Check the authentication level and try again. Report if problem still exist</value> <value number="4209" name="E_LOADER_SEC_LIB_INVALID_CHANGE_OPERATION" fatal="true" short="Invalid change operation.">Internal error. Reset loader. Report if problem still exist.</value> - <value number="4210" name="E_LOADER_SEC_LIB_RWIMEI_NOT_ALLOWED" fatal="true" short="Rewriteable IMEI is not allowed to change.">Check if IMEI changeable is set in OTP. Report this issue if IMEI changeable is set and requested operation can not be executed.</value> + <value number="4210" name="E_LOADER_SEC_LIB_RWIMEI_NOT_ALLOWED" fatal="true" short="Re-writable IMEI is not allowed to change.">Check if IMEI changeable is set in OTP. Report this issue if IMEI changeable is set and requested operation can not be executed.</value> <value number="4211" name="E_LOADER_SEC_LIB_REQUEST_DENIED" fatal="true" short="Request for change operation is denied.">Check the authentication level and try again. Report if problem still exist</value> <value number="4212" name="E_LOADER_SEC_LIB_BOOT_BLOCK_DO_NOT_EXIST" fatal="true" short="Boot record do not exist.">If boot block is corrupted or do not exist, processFile command should be used to flash the new boot record or recovery domain data to generate the boot record template.</value> <value number="4213" name="E_LOADER_SEC_LIB_CORRUPTED_DOMAIN_DATA" fatal="true" short="Corrupted or do not exist domain data in boot block.">If domain data are corrupted or do not exist should be use the bind properties command or recover domain data to generate the new domain data.</value> <value number="4214" name="E_LOADER_SEC_LIB_INVALID_DOMAIN" fatal="true" short="Invalid domain.">Select appropriated domain.</value> - <value number="4215" name="E_LOADER_SEC_LIB_INVALID_CHALLENGE_DATA_BLOCK" fatal="true" short="Invalid challenge data block.">Verify that challene data block is created properly.</value> - <value number="4216" name="E_LOADER_SEC_LIB_NO_DEBUG_HW_NOT_ALLOWED" fatal="true" short="Not allowed operation on NoDebug HW.">Cuurent opertaion can be executed only on Debug HW.</value> + <value number="4215" name="E_LOADER_SEC_LIB_INVALID_CHALLENGE_DATA_BLOCK" fatal="true" short="Invalid challenge data block.">Verify that challenge data block is created properly.</value> + <value number="4216" name="E_LOADER_SEC_LIB_NO_DEBUG_HW_NOT_ALLOWED" fatal="true" short="Not allowed operation on NoDebug HW.">Current operation can be executed only on Debug HW.</value> <!-- * Emulator Fatal 4300-4350 @@ -709,7 +709,7 @@ <value number="4301" name="E_FIFO_UNDERFLOW" fatal="true" short="UART FIFO underflow.">Reset loader. Report if problem still exist.</value> <value number="4302" name="E_OBJECT_NULL" fatal="true" short="Null pointer to Object.">Reset loader. Report if problem still exist.</value> <value number="4303" name="E_POINTER_NOT_NULL" fatal="true" short="Pointer is not NULL.">Reset loader. Report if problem still exist.</value> - <value number="4304" name="E_UNRECOGNIZED_STATE" fatal="true" short="The state in the State Machine is invalid.">Reset loader. Report if problem stil exist.</value> + <value number="4304" name="E_UNRECOGNIZED_STATE" fatal="true" short="The state in the State Machine is invalid.">Reset loader. Report if problem still exist.</value> <value number="4305" name="E_UNKNOWN_MANUFACTURER_ID" fatal="true" short="The provided manufacturer ID is not valid.">Possible error in HW configuration. Try to reset the loader and if problem still exist, report it.</value> <value number="4306" name="E_UNKNOWN_DEVICE_ID" fatal="true" short="The provided device ID is not valid.">Possible error in HW configuration. Try to reset the loader and if problem still exist, report it.</value> <value number="4308" name="E_INVALID_A01_FORMAT" fatal="true" short="Something wrong with the A01 file containing the flash image.">Verify that the flash image is valid, otherwise report the problem. </value> @@ -756,7 +756,7 @@ <value number="5033" name="A2_E_BOOTIMAGE_SIGNATURE_FAILED" fatal="true" short="Boot image signature failed.">.</value> <value number="5034" name="A2_E_BOOTIMAGE_FAILED_TO_READ_IMAGE" fatal="true" short="Failed to read image.">.</value> <value number="5035" name="A2_E_BOOTIMAGE_FAILED_ALLOCATE_MEM" fatal="true" short="Failed to allocate memory.">.</value> - <value number="5036" name="A2_E_BOOTIMAGE_INVALID_PARAM" fatal="true" short="Boot image invalid parametars.">.</value> + <value number="5036" name="A2_E_BOOTIMAGE_INVALID_PARAM" fatal="true" short="Boot image invalid parameters.">.</value> <value number="5037" name="A2_E_BOOTIMAGE_INVALID_LENGTH" fatal="true" short="Boot image has invalid length.">.</value> <value number="5038" name="A2_E_BOOTIMAGE_MACED_HEADER_SIZE_ZERO" fatal="true" short="Header size is zero.">.</value> <value number="5039" name="A2_E_FLASH_RESULT_DEVICE_PROTECTED" fatal="true" short="The flash device was protected.">.</value> @@ -845,11 +845,11 @@ <value number="5122" name="A2_E_PMC_OVERFLOWN" fatal="true" short="All steps of the PMC are destroyed.">.</value> <value number="5123" name="A2_E_PMC_ONCE_REQUIRED" fatal="true" short="New version of once protected module attempted to be loaded without ARB flag set.">.</value> <value number="5124" name="A2_E_PMC_BAD_N_OF_STEPS" fatal="true" short="Unsuitable number of steps within PMC.">.</value> - <value number="5125" name="A2_E_UNIT_MISSING" fatal="true" short="Dynamyc variable is missing.">.</value> - <value number="5126" name="A2_E_UNIT_TO_BIG" fatal="true" short="Dynamyc variable found is to big.">.</value> + <value number="5125" name="A2_E_UNIT_MISSING" fatal="true" short="Dynamic variable is missing.">.</value> + <value number="5126" name="A2_E_UNIT_TO_BIG" fatal="true" short="Dynamic variable found is to big.">.</value> <value number="5127" name="A2_E_PARTMAN_READ_ERROR" fatal="true" short="Error reading partition manger status.">.</value> <value number="5128" name="A2_E_PARTMAN_INIT_ERROR" fatal="true" short="Error initializing partition manger.">.</value> - <value number="5129" name="A2_E_BOOTIMAGE_INVALID_ALLIGNMENT" fatal="true" short="Boot container size is not word alligned.">.</value> + <value number="5129" name="A2_E_BOOTIMAGE_INVALID_ALLIGNMENT" fatal="true" short="Boot container size is not word aligned.">.</value> <value number="5130" name="A2_E_BOOTIMAGE_INSUFFICIENT_CONTAINERS" fatal="true" short="Not enough boot containers are allocated.">.</value> <value number="5131" name="A2_E_BOOTIMAGE_INVALID_CONTAINER_TYPE" fatal="true" short="Invalid boot container type. At this position other type of container is expected.">.</value> <value number="5132" name="A2_E_DATA_LENGTH_IS_NOT_ALIGNED" fatal="true" short="The data size must be aligned to 512 bytes when reading or writing pages to/from the NAND.">.</value> @@ -959,4 +959,4 @@ <value number="80009" name="E_DUMMY_CODE" fatal="true">Request for recovery condition for condition that is not changed.</value> </status> -</commandspec> +</commandspec>
\ No newline at end of file diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/errorcode_h.xsl b/lcmodule/source/cnh1606344_ldr_communication_module/config/errorcode_h.xsl index 5ff13eb..2a7e3f6 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/errorcode_h.xsl +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/errorcode_h.xsl @@ -51,8 +51,8 @@ * Authentication Fatal 400-450 * Authentication non-fatal 451-499 * - * COPS General Fatal 500-550 - * COPS General non-fatal 551-599 + * Zip Parser Fatal 500-550 + * Zip Parser non-fatal 551-599 * * System Fatal 600-650 * System non-fatal 651-699 @@ -60,8 +60,6 @@ * Flash Fatal 700-750 * Flash non-fatal 751-799 * - * Parameters Fatal 800-850 - * Parameters non-fatal 851-899 * * File management Fatal 900-950 * File management non-fatal 951-999 @@ -69,35 +67,73 @@ * Command Auditing and execution Fatal 1000-1050 * Command Auditing and execution non-fatal 1051-1099 * - * Emulation Fatal 1100-1150 - * Emulation non-fatal 1151-1199 * * Timers Fatal 1200-1250 * Timers non-fatal 1251-1299 * - * CABS Fatal 1300-1350 - * CABS non-fatal 1351-1399 + * Parameter Fatal 1300-1350 + * Parameter non-fatal 1351-1399 * - * GDFS Fatal 1400-1450 - * GDFS non-fatal 1451-1499 + * Block device Fatal 1400-1450 + * Block device non-fatal 1451-1499 * - * Antirollback Fatal 1500-1550 - * Antirollback non-fatal 1551-1599 + * Boot area Fatal 1500-1550 + * Boot area non-fatal 1551-1599 * - * Memory and Boot Fatal 1600-1650 - * Memory and Boot non-fatal 1651-1699 + * Cops data Fatal 1600-1650 + * Cops data non-fatal 1651-1699 * - * @todo this should be removed and error codes should be remaped. - * The same applies to Emulator errors. + * PD NAND Fatal 1700-1750 + * PD NAND non-fatal 1751-1799 * - * Job Handler Fatal 1700-1750 - * Job Handler non-fatal 1751-1799 - * - * Emulator Fatal 1800-1850 - * Emulator non-fatal 1851-1899 + * Trim Area non-fatal 1851-1899 * * Loader utilities Fatal 1900-1950 * Loader utilities non-fatal 1951-1999 + * + * Loader ADBG Fatal 2000-2050 + * Loader ADBG non-fatal 2051-2099 + * + * OTP applications Fatal 2100-2150 + * OTP applications non-fatal 2151-2199 + * + * Security applications Fatal 2200-2250 + * Security applications non-fatal 2251-2299 + * + * Trim Area Fatal 2300-2350 + * Trim Area non-fatal 2351-2499 + * + * Recovery applications Fatal 2500-2550 + * Recovery applications non-fatal 2551-2599 + * + * PD CFI Flash Fatal 2600-2650 + * PD CFI Flash non-fatal 2651-2699 + * + * HSI Driver Fatal 2700-2724 + * HSI Driver Non-Fatal 2725-2749 + * + * HSI Driver Error Callback Fatal 2750-2774 + * HSI Driver Error Callback Non-Fatal 2775-2799 + * + * Communication Relay Fatal 2800-2849 + * Communication Relay Non-Fatal 2850-2899 + * + * SDIO Driver Fatal 2900-2924 + * SDIO Driver Non-Fatal 2925-2949 + * + * SDIO Driver Error Callback Fatal 2950-2974 + * SDIO Driver Error Callback Non-Fatal 2975-2999 + * + * External BAM Interface Fatal 3000-3049 + * External BAM Interface non-fatal 3050-3099 + * + * Security Library Fatal 4000-4050 + * Security Library non-fatal 4051-4250 + * + * Emulator Fatal 4300-4350 + * Emulator non-fatal 4351-4399 + * + * A2 and lower versions error codes translation 5000+ */ <apply-templates select="status"/> diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_a2_family.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_a2_family.h index c5f409b..867317e 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_a2_family.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_a2_family.h @@ -20,7 +20,6 @@ ******************************************************************************/ #include "t_a2_family.h" #include "error_codes.h" -#include "t_communication_service.h" /******************************************************************************* * Declaration of functions @@ -53,8 +52,10 @@ ErrorCode_e A2_Family_Shutdown(Communication_t *Communication_p); /* * A2 Cancel Receiver. * - * @param [in] Communication_p Communication module context. - * @param [in] PacketsBeforeTransferStop Number of packets that will be transmited before stopping the transmition. + * @param [in] Communication_p Communication module context. + * @param [in] PacketsBeforeTransferStop Number of packets that will be + * transmitted before stopping the + * transmission. * * @retval E_SUCCESS After successful execution. * @retval E_INVALID_INPUT_PARAMETERS Invalid input parameter. diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h index 643e067..e012feb 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_communication_service.h @@ -19,7 +19,7 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" +#include "c_system_v2.h" #include "error_codes.h" #include "t_communication_service.h" @@ -81,13 +81,13 @@ extern "C" * calculations and verifications. * @param [in] CommunicationDevice_p The device to use for network * transmission. - * @param [in] CommandCallback_p Collback function for command handling. + * @param [in] CommandCallback_p Callback function for command handling. * @param [in] Buffers_p Pointer to buffer handling functions. * @param [in] Timers_p Pointer to timers handling functions. * @param [in] Queue_p Pointer to queue handling functions. * * @retval E_SUCCESS If the module instance is successfully - * initialized. A protocol family dependant error + * initialized. A protocol family dependent error * code otherwise. */ LCM_API ErrorCode_e Do_Communication_Initialize(void *Object_p, Communication_t **Communication_pp, Family_t Family, HashDevice_t *HashDevice_p, CommunicationDevice_t *CommunicationDevice_p, Do_CEH_Call_t CommandCallback_p, BuffersInterface_t *Buffers_p, TimersInterface_t *Timers_p, QueueInterface_t *Queue_p); @@ -102,7 +102,7 @@ extern "C" * @param [in,out] Communication_pp Communication module context. * * @retval E_SUCCESS If the module instance is successfully - * shut down. A protocol family dependant error + * shut down. A protocol family dependent error * code otherwise. */ LCM_API ErrorCode_e Do_Communication_Shutdown(Communication_t **Communication_pp); @@ -118,8 +118,8 @@ extern "C" * @param [in] Communication_p Communication module context. * * - * @retval E_SUCCESS If all packets are successfully handled. A - * protocol family dependant error code otherwise. + * @retval E_SUCCESS If all packets are successfully handled. + * A protocol family dependent error code otherwise. */ LCM_API ErrorCode_e Do_Communication_Poll(Communication_t *Communication_p); @@ -132,8 +132,8 @@ extern "C" * @param [in] Family New protocol family identifier. * @param [in] CEHCallback Callback that will handle the commands. * - * @retval E_SUCCESS If the family is successfully changed. A - * protocol family dependant error code otherwise. + * @retval E_SUCCESS If the family is successfully changed. + * A protocol family dependent error code otherwise. */ LCM_API ErrorCode_e Do_Communication_SetFamily(Communication_t *Communication_p, Family_t Family, Do_CEH_Call_t CEHCallback); @@ -141,7 +141,7 @@ extern "C" * Function for sending packet. * * @param [in] Communication_p Communication module context. - * @param [in] InputData_p Pointer to the data for tranmission. + * @param [in] InputData_p Pointer to the data for transmission. * * @retval E_SUCCESS After successful execution. * @retval E_FAILED_TO_ALLOCATE_COMM_BUFFER Failed to allocate communication @@ -186,7 +186,7 @@ extern "C" * device for the given LCM context. * * @retval E_SUCCESS After successful execution. - * @retval E_INVALID_INPUT_PARAMTERS In case when communicaiton is not Singleton + * @retval E_INVALID_INPUT_PARAMTERS In case when communication is not Singleton * and Communication_p is NULL pointer. */ LCM_API ErrorCode_e Do_Communication_GetCommunicationDevice(Communication_t *Communication_p, CommunicationDevice_t **CommunicationDevice_pp); @@ -202,7 +202,7 @@ extern "C" * device to be set for the given LCM context. * * @retval E_SUCCESS After successful execution. - * @retval E_INVALID_INPUT_PARAMTERS In case when communicaiton is not Singleton + * @retval E_INVALID_INPUT_PARAMTERS In case when communication is not Singleton * and Communication_p is NULL pointer. */ LCM_API ErrorCode_e Do_Communication_SetCommunicationDevice(Communication_t *Communication_p, CommunicationDevice_t *CommunicationDevice_p); @@ -210,11 +210,11 @@ extern "C" /* * Cancel Receiving new packets * - * @param [in] Communication_p Communication module context. + * @param [in] Communication_p Communication module context. * @param [in] PacketsBeforeReceiverStop Number of packets to be send before stopping the receiver. * - * @retval E_SUCCESS If all packets are successfully handled. A - * protocol family dependant error code otherwise. + * @retval E_SUCCESS If all packets are successfully handled. + * A protocol family dependent error code otherwise. */ LCM_API ErrorCode_e Do_Communication_Cancel_Receiver(Communication_t *Communication_p, uint8 PacketsBeforeReceiverStop); @@ -225,7 +225,7 @@ extern "C" * * @retval char LCM_CurrentVersion[] After successful execution. */ - LCM_API char *Do_Communication_GetVersion(); + LCM_API char *Do_Communication_GetVersion(void); #ifdef __cplusplus }; diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_measurement_tool.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_measurement_tool.h deleted file mode 100644 index 25884b8..0000000 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_measurement_tool.h +++ /dev/null @@ -1,159 +0,0 @@ -/******************************************************************************* - * Copyright (C) ST-Ericsson SA 2011 - * License terms: 3-clause BSD license - ******************************************************************************/ -#ifndef R_MEASUREMENT_TOOL_H_ -#define R_MEASUREMENT_TOOL_H_ -/** - * @addtogroup ldr_communication_module - * @{ - * @addtogroup measurement_serv Measurement services - * Measurement functions is tool for performance measurement. Can be used - * for flashing performance, communication performance and i.t.c. - * - * @{ - * - */ - -/******************************************************************************* - * Includes - ******************************************************************************/ - -#include "t_basicdefinitions.h" -#include "t_measurement_tool.h" -#include "error_codes.h" - -/******************************************************************************* - * Declaration of functions - ******************************************************************************/ - -#define MP(x, y, z) Do_Measurement_AddMeasurementData( x, Do_Timer_ReadTime(NULL,x->TimerId), y, z); -#define MFINISH(x) Do_Measurement_CompleteResults( x); -/** - * Initialization of measurement module. - * - * @param [in] MeasurementData_p Pointer to curren measurement data block. - * - * @retval E_SUCCESS If initialization is done. - */ -ErrorCode_e Do_Measurment_Init(Measurement_t *MeasurementData_p); - -/** - * This function create general measurement data block. - * - * @param [in] Communication_p Communication module context. - * @param [in] MeasurementData_pp Pointer to the created measurement data block. - * @param [in] Type Type of measurement. - * - * @retval E_SUCCESS After successful execution. - * @retval E_ALLOCATE_FAILED If failed to allocate session measurement - * data block. - */ -ErrorCode_e Do_Measurement_CreateMeasurementData(Communication_t *Communication_p, Measurement_t **MeasurementData_pp, uint32 Type); - -/** - * This function collect all data from measurement buffer. - * - * @param [in] Communication_p Communication module context. - * @param [in, out] Data_pp Point to pointer that should be initialized to point - * on outgoing buffer. - * - * @return Number of characters successfully readied from measurement - * buffer. - */ -uint32 Do_Measurement_GetMeasurementData(Communication_t *Communication_p, uint8 **Data_pp); - -/** - * This function create measurement data block for bulk session. - * - * @param [in] Communication_p Communication module context. - * @param [in] SessionMeasurement_pp Pointer to the created session - * measurement data block. - * @param [in] PreviousSessionDataBlock_p Pointer to the previouse session - * measurement data block. - * @param [in] ChunkNr Number of chunks in this session. - * @param [in] Session Session number. - * - * @retval E_SUCCESS After successful execution. - * @retval E_ALLOCATE_FAILED If failed to allocate session measurement - * data block. - */ -ErrorCode_e Do_Measurement_CreateSessionMeasurementData(Communication_t *Communication_p, - SessionMeasurement_t **SessionMeasurement_pp, - SessionMeasurement_t *PreviousSessionDataBlock_p, - uint32 ChunkNr, uint32 Session); - -/** - * This function create measurement data block for measure chunks transfer. - * - * @param [in] Communication_p Communication module context. - * @param [in] ChunkMeasurement_pp Pointer to the created chunk - * measurement data block. - * @param [in] PreviousChunkDataBlock_p Pointer to the previouse chunk - * measurement data block. - * @param [in] ChunkId Chunk ID. - * - * @retval E_SUCCESS After successful execution. - * @retval E_ALLOCATE_FAILED If failed to allocate session measurement - * data block. - */ -ErrorCode_e Do_Measurement_CreateChunkMeasurementData(Communication_t *Communication_p, - ChunkMeasurement_t **ChunkMeasurement_pp, - ChunkMeasurement_t *PreviousChunkDataBlock_p, - uint32 ChunkId); -/** - * This function destroy measurement data block for bulk session. - * - * @param [in] MeasurementData_pp Pointer to the measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_DestroySessionMeasurementData(SessionMeasurement_t **MeasurementData_pp); - -/** - * This function destroy measurement data block for bulk chunks. - * - * @param [in] MeasurementData_pp Pointer to the main measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_DestroyChunkMeasurementData(ChunkMeasurement_t **MeasurementData_pp); - -/** - * This function destroy general measurement data block. - * - * @param [in] MeasurementData_pp Pointer to the main measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_DestroyMeasurementData(Measurement_t **MeasurementData_pp); - -/** - * This function make zero reference for all measured data. - * - * @param [in] MeasurementData_p Pointer to the main measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_ZeroReferenceMeasurementData(Measurement_t *MeasurementData_p); - -/** - * This function add measured time in specified measurement data block. - * - * @param [in] MeasurementData_p Pointer to the main measurement data block. - * @param [in] Time Measured time. - * @param [in] ChunkID Chunk ID - * @param [in] Parameter Parameter in the measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_AddMeasurementData(Measurement_t *MeasurementData_p, uint32 Time, uint32 ChunkID, MeasurementParameter_t Parameter); - -/** - * - */ -ErrorCode_e Do_Measurement_CompleteResults(Measurement_t *Measurement_p); - -/** @} */ -/** @} */ -#endif /* R_MEASUREMENT_TOOL_H_ */ diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_protrom_family.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_protrom_family.h index a5498c6..670590d 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_protrom_family.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_protrom_family.h @@ -21,7 +21,6 @@ ******************************************************************************/ #include "t_protrom_protocol.h" #include "error_codes.h" -#include "t_communication_service.h" /******************************************************************************* * Declaration of functions @@ -41,7 +40,7 @@ ErrorCode_e Protrom_Family_Init(Communication_t *Communication_p); /** - * Protrom family protocols sutdown. + * Protrom family protocols shutdown. * * @param [in] Communication_p Communication module context. * @@ -51,10 +50,12 @@ ErrorCode_e Protrom_Family_Init(Communication_t *Communication_p); ErrorCode_e Protrom_Family_Shutdown(Communication_t *Communication_p); /* - * Protrom Cancel Transmition. + * Protrom Cancel Transmission. * - * @param [in] Communication_p Communication module context. - * @param [in] PacketsBeforeTransferStop Number of packets that will be transmited before stopping the transmition. + * @param [in] Communication_p Communication module context. + * @param [in] PacketsBeforeTransferStop Number of packets that will be + * transmitted before stopping the + * transmission. * * @retval E_SUCCESS After successful execution. * @retval E_INVALID_INPUT_PARAMETERS Invalid input parameter. diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_r15_family.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_r15_family.h index 7e6d2f6..9731e3d 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_r15_family.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_r15_family.h @@ -11,7 +11,7 @@ * The R15 protocol family include two protocols COMMAND and BULK. Command * protocol is used for sending commands between the ME and PC tool in both * direction. This module include R15 transport layer and R15 network layer - * for handling R15 prtocols. + * for handling R15 protocols. * * @{ * @@ -22,7 +22,6 @@ ******************************************************************************/ #include "t_r15_family.h" #include "error_codes.h" -#include "t_communication_service.h" /******************************************************************************* * Declaration of functions @@ -43,7 +42,7 @@ ErrorCode_e R15_Family_Init(Communication_t *Communication_p); /** - * R15 family protocols sutdown. + * R15 family protocols shutdown. * * @param [in] Communication_p Communication module context. * @@ -53,10 +52,12 @@ ErrorCode_e R15_Family_Init(Communication_t *Communication_p); ErrorCode_e R15_Family_Shutdown(Communication_t *Communication_p); /* - * R15 Cancel Transmition. + * R15 Cancel Transmission. * - * @param [in] Communication_p Communication module context. - * @param [in] PacketsBeforeTransferStop Number of packets that will be transmited before stopping the transmition. + * @param [in] Communication_p Communication module context. + * @param [in] PacketsBeforeTransferStop Number of packets that will be + * transmitted before stopping the + * transmission. * * @retval E_SUCCESS After successful execution. * @retval E_INVALID_INPUT_PARAMETERS Invalid input parameter. diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_z_family.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_z_family.h index 8bb577f..6cc84a3 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/r_z_family.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/r_z_family.h @@ -22,8 +22,6 @@ ******************************************************************************/ #include "t_z_protocol.h" #include "error_codes.h" -#include "t_communication_service.h" -#include "t_z_network.h" /******************************************************************************* * Declaration of functions @@ -57,10 +55,12 @@ ErrorCode_e Z_Family_Init(Communication_t *Communication_p); ErrorCode_e Z_Family_Shutdown(Communication_t *Communication_p); /* - * Z family Cancel Transmition. + * Z family Cancel Transmission. * - * @param [in] Communication_p Communication module context. - * @param [in] PacketsBeforeTransferStop Number of packets that will be transmited before stopping the transmition. + * @param [in] Communication_p Communication module context. + * @param [in] PacketsBeforeTransferStop Number of packets that will be + * transmitted before stopping the + * transmission. * * @retval E_SUCCESS After successful execution. * @retval E_INVALID_INPUT_PARAMETERS Invalid input parameter. diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/t_communication_service.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/t_communication_service.h index 74f4721..268788a 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/t_communication_service.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/t_communication_service.h @@ -13,7 +13,6 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "c_system.h" #include "t_basicdefinitions.h" #include "error_codes.h" #include "t_security_algorithms.h" @@ -21,12 +20,6 @@ #include "t_queue.h" #include "t_time_utilities.h" -#ifndef CFG_ENABLE_LOADER_TYPE -#ifdef WIN32 -#include <windows.h> -#endif -#endif - /******************************************************************************* * Types, constants and external variables @@ -47,6 +40,7 @@ typedef void (*HashCallback_t)(void *Data_p, const uint32 Length, uint8 *Hash_p, typedef ErrorCode_e(*DeviceRead_fn)(void *Data_p, uint32 Length, CommunicationCallback_t Callback_fn, void *Param_p); typedef ErrorCode_e(*DeviceWrite_fn)(void *Data_p, uint32 Length, CommunicationCallback_t Callback_fn, void *Param_p); typedef ErrorCode_e(*DeviceCancel_fn)(void *Param_p); +typedef ErrorCode_e(*DeviceSetTimeouts_fn)(void *Timeouts_p, void *Param_p); typedef void (*HashDeviceCancel_fn)(void *Object_p, void **Param_p); typedef void (*DeviceCalculate_fn)(void *Object_p, HashType_e Type, void *Data_p, const uint32 Length, uint8 *Hash_p, HashCallback_t Callback_fn, void *Param_p); @@ -243,14 +237,16 @@ typedef struct { * Structure contain all functions for communication device manipulating. */ typedef struct { - DeviceRead_fn Read; /**< Pointer to function for read data from - communication device. */ - DeviceWrite_fn Write; /**< Pointer to function for write data thru the - communication device. */ - DeviceCancel_fn Cancel; /**< Pointer to function for canceling current - communication with communication device. */ - void *Context_p; /**< Pointer to Device description data. */ - void *Object_p; /**< Pointer to Object associated with the device. */ + DeviceRead_fn Read; /**< Pointer to function for read data from + communication device. */ + DeviceWrite_fn Write; /**< Pointer to function for write data thru the + communication device. */ + DeviceCancel_fn Cancel; /**< Pointer to function for canceling current + communication with communication device. */ + DeviceSetTimeouts_fn SetTimeouts; /**< Pointer to function for setting timeouts + for the communication device*/ + void *Context_p; /**< Pointer to Device description data. */ + void *Object_p; /**< Pointer to Object associated with the device. */ } CommunicationDevice_t; /** @@ -338,7 +334,7 @@ typedef struct FamilyDescriptor_s { ErrorCode_e(*SetProtocolTimeouts_fn)(Communication_t *Communication_p, void *TimeoutData_p); /**< Pointer to function for getting communication timeouts from current protocol family. */ ErrorCode_e(*GetProtocolTimeouts_fn)(Communication_t *Communication_p, void *TimeoutData_p); - /**< Pointer to function for stopping the transmition pool after sending the specified number of packets. */ + /**< Pointer to function for stopping the transmission pool after sending the specified number of packets. */ ErrorCode_e(*CancelReceiver_fn)(Communication_t *Communication_p, uint8 PacketsBeforeTransferStop); } FamilyDescriptor_t; diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/t_measurement_tool.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/t_measurement_tool.h deleted file mode 100644 index bdc2022..0000000 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/t_measurement_tool.h +++ /dev/null @@ -1,89 +0,0 @@ -/******************************************************************************* - * Copyright (C) ST-Ericsson SA 2011 - * License terms: 3-clause BSD license - ******************************************************************************/ -#ifndef T_MEASUREMENT_TOOL_H_ -#define T_MEASUREMENT_TOOL_H_ - -/** - * @addtogroup ldr_communication_serv - * @{ - * @addtogroup measurement_serv - * @{ - * - */ - -/******************************************************************************* - * Includes - ******************************************************************************/ - -#include "t_basicdefinitions.h" -#include "t_time_utilities.h" - -/** */ -typedef enum { - FLASH_VIA_BULK_TRANSFER, -} MeasurementType_t; - -/** Type of parameters for measurement. */ -typedef enum { - START_SESSION_TIME, - END_SESSION_TIME, - RECEIVED_CHUNK_TIME , - START_FLASH_CHUNK_TIME, - END_FLASH_CHUNK_TIME, - START_COMMAND_TIME, - END_COMMAND_TIME, -} MeasurementParameter_t; - -/** Structure for Chunk Data measurement */ -typedef struct ChunkMeasurement_s { - struct ChunkMeasurement_s *PreviousDataBlock_p; - uint32 ChunkId; - uint32 ReceivedChunkTime; - uint32 StartFlashChunkTime; - uint32 EndFlashChunkTime; - struct ChunkMeasurement_s *NextDataBlock_p; -} ChunkMeasurement_t; - -/** structure for Session measurement */ -typedef struct SessionMeasurement_s { - struct SessionMeasurement_s *PreviousDataBlock_p; - uint32 SessionId; - uint32 OpenSessionTime; - uint32 CloseSessionTime; - uint32 ChunkNr; - ChunkMeasurement_t *ChunkMeasurement_p; - struct SessionMeasurement_s *NextDataBlock_p; -} SessionMeasurement_t; - -/** structure for fllash file procedure measurement */ -typedef struct ProcesFileMeasurement_s { - struct ProcesFileMeasurement_s *PreviousBlock_p; - uint32 OpenTime; - uint32 CloseTime; - struct ProcesFileMeasurement_s *NextBlock_p; -} ProcesFileMeasurement_t; - -/** Measurement data context structure*/ -typedef struct { - uint32 SessionNr; - SessionMeasurement_t *SessionMeasurement_p; - ProcesFileMeasurement_t *ProcesFileMeasurement_p; -} MeasurementDataContext_t; - -/** Structure for global data measurement */ -typedef struct { - uint32 Type; - uint32 TimerId; - uint32 StartCommandTime; - uint32 EndCommandTime; - MeasurementDataContext_t *MeasurementData_p; - Timer_t Timer; - uint32 ResultLength; - uint8 *Result_p; -} Measurement_t; - -/** @} */ -/** @} */ -#endif /* T_MEASUREMENT_TOOL_H_ */ diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/include/t_r15_family.h b/lcmodule/source/cnh1606344_ldr_communication_module/include/t_r15_family.h index 66575f5..eb82411 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/include/t_r15_family.h +++ b/lcmodule/source/cnh1606344_ldr_communication_module/include/t_r15_family.h @@ -18,12 +18,11 @@ ******************************************************************************/ #include "t_r15_transport_layer.h" -#include "t_r15_network_layer.h" -/** Strucure with timeouts for R15 protocols. */ +/** Structure with timeouts for R15 protocols. */ typedef struct { uint32 TCACK ; /**< Time for command packet acknowledge. */ - uint32 TBCR; /**< Time for bulk command packet to be recieved.*/ + uint32 TBCR; /**< Time for bulk command packet to be received.*/ uint32 TBDR; /**< Time for bulk data packet to be received. */ } R15_Timeouts_t; diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c index 3db459b..9ceab4c 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/communication_service.c @@ -452,8 +452,8 @@ ErrorExit: * @param [in] Communication_p Communication module context. * @param [in] PacketsBeforeReceiverStop Number of packets to be send before stopping the receiver. * - * @retval E_SUCCESS If all packets are successfully handled. A - * protocol family dependant error code otherwise. + * @retval E_SUCCESS If all packets are successfully handled. + * A protocol family dependent error code otherwise. */ ErrorCode_e Do_Communication_Cancel_Receiver(Communication_t *Communication_p, uint8 PacketsBeforeReceiverStop) { diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c index ef324cf..224e4fb 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c @@ -13,6 +13,6 @@ * LCD_LCM_CompatibilityList in file LcdVersion.cpp in LCD code. */ -char LCM_CurrentVersion[] = "P3Y"; +char LCM_CurrentVersion[] = "P4Y"; /** @} */ diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/measurement_tool.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/measurement_tool.c deleted file mode 100644 index 67f730e..0000000 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/measurement_tool.c +++ /dev/null @@ -1,667 +0,0 @@ -/******************************************************************************* - * Copyright (C) ST-Ericsson SA 2011 - * License terms: 3-clause BSD license - ******************************************************************************/ -/** - * @addtogroup ldr_communication_serv - * @{ - */ - -/******************************************************************************* - * Includes - ******************************************************************************/ -#include <string.h> -#include "t_basicdefinitions.h" -#include "r_communication_service.h" -#include "r_measurement_tool.h" -#include "r_time_utilities.h" -#include "r_serialization.h" -#include "r_debug_macro.h" -#include "r_memory_utils.h" - -/******************************************************************************* - * File scope types, constants and variables - ******************************************************************************/ - -Measurement_t *Measurement_p; - -static ChunkMeasurement_t *GetLastChunkDataBlock(ChunkMeasurement_t *ChunkMeasurement_p); -static SessionMeasurement_t *GetLastSessionDataBlock(SessionMeasurement_t *SessionMeasurement_p); -static ChunkMeasurement_t *FindChunkDataBlock(ChunkMeasurement_t *Measurement_p, uint32 ChunkID); -static uint32 CalculateSizeOfResults(SessionMeasurement_t *DataMeasurement_p, uint32 Type, uint32 *SessionNr_pp); -static void SessionDataSerialize(uint8 **Data_pp, SessionMeasurement_t *SessData_p, uint32 *Length_p); -static void ChunkDataSerialize(uint8 **Data_pp, ChunkMeasurement_t *ChunkData_p, uint32 *Length_p); -static ErrorCode_e CompleteBulkFlashResults(Measurement_t *Measurement_p); -static void TimerMeasurmentHandler(void *Data_p, void *Timer_p, void *Param_p); - -/******************************************************************************* - * Definition of external functions - ******************************************************************************/ -/* - * Initialization of measurement module. - * - * @param [in] Measurement_p Pointer to curren measurement data block. - * - * @retval E_SUCCESS If initialization is done. - */ -ErrorCode_e Do_Measurement_Init(Measurement_t *Measurement_p) -{ - return E_SUCCESS; -} - -/* - * This function create general measurement data block. - * - * @param [in] Communication_p Communication module context. - * @param [in] Measurement_pp Pointer to the created measurement data block. - * @param [in] Type Type of measurement. - * - * @retval E_SUCCESS After successful execution. - * @retval E_ALLOCATE_FAILED If failed to allocate session measurement - * data block. - */ -ErrorCode_e Do_Measurement_CreateMeasurementData(Communication_t *Communication_p, Measurement_t **Measurement_pp, uint32 Type) -{ - ErrorCode_e ReturnValue = E_ALLOCATE_FAILED; - - if (NULL != *Measurement_pp) { - ReturnValue = Do_Measurement_DestroyMeasurementData(Measurement_pp); - - if (E_SUCCESS != ReturnValue) { - return ReturnValue; - } - } - - *Measurement_pp = (Measurement_t *)malloc(sizeof(Measurement_t)); - - if (NULL == *Measurement_pp) { - return E_ALLOCATE_FAILED; - } - - (*Measurement_pp)->MeasurementData_p = malloc(sizeof(MeasurementDataContext_t)); - - if (NULL == (*Measurement_pp)->MeasurementData_p) { - return E_ALLOCATE_FAILED; - } - - (*Measurement_pp)->MeasurementData_p->SessionNr = 0; - (*Measurement_pp)->MeasurementData_p->SessionMeasurement_p = NULL; - (*Measurement_pp)->MeasurementData_p->ProcesFileMeasurement_p = NULL; - (*Measurement_pp)->Timer.Time = 3600000; - (*Measurement_pp)->Timer.Time = 3600000; - (*Measurement_pp)->Timer.PeriodicalTime = 0; - (*Measurement_pp)->Timer.HandleFunction_p = TimerMeasurmentHandler; - (*Measurement_pp)->TimerId = Do_Timer_TimerGet(NULL, &(*Measurement_pp)->Timer); - (*Measurement_pp)->StartCommandTime = 0; - (*Measurement_pp)->EndCommandTime = 0; - (*Measurement_pp)->Type = Type; - (*Measurement_pp)->ResultLength = 0; - (*Measurement_pp)->Result_p = NULL; - return E_SUCCESS; -} - -/* - * This function create general measurement data block. - * - * @param [in] Communication_p Communication module context. - * @param [in] Data_pp Pointer to the data block. - * @param [in] DataLength_p Pointer to the data block length. - * - * @retval E_SUCCESS After successful execution. - * @retval E_ALLOCATE_FAILED If failed to allocate session measurement - * data block. - */ -uint32 Do_Measurement_GetMeasurementData(Communication_t *Communication_p, uint8 **Data_pp) -{ - if (NULL == Measurement_p || 0 == Measurement_p->ResultLength || NULL == Measurement_p->Result_p) { - return 0; - } - - *Data_pp = (uint8 *)malloc(Measurement_p->ResultLength); - ASSERT(NULL != *Data_pp); - memcpy((uint8 *)*Data_pp, Measurement_p->Result_p, Measurement_p->ResultLength); - return Measurement_p->ResultLength; -} - -/* - * This function create measurement data block for bulk session. - * - * @param [in] Communication_p Communication module context. - * @param [in] SessionMeasurement_pp Pointer to the created session - * measurement data block. - * @param [in] PreviousSessionDataBlock_p Pointer to the previouse session - * measurement data block. - * @param [in] ChunkNr Number of chunks in this session. - * @param [in] Session Session number. - * - * @retval E_SUCCESS After successful execution. - * @retval E_ALLOCATE_FAILED If failed to allocate session measurement - * data block. - */ -ErrorCode_e Do_Measurement_CreateSessionMeasurementData(Communication_t *Communication_p, - SessionMeasurement_t **SessionMeasurement_pp, - SessionMeasurement_t *PreviousSessionDataBlock_p, - uint32 ChunkNr, uint32 Session) -{ - ChunkMeasurement_t *ChunkDataBlock_p = NULL; - SessionMeasurement_t **NewSessionDataBlock_pp = NULL; - SessionMeasurement_t *LastSessionMeasurement_p = NULL; - uint32 i; - ErrorCode_e ReturnValue = E_ALLOCATE_FAILED; - - if (*SessionMeasurement_pp != NULL) { - LastSessionMeasurement_p = GetLastSessionDataBlock(*SessionMeasurement_pp); - NewSessionDataBlock_pp = &LastSessionMeasurement_p->NextDataBlock_p; - } else { - NewSessionDataBlock_pp = SessionMeasurement_pp; - } - - *NewSessionDataBlock_pp = (SessionMeasurement_t *)malloc(sizeof(SessionMeasurement_t)); - - if (NULL == *SessionMeasurement_pp) { - return ReturnValue; - } - - (*NewSessionDataBlock_pp)->PreviousDataBlock_p = LastSessionMeasurement_p; - (*NewSessionDataBlock_pp)->SessionId = Session; - (*NewSessionDataBlock_pp)->ChunkNr = ChunkNr; - (*NewSessionDataBlock_pp)->OpenSessionTime = 0; - (*NewSessionDataBlock_pp)->CloseSessionTime = 0; - (*NewSessionDataBlock_pp)->ChunkMeasurement_p = NULL; - (*NewSessionDataBlock_pp)->NextDataBlock_p = NULL; - - for (i = 0; i < ChunkNr; i++) { - ReturnValue = Do_Measurement_CreateChunkMeasurementData(Communication_p, &(*NewSessionDataBlock_pp)->ChunkMeasurement_p, ChunkDataBlock_p, i); - } - - return ReturnValue; -} - -/* - * This function create measurement data block for measure chunks transfer. - * - * @param [in] Communication_p Communication module context. - * @param [in] ChunkMeasurement_pp Pointer to the created chunk - * measurement data block. - * @param [in] PreviousChunkDataBlock_p Pointer to the previouse chunk - * measurement data block. - * @param [in] ChunkId Chunk ID. - * - * @retval E_SUCCESS After successful execution. - * @retval E_ALLOCATE_FAILED If failed to allocate session measurement - * data block. - */ -ErrorCode_e Do_Measurement_CreateChunkMeasurementData(Communication_t *Communication_p, - ChunkMeasurement_t **ChunkMeasurement_pp, - ChunkMeasurement_t *PreviousChunkDataBlock_p, - uint32 ChunkId) -{ - ChunkMeasurement_t **NewChunkDataBlock_pp = NULL; - ChunkMeasurement_t *LastChunkMeasurement_p = NULL; - - if (*ChunkMeasurement_pp != NULL) { - LastChunkMeasurement_p = GetLastChunkDataBlock(*ChunkMeasurement_pp); - NewChunkDataBlock_pp = &(LastChunkMeasurement_p)->NextDataBlock_p; - } else { - NewChunkDataBlock_pp = ChunkMeasurement_pp; - } - - *NewChunkDataBlock_pp = (ChunkMeasurement_t *)malloc(sizeof(ChunkMeasurement_t)); - - if (NULL == *NewChunkDataBlock_pp) { - return E_ALLOCATE_FAILED; - } - - (*NewChunkDataBlock_pp)->PreviousDataBlock_p = LastChunkMeasurement_p; - (*NewChunkDataBlock_pp)->ChunkId = ChunkId; - (*NewChunkDataBlock_pp)->ReceivedChunkTime = 0; - (*NewChunkDataBlock_pp)->StartFlashChunkTime = 0; - (*NewChunkDataBlock_pp)->EndFlashChunkTime = 0; - (*NewChunkDataBlock_pp)->NextDataBlock_p = NULL; - return E_SUCCESS; -} - -/* - * This function destroy measurement data block for bulk session. - * - * @param [in] Measurement_pp Pointer to the measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_DestroySessionMeasurementData(SessionMeasurement_t **SessionMeasurement_pp) -{ - ErrorCode_e ReturnValue; - SessionMeasurement_t *LastSessionDataBlock_p = NULL; - - if (*SessionMeasurement_pp != NULL) { - LastSessionDataBlock_p = GetLastSessionDataBlock(*SessionMeasurement_pp); - - do { - *SessionMeasurement_pp = LastSessionDataBlock_p->PreviousDataBlock_p; - /* free the all chunks in the session data block */ - ReturnValue = Do_Measurement_DestroyChunkMeasurementData(&LastSessionDataBlock_p->ChunkMeasurement_p); - - if (ReturnValue != E_SUCCESS) { - return ReturnValue; - } - - /* free the session data block */ - free(LastSessionDataBlock_p); - LastSessionDataBlock_p = *SessionMeasurement_pp; - } while (LastSessionDataBlock_p->PreviousDataBlock_p != NULL); - - /* free the all chunks in the last session data block */ - ReturnValue = Do_Measurement_DestroyChunkMeasurementData(&LastSessionDataBlock_p->ChunkMeasurement_p); - - if (ReturnValue != E_SUCCESS) { - return ReturnValue; - } - - /* free the last session data block */ - free(LastSessionDataBlock_p); - } - - return E_SUCCESS; -} - -/* - * This function destroy measurement data block for bulk chunks. - * - * @param [in] Measurement_pp Pointer to the main measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_DestroyChunkMeasurementData(ChunkMeasurement_t **ChunkMeasurement_pp) -{ - ChunkMeasurement_t *LastChunkDataBlock_p = NULL; - ChunkMeasurement_t *TmpLastChunkDataBlock_p = NULL; - - if (*ChunkMeasurement_pp != NULL) { - LastChunkDataBlock_p = GetLastChunkDataBlock(*ChunkMeasurement_pp); - TmpLastChunkDataBlock_p = LastChunkDataBlock_p->PreviousDataBlock_p; - free(LastChunkDataBlock_p); - - while (TmpLastChunkDataBlock_p != NULL) { - /* free the chunk data block */ - LastChunkDataBlock_p = TmpLastChunkDataBlock_p; - TmpLastChunkDataBlock_p = LastChunkDataBlock_p->PreviousDataBlock_p; - free(LastChunkDataBlock_p); - }//while(TmpLastChunkDataBlock_p != NULL); - - // while(LastChunkDataBlock_p->PreviousDataBlock_p != NULL) - // { - // *ChunkMeasurement_pp = LastChunkDataBlock_p->PreviousDataBlock_p; - // /* free the chunk data block */ - // free(LastChunkDataBlock_p); - // LastChunkDataBlock_p = *ChunkMeasurement_pp; - // } - /* free the last chunk data block */ - //free(*ChunkMeasurement_pp); - } - - return E_SUCCESS; -} - -/* - * This function destroy general measurement data block. - * - * @param [in] Measurement_pp Pointer to the main measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_DestroyMeasurementData(Measurement_t **Measurement_pp) -{ - ErrorCode_e ReturnValue = E_INVALID_INPUT_PARAMETERS; - - if (NULL == *Measurement_pp) { - return ReturnValue; - } - - switch ((*Measurement_pp)->Type) { - case FLASH_VIA_BULK_TRANSFER: - - /* free the all created session data blocks */ - if (NULL != (*Measurement_pp)->MeasurementData_p) { - if (NULL != (*Measurement_pp)->MeasurementData_p->SessionMeasurement_p) { - ReturnValue = Do_Measurement_DestroySessionMeasurementData(&(*Measurement_pp)->MeasurementData_p->SessionMeasurement_p); - (*Measurement_pp)->MeasurementData_p->SessionMeasurement_p = NULL; - } - - ReturnValue = E_SUCCESS; - //free((*Measurement_pp)->MeasurementData_p->ProcesFileMeasurement_p); - //free((*Measurement_pp)->MeasurementData_p); - } - - if (E_SUCCESS != ReturnValue) { - return ReturnValue; - } - - break; - - default: - //... - break; - } - - //free(*Measurement_pp); - return ReturnValue; -} - -/* - * This function make zero reference for all measured data. - * - * @param [in] Measurement_p Pointer to the main measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_ZeroReferenceMeasurementData(Measurement_t *Measurement_p) -{ - return E_SUCCESS; -} - -/* - * This function add measured time in specified measurement data block. - * - * @param [in] Measurement_p Pointer to the main measurement data block. - * @param [in] Time Measured time. - * @param [in] ChunkID Chunk ID - * @param [in] Parameter Parameter in the measurement data block. - * - * @retval E_SUCCESS After successful execution. - */ -ErrorCode_e Do_Measurement_AddMeasurementData(Measurement_t *Measurement_p, uint32 Time, uint32 ChunkID, MeasurementParameter_t Parameter) -{ - ErrorCode_e ReturnValue = E_FAILED_TO_FIND_CHUNK_DATA_BLOCK; - uint32 NewTime; - SessionMeasurement_t *SessionMeasurement_p = GetLastSessionDataBlock(Measurement_p->MeasurementData_p->SessionMeasurement_p); - ChunkMeasurement_t *ChankDataBlock_p = NULL; - NewTime = Measurement_p->Timer.Time - Time; - - switch (Parameter) { - case START_SESSION_TIME: - SessionMeasurement_p->OpenSessionTime = NewTime; - ReturnValue = E_SUCCESS; - break; - - case END_SESSION_TIME: - SessionMeasurement_p->CloseSessionTime = NewTime; - ReturnValue = E_SUCCESS; - break; - - case RECEIVED_CHUNK_TIME : - ChankDataBlock_p = FindChunkDataBlock(SessionMeasurement_p->ChunkMeasurement_p, ChunkID); - - if (ChankDataBlock_p != NULL) { - ChankDataBlock_p->ReceivedChunkTime = NewTime; - ReturnValue = E_SUCCESS; - } - - break; - - case START_FLASH_CHUNK_TIME: - ChankDataBlock_p = FindChunkDataBlock(SessionMeasurement_p->ChunkMeasurement_p, ChunkID); - - if (ChankDataBlock_p != NULL) { - ChankDataBlock_p->StartFlashChunkTime = NewTime; - ReturnValue = E_SUCCESS; - } - - break; - - case END_FLASH_CHUNK_TIME: - ChankDataBlock_p = FindChunkDataBlock(SessionMeasurement_p->ChunkMeasurement_p, ChunkID); - - if (ChankDataBlock_p != NULL) { - ChankDataBlock_p->EndFlashChunkTime = NewTime; - ReturnValue = E_SUCCESS; - } - - break; - - case START_COMMAND_TIME: - Measurement_p->StartCommandTime = NewTime; - ReturnValue = E_SUCCESS; - break; - - case END_COMMAND_TIME: - Measurement_p->EndCommandTime = NewTime; - ReturnValue = E_SUCCESS; - break; - - default: - //… - break; - } - - return ReturnValue; -} - -/* - * - */ -ErrorCode_e Do_Measurement_CompleteResults(Measurement_t *Measurement_p) -{ - ErrorCode_e ReturnValue = E_FAILED_TO_FIND_CHUNK_DATA_BLOCK; - //SessionMeasurement_t * TmpSessData_p = NULL; - //uint8* Data_p = NULL; - uint32 Size = 0; - - switch (Measurement_p->Type) { - case FLASH_VIA_BULK_TRANSFER: - Size = CalculateSizeOfResults(Measurement_p->MeasurementData_p->SessionMeasurement_p, Measurement_p->Type, (uint32 *)&Measurement_p->MeasurementData_p->SessionNr); - - if (Size != 0) { - Size += 2 * sizeof(uint32); - BUFFER_FREE(Measurement_p->Result_p); - - Measurement_p->Result_p = (uint8 *)malloc(Size); - // ASSERT(NULL != Measurement_p->Result_p); - Measurement_p->ResultLength = Size; - - /* get result from the list of the session data blocks */ - ReturnValue = CompleteBulkFlashResults(Measurement_p); - } else { - Measurement_p->ResultLength = Size; - BUFFER_FREE(Measurement_p->Result_p); - - Measurement_p->Result_p = NULL; - ReturnValue = E_SUCCESS; - } - - break; - - default: - //... - break; - } - - return ReturnValue; -} - -/******************************************************************************* - * Definition of internal functions - ******************************************************************************/ -/* - * This function create Timer callback. - * - * @param [in] Data_p Pointer to data. - * @param [in] Timer_p Pointer to timer. - * @param [in] Param_p Pointer to parameter. - * - */ -void TimerMeasurmentHandler(void *Data_p, void *Timer_p, void *Param_p) -{ - ASSERT(FALSE); -} - -/* - * This function search the requested chunk data block in the list of the chunk - * data blocks. - * - * @param [in] Measurement_p Pointer to the main measurement data block. - * @param [in] ChunkID Chunk ID for requested chunk data block. - * - * @retval pointer Pointer to the requested chunk data block. - * @retval NULL If the list of the chunk data blocks is empty. - */ -static ChunkMeasurement_t *FindChunkDataBlock(ChunkMeasurement_t *Measurement_p, uint32 ChunkID) -{ - ChunkMeasurement_t *TmpData_p = Measurement_p; - - if (TmpData_p != NULL) { - while ((TmpData_p->NextDataBlock_p != NULL) && (TmpData_p->ChunkId != ChunkID)) { - TmpData_p = TmpData_p->NextDataBlock_p; - } - } - - return TmpData_p; -} - -/* - * Get last chunk data block from the list of the chunk data blocks. - * - * @param [in] ChunkMeasurement_p Pointer to the main measurement data block. - * - * @retval pointer Pointer to the last chunk data block. - * @retval NULL If the list of the chunk data blocks is empty. - */ -static ChunkMeasurement_t *GetLastChunkDataBlock(ChunkMeasurement_t *ChunkMeasurement_p) -{ - ChunkMeasurement_t *TmpData_p = ChunkMeasurement_p; - - if (TmpData_p != NULL) { - while (TmpData_p->NextDataBlock_p != NULL) { - TmpData_p = TmpData_p->NextDataBlock_p; - } - } - - return TmpData_p; -} - -/* - * Get last session data block from the list of the chunk data blocks. - * - * @param [in] ChunkMeasurement_p Pointer to the main measurement data block. - * - * @retval pointer Pointer to the last chunk data block. - * @retval NULL If the list of the chunk data blocks is empty. - */ -static SessionMeasurement_t *GetLastSessionDataBlock(SessionMeasurement_t *SessionMeasurement_p) -{ - SessionMeasurement_t *TmpData_p = SessionMeasurement_p; - - if (TmpData_p != NULL) { - while (TmpData_p->NextDataBlock_p != NULL) { - TmpData_p = TmpData_p->NextDataBlock_p; - } - } - - return TmpData_p; -} - - -static ErrorCode_e CompleteBulkFlashResults(Measurement_t *Measurement_p) -{ - ErrorCode_e ReturnValue = E_SUCCESS; - SessionMeasurement_t *TmpSessData_p = Measurement_p->MeasurementData_p->SessionMeasurement_p; - ChunkMeasurement_t *TmpChunkData_p = NULL; - uint8 *Data_p = Measurement_p->Result_p; - - if (TmpSessData_p != NULL) { - memcpy(Data_p , (uint8 *)&Measurement_p->Type , sizeof(uint32)); - memcpy(Data_p + sizeof(uint32), (uint8 *)&Measurement_p->MeasurementData_p->SessionNr, sizeof(uint32)); - Data_p += 2 * sizeof(uint32); - //Measurement_p->ResultLength ++; - //SessionDataSerialize(&Data_p, TmpSessData_p, &Measurement_p->ResultLength); - TmpChunkData_p = TmpSessData_p->ChunkMeasurement_p; - - //while(TmpSessData_p->NextDataBlock_p != NULL) - while (TmpSessData_p != NULL) { - SessionDataSerialize(&Data_p, TmpSessData_p, &Measurement_p->ResultLength); - TmpChunkData_p = TmpSessData_p->ChunkMeasurement_p; - - if (TmpChunkData_p != NULL) { - ChunkDataSerialize(&Data_p, TmpChunkData_p, &Measurement_p->ResultLength); - - while (TmpChunkData_p->NextDataBlock_p != NULL) { - TmpChunkData_p = TmpChunkData_p->NextDataBlock_p; - ChunkDataSerialize(&Data_p, TmpChunkData_p, &Measurement_p->ResultLength); - } - } - - TmpSessData_p = TmpSessData_p->NextDataBlock_p; - } - } - - return ReturnValue; -} - - -static void SessionDataSerialize(uint8 **Data_pp, SessionMeasurement_t *SessData_p, uint32 *Length_p) -{ - put_uint32_le((void **)Data_pp, SessData_p->SessionId); - *Length_p++; - put_uint32_le((void **)Data_pp, SessData_p->OpenSessionTime); - *Length_p++; - put_uint32_le((void **)Data_pp, SessData_p->CloseSessionTime); - *Length_p++; - put_uint32_le((void **)Data_pp, SessData_p->ChunkNr); - *Length_p++; -} - - -static void ChunkDataSerialize(uint8 **Data_pp, ChunkMeasurement_t *ChunkData_p, uint32 *Length_p) -{ - put_uint32_le((void **)Data_pp, ChunkData_p->ChunkId); - *Length_p++; - put_uint32_le((void **)Data_pp, ChunkData_p->ReceivedChunkTime); - *Length_p++; - put_uint32_le((void **)Data_pp, ChunkData_p->StartFlashChunkTime); - *Length_p++; - put_uint32_le((void **)Data_pp, ChunkData_p->EndFlashChunkTime); - *Length_p++; -} - -/* - * Calculate size of the results. - * - * @param [in] DataMeasurement_p Pointer to the main measurement data block. - * @param [in] Type Type of measurement data block. - * - * @retval Size Size of the results. - * @retval 0 If the list of the chunk data blocks is empty. - */ -static uint32 CalculateSizeOfResults(SessionMeasurement_t *DataMeasurement_p, uint32 Type, uint32 *SessionNr_p) -{ - SessionMeasurement_t *TmpData_p = DataMeasurement_p; - uint32 Size = 0; - - switch (Type) { - case FLASH_VIA_BULK_TRANSFER: - - if (TmpData_p != NULL) { - *SessionNr_p = 0; - - //(SessionMeasurement_t*)TmpData_p = ((SessionMeasurement_t*)TmpData_p)->NextDataBlock_p; - //while(((SessionMeasurement_t*)TmpData_p)->NextDataBlock_p != NULL) - while (TmpData_p != NULL) { - Size = Size + (((SessionMeasurement_t *)TmpData_p)->ChunkNr * 4 * sizeof(uint32)); - Size += (4 * sizeof(uint32)); - //(SessionMeasurement_t*)TmpData_p = ((SessionMeasurement_t*)TmpData_p)->NextDataBlock_p; - TmpData_p = (SessionMeasurement_t *)TmpData_p->NextDataBlock_p; - (*SessionNr_p)++; - } - } - - break; - - default: - Size = 0; - break; - - } - - return Size; -} - -/** @} */ diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/r15_family.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/r15_family.c index 29be578..baeedbf 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/r15_family.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/r15_family.c @@ -10,12 +10,12 @@ /******************************************************************************* * Includes ******************************************************************************/ -#include "r_r15_family.h" -#include "r_r15_transport_layer.h" -#include "r_r15_network_layer.h" #include <stdlib.h> #include <stdio.h> #include <string.h> +#include "r_r15_family.h" +#include "r_r15_transport_layer.h" +#include "r_r15_network_layer.h" #include "r_debug_macro.h" /******************************************************************************* * File scope types, constants and variables diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/test_cases/ADbg_cnh1606344.c b/lcmodule/source/cnh1606344_ldr_communication_module/test_cases/ADbg_cnh1606344.c index eb0e2b4..6caf9a0 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/test_cases/ADbg_cnh1606344.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/test_cases/ADbg_cnh1606344.c @@ -50,7 +50,7 @@ static void ADbg_Do_Communication_GetProtocolTimeouts(ADbg_Case_t *Case_p); // A2_Family // Communication_service -static uint8 Parameters2_1[7] = {6, WORDPTR, WORD, WORDPTR, WORDPTR, WORD, WORD}; +static uint8 Parameters2_1[11] = {10, VOIDPTR, WORDPTR, WORD, WORDPTR, WORDPTR, WORD, WORDPTR, WORDPTR, WORDPTR, WORD}; ADBG_CASE_DEFINE(Test_Do_Communication_Initialize, 1, 15, ADbg_Do_Communication_Initialize, Parameters2_1); static uint8 Parameters2_2[3] = {2, WORDPTR, WORD}; ADBG_CASE_DEFINE(Test_Do_Communication_Shutdown, 2, 15, ADbg_Do_Communication_Shutdown, Parameters2_2); @@ -109,15 +109,20 @@ void Do_CNH1606344_Module_Test_Run(ADbg_MainModule_t *MainModule_p) static void ADbg_Do_Communication_Initialize(ADbg_Case_t *Case_p) { ErrorCode_e Result = E_SUCCESS; - Communication_t *Communication_p; + void *Object_p; + Communication_t **Communication_pp; Family_t Family; HashDevice_t *HashDevice_p; CommunicationDevice_t *CommunicationDevice_p; Do_CEH_Call_t CommandCallback_p; + BuffersInterface_t *Buffers_p; + TimersInterface_t *Timers_p; + QueueInterface_t *Queue_p; uint8 *Var_p = NULL; Var_p = Case_p->Command_p->Data_p; - Communication_p = Do_ADbg_GetDataPointer(sizeof(Communication_t), (void **)&Var_p); + Object_p = Do_ADbg_GetDataPointer(sizeof(void *), (void **)&Var_p); + Communication_pp = Do_ADbg_GetDataPointer(sizeof(Communication_t *), (void **)&Var_p); Do_ADbg_GetDataVar(sizeof(Family_t), &Var_p, &Family); @@ -125,11 +130,14 @@ static void ADbg_Do_Communication_Initialize(ADbg_Case_t *Case_p) CommunicationDevice_p = Do_ADbg_GetDataPointer(sizeof(CommunicationDevice_t), (void **)&Var_p); Do_ADbg_GetDataVar(sizeof(Do_CEH_Call_t), &Var_p, &CommandCallback_p); + Buffers_p = Do_ADbg_GetDataPointer(sizeof(BuffersInterface_t), (void **)&Var_p); + Timers_p = Do_ADbg_GetDataPointer(sizeof(TimersInterface_t), (void **)&Var_p); + Queue_p = Do_ADbg_GetDataPointer(sizeof(QueueInterface_t), (void **)&Var_p); - Result = Do_Communication_Initialize(Communication_p, Family, HashDevice_p, CommunicationDevice_p, CommandCallback_p); + Result = Do_Communication_Initialize(Object_p, Communication_pp, Family, HashDevice_p, CommunicationDevice_p, CommandCallback_p, Buffers_p, Timers_p, Queue_p); Do_ADbg_Assert((ErrorCode_e)(*Var_p) == Result, Case_p); - BUFFER_FREE(Communication_p); + BUFFER_FREE(*Communication_pp); BUFFER_FREE(HashDevice_p); BUFFER_FREE(CommunicationDevice_p); diff --git a/lcmodule/source/legacy_compatibility/c_system.h b/lcmodule/source/legacy_compatibility/c_system_v2.h index fe65751..0b708bf 100644 --- a/lcmodule/source/legacy_compatibility/c_system.h +++ b/lcmodule/source/legacy_compatibility/c_system_v2.h @@ -1,34 +1,27 @@ -#ifndef INCLUSION_GUARD_C_SYSTEM_H -#define INCLUSION_GUARD_C_SYSTEM_H - -/************************************************************************* -* Copyright (C) ST-Ericsson SA 2011 -* License terms: 3-clause BSD license -************************************************************************** -* -* DESCRIPTION: -* -* System configuration include file. This file must be the first -* file included by every source (*.c) file in the system -* -*************************************************************************/ - -/************************************************************************* -* Includes -*************************************************************************/ - -#include "c_compiler.h" - -//#include "product.h" - -/************************************************************************* -* Types, constants and external variables -*************************************************************************/ - - - -#endif // INCLUSION_GUARD_C_SYSTEM_H - - - - +#ifndef INCLUSION_GUARD_C_SYSTEM_V2_H
+#define INCLUSION_GUARD_C_SYSTEM_V2_H
+
+/*************************************************************************
+$Copyright Ericsson AB 2008 $
+**************************************************************************
+*
+* DESCRIPTION:
+*
+* System configuration include file. This file must be the first
+* file included by every source (*.c) file in the system
+*
+*************************************************************************/
+
+/*************************************************************************
+* Includes
+*************************************************************************/
+
+#include "c_compiler.h"
+
+/*************************************************************************
+* Types, constants and external variables
+*************************************************************************/
+
+
+
+#endif // INCLUSION_GUARD_C_SYSTEM_V2_H
diff --git a/source/LCDriver.rc b/source/LCDriver.rc index 06d4ffb..fdf0284 100644 --- a/source/LCDriver.rc +++ b/source/LCDriver.rc @@ -89,7 +89,7 @@ BEGIN VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2012"
VALUE "PrivateBuild", "Change-Id: I70835353a592d1f1ad40743640a1d0827e56fd2e"
VALUE "ProductName", "CXC 173 0865, LCDriver DLL"
- VALUE "ProductVersion", "P3Y"
+ VALUE "ProductVersion", "P4Y"
END
END
BLOCK "VarFileInfo"
diff --git a/source/LCM/Hash.cpp b/source/LCM/Hash.cpp index 1b6efd5..2b5e3b1 100644 --- a/source/LCM/Hash.cpp +++ b/source/LCM/Hash.cpp @@ -78,7 +78,7 @@ void *Hash::WorkerThread(void *arg) HashRequest *request = 0; while (true) { - RemoveResult result = pThis->m_RequestQueue->RemoveHead((void**)(&request), INFINITE); + RemoveResult result = pThis->m_RequestQueue->RemoveHead((void **)(&request), INFINITE); if (REMOVE_SUCCESS != result) { break; @@ -91,6 +91,7 @@ void *Hash::WorkerThread(void *arg) if (request->Length != 0) { SecurityAlgorithms::SHA256(request->Data_p, request->Length, request->Hash_p); } + break; case HASH_CRC16: diff --git a/source/LCM/include/t_protrom_header.h b/source/LCM/include/t_protrom_header.h index 63ae6ef..e8f52c4 100644 --- a/source/LCM/include/t_protrom_header.h +++ b/source/LCM/include/t_protrom_header.h @@ -32,8 +32,6 @@ #define PROTROM_HEADER_LENGTH 7 /** Value of the reserved field */ #define PROTROM_RESERVED_FIELD 0x00 -/** Offset of the header in the buffer */ -#define HEADER_OFFSET_IN_BUFFER 8 /** * Header search results diff --git a/source/LcdVersion.cpp b/source/LcdVersion.cpp index 538bba8..f95c525 100644 --- a/source/LcdVersion.cpp +++ b/source/LcdVersion.cpp @@ -18,6 +18,6 @@ * This table contains compatibility information for the versions of LCM. * Current LCM version is defined in file lcm_version.c in LCM code. */ -const char *LCD_LCM_CompatibilityList[] = {"P3Y", +const char *LCD_LCM_CompatibilityList[] = {"P4Y", NULL }; diff --git a/source/api_wrappers/linux/CEventObject.cpp b/source/api_wrappers/linux/CEventObject.cpp index 6c0f6c3..1a09fa9 100644 --- a/source/api_wrappers/linux/CEventObject.cpp +++ b/source/api_wrappers/linux/CEventObject.cpp @@ -20,13 +20,17 @@ CEventObject::CEventObject() { char sem_name[SEM_NAME_MAX_LENGTH]; int sem_nr = 1; - while(sem_nr <= SEM_MAX_NR) { + + while (sem_nr <= SEM_MAX_NR) { snprintf(sem_name, SEM_NAME_MAX_LENGTH, "lcdriversem_%d", sem_nr); /* open semaphore with "rw" permissions for everyone - 0666 */ m_sem = sem_open(sem_name, O_CREAT | O_EXCL, 0666 , 0); - if (m_sem != SEM_FAILED) + + if (m_sem != SEM_FAILED) { break; + } + sem_nr++; } } @@ -69,6 +73,7 @@ DWORD CEventObject::Wait(DWORD dwTimeout) /* Try to lock the semaphore */ ret = sem_trywait(m_sem); + if (ret != 0) { while (dwTimePassed < dwTimeout) { /* Sleep 1ms */ @@ -76,6 +81,7 @@ DWORD CEventObject::Wait(DWORD dwTimeout) /* Try to lock the semaphore again*/ ret = sem_trywait(m_sem); + if (ret == 0) { return WAIT_OBJECT_0; } @@ -85,6 +91,7 @@ DWORD CEventObject::Wait(DWORD dwTimeout) dwTimePassed = 1000 * (curr_time.tv_sec - start_time.tv_sec) + \ (curr_time.tv_usec - start_time.tv_usec) / 1000; } + return WAIT_TIMEOUT; } } diff --git a/source/api_wrappers/linux/CSemaphore.cpp b/source/api_wrappers/linux/CSemaphore.cpp index 5dae856..166ab88 100644 --- a/source/api_wrappers/linux/CSemaphore.cpp +++ b/source/api_wrappers/linux/CSemaphore.cpp @@ -16,13 +16,17 @@ CSemaphore::CSemaphore(unsigned int initial_count) { char sem_name[SEM_NAME_MAX_LENGTH]; int sem_nr = 1; - while(sem_nr <= SEM_MAX_NR) { + + while (sem_nr <= SEM_MAX_NR) { snprintf(sem_name, SEM_NAME_MAX_LENGTH, "lcdriversem_%d", sem_nr); /* open semaphore with "rw" permissions for everyone - 0666 */ m_semaphore = sem_open(sem_name, O_CREAT | O_EXCL, 0666 , 0); - if (m_semaphore != SEM_FAILED) + + if (m_semaphore != SEM_FAILED) { break; + } + sem_nr++; } } @@ -60,6 +64,7 @@ DWORD CSemaphore::Wait(DWORD timeout) /* Try to lock the semaphore */ ret = sem_trywait(m_semaphore); + if (ret != 0) { while (dwTimePassed < timeout) { /* Sleep 1ms */ @@ -67,6 +72,7 @@ DWORD CSemaphore::Wait(DWORD timeout) /* Try to lock the semaphore again*/ ret = sem_trywait(m_semaphore); + if (ret == 0) { return WAIT_OBJECT_0; } diff --git a/source/api_wrappers/linux/CSemaphore.h b/source/api_wrappers/linux/CSemaphore.h index 0abe5dd..3d68b63 100644 --- a/source/api_wrappers/linux/CSemaphore.h +++ b/source/api_wrappers/linux/CSemaphore.h @@ -19,7 +19,7 @@ public: DWORD Wait(DWORD timeout = INFINITE); private: - sem_t* m_semaphore; + sem_t *m_semaphore; }; #endif /* _CSEMAPHORE_H */ diff --git a/source/utilities/BulkHandler.cpp b/source/utilities/BulkHandler.cpp index bd8af8f..4e790c8 100644 --- a/source/utilities/BulkHandler.cpp +++ b/source/utilities/BulkHandler.cpp @@ -191,6 +191,7 @@ void BulkHandler::HandleRxSessionEnd(uint16 session, uint32 chunkSize, uint64 of m_Methods->UpdateBulkProgress(); ErrorExit: + if (E_SUCCESS != ReturnValue) { m_Methods->SignalError(ReturnValue); } |