diff options
author | xmarvla <vlatko.markovic@seavus.com> | 2011-12-26 11:39:55 +0100 |
---|---|---|
committer | Viktor Mladenovski <viktor.mladenovski@seavus.com> | 2012-05-25 14:40:23 +0200 |
commit | f2be658909048b1050bf66c14324cccce852a931 (patch) | |
tree | 6d706961731e8dd2864581491ae4ca8fc6574359 /lcmodule/source | |
parent | 7500cbd59a6faa7dd69b278d7a02da2c8fa96060 (diff) |
Flash tool cli cannot work with network path
Resolve problems in error handling for process file command
when path to non-existing file is given as input paramter
to LCDriver.
Fix AStyle code formatting.
ST-Ericsson ID: 402761
ST-Ericsson FOSS-OUT ID: NA
Change-Id: Ia6539a7ebab97a078bc0d105b23b6a0545762194
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43810
Reviewed-by: QABUILD
Tested-by: Aleksandar GASOSKI <aleksandar.gasoski@seavus.com>
Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Diffstat (limited to 'lcmodule/source')
12 files changed, 81 insertions, 46 deletions
diff --git a/lcmodule/source/LCM.rc b/lcmodule/source/LCM.rc index 9cbe9af..862bc80 100644 --- a/lcmodule/source/LCM.rc +++ b/lcmodule/source/LCM.rc @@ -69,15 +69,15 @@ BEGIN BEGIN
BLOCK "040904b0"
BEGIN
- VALUE "Comments", "Build date: 2011-12-09"
+ VALUE "Comments", "Build date: 2011-12-26"
VALUE "CompanyName", "STEricsson AB"
VALUE "FileDescription", "LCM Dynamic Link Library"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "Loader Communication Module"
VALUE "LegalCopyright", "Copyright (C) STEricsson AB 2011"
- VALUE "PrivateBuild", "Change-Id: If0926da184dfefefcaad0d4e97080de283b7aabd"
+ VALUE "PrivateBuild", "Change-Id: Ia6539a7ebab97a078bc0d105b23b6a0545762194"
VALUE "ProductName", "CXA1104507 Loader Communication Module"
- VALUE "ProductVersion", "PX3"
+ VALUE "ProductVersion", "PX4"
END
END
BLOCK "VarFileInfo"
diff --git a/lcmodule/source/LCM.vcproj b/lcmodule/source/LCM.vcproj index 67fb14a..7283845 100644 --- a/lcmodule/source/LCM.vcproj +++ b/lcmodule/source/LCM.vcproj @@ -46,7 +46,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=""$(ProjectDir)autogen";"$(ProjectDir)cnh1606344_ldr_communication_module\config";"$(ProjectDir)legacy_compatibility";"$(ProjectDir)cnh1606344_ldr_communication_module\include";"$(ProjectDir)cnh1605721_ldr_security_algorithms\include";"$(ProjectDir)cnh1605720_ldr_time_utilities\include";"$(ProjectDir)cnh1605551_ldr_utilities\include";"$(ProjectDir)cnh1605205_ldr_network_layer\include";"$(ProjectDir)cnh1605204_ldr_transport_layer\include";"$(ProjectDir)cnh1605203_ldr_communication_buffer\include";"$(ProjectDir)cnh1605551_ldr_utilities\critical_section"" - PreprocessorDefinitions="WIN32;_DEBUG;LCM_EXPORTS;PRINT_A_" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_DEBUG;LCM_EXPORTS;PRINT_A_" RuntimeLibrary="1" UsePrecompiledHeader="0" PrecompiledHeaderThrough="" diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c index aea0149..4cd38d3 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c @@ -95,9 +95,11 @@ ErrorCode_e A2_Speedflash_Poll(Communication_t *Communication_p) A2_SPEEDFLASH_REQ_SIZE, A2_Speedflash_ReadCallback, Communication_p->CommunicationDevice_p); #endif break; + case A2_SPEEDFLASH_WAIT_READ_REQ: /* nothing to do */ break; + case A2_SPEEDFLASH_WRITE_BLOCK: if (NULL != A2_SPEEDFLASH(Communication_p)->Outbound_p) { @@ -110,6 +112,7 @@ ErrorCode_e A2_Speedflash_Poll(Communication_t *Communication_p) } break; + case A2_SPEEDFLASH_WAIT_WRITE_BLOCK: /* nothing to do */ break; 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 42d3cae..b04d715 100644 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/bulk_protocol.c @@ -512,6 +512,7 @@ ErrorCode_e R15_Bulk_Process(Communication_t *Communication_p, PacketMeta_t *Pac break; #ifndef CFG_ENABLE_LOADER_TYPE + case CMD_BULK_WRITE: if (NULL != R15_TRANSPORT(Communication_p)->BulkCommandCallback_p) { @@ -523,6 +524,7 @@ ErrorCode_e R15_Bulk_Process(Communication_t *Communication_p, PacketMeta_t *Pac ReturnValue = R15_Network_PacketRelease(Communication_p, Packet_p); break; #endif + case CMD_BULK_STATUS: // not implemented. A_(printf("bulk_protocol.c (%d): ** Not implemented bulk command! **\n", __LINE__);) @@ -733,6 +735,7 @@ static ErrorCode_e R15_Bulk_Process_Read(Communication_t *Communication_p, TL_Bu break; #ifndef CFG_ENABLE_LOADER_TYPE + /* coverity[unterminated_case] */ case WAIT_WRITE_REQUEST: BulkVector_p->State = SEND_READ_REQUEST; @@ -961,6 +964,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect break; #ifndef CFG_ENABLE_LOADER_TYPE + case WAIT_TX_DONE: /* Wait for all chunks in the current session to be send before closing @@ -994,6 +998,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect C_(printf("bulk_protocol.c(%d) Write bulk process finished! \n", __LINE__);) break; #ifndef CFG_ENABLE_LOADER_TYPE + case CANCEL_BULK: { uint32 Counter; @@ -1015,6 +1020,7 @@ ErrorCode_e R15_Bulk_Process_Write(Communication_t *Communication_p, TL_BulkVect } break; #endif + default: BulkVector_p->State = BULK_IDLE_STATE; break; @@ -1191,7 +1197,7 @@ static void R15_Bulk_ReadChunkCallBack(Communication_t *Communication_p, const v { TL_BulkVectorList_t *BulkVector_p = R15_TRANSPORT(Communication_p)->BulkHandle.BulkVector_p; - if(NULL == BulkVector_p) { + if (NULL == BulkVector_p) { A_(printf("bulk_protocol.c(%d) Bulk Vector released! \n", __LINE__);) return; } 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 925d722..893412f 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 @@ -131,8 +131,10 @@ ErrorCode_e R15_Transport_Poll(Communication_t *Communication_p) switch (Packet_p->Header.Protocol) { case PROTO_BULK: return R15_Bulk_Process(Communication_p, Packet_p); + case PROTO_COMMAND: return R15_Command_Process(Communication_p, Packet_p); + default: return E_SUCCESS; } 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 7c4f6e1..0bd2944 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 @@ -285,7 +285,7 @@ typedef struct { /** R15 Network context */ typedef struct { - PacketMeta_t *MetaInfoList[COMMAND_BUFFER_COUNT+BULK_BUFFER_COUNT]; + PacketMeta_t *MetaInfoList[COMMAND_BUFFER_COUNT + BULK_BUFFER_COUNT]; /**< List of meta data for used packets. */ RetransmissionContext_t *RetransmissionList[MAX_SIZE_RETRANSMISSION_LIST]; /**< List of packet for retransmission */ 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 417c10b..1aa32a3 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/a2_network.c @@ -149,9 +149,11 @@ void A2_Network_ReadCallback(const void *Data_p, const uint32 Length, void *Para case A2_RECEIVE_HEADER: ReturnValue = A2_Network_ReceiveHeader(Communication_p); break; + case A2_RECEIVE_PAYLOAD: ReturnValue = A2_Network_ReceivePayload(Communication_p); break; + default: A2_NETWORK(Communication_p)->Inbound.State = A2_RECEIVE_HEADER; A2_NETWORK(Communication_p)->Inbound.RecData = 0; @@ -565,9 +567,11 @@ ErrorCode_e A2_Network_TransmiterHandler(Communication_t *Communication_p) } break; + case A2_SENDING_HEADER: /* nothing to do, wait until sending is finished and state changed in write callback */ break; + case A2_SEND_PAYLOAD: Out_p->State = A2_SENDING_PAYLOAD; @@ -582,6 +586,7 @@ ErrorCode_e A2_Network_TransmiterHandler(Communication_t *Communication_p) } break; + case A2_SENDING_PAYLOAD: /* nothing to do, wait until sending is finished and state changed when packet ACK is received */ break; 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 3dc19a4..11410e2 100644 --- a/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c +++ b/lcmodule/source/cnh1605205_ldr_network_layer/source/protrom_network.c @@ -411,6 +411,7 @@ static ErrorCode_e Protrom_Network_TransmiterHandler(Communication_t *Communicat case PROTROM_SENDING_HEADER: break; + case PROTROM_SEND_PAYLOAD: Out_p->State = PROTROM_SENDING_PAYLOAD; 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 7bc4dad..c8347bf 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 @@ -226,9 +226,9 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p) #ifdef CFG_ENABLE_LOADER_TYPE if (E_SUCCESS != Communication_p->CommunicationDevice_p->Read( - In_p->Target_p + ReqBufferOffset + In_p->RecBackupData, - ReqData - In_p->RecBackupData, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p)) { + In_p->Target_p + ReqBufferOffset + In_p->RecBackupData, + ReqData - In_p->RecBackupData, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p)) { /* Read failed! Return to previous state. */ In_p->ReqData = ReqData; In_p->ReqBuffOffset = ReqBufferOffset; @@ -271,8 +271,8 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p) #ifdef CFG_ENABLE_LOADER_TYPE if (E_SUCCESS != Communication_p->CommunicationDevice_p->Read( - In_p->Target_p + ReqBufferOffset, ReqData, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p)) { + In_p->Target_p + ReqBufferOffset, ReqData, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p)) { /* Read failed! Return to previous state. */ In_p->ReqData = ReqData; In_p->ReqBuffOffset = ReqBufferOffset; @@ -294,15 +294,15 @@ ErrorCode_e R15_Network_ReceiverHandler(Communication_t *Communication_p) #ifdef CFG_ENABLE_LOADER_TYPE if (E_SUCCESS == Communication_p->CommunicationDevice_p->Read(In_p->Target_p, - ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p)) { + ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p)) { In_p->State = RECEIVE_HEADER; } #else (void)Communication_p->CommunicationDevice_p->Read(In_p->Target_p, - ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, - Communication_p->CommunicationDevice_p); + ALIGNED_HEADER_LENGTH, R15_Network_ReadCallback, + Communication_p->CommunicationDevice_p); In_p->State = RECEIVE_HEADER; #endif } @@ -347,6 +347,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) HeaderStartInBuffer_p = Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER; #ifdef CFG_ENABLE_LOADER_TYPE + if (Out_p->Packet_p->Header.ExtendedHeaderLength == COMMAND_EXTENDED_HEADER_LENGTH) { ExtHdrLen = ALIGNED_COMMAND_EXTENDED_HEADER_LENGTH; } else { @@ -372,13 +373,14 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) ContinuousBufferLength = ALIGNED_HEADER_LENGTH + ExtHdrLen; Out_p->State = SENDING_HEADER; } + #else ContinuousBufferLength = ALIGNED_HEADER_LENGTH; Out_p->State = SENDING_HEADER; #endif if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write((Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER), - ContinuousBufferLength, R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { + ContinuousBufferLength, R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { C_(printf("r15_network_layer.c (%d) Header Sent to comm device! \n", __LINE__);) } else { Out_p->State = SEND_HEADER; @@ -387,9 +389,11 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) } break; + case SENDING_HEADER: /* nothing to do, wait until sending is finished and state changed by write callback */ break; + case SEND_EX_HEADER: ExHeaderStartInBuffer_p = Out_p->Packet_p->Buffer_p + HEADER_OFFSET_IN_BUFFER + ALIGNED_HEADER_LENGTH; @@ -408,7 +412,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) } if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write(ExHeaderStartInBuffer_p, ExtHdrLen, - R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { + R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { C_(printf("r15_network_layer.c (%d) ExHeader Sent to comm device! \n", __LINE__);) } else { Out_p->State = SEND_EX_HEADER; @@ -417,17 +421,19 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) } break; + case SENDING_EX_HEADER: /* nothing to do, wait until sending is finished and state changed by write callback */ break; + case SEND_PAYLOAD: Out_p->State = SENDING_PAYLOAD; Aligned_Length = (Out_p->Packet_p->Header.PayloadLength + (ALIGN_SIZE - 1)) & (~(ALIGN_SIZE - 1)); if (E_SUCCESS == Communication_p->CommunicationDevice_p->Write(Out_p->Packet_p->Payload_p, - Aligned_Length, - R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { + Aligned_Length, + R15_Network_WriteCallback, Communication_p->CommunicationDevice_p)) { RegisterRetransmission = TRUE; C_(printf("r15_network_layer.c (%d) Payload Sent to comm device! \n", __LINE__);) } else { @@ -436,6 +442,7 @@ ErrorCode_e R15_Network_TransmiterHandler(Communication_t *Communication_p) } break; + case SENDING_PAYLOAD: /* nothing to do, wait until sending is finished and state changed by write callback */ break; @@ -485,7 +492,7 @@ ErrorCode_e R15_Network_CancelRetransmission(const Communication_t *const Commun R15_NETWORK(Communication_p)->RetransmissionListCount--; for (; Index < R15_NETWORK(Communication_p)->RetransmissionListCount; Index++) { - R15_NETWORK(Communication_p)->RetransmissionList[Index] = R15_NETWORK(Communication_p)->RetransmissionList[Index+1]; + R15_NETWORK(Communication_p)->RetransmissionList[Index] = R15_NETWORK(Communication_p)->RetransmissionList[Index + 1]; } R15_NETWORK(Communication_p)->RetransmissionList[Index] = NULL; @@ -717,15 +724,17 @@ static ErrorCode_e R15_Network_ReceiveHeader(const Communication_t *const Commun } } else { A_( - if(print_header) { - uint32 Counter = 0; - printf("Invalid header! \n"); - for (Counter = 0; Counter < 16; Counter++) { - printf(" %02X", In_p->Scratch[Counter]); - } - printf("\n\n"); + if (print_header) { + uint32 Counter = 0; + printf("Invalid header! \n"); + + for (Counter = 0; Counter < 16; Counter++) { + printf(" %02X", In_p->Scratch[Counter]); } + + printf("\n\n"); + } ) } } @@ -747,12 +756,12 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat R15_DeserializeBulkExtendedHeader(&BulkExtendedHeader, In_p->Target_p); IsValidHeader = R15_IsValidExtendedHeader(In_p->Target_p, - In_p->Header.ExtendedHeaderLength, - In_p->Header.ExtendedHeaderChecksum); + In_p->Header.ExtendedHeaderLength, + In_p->Header.ExtendedHeaderChecksum); if (IsValidHeader) { if (R15Header.Protocol == BULK_PROTOCOL && - (BulkExtendedHeader.TypeFlags & MASK_BULK_COMMAND_SELECT) == CMD_BULK_DATA) { + (BulkExtendedHeader.TypeFlags & MASK_BULK_COMMAND_SELECT) == CMD_BULK_DATA) { In_p->Packet_p = R15_Network_PacketAllocate(Communication_p, BULK_BUFFER_SIZE); } else { In_p->Packet_p = R15_Network_PacketAllocate(Communication_p, COMMAND_BUFFER_SIZE); @@ -793,10 +802,10 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat memcpy(Packet_p->Hash, &Packet_p->Header.PayloadChecksum, 4); Communication_p->HashDevice_p->Calculate(OBJECT_HASH(Communication_p), - HASH_NONE, - Packet_p->Payload_p, Packet_p->Header.PayloadLength, - Packet_p->Hash, (HashCallback_t)R15_InHashCallback, - (void *)Packet_p); + HASH_NONE, + Packet_p->Payload_p, Packet_p->Header.PayloadLength, + Packet_p->Hash, (HashCallback_t)R15_InHashCallback, + (void *)Packet_p); #endif In_p->Packet_p = NULL; @@ -809,10 +818,10 @@ static ErrorCode_e R15_Network_ReceiveExtendedHeader(Communication_t *Communicat uint32 Counter = 0; printf("Invalid exheader! \n"); - for (Counter = 0; Counter < 16; Counter++) { - printf(" %02X", In_p->Target_p[Counter]); - } - printf("\n\n"); + for (Counter = 0; Counter < 16; Counter++) { + printf(" %02X", In_p->Target_p[Counter]); + } + printf("\n\n"); ) RESET_INBOUND(In_p, RECEIVE_HEADER); SYNC_HEADER(In_p, ALIGNED_HEADER_LENGTH, In_p->Scratch); @@ -848,10 +857,10 @@ static ErrorCode_e R15_Network_ReceivePayload(Communication_t *Communication_p) #endif Communication_p->HashDevice_p->Calculate(OBJECT_HASH(Communication_p), - Communication_p->CurrentFamilyHash, - Packet_p->Payload_p, Packet_p->Header.PayloadLength, - Packet_p->Hash, (HashCallback_t)R15_InHashCallback, - (void *)Packet_p); + Communication_p->CurrentFamilyHash, + Packet_p->Payload_p, Packet_p->Header.PayloadLength, + Packet_p->Hash, (HashCallback_t)R15_InHashCallback, + (void *)Packet_p); } else { SET_PACKET_FLAGS(Packet_p, PACKET_RX_STATE_MASK, BUF_PAYLOAD_CRC_OK); (void)QUEUE((Packet_p->Communication_p), FifoEnqueue_Fn)(OBJECT_QUEUE(Packet_p->Communication_p), Packet_p->Communication_p->Inbound_p, Packet_p); @@ -896,7 +905,7 @@ static ErrorCode_e R15_Network_RegisterRetransmission(Communication_t *Communica i = R15_NETWORK(Communication_p)->RetransmissionListCount; for (; Index < i; i--) { - R15_NETWORK(Communication_p)->RetransmissionList[i] = R15_NETWORK(Communication_p)->RetransmissionList[i-1]; + R15_NETWORK(Communication_p)->RetransmissionList[i] = R15_NETWORK(Communication_p)->RetransmissionList[i - 1]; } R15_NETWORK(Communication_p)->RetransmissionList[Index] = R_Ctx_p; @@ -936,7 +945,7 @@ static void R15_Network_RetransmissionCallback(Communication_t *Communication_p, R15_NETWORK(Communication_p)->RetransmissionListCount--; for (; Index < R15_NETWORK(Communication_p)->RetransmissionListCount; Index++) { - R15_NETWORK(Communication_p)->RetransmissionList[Index] = R15_NETWORK(Communication_p)->RetransmissionList[Index+1]; + R15_NETWORK(Communication_p)->RetransmissionList[Index] = R15_NETWORK(Communication_p)->RetransmissionList[Index + 1]; } R15_NETWORK(Communication_p)->RetransmissionList[Index] = NULL; diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml index 4d32f14..52b76e2 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml +++ b/lcmodule/source/cnh1606344_ldr_communication_module/config/commands.xml @@ -389,7 +389,7 @@ </permissions> </command> - <command number="16" name="System Deauthenticate" ADbg="false" source="PC"> supportedcmdtype="longrunning"> + <command number="16" name="System Deauthenticate" ADbg="false" source="PC" supportedcmdtype="longrunning"> <interface type="loader" name="Deauthenticate"/> <documentation> This command is used by the Loader to deauthenticates the ME from prior authentications to prevent unauthorized access. 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 8ef2ff3..bd4ebc8 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/lcm_version.c @@ -11,6 +11,6 @@ * brief ASCII string variable holding the LCM version/build time/product number.. */ -char LCM_CurrentVersion[] = "PX2"; +char LCM_CurrentVersion[] = "PX4"; /** @} */ diff --git a/lcmodule/source/cnh1606344_ldr_communication_module/source/measurement_tool.c b/lcmodule/source/cnh1606344_ldr_communication_module/source/measurement_tool.c index 4b42f60..67f730e 100644 --- a/lcmodule/source/cnh1606344_ldr_communication_module/source/measurement_tool.c +++ b/lcmodule/source/cnh1606344_ldr_communication_module/source/measurement_tool.c @@ -382,10 +382,12 @@ ErrorCode_e Do_Measurement_AddMeasurementData(Measurement_t *Measurement_p, uin 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); @@ -395,6 +397,7 @@ ErrorCode_e Do_Measurement_AddMeasurementData(Measurement_t *Measurement_p, uin } break; + case START_FLASH_CHUNK_TIME: ChankDataBlock_p = FindChunkDataBlock(SessionMeasurement_p->ChunkMeasurement_p, ChunkID); @@ -404,6 +407,7 @@ ErrorCode_e Do_Measurement_AddMeasurementData(Measurement_t *Measurement_p, uin } break; + case END_FLASH_CHUNK_TIME: ChankDataBlock_p = FindChunkDataBlock(SessionMeasurement_p->ChunkMeasurement_p, ChunkID); @@ -413,14 +417,17 @@ ErrorCode_e Do_Measurement_AddMeasurementData(Measurement_t *Measurement_p, uin } 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; @@ -462,6 +469,7 @@ ErrorCode_e Do_Measurement_CompleteResults(Measurement_t *Measurement_p) } break; + default: //... break; @@ -646,6 +654,7 @@ static uint32 CalculateSizeOfResults(SessionMeasurement_t *DataMeasurement_p, ui } break; + default: Size = 0; break; |