/** @req COMM813 */ void ComM_Nm_RestartIndication( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_NM_RESTARTINDICATION); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_NM_RESTARTINDICATION); ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; ChannelInternal->NmIndicationMask |= COMM_NM_INDICATION_RESTART; }
void ComM_DCM_InactiveDiagnostic(void){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_DCM_INACTIVEDIAGNOSTIC); /** !req ComM182 : The communication inhibition shall get temporarily inactive during an active diagnostic session */ // TODO DeActivate channels, we must have a DCM user with channels }
/** @req COMM807 */ void ComM_Nm_NetworkMode( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_NM_NETWORKMODE); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_NM_NETWORKMODE); ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; ChannelInternal->NmIndicationMask |= COMM_NM_INDICATION_NETWORK_MODE; }
/** @req COMM811 */ void ComM_Nm_BusSleepMode( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_NM_BUSSLEEPMODE); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_NM_BUSSLEEPMODE); ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; ChannelInternal->NmIndicationMask |= COMM_NM_INDICATION_BUS_SLEEP; }
void ComM_CommunicationAllowed( NetworkHandleType Channel, boolean Allowed) { COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_COMMUNICATIONALLOWED); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_COMMUNICATIONALLOWED); ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; ChannelInternal->CommunicationAllowed = Allowed; /** @req COMM885 */ }
/** @req COMM804 */ void ComM_Nm_NetworkStartIndication( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_NM_NETWORKSTARTINDICATION); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_NM_NETWORKSTARTINDICATION); ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; // Used to simulate Wake-up ChannelInternal->NmIndicationMask |= COMM_NM_INDICATION_RESTART; }
void ComM_EcuM_WakeUpIndication( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_ECUM_WAKEUPINDICATION); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_ECUM_WAKEUPINDICATION); /* Activate wake-up i.e. start RequestRun and go to full communication */ #if defined(USE_ECUM) || defined(COMM_TESTS) ComM_Internal_RequestRUN(Channel); #endif ComM_Internal.Channels[Channel].WakeUp = TRUE; }
void ComM_DCM_InactiveDiagnostic(NetworkHandleType Channel){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_DCM_INACTIVEDIAGNOSTIC); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_DCM_INACTIVEDIAGNOSTIC); const ComM_ChannelType* ChannelConf = &ComM_Config->Channels[Channel]; ComM_Internal.Channels[Channel].DCM_Requested = FALSE; /* IMPROVEMENT: Report DET error if returning error */ (void)ComM_Internal_UpdateChannelState(ChannelConf, FALSE); }
/** @req COMM392 */ void ComM_Nm_BusSleepMode( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_NM_BUSSLEEPMODE); /** @req COMM810 */ COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_NM_BUSSLEEPMODE); const ComM_ChannelType* ChannelConf = &ComM_Config->Channels[Channel]; ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; ChannelInternal->NmIndicationMask |= COMM_NM_INDICATION_BUS_SLEEP; Std_ReturnType status = ComM_Internal_UpdateChannelState(ChannelConf, FALSE); if (status != E_OK) { // IMPROVEMENT: Report DET error? } }
/** @req COMM792 */ void ComM_Nm_RestartIndication( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_NM_RESTARTINDICATION); /** @req COMM812 */ COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_NM_RESTARTINDICATION); const ComM_ChannelType* ChannelConf = &ComM_Config->Channels[Channel]; ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; ChannelInternal->NmIndicationMask |= COMM_NM_INDICATION_RESTART; Std_ReturnType status = ComM_Internal_UpdateChannelState(ChannelConf, TRUE); if (status != E_OK) { // IMPROVEMENT: Report DET error? } }
/** @req COMM383 */ void ComM_Nm_NetworkStartIndication( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_NM_NETWORKSTARTINDICATION); /** @req COMM805 */ COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_NM_NETWORKSTARTINDICATION); const ComM_ChannelType* ChannelConf = &ComM_Config->Channels[Channel]; ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; // Used to simulate Wake-up ChannelInternal->NmIndicationMask |= COMM_NM_INDICATION_RESTART; Std_ReturnType status = ComM_Internal_UpdateChannelState(ChannelConf, FALSE); if (status != E_OK) { // IMPROVMENT: Add DET error } }
void ComM_BusSM_ModeIndication( NetworkHandleType Channel, ComM_ModeType *Mode ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_BUSSM_MODEINDICATION); /** @req COMM816 */ COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_BUSSM_MODEINDICATION); ComM_ModeType ComMode; ComMode = *Mode; ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel]; const ComM_ChannelType* ChannelConf = &ComM_Config->Channels[Channel]; #if defined(USE_BSWM) || defined(USE_DCM) if( ChannelInternal->Mode != ComMode) { #if defined(USE_BSWM) BswM_ComM_CurrentMode(Channel, ComMode); /* @req COMM976 */ #endif #if defined(USE_DCM) /* @req COMM266 */ /* !req COMM693 */ switch(ComMode) { case COMM_NO_COMMUNICATION: Dcm_ComM_NoComModeEntered(Channel); break; case COMM_SILENT_COMMUNICATION: Dcm_ComM_SilentComModeEntered(Channel); break; case COMM_FULL_COMMUNICATION: Dcm_ComM_FullComModeEntered(Channel); break; default: break; } #endif } #endif ChannelInternal->Mode = ComMode; ChannelInternal->SubMode = ChannelInternal->RequestedSubMode; /** @req COMM898 */ /** @req COMM899 */ /** @req COMM883 */ switch(ComMode) { case COMM_NO_COMMUNICATION: break; case COMM_SILENT_COMMUNICATION: break; case COMM_FULL_COMMUNICATION: /* IMPROVMENT: What to do if return error */ (void)ComM_Internal_NotifyNm(ChannelConf); break; } }
void ComM_BusSM_ModeIndication( NetworkHandleType Channel, ComM_ModeType ComMode ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_BUSSM_MODEINDICATION); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_BUSSM_MODEINDICATION); // Not implemented (void)ComMode; }
void ComM_EcuM_RunModeIndication( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_ECUM_RUNMODEINDICATION); COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_ECUM_RUNMODEINDICATION); ComM_Internal.Channels[Channel].RunModeIndication = TRUE; }
void ComM_DeInit(){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_DEINIT); ComM_Internal.InitStatus = COMM_UNINIT; }
// ECU State Manager Callbacks // --------------------------- void ComM_EcuM_WakeUpIndication( NetworkHandleType Channel ){ COMM_VALIDATE_INIT_NORV(COMM_SERVICEID_ECUM_WAKEUPINDICATION); /** @req COMM814 */ COMM_VALIDATE_CHANNEL_NORV(Channel, COMM_SERVICEID_ECUM_WAKEUPINDICATION); }