init.o(.text)\r
arch.o(.text)\r
task.o(.text)\r
- resource.o(.text)\r
alarm.o(.text)\r
\r
. = ALIGN(2);\r
*(.text.bank9*)\r
\r
/* BANK9 MODULES */\r
+ resource.o(.text)\r
sched_table.o(.text)\r
counter.o(.text)\r
sys_tick.o(.text)\r
gcc_version := $(word 3,$(shell ${CROSS_COMPILE}gcc --version))\r
gcc_split = $(subst ., ,$(gcc_version))\r
\r
-# If version 4.3 or above then use -te500v1\r
-ifeq ($(word 1,$(gcc_split)),4)\r
-ifneq ($(filter $(word 2,$(gcc_split)),3 4 5 6 7 8 9),)\r
-ppc_common-$(CFG_SPE) += -te500v1 -mhard-float # -mfloat-gprs=single -mspe=yes -mhard-float\r
-endif\r
-endif\r
+# If version 4.3 or above then use -te500v1 (CodeSourcery)\r
+#ifeq ($(word 1,$(gcc_split)),4)\r
+#ifneq ($(filter $(word 2,$(gcc_split)),3 4 5 6 7 8 9),)\r
+#ppc_common-$(CFG_SPE) += -te500v1 -mhard-float # -mfloat-gprs=single -mspe=yes -mhard-float\r
+#endif\r
+#endif\r
ifeq ($(ppc_common-y),)\r
ppc_common-$(CFG_SPE) += -mfloat-gprs=single -mspe=yes -mhard-float -mcpu=8540 -mno-eabi\r
endif\r
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
-/*\r
- * Adc_Cfg.c\r
- *\r
- * Created on: 2009-okt-02\r
- * Author: Fredrik\r
- */\r
+\r
+#warning "This default file may only be used as an example!"\r
\r
#include "Adc.h"\r
#include "stm32f10x_adc.h"\r
\r
-\r
Adc_GroupStatus AdcGroupStatus[ADC_NBR_OF_GROUPS];\r
\r
/* Configuration goes here. */\r
#ifndef ADC_CFG_H_\r
#define ADC_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
+\r
#define ADC_PRIORITY_HW 0\r
#define ADC_PRIORITY_HW_SW 1\r
#define ADC_PRIORITY_NONE 2\r
\r
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
+#warning "This default file may only be used as an example!"\r
\r
#include "Mcu.h"\r
\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define MCU_DEV_ERROR_DETECT STD_ON\r
#define MCU_PERFORM_RESET_API STD_ON\r
#define MCU_VERSION_INFO_API STD_ON\r
#ifndef PWM_CFG_H_\r
#define PWM_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
/****************************************************************************\r
* Global configuration options and defines\r
*/\r
*/\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "CanTp_Types.h"\r
\r
CanTp_GeneralType CanTpGeneralConfig =\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef CANTP_CFG_H_\r
#define CANTP_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DCM_CFG_H_\r
#define DCM_CFG_H_\r
/*\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Dcm.h"\r
#include "Rte_Dcm.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DEM_CFG_H_\r
#define DEM_CFG_H_\r
/*\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DEM_INTERRID_H_\r
#define DEM_INTERRID_H_\r
\r
CANTP_E_OPER_NOT_SUPPORTED,\r
CANTP_E_COMM,\r
CANNM_E_CANIF_TRANSMIT_ERROR,\r
- CANM_E_NETWORK_TIMEOUT,\r
+ CANNM_E_NETWORK_TIMEOUT,\r
CANIF_TRCV_E_TRANSCEIVER,\r
CANIF_E_INVALID_DLC,\r
CANIF_STOPPED,\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DEMINTEVTID_H_\r
#define DEMINTEVTID_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Dem.h"\r
\r
/*********************\r
* Specification: Autosar v2.0.1, Final\r
*\r
*/\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef _DET_CFG_H_\r
#define _DET_CFG_H_\r
\r
* Author: Jonte\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Adc.h"\r
\r
Adc_GroupStatus AdcGroupStatus[ADC_NBR_OF_GROUPS];\r
#ifndef ADC_CFG_H_\r
#define ADC_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define ADC_DEINIT_API STD_ON\r
#define ADC_DEV_ERROR_DETECT STD_ON\r
#define ADC_ENABLE_QUEUING STD_ON\r
#ifndef CAN_CFG_H_\r
#define CAN_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
// Number of controller configs\r
#define CAN_ARC_CTRL_CONFIG_CNT 1\r
\r
* on Wed Apr 21 10:15:00 CEST 2010\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
\r
\r
#include <stdlib.h>\r
#ifndef COMGLOBALS_H_\r
#define COMGLOBALS_H_\r
\r
+#warning "This default file may only be used as an example!"\r
\r
// PDU definitions\r
enum {\r
#ifndef DIO_CFG_H_\r
#define DIO_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define DIO_VERSION_INFO_API STD_ON\r
#define DIO_DEV_ERROR_DETECT STD_ON\r
#define DIO_END_OF_LIST -1\r
\r
#define DIO_CHANNEL_NAME_LED_CHANNEL (DIO_CHANNEL_H7)\r
\r
+// Standard board test led\r
+#define DIO_CHANNEL_NAME_BOARD_LED DIO_CHANNEL_NAME_LED_CHANNEL\r
+\r
#define DIO_PORT_NAME_LED_PORT (DIO_PORT_H)\r
\r
#define DIO_GROUP_NAME_LED_PORT (&DioConfigData[0])\r
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
+\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Dio.h"\r
#include "Dio_Cfg.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
\r
\r
#include "Gpt.h"\r
\r
#ifndef GPT_CFG_H_\r
#define GPT_CFG_H_\r
+\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Std_Types.h"\r
\r
\r
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include <stdint.h>\r
#include "Mcu.h"\r
\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define MCU_DEV_ERROR_DETECT STD_ON\r
#define MCU_PERFORM_RESET_API STD_OFF\r
#define MCU_VERSION_INFO_API STD_ON\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Port.h"\r
\r
const Port_ConfigType PortConfigData =\r
#ifndef PORT_CFG_H_\r
#define PORT_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Std_Types.h"\r
\r
/** Build version info API */\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
#ifndef PWM_CFG_H_\r
#define PWM_CFG_H_\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
/*\r
* PwmGeneral\r
*/\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Adc.h"\r
#include "Dma.h"\r
#include "mpc5516.h"\r
* Definitions of configuration parameters for ADC Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef ADC_CFG_H_\r
#define ADC_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "CanIf.h"\r
#include <stdlib.h>\r
\r
* Definitions of configuration parameters for CAN Interface.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef CANIF_CFG_H_\r
#define CANIF_CFG_H_\r
\r
* Definitions of configuration parameters for CAN Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef CAN_CFG_H_\r
#define CAN_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include <stdlib.h>\r
#include "Can.h"\r
#include "CanIf_Cbk.h"\r
* Author: Mattias\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef COMGLOBALS_H_\r
#define COMGLOBALS_H_\r
\r
*/\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef COM_CFG_H_\r
#define COM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Com_PbCfg.h"\r
#include "Com_RunTest.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef _COM_PBCFG_H\r
#define _COM_PBCFG_H\r
\r
* Specification: Autosar v2.0.1, Final\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef _DET_CFG_H_\r
#define _DET_CFG_H_\r
\r
/** @file Dio_Cfg.h\r
* Definitions of configuration parameters for the DIO Driver.\r
*/\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DIO_CFG_H_\r
#define DIO_CFG_H_\r
\r
#define DIO_CHANNEL_NAME_LEDS_LED4 (DIO_CHANNEL_D4)\r
#define DIO_CHANNEL_NAME_LEDS_LED5 (DIO_CHANNEL_D5)\r
\r
+// Standard board test led\r
+#define DIO_CHANNEL_NAME_BOARD_LED DIO_CHANNEL_NAME_LEDS_LED4\r
+\r
+\r
// Port\r
#define DIO_PORT_NAME_LED_PORT (DIO_PORT_D)\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Dio.h"\r
#include "Dio_Cfg.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Dma.h"\r
\r
const Dma_MuxConfigType DmaMuxConfig [DMA_NUMBER_OF_CHANNELS] =\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DMA_CFG_H_\r
#define DMA_CFG_H_\r
\r
* Initialization sequences are defined in EcuM_Callout_template.c\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef ECUM_CFG_H_\r
#define ECUM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef EEP_CFG_H_\r
#define EEP_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Eep.h"\r
#include "Spi.h"\r
#include "Spi_Cfg.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Eep.h"\r
#include "Spi.h"\r
#include "Spi_Cfg.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Fls.h"\r
#include <stdlib.h>\r
\r
* Definitions of configuration parameters for Flash Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef FLS_CFG_H_\r
#define FLS_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Fls.h"\r
#include <stdlib.h>\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef FLS_SST25XX_CFG_H_\r
#define FLS_SST25XX_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Gpt.h"\r
#include "Gpt_Cfg.h"\r
#include <stdlib.h>\r
* Definitions of configuration parameters for GPT Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef GPT_CFG_H_\r
#define GPT_CFG_H_\r
#include "Std_Types.h"\r
* Definitions of configuration parameters for LIN Interface.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef LINIF_CFG_H_\r
#define LINIF_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "LinIf_Cfg.h"\r
#include "Lin_Cfg.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef LINSM_CFG_H_\r
#define LINSM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "LinSM_Cfg.h"\r
#include "LinIf_Cfg.h"\r
#include "Lin_Cfg.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
* Definitions of configuration parameters for LIN Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef LIN_CFG_H_\r
#define LIN_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Mcu.h"\r
#include "Lin.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Lin_Cfg.h"\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
\r
* Definitions of configuration parameters for MCU Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MEMIF_CFG_H_\r
#define MEMIF_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define PDUR_MODULE_ID 51\r
#define PDUR_INSTANCE_ID 0\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define PDUR_ZERO_COST_OPERATION STD_ON\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Port_Cfg.h"\r
\r
// All: PA,OBE,IBE,ODE,HYS,SRC,WPE,WPS\r
* Definitions of configuration parameters for Port Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef PORT_CFG_H_\r
#define PORT_CFG_H_\r
\r
* Author: nian\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Pwm.h"\r
#include "Pwm_Cfg.h"\r
\r
* Definitions of configuration parameters for PWM Driver.\r
*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef PWM_CFG_H_\r
#define PWM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef SPI_CFG_H_\r
#define SPI_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Spi.h"\r
#include "Spi_Cfg.h"\r
#include <stdlib.h>\r
\r
\r
/* MPC55xx Reset Control Word(RCW) */\r
-rcw(R) : ORIGIN = 0x00000000, LENGTH = 0x8\r
+rcw : ORIGIN = 0x00000000, LENGTH = 0x8\r
flash(R) : ORIGIN = 0x00000008, LENGTH = 1M\r
/* 5516S, 48K\r
* 5517S,5516G,5516E, 64K RAM\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef CANIF_CFG_H_\r
#define CANIF_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef CAN_CFG_H_\r
#define CAN_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include <stdlib.h>\r
#include "Can.h"\r
#include "CanIf_Cbk.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef COM_CFG_H_\r
#define COM_CFG_H_\r
\r
* Specification: Autosar v2.0.1, Final\r
*\r
*/\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef _DET_CFG_H_\r
#define _DET_CFG_H_\r
\r
\r
/* Link time config */\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Std_Types.h"\r
#include "Os.h"\r
#include "Mcu.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Gpt.h"\r
#include "Gpt_Cfg.h"\r
#include <stdlib.h>\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef GPT_CFG_H_\r
#define GPT_CFG_H_\r
#include "Std_Types.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MEMIF_CFG_H_\r
#define MEMIF_CFG_H_\r
\r
\r
\r
/* MPC55xx Reset Control Word(RCW) */\r
-rcw(R) : ORIGIN = 0x00000000, LENGTH = 0x8\r
+rcw : ORIGIN = 0x00000000, LENGTH = 0x8\r
flash(R) : ORIGIN = 0x00000008, LENGTH = 1M\r
/* 5516S, 48K\r
* 5517S,5516G,5516E, 64K RAM\r
* Specification: Autosar v2.0.1, Final\r
*\r
*/\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef _DET_CFG_H_\r
#define _DET_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MEMIF_CFG_H_\r
#define MEMIF_CFG_H_\r
\r
\r
\r
/* MPC55xx Reset Control Word(RCW) */\r
-rcw(R) : ORIGIN = 0x00000000, LENGTH = 0x8\r
+rcw : ORIGIN = 0x00000000, LENGTH = 0x8\r
flash(R) : ORIGIN = 0x00000008, LENGTH = 2M\r
/* 5516S, 48K\r
* 5517S,5516G,5516E, 64K RAM\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Adc.h"\r
#include "Dma.h"\r
#include "mpc5516.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef ADC_CFG_H_\r
#define ADC_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "CanIf.h"\r
#include <stdlib.h>\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef CANIF_CFG_H_\r
#define CANIF_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef CAN_CFG_H_\r
#define CAN_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include <stdlib.h>\r
#include "Can.h"\r
#include "CanIf_Cbk.h"\r
\r
\r
\r
-/*\r
- * ComGlobals.h\r
- *\r
- * Created on: 2009-jan-11\r
- * Author: Mattias\r
- */\r
+#warning "This default file may only be used as an example!"\r
\r
#ifndef COMGLOBALS_H_\r
#define COMGLOBALS_H_\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef COM_CFG_H_\r
#define COM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Com_PbCfg.h"\r
#include "Com_RunTest.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef _COM_PBCFG_H\r
#define _COM_PBCFG_H\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
/*\r
* Development Error Tracer driver\r
*\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DIO_CFG_H_\r
#define DIO_CFG_H_\r
\r
// Channels\r
#define DIO_CHANNEL_NAME_LED_K2 (125)\r
\r
+// Standard board test led\r
+#define DIO_CHANNEL_NAME_BOARD_LED DIO_CHANNEL_NAME_LED_K2\r
+\r
// Port\r
// No ports available for MPC5567\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Dio.h"\r
#include "Dio_Cfg.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Dma.h"\r
\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef DMA_CFG_H_\r
#define DMA_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef ECUM_CFG_H_\r
#define ECUM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef EEP_CFG_H_\r
#define EEP_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Eep.h"\r
#include "Spi.h"\r
#include "Spi_Cfg.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Eep.h"\r
#include "Spi.h"\r
#include "Spi_Cfg.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Fls.h"\r
#include <stdlib.h>\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef FLS_CFG_H_\r
#define FLS_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Fls.h"\r
#include <stdlib.h>\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef FLS_SST25XX_CFG_H_\r
#define FLS_SST25XX_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Gpt.h"\r
#include "Gpt_Cfg.h"\r
#include <stdlib.h>\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef GPT_CFG_H_\r
#define GPT_CFG_H_\r
#include "Std_Types.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef LINIF_CFG_H_\r
#define LINIF_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "LinIf_Cfg.h"\r
#include "Lin_Cfg.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef LINSM_CFG_H_\r
#define LINSM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "LinSM_Cfg.h"\r
#include "LinIf_Cfg.h"\r
#include "Lin_Cfg.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef LIN_CFG_H_\r
#define LIN_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Mcu.h"\r
#include "Lin.h"\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Lin_Cfg.h"\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MEMIF_CFG_H_\r
#define MEMIF_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define PDUR_MODULE_ID 51\r
#define PDUR_INSTANCE_ID 0\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#define PDUR_ZERO_COST_OPERATION STD_ON\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
/*\r
* Port_Cfg.c\r
*\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef PORT_CFG_H_\r
#define PORT_CFG_H_\r
\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef PWM_CFG_H_\r
#define PWM_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef SPI_CFG_H_\r
#define SPI_CFG_H_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#include "Spi.h"\r
#include "Spi_Cfg.h"\r
#include <stdlib.h>\r
\r
\r
/* MPC55xx Reset Control Word(RCW) */\r
-rcw(R) : ORIGIN = 0x00000000, LENGTH = 0x8\r
+rcw : ORIGIN = 0x00000000, LENGTH = 0x8\r
flash(R) : ORIGIN = 0x00000008, LENGTH = 2M\r
/* 5516S, 48K\r
* 5517S,5516G,5516E, 64K RAM\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
\r
\r
\r
\r
+#warning "This default file may only be used as an example!"\r
+\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
\r
\r
/* MPC55xx Reset Control Word(RCW) */\r
-rcw(R) : ORIGIN = 0x00000000, LENGTH = 0x8\r
+rcw : ORIGIN = 0x00000000, LENGTH = 0x8\r
flash(R) : ORIGIN = 0x00000008, LENGTH = 0x100000\r
/* 5516S, 48K\r
* 5517S,5516G,5516E, 64K RAM\r
\r
int write( int fd, const void *_buf, size_t nbytes)\r
{\r
- char *buf = (char *)_buf;\r
//(void)fd; // Normally 0- ?, 1-stdout, 2-stderr,\r
// Added 3-ramlog,\r
\r
#ifdef USE_TTY_WINIDEA\r
if (g_TConn)\r
{\r
+ char *buf = (char *)_buf;\r
unsigned char nCnt,nLen;\r
for(nCnt=0; nCnt<nbytes; nCnt++)\r
{\r
#endif\r
\r
#ifdef USE_TTY_T32\r
+ char *buf = (char *)_buf;\r
for (int i = 0; i < nbytes; i++) {\r
if (*(buf + i) == '\n') {\r
t32_writebyte ('\r');\r
#endif\r
\r
#ifdef USE_TTY_ARM_ITM\r
+ char *buf = (char *)_buf;\r
for (int i = 0; i < nbytes; i++) {\r
ITM_SendChar(*(buf + i));\r
}\r
#endif\r
\r
#if defined(USE_RAMLOG)\r
+ char *buf = (char *)_buf;\r
for (int i = 0; i < nbytes; i++) {\r
ramlog_chr (*(buf + i));\r
}\r
#if defined(USE_RAMLOG)\r
/* RAMLOG support */\r
if(fd == FILE_RAMLOG) {\r
+ char *buf = (char *)_buf;\r
for (int i = 0; i < nbytes; i++) {\r
ramlog_chr (*(buf + i));\r
}\r
-/*
- * Copyright ArcCore AB
- *
- * A simple implementation of all formatted xxprintf functionallity.
- *
- * DESIGN CRITERIA:
- * - Reentrant
- * - Use little stack
- *
- * What you normally would do is to print to a buffer of some kind and then
- * call write(). However little stack indicates that we can't place buffers
- * on the stack and reentrant tells us that we can't have a static buffer.
- * That leaves us with printing characters as it is ready. From a speed
- * point of view that is less than optimal, but that the way it's got to be.
- * (Could make a 16 long char buffer??)
- *
- * This is just intended to be used as a replacement for newlibs implementation.
- * Newlib porting interface have the following API:
- * int write( int fd, char *buf, int nbytes)
- *
- *
- * Note that puts(), putc() are still the newlib variants....
- *
- * printf() -> vfprintf(stdout,) -> vsnprintf(buf,)
- * write()
- * vprintf() -> vfprintf(stdout,) -> vsnprintf(buf,)
- * write()
- * sprintf(buf,) -> vsnprintf(buf,)
- * snprintf(buf,) -> vsnprintf(buf,)
- *
- * IMPLEMENTATION NOTE:
- * If printing more than the limit, e.g. using vsnprintf() then
- * the emit function will only stop printing, but not interrupted
- * (The code will get more complicated that way)
- */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-
-//#define HOST_TEST 1
-
-#ifdef HOST_TEST
-#define _STDOUT stdout
-#define _STDIN stdin
-#define _STDERR stderr
-#else
-#define _STDOUT (FILE *)STDOUT_FILENO
-#define _STDINT STDIN_FILENO
-#define _STDERR (FILE *)STDERR_FILENO
-#endif
-
-
-int arc_putchar(int fd, int c);
-int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap);
-
-int printf(const char *format, ...) {
- va_list ap;
- int rv;
-
- va_start(ap, format);
- rv = vfprintf(_STDOUT, format, ap);
- va_end(ap);
- return rv;
-}
-
-int fprintf(FILE *file, const char *format, ...) {
- va_list ap;
- int rv;
-
- va_start(ap, format);
- rv = vfprintf(file, format, ap);
- va_end(ap);
- return rv;
-}
-
-int sprintf(char *buffer, const char *format, ...) {
- va_list ap;
- int rv;
-
- va_start(ap, format);
- rv = vsnprintf(buffer, ~(size_t)0, format, ap);
- va_end(ap);
-
- return rv;
-}
-
-int snprintf(char *buffer, size_t n, const char *format, ...) {
- va_list ap;
- int rv;
-
- va_start(ap, format);
- rv = vsnprintf(buffer, n, format, ap);
- va_end(ap);
- return rv;
-}
-
-int vprintf(const char *format, va_list ap) {
- return vfprintf(_STDOUT, format, ap);
-}
-
-int vsprintf(char *buffer, const char *format, va_list ap) {
- return vsnprintf(buffer, ~(size_t)0, format, ap);
-}
-
-int vfprintf(FILE *file, const char *format, va_list ap) {
- int rv;
- /* Just print to _STDOUT */
- rv = print(file,NULL,~(size_t)0, format,ap);
- return rv;
-}
-
-
-int vsnprintf(char *buffer, size_t n, const char *format, va_list ap) {
- int rv;
-
- rv = print(NULL, &buffer, n, format,ap);
- return rv;
-}
-
-
-/*
- * The integer only counterpart
- */
-int iprintf(const char *format, ...) __attribute__ ((alias("printf")));
-int fiprintf(FILE *file, const char *format, ...) __attribute__ ((alias("fprintf")));
-int siprintf(char *buffer, const char *format, ...) __attribute__ ((alias("sprintf")));
-int sniprintf(char *buffer, size_t n, const char *format, ...) __attribute__ ((alias("snprintf")));
-int viprintf(const char *format, va_list ap) __attribute__ ((alias("vprintf")));
-int vsiprintf(char *buffer, const char *format, va_list ap) __attribute__ ((alias("vsprintf")));
-int vfiprintf(FILE *file, const char *format, va_list ap) __attribute__ ((alias("vfprintf")));
-
-/**
- *
- * @param file The file to print to
- * @param buf The buffer to print to
- * @param c The char to print
- * @return
- */
-static inline int emitChar( FILE *file, char **buf, char c, int *left ) {
- if( (*left) == 1 ) {
- return 1;
- }
- --(*left);
- if( buf == NULL ) {
-#if HOST_TEST
- putc(c, _STDOUT);
- fflush(_STDOUT);
-#else
- arc_putchar((int)file, c);
-#endif
- } else {
- **buf = c;
- (*buf)++;
- }
- return 1;
-}
-
-
-#if defined(HOST_TEST)
-/**
- * Convert a number to a string
- *
- * @param val The value to convert
- * @param str Pointer to a space where to put the string
- * @param base The base
- * @param negative If negative or not.
- */
-void xtoa( unsigned long val, char* str, int base, int negative) {
- int i;
- char *oStr = str;
- char c;
-
- if (negative) {
- val = -val;
- }
-
- if( base < 10 && base > 16 ) {
- *str = '0';
- return;
- }
- i = 0;
-
- do {
- str[i++] = "0123456789abcdef"[ val % base ];
- } while ((val /= base) > 0);
-
-
- if (negative) {
- str[i++] = '-';
- }
-
- str[i] = '\0';
- str = &str[i]-1;
- while(str > oStr) {
- c = *str;
- *str-- = *oStr;
- *oStr++=c;
- }
-}
-#else
-extern void xtoa( unsigned long val, char* str, int base, int negative);
-#endif
-
-
-#define FL_NONE (0<<0)
-#define FL_ZERO (1<<1)
-#define FL_HASH (1<<2)
-#define FL_SPACE (1<<3)
-#define FL_ALIGN_LEFT (1<<4)
-#define FL_TYPE_SIGNED_INT (1<<5)
-#define FL_TYPE_UNSIGNED_INT (1<<6)
-
-
-static void emitString( FILE *file, char **buffer, char *string, int width, int flags, int *left) {
- char pad;
- char *str = string;
- int i;
- int strLen;
- /* padding: FL_ZERO or normal ' '
- * align: FL_ALIGN_LEFT (left) or normal (right)
- */
- pad = (flags & FL_ZERO) ? '0' : ' ';
-
-
- if( flags & FL_ALIGN_LEFT ) {
- for(i=0;str[i]; i++) {
- emitChar(file,buffer,str[i],left);
- }
-
- /* Pad the rest */
- for(;i<width;i++) {
- emitChar(file,buffer,pad,left);
- }
- } else {
-
- strLen = strlen(string);
-
- /* Pad first */
- if( width > strLen ) {
- for(i=0;i<(width-strLen);i++) {
- emitChar(file,buffer,pad,left);
- }
- }
-
- for(i=0;i<strLen; i++) {
- emitChar(file,buffer,string[i],left);
- }
- }
-}
-
-void emitInt( FILE *file, char **buffer, int val, int base, int width, int flags, int *left )
-{
- char lBuf[12]; // longest is base 10, 2^32
- char *str = lBuf;
-
- if( flags & FL_TYPE_SIGNED_INT ) {
- xtoa(val,str,base ,(val < 0));
- } else {
- xtoa((unsigned)val,str,base ,0);
- }
-
- emitString(file,buffer,str,width,flags,left);
-}
-
-#define PRINT_CHAR(_c) *buffer++= (_c);
-
-
-/**
- * Write formatted output to an array with a maximum number of characters.
- *
- * This is the mother of the formatted print family. The main goal here
- * is to be very small and memory efficient.
- *
- * Support:
- * Parameter: None
- * Flags : '-' and '0'
- * Width : Normal padding is supported, '*' is not.
- * Precision: None
- * Length : None
- * C99 : None
- * Type : d,u,x,s,and c
- *
- * @param file The file descriptor
- * @param buffer A pointer to the place to store the output
- * If NULL the output is instead
- * @param n The maximum number of characters to write
- * @param format The format string
- * @param ap The va list
- * @return
- */
-int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap)
-{
- char ch;
- int flags;
- char *str;
- int width;
- int left = n;
-
- while ( (ch = *format++) ) {
-
- if (ch == '%') {
- ch = *format++;
-
- if( ch == '%') {
- emitChar(file,buffer,ch,&left);
- continue;
- }
-
- /* Find flags */
- switch (ch) {
- case '0':
- flags = FL_ZERO;
- break;
- case ' ':
- flags = FL_SPACE;
- break;
- case '-':
- flags = FL_ALIGN_LEFT;
- break;
- default:
- /* Not supported or no flag */
- flags = FL_NONE;
- format--;
- break;
- }
-
- ch = *format++;
-
- /* Width */
- if( (ch >= '0') && (ch <= '9') ) {
- width = ch -'0';
- ch = *format++;
- } else {
- width = 0;
- }
-
- /* Find type */
- switch (ch) {
- case 'c':
- emitChar(file,buffer,(char )va_arg( ap, int ),&left);
- break;
- case 'd':
- flags |= FL_TYPE_SIGNED_INT;
- emitInt(file,buffer,va_arg( ap, int ),10,width,flags,&left);
- break;
- case 'u':
- flags |= FL_TYPE_UNSIGNED_INT;
- emitInt(file,buffer,va_arg( ap, int ),10,width,flags,&left);
- break;
- case 'x':
- flags |= FL_TYPE_UNSIGNED_INT;
- emitInt(file,buffer,va_arg( ap, int ),16,width,flags,&left);
- break;
- case 's':
- str = (char *)va_arg( ap, int );
-
- if( str == NULL ) {
- str = "(null)";
- }
-
- emitString(file,buffer,str,width,flags,&left);
- break;
- default:
- assert(0); // oops
- break;
- }
-
- } else {
- flags = FL_NONE;
- emitChar(file,buffer,ch,&left);
- }
- }
-// va_end(ap); // Removed, TODO: Check the va_start/va_end handling (used in calling functions also).
- if(buffer!=0) {
- left = 0;
- emitChar(file,buffer,'\0',&left);
- }
- return 0; // Wrong.. but for now.
-}
-
-#if defined(HOST_TEST)
-int main(void) {
- char *ptr = NULL;
- char buff[30];
-
- printf("char: %c %c = a B\n", 'a', 66);
-
- printf("string: %s = (null)\n", (char *)ptr);
-
- printf("string: %s = foobar \n", "foobar");
-
- printf("string: %2s = foobar \n", "foobar");
- printf("string: \"%8s\" = \" foobar\" \n", "foobar");
- /* Left justify */
- printf("string: \"%-8s\" = \"foobar \" \n", "foobar");
-
- printf("decimal: 23 = %d \n", 23);
- printf("hex: c23 = %x \n", 0xc23);
- printf("hex: 0c23 = %04x \n", 0xc23);
- printf("decimal with blanks: 23 = %6d \n", 23);
- printf("decimal with zero: 000023 = %06d \n", 23);
-
- /* negative and large numbers */
- printf("decimal: -23 = %d \n", -23);
- printf("decimal: 4294967273 = %u \n", -23);
- printf("decimal: c0000000 = %x \n", 0xc0000000);
-
- printf("decimal: 00c000 = %06x \n", 0xc000);
-
- fprintf(_STDOUT, "string: %s = foobar \n", "foobar");
- sprintf(buff, "string: %s = foobar \n", "foobar");
- printf("%s",buff);
-
- snprintf(buff,10, "%s\n", "12345678901234567");
- printf("\"123456789\" = \"%s\"\n",buff);
-
- snprintf(buff,12, "%s\n", "abcdefghijklmn");
- printf("\"abcdefghijkl\" = \"%s\"\n",buff);
-
- return 0;
-}
-#endif
-
-
+/*\r
+ * Copyright ArcCore AB\r
+ *\r
+ * A simple implementation of all formatted xxprintf functionallity.\r
+ *\r
+ * DESIGN CRITERIA:\r
+ * - Reentrant\r
+ * - Use little stack\r
+ *\r
+ * What you normally would do is to print to a buffer of some kind and then\r
+ * call write(). However little stack indicates that we can't place buffers\r
+ * on the stack and reentrant tells us that we can't have a static buffer.\r
+ * That leaves us with printing characters as it is ready. From a speed\r
+ * point of view that is less than optimal, but that the way it's got to be.\r
+ * (Could make a 16 long char buffer??)\r
+ *\r
+ * This is just intended to be used as a replacement for newlibs implementation.\r
+ * Newlib porting interface have the following API:\r
+ * int write( int fd, char *buf, int nbytes)\r
+ *\r
+ *\r
+ * Note that puts(), putc() are still the newlib variants....\r
+ *\r
+ * printf() -> vfprintf(stdout,) -> vsnprintf(buf,)\r
+ * write()\r
+ * vprintf() -> vfprintf(stdout,) -> vsnprintf(buf,)\r
+ * write()\r
+ * sprintf(buf,) -> vsnprintf(buf,)\r
+ * snprintf(buf,) -> vsnprintf(buf,)\r
+ *\r
+ * IMPLEMENTATION NOTE:\r
+ * If printing more than the limit, e.g. using vsnprintf() then\r
+ * the emit function will only stop printing, but not interrupted\r
+ * (The code will get more complicated that way)\r
+ */\r
+\r
+#include <unistd.h>\r
+#include <stdio.h>\r
+#include <stdarg.h>\r
+#include <assert.h>\r
+#include <string.h>\r
+\r
+//#define HOST_TEST 1\r
+\r
+#ifdef HOST_TEST\r
+#define _STDOUT stdout\r
+#define _STDIN stdin\r
+#define _STDERR stderr\r
+#else\r
+#define _STDOUT (FILE *)STDOUT_FILENO\r
+#define _STDINT STDIN_FILENO\r
+#define _STDERR (FILE *)STDERR_FILENO\r
+#endif\r
+\r
+\r
+int arc_putchar(int fd, int c);\r
+int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap);\r
+\r
+int printf(const char *format, ...) {\r
+ va_list ap;\r
+ int rv;\r
+\r
+ va_start(ap, format);\r
+ rv = vfprintf(_STDOUT, format, ap);\r
+ va_end(ap);\r
+ return rv;\r
+}\r
+\r
+int fprintf(FILE *file, const char *format, ...) {\r
+ va_list ap;\r
+ int rv;\r
+\r
+ va_start(ap, format);\r
+ rv = vfprintf(file, format, ap);\r
+ va_end(ap);\r
+ return rv;\r
+}\r
+\r
+int sprintf(char *buffer, const char *format, ...) {\r
+ va_list ap;\r
+ int rv;\r
+\r
+ va_start(ap, format);\r
+ rv = vsnprintf(buffer, ~(size_t)0, format, ap);\r
+ va_end(ap);\r
+\r
+ return rv;\r
+}\r
+\r
+int snprintf(char *buffer, size_t n, const char *format, ...) {\r
+ va_list ap;\r
+ int rv;\r
+\r
+ va_start(ap, format);\r
+ rv = vsnprintf(buffer, n, format, ap);\r
+ va_end(ap);\r
+ return rv;\r
+}\r
+\r
+int vprintf(const char *format, va_list ap) {\r
+ return vfprintf(_STDOUT, format, ap);\r
+}\r
+\r
+int vsprintf(char *buffer, const char *format, va_list ap) {\r
+ return vsnprintf(buffer, ~(size_t)0, format, ap);\r
+}\r
+\r
+int vfprintf(FILE *file, const char *format, va_list ap) {\r
+ int rv;\r
+ /* Just print to _STDOUT */\r
+ rv = print(file,NULL,~(size_t)0, format,ap);\r
+ return rv;\r
+}\r
+\r
+\r
+int vsnprintf(char *buffer, size_t n, const char *format, va_list ap) {\r
+ int rv;\r
+\r
+ rv = print(NULL, &buffer, n, format,ap);\r
+ return rv;\r
+}\r
+\r
+\r
+/*\r
+ * The integer only counterpart\r
+ */\r
+int iprintf(const char *format, ...) __attribute__ ((alias("printf")));\r
+int fiprintf(FILE *file, const char *format, ...) __attribute__ ((alias("fprintf")));\r
+int siprintf(char *buffer, const char *format, ...) __attribute__ ((alias("sprintf")));\r
+int sniprintf(char *buffer, size_t n, const char *format, ...) __attribute__ ((alias("snprintf")));\r
+int viprintf(const char *format, va_list ap) __attribute__ ((alias("vprintf")));\r
+int vsiprintf(char *buffer, const char *format, va_list ap) __attribute__ ((alias("vsprintf")));\r
+int vfiprintf(FILE *file, const char *format, va_list ap) __attribute__ ((alias("vfprintf")));\r
+\r
+/**\r
+ *\r
+ * @param file The file to print to\r
+ * @param buf The buffer to print to\r
+ * @param c The char to print\r
+ * @return\r
+ */\r
+static inline int emitChar( FILE *file, char **buf, char c, int *left ) {\r
+ if( (*left) == 1 ) {\r
+ return 1;\r
+ }\r
+ --(*left);\r
+ if( buf == NULL ) {\r
+#if HOST_TEST\r
+ putc(c, _STDOUT);\r
+ fflush(_STDOUT);\r
+#else\r
+ arc_putchar((int)file, c);\r
+#endif\r
+ } else {\r
+ **buf = c;\r
+ (*buf)++;\r
+ }\r
+ return 1;\r
+}\r
+\r
+\r
+#if defined(HOST_TEST)\r
+/**\r
+ * Convert a number to a string\r
+ *\r
+ * @param val The value to convert\r
+ * @param str Pointer to a space where to put the string\r
+ * @param base The base\r
+ * @param negative If negative or not.\r
+ */\r
+void xtoa( unsigned long val, char* str, int base, int negative) {\r
+ int i;\r
+ char *oStr = str;\r
+ char c;\r
+\r
+ if (negative) {\r
+ val = -val;\r
+ }\r
+\r
+ if( base < 10 && base > 16 ) {\r
+ *str = '0';\r
+ return;\r
+ }\r
+ i = 0;\r
+\r
+ do {\r
+ str[i++] = "0123456789abcdef"[ val % base ];\r
+ } while ((val /= base) > 0);\r
+\r
+\r
+ if (negative) {\r
+ str[i++] = '-';\r
+ }\r
+\r
+ str[i] = '\0';\r
+ str = &str[i]-1;\r
+ while(str > oStr) {\r
+ c = *str;\r
+ *str-- = *oStr;\r
+ *oStr++=c;\r
+ }\r
+}\r
+#else\r
+extern void xtoa( unsigned long val, char* str, int base, int negative);\r
+#endif\r
+\r
+\r
+#define FL_NONE (0<<0)\r
+#define FL_ZERO (1<<1)\r
+#define FL_HASH (1<<2)\r
+#define FL_SPACE (1<<3)\r
+#define FL_ALIGN_LEFT (1<<4)\r
+#define FL_TYPE_SIGNED_INT (1<<5)\r
+#define FL_TYPE_UNSIGNED_INT (1<<6)\r
+\r
+\r
+static void emitString( FILE *file, char **buffer, char *string, int width, int flags, int *left) {\r
+ char pad;\r
+ char *str = string;\r
+ int i;\r
+ int strLen;\r
+ /* padding: FL_ZERO or normal ' '\r
+ * align: FL_ALIGN_LEFT (left) or normal (right)\r
+ */\r
+ pad = (flags & FL_ZERO) ? '0' : ' ';\r
+\r
+\r
+ if( flags & FL_ALIGN_LEFT ) {\r
+ for(i=0;str[i]; i++) {\r
+ emitChar(file,buffer,str[i],left);\r
+ }\r
+\r
+ /* Pad the rest */\r
+ for(;i<width;i++) {\r
+ emitChar(file,buffer,pad,left);\r
+ }\r
+ } else {\r
+\r
+ strLen = strlen(string);\r
+\r
+ /* Pad first */\r
+ if( width > strLen ) {\r
+ for(i=0;i<(width-strLen);i++) {\r
+ emitChar(file,buffer,pad,left);\r
+ }\r
+ }\r
+\r
+ for(i=0;i<strLen; i++) {\r
+ emitChar(file,buffer,string[i],left);\r
+ }\r
+ }\r
+}\r
+\r
+void emitInt( FILE *file, char **buffer, int val, int base, int width, int flags, int *left )\r
+{\r
+ char lBuf[12]; // longest is base 10, 2^32\r
+ char *str = lBuf;\r
+\r
+ if( flags & FL_TYPE_SIGNED_INT ) {\r
+ xtoa(val,str,base ,(val < 0));\r
+ } else {\r
+ xtoa((unsigned)val,str,base ,0);\r
+ }\r
+\r
+ emitString(file,buffer,str,width,flags,left);\r
+}\r
+\r
+#define PRINT_CHAR(_c) *buffer++= (_c);\r
+\r
+\r
+/**\r
+ * Write formatted output to an array with a maximum number of characters.\r
+ *\r
+ * This is the mother of the formatted print family. The main goal here\r
+ * is to be very small and memory efficient.\r
+ *\r
+ * Support:\r
+ * Parameter: None\r
+ * Flags : '-' and '0'\r
+ * Width : Normal padding is supported, '*' is not.\r
+ * Precision: None\r
+ * Length : None\r
+ * C99 : None\r
+ * Type : d,u,x,s,and c\r
+ *\r
+ * @param file The file descriptor\r
+ * @param buffer A pointer to the place to store the output\r
+ * If NULL the output is instead\r
+ * @param n The maximum number of characters to write\r
+ * @param format The format string\r
+ * @param ap The va list\r
+ * @return\r
+ */\r
+int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap)\r
+{\r
+ char ch;\r
+ int flags;\r
+ char *str;\r
+ int width;\r
+ int left = n;\r
+\r
+ while ( (ch = *format++) ) {\r
+\r
+ if (ch == '%') {\r
+ ch = *format++;\r
+\r
+ if( ch == '%') {\r
+ emitChar(file,buffer,ch,&left);\r
+ continue;\r
+ }\r
+\r
+ /* Find flags */\r
+ switch (ch) {\r
+ case '0':\r
+ flags = FL_ZERO;\r
+ break;\r
+ case ' ':\r
+ flags = FL_SPACE;\r
+ break;\r
+ case '-':\r
+ flags = FL_ALIGN_LEFT;\r
+ break;\r
+ default:\r
+ /* Not supported or no flag */\r
+ flags = FL_NONE;\r
+ format--;\r
+ break;\r
+ }\r
+\r
+ ch = *format++;\r
+\r
+ /* Width */\r
+ if( (ch >= '0') && (ch <= '9') ) {\r
+ width = ch -'0';\r
+ ch = *format++;\r
+ } else {\r
+ width = 0;\r
+ }\r
+\r
+ /* Find type */\r
+ switch (ch) {\r
+ case 'c':\r
+ emitChar(file,buffer,(char )va_arg( ap, int ),&left);\r
+ break;\r
+ case 'd':\r
+ flags |= FL_TYPE_SIGNED_INT;\r
+ emitInt(file,buffer,va_arg( ap, int ),10,width,flags,&left);\r
+ break;\r
+ case 'u':\r
+ flags |= FL_TYPE_UNSIGNED_INT;\r
+ emitInt(file,buffer,va_arg( ap, int ),10,width,flags,&left);\r
+ break;\r
+ case 'x':\r
+ flags |= FL_TYPE_UNSIGNED_INT;\r
+ emitInt(file,buffer,va_arg( ap, int ),16,width,flags,&left);\r
+ break;\r
+ case 's':\r
+ str = (char *)va_arg( ap, int );\r
+\r
+ if( str == NULL ) {\r
+ str = "(null)";\r
+ }\r
+\r
+ emitString(file,buffer,str,width,flags,&left);\r
+ break;\r
+ default:\r
+ assert(0); // oops\r
+ break;\r
+ }\r
+\r
+ } else {\r
+ flags = FL_NONE;\r
+ emitChar(file,buffer,ch,&left);\r
+ }\r
+ }\r
+// va_end(ap); // Removed, TODO: Check the va_start/va_end handling (used in calling functions also).\r
+ if(buffer!=0) {\r
+ left = 0;\r
+ emitChar(file,buffer,'\0',&left);\r
+ }\r
+ return 0; // Wrong.. but for now.\r
+}\r
+\r
+#if defined(HOST_TEST)\r
+int main(void) {\r
+ char *ptr = NULL;\r
+ char buff[30];\r
+\r
+ printf("char: %c %c = a B\n", 'a', 66);\r
+\r
+ printf("string: %s = (null)\n", (char *)ptr);\r
+\r
+ printf("string: %s = foobar \n", "foobar");\r
+\r
+ printf("string: %2s = foobar \n", "foobar");\r
+ printf("string: \"%8s\" = \" foobar\" \n", "foobar");\r
+ /* Left justify */\r
+ printf("string: \"%-8s\" = \"foobar \" \n", "foobar");\r
+\r
+ printf("decimal: 23 = %d \n", 23);\r
+ printf("hex: c23 = %x \n", 0xc23);\r
+ printf("hex: 0c23 = %04x \n", 0xc23);\r
+ printf("decimal with blanks: 23 = %6d \n", 23);\r
+ printf("decimal with zero: 000023 = %06d \n", 23);\r
+\r
+ /* negative and large numbers */\r
+ printf("decimal: -23 = %d \n", -23);\r
+ printf("decimal: 4294967273 = %u \n", -23);\r
+ printf("decimal: c0000000 = %x \n", 0xc0000000);\r
+\r
+ printf("decimal: 00c000 = %06x \n", 0xc000);\r
+\r
+ fprintf(_STDOUT, "string: %s = foobar \n", "foobar");\r
+ sprintf(buff, "string: %s = foobar \n", "foobar");\r
+ printf("%s",buff);\r
+\r
+ snprintf(buff,10, "%s\n", "12345678901234567");\r
+ printf("\"123456789\" = \"%s\"\n",buff);\r
+\r
+ snprintf(buff,12, "%s\n", "abcdefghijklmn");\r
+ printf("\"abcdefghijkl\" = \"%s\"\n",buff);\r
+\r
+ return 0;\r
+}\r
+#endif\r
+\r
+\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+/* Globally fulfilled requirements */\r
+/** @req CANNM081 */\r
+/** @req CANNM044 */\r
+/** @req CANNM050 */\r
+/** @req CANNM088 */\r
+/** @req CANNM089 */\r
+/** @req CANNM090 */\r
+/** @req CANNM093 */\r
+/** @req CANNM206 */\r
+/** @req CANNM125 */\r
+/** @req CANNM140 */\r
+/** @req CANNM142 */\r
+/** @req CANNM145 */\r
+/** @req CANNM146 */\r
+/** @req CANNM039 */\r
+/** @req CANNM001.mandatory */\r
+/** @req CANNM158 */\r
+/** @req CANNM161 */\r
+/** @req CANNM162 */\r
+/** @req CANNM086 */\r
+/** @req CANNM019 */\r
+/** @req CANNM189 */\r
+/** @req CANNM190 */\r
+/** @req CANNM191 */\r
+/** @req CANNM016 */\r
+/** @req CANNM195 */\r
+/** @req CANNM197.toolchain */\r
+/** @req CANNM198.toolchain */\r
+/** @req CANNM026 */\r
+/** @req CANNM201 */\r
\r
#if (CANNM_DEV_ERROR_DETECT == STD_ON)\r
#include "Det.h"\r
#endif\r
+#if defined(USE_DEM)\r
+#include "Dem.h"\r
+#endif\r
#include "ComStack_Types.h"\r
#include "CanNm.h"\r
#include "CanNm_Internal.h"\r
#include "Nm_Cbk.h"\r
#include "NmStack_Types.h"\r
#include "MemMap.h"\r
+\r
+/** @req CANNM083 */\r
#include "CanIf.h"\r
#include "Nm.h"\r
\r
};\r
\r
/** Initialize the complete CanNm module, i.e. all channels which are activated */\r
+/** @req CANNM041 */\r
void CanNm_Init( const CanNm_ConfigType * const cannmConfigPtr ){\r
CANNM_VALIDATE_NOTNULL(cannmConfigPtr, CANNM_SERVICEID_INIT);\r
\r
- CanNm_ConfigPtr = cannmConfigPtr;\r
+ CanNm_ConfigPtr = cannmConfigPtr; /**< @req CANNM060 */\r
\r
int channel;\r
for (channel = 0; channel < CANNM_CHANNEL_COUNT; channel++) {\r
const CanNm_ChannelType* ChannelConf = &CanNm_ConfigPtr->Channels[channel];\r
CanNm_Internal_ChannelType* ChannelInternal = &CanNm_Internal.Channels[channel];\r
- if (ChannelConf->Active) {\r
- ChannelInternal->Mode = NM_MODE_BUS_SLEEP;\r
- ChannelInternal->State = NM_STATE_BUS_SLEEP;\r
- ChannelInternal->Requested = FALSE;\r
+ if (ChannelConf->Active) { /**< @req CANNM204 */\r
+ ChannelInternal->Mode = NM_MODE_BUS_SLEEP; /**< @req CANNM144 */\r
+ ChannelInternal->State = NM_STATE_BUS_SLEEP; /**< @req CANNM141 */\r
+ ChannelInternal->Requested = FALSE; /**< @req CANNM143 */\r
\r
+ /** @req CANNM085 */\r
memset(ChannelInternal->TxMessageSdu, 0x00, 8);\r
memset(ChannelInternal->RxMessageSdu, 0x00, 8);\r
\r
+ /** @req CANNM025 */\r
+ uint8* destUserData = CanNm_Internal_GetUserDataPtr(ChannelConf, ChannelInternal->TxMessageSdu);\r
+ uint8 userDataLength = CanNm_Internal_GetUserDataLength(ChannelConf);\r
+ memset(destUserData, 0xFF, userDataLength);\r
+\r
#if (CANNM_NODE_ID_ENABLED == STD_ON)\r
+ /** @req CANNM013 */\r
if (ChannelConf->NidPosition != CANNM_PDU_OFF) {\r
ChannelInternal->TxMessageSdu[ChannelConf->NidPosition] = ChannelConf->NodeId;\r
}\r
}\r
\r
CanNm_Internal.InitStatus = CANNM_INIT;\r
+\r
+ /** @req CANNM061 */\r
+ /** @req CANNM033 */\r
}\r
\r
/** Passive startup of the AUTOSAR CAN NM. It triggers the transition from Bus-\r
CanNm_Internal_ChannelType* ChannelInternal = &CanNm_Internal.Channels[nmChannelHandle];\r
\r
if (ChannelInternal->Mode == NM_MODE_BUS_SLEEP) {\r
- CanNm_Internal_BusSleep_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_BusSleep_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM128 @req CANNM095.3 */\r
return NM_E_OK;\r
} else {\r
- return NM_E_NOT_EXECUTED;\r
+ return NM_E_NOT_EXECUTED; /**< @req CANNM147 */\r
}\r
}\r
\r
const CanNm_ChannelType* ChannelConf = &CanNm_ConfigPtr->Channels[nmChannelHandle];\r
CanNm_Internal_ChannelType* ChannelInternal = &CanNm_Internal.Channels[nmChannelHandle];\r
\r
- ChannelInternal->Requested = TRUE;\r
+ ChannelInternal->Requested = TRUE; /**< @req CANNM104 */\r
\r
if (ChannelInternal->Mode == NM_MODE_BUS_SLEEP) {\r
- CanNm_Internal_BusSleep_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_BusSleep_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM129 @req CANNM095.1 */\r
} else if (ChannelInternal->Mode == NM_MODE_PREPARE_BUS_SLEEP) {\r
- CanNm_Internal_PrepareBusSleep_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_PrepareBusSleep_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM123 @req CANNM095.2 */\r
} else if (ChannelInternal->Mode == NM_MODE_NETWORK) {\r
if (ChannelInternal->State == NM_STATE_READY_SLEEP) {\r
- CanNm_Internal_ReadySleep_to_NormalOperation(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_ReadySleep_to_NormalOperation(ChannelConf, ChannelInternal); /**< @req CANNM110 */\r
}\r
}\r
return NM_E_OK;\r
const CanNm_ChannelType* ChannelConf = &CanNm_ConfigPtr->Channels[nmChannelHandle];\r
CanNm_Internal_ChannelType* ChannelInternal = &CanNm_Internal.Channels[nmChannelHandle];\r
\r
- ChannelInternal->Requested = FALSE;\r
+ ChannelInternal->Requested = FALSE; /**< @req CANNM105 */\r
\r
if (ChannelInternal->Mode == NM_MODE_NETWORK) {\r
if (ChannelInternal->State == NM_STATE_NORMAL_OPERATION) {\r
- CanNm_Internal_NormalOperation_to_ReadySleep(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_NormalOperation_to_ReadySleep(ChannelConf, ChannelInternal); /**< @req CANNM118 */\r
}\r
}\r
return NM_E_OK;\r
return NM_E_NOT_OK;\r
}\r
\r
+#if (CANNM_USER_DATA_ENABLED == STD_ON) /**< @req CANNM053.1 */\r
/** Set user data for NM messages transmitted next on the bus. */\r
+/** @req CANNM159 @req CANNM015 */\r
Nm_ReturnType CanNm_SetUserData( const NetworkHandleType nmChannelHandle, const uint8* const nmUserDataPtr ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_SETUSERDATA, NM_E_NOT_OK);\r
CANNM_VALIDATE_CHANNEL(nmChannelHandle, CANNM_SERVICEID_SETUSERDATA, NM_E_NOT_OK);\r
\r
return NM_E_OK;\r
}\r
+#endif\r
\r
+#if (CANNM_USER_DATA_ENABLED == STD_ON) /**< @req CANNM053.2 */\r
/** Get user data out of the most recently received NM message. */\r
+/** @req CANNM160 @req CANNM031 */\r
Nm_ReturnType CanNm_GetUserData( const NetworkHandleType nmChannelHandle, uint8* const nmUserDataPtr ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_GETUSERDATA, NM_E_NOT_OK);\r
CANNM_VALIDATE_CHANNEL(nmChannelHandle, CANNM_SERVICEID_GETUSERDATA, NM_E_NOT_OK);\r
\r
return NM_E_OK;\r
}\r
+#endif\r
\r
#if (CANNM_NODE_ID_ENABLED == STD_ON)\r
/** Get node identifier out of the most recently received NM PDU. */\r
+/** @req CANNM132 */\r
Nm_ReturnType CanNm_GetNodeIdentifier( const NetworkHandleType nmChannelHandle, uint8 * const nmNodeIdPtr ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_GETNODEIDENTIFIER, NM_E_NOT_OK);\r
CANNM_VALIDATE_CHANNEL(nmChannelHandle, CANNM_SERVICEID_GETNODEIDENTIFIER, NM_E_NOT_OK);\r
}\r
\r
/** Get node identifier configured for the local node. */\r
+/** @req CANNM133 */\r
Nm_ReturnType CanNm_GetLocalNodeIdentifier( const NetworkHandleType nmChannelHandle, uint8 * const nmNodeIdPtr ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_GETLOCALNODEIDENTIFIER, NM_E_NOT_OK);\r
CANNM_VALIDATE_CHANNEL(nmChannelHandle, CANNM_SERVICEID_GETLOCALNODEIDENTIFIER, NM_E_NOT_OK);\r
\r
#if (CANNM_NODE_DETECTION_ENABLED == STD_ON)\r
/** Set Repeat Message Request Bit for NM messages transmitted next on the bus. */\r
+/** @req CANNM135 @req CANNM136 */\r
Nm_ReturnType CanNm_RepeatMessageRequest( const NetworkHandleType nmChannelHandle ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_REPEATMESSAGEREQUEST, NM_E_NOT_OK);\r
CANNM_VALIDATE_CHANNEL(nmChannelHandle, CANNM_SERVICEID_REPEATMESSAGEREQUEST, NM_E_NOT_OK);\r
\r
if (ChannelConf->CbvPosition != CANNM_PDU_OFF) {\r
if (ChannelInternal->State == NM_STATE_READY_SLEEP) {\r
- ChannelInternal->TxMessageSdu[ChannelConf->CbvPosition] = CANNM_CBV_REPEAT_MESSAGE_REQUEST;\r
- CanNm_Internal_ReadySleep_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ ChannelInternal->TxMessageSdu[ChannelConf->CbvPosition] = CANNM_CBV_REPEAT_MESSAGE_REQUEST; /**< @req CANNM113 */\r
+ CanNm_Internal_ReadySleep_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM112 */\r
+ return NM_E_OK;\r
} else if (ChannelInternal->State == NM_STATE_NORMAL_OPERATION) {\r
- ChannelInternal->TxMessageSdu[ChannelConf->CbvPosition] = CANNM_CBV_REPEAT_MESSAGE_REQUEST;\r
- CanNm_Internal_NormalOperation_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ ChannelInternal->TxMessageSdu[ChannelConf->CbvPosition] = CANNM_CBV_REPEAT_MESSAGE_REQUEST; /**< @req CANNM121 */\r
+ CanNm_Internal_NormalOperation_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM120 */\r
+ return NM_E_OK;\r
}\r
- return NM_E_OK;\r
- } else {\r
- return NM_E_NOT_EXECUTED;\r
}\r
+ return NM_E_NOT_EXECUTED; /**< @req CANNM137 */\r
}\r
#endif\r
\r
#if ((CANNM_NODE_ID_ENABLED == STD_ON) || (CANNM_NODE_DETECTION_ENABLED == STD_ON) || (CANNM_USER_DATA_ENABLED == STD_ON))\r
/** Get the whole PDU data out of the most recently received NM message. */\r
+/** @req CANNM138 @req CANNM139 */\r
Nm_ReturnType CanNm_GetPduData( const NetworkHandleType nmChannelHandle, uint8 * const nmPduDataPtr ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_GETPDUDATA, NM_E_NOT_OK);\r
CANNM_VALIDATE_CHANNEL(nmChannelHandle, CANNM_SERVICEID_GETPDUDATA, NM_E_NOT_OK);\r
#endif\r
\r
/** Returns the state and the mode of the network management. */\r
+/** @req CANNM091 */\r
Nm_ReturnType CanNm_GetState( const NetworkHandleType nmChannelHandle, Nm_StateType * const nmStatePtr, Nm_ModeType * const nmModePtr ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_GETSTATE, NM_E_NOT_OK);\r
CANNM_VALIDATE_CHANNEL(nmChannelHandle, CANNM_SERVICEID_GETSTATE, NM_E_NOT_OK);\r
\r
/** This service confirms a previous successfully processed CAN transmit request.\r
* This callback service is called by the CanIf and implemented by the CanNm. */\r
+/** @req CANNM034.deferred */\r
void CanNm_TxConfirmation( PduIdType canNmTxPduId ){\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_TXCONFIRMATION);\r
CANNM_VALIDATE_CHANNEL(canNmTxPduId, CANNM_SERVICEID_TXCONFIRMATION);\r
CanNm_Internal_ChannelType* ChannelInternal = &CanNm_Internal.Channels[canNmTxPduId];\r
\r
if (ChannelInternal->Mode == NM_MODE_NETWORK) {\r
- CanNm_Internal_NetworkMode_to_NetworkMode(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_NetworkMode_to_NetworkMode(ChannelConf, ChannelInternal); /**< @req CANNM099.1 */\r
}\r
}\r
\r
const CanNm_ChannelType* ChannelConf = &CanNm_ConfigPtr->Channels[canNmRxPduId];\r
CanNm_Internal_ChannelType* ChannelInternal = &CanNm_Internal.Channels[canNmRxPduId];\r
\r
- memcpy(ChannelInternal->RxMessageSdu, canSduPtr, ChannelConf->PduLength);\r
+ memcpy(ChannelInternal->RxMessageSdu, canSduPtr, ChannelConf->PduLength); /**< @req CANNM035 */\r
\r
boolean repeatMessageBitIndication = FALSE;\r
if (ChannelConf->CbvPosition != CANNM_PDU_OFF) {\r
}\r
\r
if (ChannelInternal->Mode == NM_MODE_BUS_SLEEP) {\r
- CanNm_Internal_BusSleep_to_BusSleep(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_BusSleep_to_BusSleep(ChannelConf, ChannelInternal); /**< @req CANNM127.2 */\r
} else if (ChannelInternal->Mode == NM_MODE_PREPARE_BUS_SLEEP) {\r
- CanNm_Internal_PrepareBusSleep_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_PrepareBusSleep_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM124 @req CANNM095.4 */\r
} else if (ChannelInternal->Mode == NM_MODE_NETWORK) {\r
- CanNm_Internal_NetworkMode_to_NetworkMode(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_NetworkMode_to_NetworkMode(ChannelConf, ChannelInternal); /**< @req CANNM098.1 */\r
if (repeatMessageBitIndication) {\r
if (ChannelInternal->State == NM_STATE_READY_SLEEP) {\r
- CanNm_Internal_ReadySleep_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_ReadySleep_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM111 */\r
} else if (ChannelInternal->State == NM_STATE_NORMAL_OPERATION) {\r
- CanNm_Internal_NormalOperation_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_NormalOperation_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM119 */\r
}\r
}\r
}\r
void CanNm_MainFunction( NetworkHandleType nmChannelHandle ) {\r
CANNM_VALIDATE_INIT(CANNM_SERVICEID_ARC_MAINFUNCTION);\r
\r
+ /** @req CANNM108 */\r
+\r
const CanNm_ChannelType* ChannelConf = &CanNm_ConfigPtr->Channels[nmChannelHandle];\r
CanNm_Internal_ChannelType* ChannelInternal = &CanNm_Internal.Channels[nmChannelHandle];\r
if (ChannelInternal->Mode == NM_MODE_NETWORK) {\r
CanNm_Internal_TickTimeoutTime(ChannelConf, ChannelInternal);\r
-#if (CANNM_PASSIVE_MODE_ENABLED != STD_ON)\r
+#if (CANNM_PASSIVE_MODE_ENABLED != STD_ON) /**< @req CANNM072 */\r
if ((ChannelInternal->State == NM_STATE_REPEAT_MESSAGE) ||\r
(ChannelInternal->State == NM_STATE_NORMAL_OPERATION)) {\r
+ /** @req CANNM051 @req CANNM032 @req CANNM087.1 @req CANNM100.6 */\r
CanNm_Internal_TickMessageCycleTime(ChannelConf, ChannelInternal);\r
}\r
#endif\r
if (ChannelInternal->State == NM_STATE_REPEAT_MESSAGE) {\r
- CanNm_Internal_TickRepeatMessageTime(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_TickRepeatMessageTime(ChannelConf, ChannelInternal); /**< @req CANNM102.2 */\r
}\r
} else if (ChannelInternal->Mode == NM_MODE_PREPARE_BUS_SLEEP) {\r
- CanNm_Internal_TickWaitBusSleepTime(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_TickWaitBusSleepTime(ChannelConf, ChannelInternal); /**< @req CANNM115.2 */\r
}\r
}\r
\r
if (ChannelConf->MainFunctionPeriod >= ChannelInternal->TimeoutTimeLeft) {\r
ChannelInternal->TimeoutTimeLeft = 0;\r
if (ChannelInternal->State == NM_STATE_REPEAT_MESSAGE) {\r
- CanNm_Internal_RepeatMessage_to_RepeatMessage(ChannelConf, ChannelInternal);\r
+#if defined(USE_DEM)\r
+ Dem_ReportErrorStatus(CANNM_E_NETWORK_TIMEOUT, DEM_EVENT_STATUS_FAILED);\r
+#endif\r
+ CanNm_Internal_RepeatMessage_to_RepeatMessage(ChannelConf, ChannelInternal); /**< @req CANNM101.1 */\r
} else if (ChannelInternal->State == NM_STATE_NORMAL_OPERATION) {\r
- CanNm_Internal_NormalOperation_to_NormalOperation(ChannelConf, ChannelInternal);\r
+#if defined(USE_DEM)\r
+ Dem_ReportErrorStatus(CANNM_E_NETWORK_TIMEOUT, DEM_EVENT_STATUS_FAILED);\r
+#endif\r
+ CanNm_Internal_NormalOperation_to_NormalOperation(ChannelConf, ChannelInternal); /**< @req CANNM117.1 */\r
} else if (ChannelInternal->State == NM_STATE_READY_SLEEP) {\r
- CanNm_Internal_ReadySleep_to_PrepareBusSleep(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_ReadySleep_to_PrepareBusSleep(ChannelConf, ChannelInternal); /**< @req CANNM109 */\r
}\r
} else {\r
ChannelInternal->TimeoutTimeLeft -= ChannelConf->MainFunctionPeriod;\r
}\r
}\r
\r
+/** @req CANNM102.1 */\r
static inline void CanNm_Internal_TickRepeatMessageTime( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
if (ChannelConf->MainFunctionPeriod >= ChannelInternal->RepeatMessageTimeLeft) {\r
ChannelInternal->RepeatMessageTimeLeft = 0;\r
if (ChannelInternal->State == NM_STATE_REPEAT_MESSAGE) {\r
if (ChannelInternal->Requested) {\r
- CanNm_Internal_RepeatMessage_to_NormalOperation(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_RepeatMessage_to_NormalOperation(ChannelConf, ChannelInternal); /**< @req CANNM103 */\r
} else {\r
- CanNm_Internal_RepeatMessage_to_ReadySleep(ChannelConf, ChannelInternal);\r
+ CanNm_Internal_RepeatMessage_to_ReadySleep(ChannelConf, ChannelInternal); /**< @req CANNM104 */\r
}\r
}\r
} else {\r
}\r
}\r
\r
+/** @req CANNM115.1 */\r
static inline void CanNm_Internal_TickWaitBusSleepTime( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
if (ChannelConf->MainFunctionPeriod >= ChannelInternal->WaitBusSleepTimeLeft) {\r
ChannelInternal->WaitBusSleepTimeLeft = 0;\r
ChannelInternal->MessageCycleTimeLeft = 0;\r
if ((ChannelInternal->State == NM_STATE_REPEAT_MESSAGE) ||\r
(ChannelInternal->State == NM_STATE_NORMAL_OPERATION)) {\r
- ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleTime;\r
+ ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleTime; /**< @req CANNM040 */\r
+ /** @req CANNM087.2 @req CANNM100.5 */\r
CanNm_Internal_TransmitMessage(ChannelConf, ChannelInternal);\r
}\r
} else {\r
static inline void CanNm_Internal_PrepareBusSleep_to_RepeatMessage( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_REPEAT_MESSAGE;\r
- ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime;\r
+ ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime; /**< @req CANNM096.1 */\r
ChannelInternal->RepeatMessageTimeLeft = ChannelConf->RepeatMessageTime;\r
- ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime;\r
+ ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime; /**< @req CANNM100.2 */\r
// Notify 'Network Mode'\r
- Nm_NetworkMode(ChannelConf->NmNetworkHandle);\r
+ Nm_NetworkMode(ChannelConf->NmNetworkHandle); /**< @req CANNM097.1 */\r
}\r
+\r
static inline void CanNm_Internal_PrepareBusSleep_to_BusSleep( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_BUS_SLEEP;\r
ChannelInternal->State = NM_STATE_BUS_SLEEP;\r
// Notify 'Bus-Sleep Mode'\r
- Nm_BusSleepMode(ChannelConf->NmNetworkHandle);\r
+ Nm_BusSleepMode(ChannelConf->NmNetworkHandle); /**< @req CANNM126 */\r
}\r
\r
static inline void CanNm_Internal_BusSleep_to_RepeatMessage( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_REPEAT_MESSAGE;\r
- ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime;\r
+ ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime; /**< @req CANNM096.2 */\r
ChannelInternal->RepeatMessageTimeLeft = ChannelConf->RepeatMessageTime;\r
- ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime;\r
+ ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime; /**< @req CANNM100.1 */\r
// Notify 'Network Mode'\r
- Nm_NetworkMode(ChannelConf->NmNetworkHandle);\r
+ Nm_NetworkMode(ChannelConf->NmNetworkHandle); /**< @req CANNM097.2 */\r
}\r
static inline void CanNm_Internal_BusSleep_to_BusSleep( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
// Notify 'Network Start'\r
- Nm_NetworkStartIndication(ChannelConf->NmNetworkHandle);\r
+ Nm_NetworkStartIndication(ChannelConf->NmNetworkHandle); /**< @req CANNM127.1 */\r
}\r
\r
static inline void CanNm_Internal_RepeatMessage_to_RepeatMessage( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
- ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime;\r
+ ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime; /**< @req CANNM101.2 */\r
// TODO: Notify 'Network Timeout'?\r
}\r
static inline void CanNm_Internal_RepeatMessage_to_ReadySleep( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_READY_SLEEP;\r
+#if (CANNM_NODE_DETECTION_ENABLED == STD_ON)\r
+ /** @req CANNM107.1 */\r
CanNm_Internal_ClearCbv(ChannelConf, ChannelInternal);\r
+#endif\r
}\r
static inline void CanNm_Internal_RepeatMessage_to_NormalOperation( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_NORMAL_OPERATION;\r
+#if (CANNM_NODE_DETECTION_ENABLED == STD_ON)\r
+ /** @req CANNM107.2 */\r
CanNm_Internal_ClearCbv(ChannelConf, ChannelInternal);\r
+#endif\r
}\r
\r
static inline void CanNm_Internal_NormalOperation_to_RepeatMessage( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_REPEAT_MESSAGE;\r
ChannelInternal->RepeatMessageTimeLeft = ChannelConf->RepeatMessageTime;\r
- ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime;\r
+ ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime; /**< @req CANNM100.3 */\r
}\r
static inline void CanNm_Internal_NormalOperation_to_ReadySleep( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_READY_SLEEP;\r
}\r
static inline void CanNm_Internal_NormalOperation_to_NormalOperation( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
- ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime;\r
+ ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime; /**< @req CANNM117.2 */\r
}\r
\r
static inline void CanNm_Internal_ReadySleep_to_NormalOperation( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_NORMAL_OPERATION;\r
- ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime;\r
+ ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime; /**< @req CANNM116 */\r
}\r
static inline void CanNm_Internal_ReadySleep_to_PrepareBusSleep( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_PREPARE_BUS_SLEEP;\r
ChannelInternal->State = NM_STATE_PREPARE_BUS_SLEEP;\r
ChannelInternal->WaitBusSleepTimeLeft = ChannelConf->WaitBusSleepTime;\r
// Notify 'Prepare Bus-Sleep Mode'\r
- Nm_PrepareBusSleepMode(ChannelConf->NmNetworkHandle);\r
+ Nm_PrepareBusSleepMode(ChannelConf->NmNetworkHandle); /**< @req CANNM114 */\r
}\r
static inline void CanNm_Internal_ReadySleep_to_RepeatMessage( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
ChannelInternal->Mode = NM_MODE_NETWORK;\r
ChannelInternal->State = NM_STATE_REPEAT_MESSAGE;\r
ChannelInternal->RepeatMessageTimeLeft = ChannelConf->RepeatMessageTime;\r
- ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime;\r
+ ChannelInternal->MessageCycleTimeLeft = ChannelConf->MessageCycleOffsetTime; /**< @req CANNM100.4 */\r
}\r
\r
static inline void CanNm_Internal_NetworkMode_to_NetworkMode( const CanNm_ChannelType* ChannelConf, CanNm_Internal_ChannelType* ChannelInternal ) {\r
- ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime;\r
+ ChannelInternal->TimeoutTimeLeft = ChannelConf->TimeoutTime; /**< @req CANNM098.2 @req CANNM099.2 */\r
}\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+/* Globally fulfilled requirements */\r
+/** @req CANSM069 */\r
+/** @req CANSM077 */\r
+/** @req CANSM076 */\r
+/** @req CANSM078 */\r
+/** @req CANSM079 */\r
+/** @req CANSM237 */\r
+/** @req CANSM156.bswbuilder */\r
+\r
#include "ComStack_Types.h"\r
-#include "CanSM.h"\r
-#include "ComM.h"\r
-#include "ComM_BusSM.h"\r
-#include "Det.h"\r
-#include "CanIf.h"\r
+#include "CanSM.h" /**< @req CANSM013 */\r
+#include "Com.h" /**< @req CANSM172 */\r
+#include "ComM.h" /**< @req CANSM174 */\r
+#include "ComM_BusSM.h" /**< @req CANSM191 */\r
+#include "Det.h" /**< @req CANSM015 */\r
+#if defined(USE_DEM)\r
+#include "Dem.h" /**< @req CANSM014 */\r
+#endif\r
+#include "CanIf.h" /**< @req CANSM017 */\r
#include "CanSM_Internal.h"\r
\r
static CanSM_InternalType CanSM_Internal = {\r
\r
static const CanSM_ConfigType* CanSM_Config;\r
\r
+/** @req CANSM217.exceptTranceiver */\r
void CanSM_Init( const CanSM_ConfigType* ConfigPtr ) {\r
- CANSM_VALIDATE_POINTER(ConfigPtr, CANSM_SERVICEID_INIT);\r
+ CANSM_VALIDATE_POINTER(ConfigPtr, CANSM_SERVICEID_INIT); /**< @req CANSM179 */\r
\r
CanSM_Config = ConfigPtr;\r
\r
for (int i = 0; i < CANSM_NETWORK_COUNT; ++i) {\r
- CanSM_Internal_RequestComMode(i, COMM_NO_COMMUNICATION);\r
+ CanSM_Internal_RequestComMode(i, COMM_NO_COMMUNICATION); /**< @req CANSM211 */\r
}\r
\r
CanSM_Internal.InitStatus = CANSM_STATUS_INIT;\r
CANSM_VALIDATE_INIT(CANSM_SERVICEID_GETVERSIONINFO);\r
}\r
\r
+/** @req CANSM181 @req CANSM183 @req CANSM182.partially @req CANSM184 */\r
Std_ReturnType CanSM_RequestComMode( NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode ) {\r
CANSM_VALIDATE_INIT(CANSM_SERVICEID_REQUESTCOMMODE, E_NOT_OK);\r
CANSM_VALIDATE_NETWORK(NetworkHandle, CANSM_SERVICEID_REQUESTCOMMODE, E_NOT_OK);\r
return CanSM_Internal_RequestComMode(NetworkHandle, ComM_Mode);\r
}\r
\r
+/** @req CANSM032.partially @req CANSM212 @req CANSM219.exceptTranceiver @req CANSM218.exceptTranceiver\r
+ * @req CANSM231 @req CANSM232 */\r
Std_ReturnType CanSM_Internal_RequestComMode( NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode ) {\r
CanSM_Internal_NetworkType* NetworkInternal = &CanSM_Internal.Networks[NetworkHandle];\r
NetworkInternal->RequestedMode = ComM_Mode;\r
\r
Std_ReturnType overallStatus = E_OK;\r
Std_ReturnType status;\r
- status = CanSM_Internal_RequestCanIfMode(NetworkHandle, ComM_Mode);\r
+ status = CanSM_Internal_RequestCanIfMode(NetworkHandle, ComM_Mode); /**< @req CANSM240 */\r
if (status > overallStatus) overallStatus = status;\r
- status = CanSM_Internal_RequestComGroupMode(NetworkHandle, ComM_Mode);\r
+ status = CanSM_Internal_RequestComGroupMode(NetworkHandle, ComM_Mode); /**< @req CANSM241 */\r
if (status > overallStatus) overallStatus = status;\r
\r
if (status == E_OK) {\r
NetworkInternal->CurrentMode = ComM_Mode;\r
- ComM_BusSM_ModeIndication(NetworkHandle, ComM_Mode);\r
+ ComM_BusSM_ModeIndication(NetworkHandle, ComM_Mode); /**< @req CANSM089 */\r
}\r
\r
return status;\r
}\r
\r
+/** @req CANSM039 @req CANSM044 */\r
Std_ReturnType CanSM_Internal_RequestCanIfMode( NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode ) {\r
const CanSM_NetworkType* Network = &CanSM_Config->Networks[NetworkHandle];\r
CanIf_ControllerModeType CanIf_Mode;\r
return totalStatus;\r
}\r
\r
+/** @req CANSM173 */\r
Std_ReturnType CanSM_Internal_RequestComGroupMode( NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode ) {\r
const CanSM_NetworkType* Network = &CanSM_Config->Networks[NetworkHandle];\r
\r
}\r
return E_OK;\r
}\r
+\r
+/** @req CANSM090 @req CANSM185 @req CANSM187 @req CANSM186 @req CANSM188 */\r
Std_ReturnType CanSM_GetCurrentComMode( NetworkHandleType NetworkHandle, ComM_ModeType* ComM_ModePtr ) {\r
CANSM_VALIDATE_INIT(CANSM_SERVICEID_GETCURRENTCOMMODE, E_NOT_OK);\r
CANSM_VALIDATE_NETWORK(NetworkHandle, CANSM_SERVICEID_GETCURRENTCOMMODE, E_NOT_OK);\r
\r
#include "CanSM.h"\r
\r
+/** @req CANSM027 @req CANSM028 @req CANSM071 */\r
#if (CANSM_DEV_ERROR_DETECT == STD_ON)\r
#define CANSM_DET_REPORTERROR(serviceId, errorId) \\r
Det_ReportError(MODULE_ID_CANSM, 0, serviceId, errorId)\r
* TBD.\r
*/\r
\r
+/*\r
+ * General requirements\r
+ */\r
+/** @req CANTP156.Partially */\r
/** @req CANTP150 */\r
/** @req CANTP151 */\r
/** @req CANTP152 */\r
/** @req CANTP003 */\r
/** @req CANTP216 */\r
\r
-#include "CanTp.h" /** @req CANTP156 */ /** @req CANTP219 */\r
-#include "CanTp_Cbk.h" /** @req CANTP156 *//** @req CANTP233 */\r
+#include "CanTp.h" /** @req CANTP219 */\r
+#include "CanTp_Cbk.h" /** @req CANTP233 */\r
#include "Det.h"\r
#include "CanIf.h"\r
-#include "SchM_CanTp.h" /** @req CANTP156 */\r
+#include "SchM_CanTp.h"\r
#include "PduR_CanTp.h"\r
-//#include "MemMap.h" /** @req CANTP156 */\r
+//#include "MemMap.h"\r
#include <string.h>\r
//#define USE_DEBUG_PRINTF\r
#include "debug.h"\r
\r
+#define CANTP_IMMEDIATE_TX_CONFIRMATION STD_OFF\r
+\r
#if ( CANTP_DEV_ERROR_DETECT == STD_ON ) /** @req CANTP006 *//** @req CANTP134 */\r
\r
/** @req CANTP132 */ /** @req CANTP021 */\r
\r
TX_WAIT_CAN_TP_TRANSMIT_CAN_TP_PROVIDE_TX_BUFFER, /** @req CANTP226 */\r
TX_WAIT_CAN_TP_TRANSMIT_PENDING, /* CanTP_Transmit was called but no buffer was received (BUSY). */\r
- TX_WAIT_SEND_CONSECUTIVE_FRAME, TX_WAIT_FLOW_CONTROL\r
+ TX_WAIT_SEND_CONSECUTIVE_FRAME, TX_WAIT_FLOW_CONTROL,\r
+ TX_WAIT_TX_CONFIRMATION\r
} ISO15765TransferStateTypes;\r
\r
typedef enum {\r
uint8 STmin; // In case we are transmitters the remote node can configure this value (only valid for TX).\r
uint8 BS; // Blocksize (only valid for TX).\r
boolean NasNarPending;\r
+#if (CANTP_IMMEDIATE_TX_CONFIRMATION == STD_OFF)\r
+ boolean txConfirmed;\r
+#endif\r
uint32 NasNarTimeoutCount; // CanTpNas, CanTpNar.\r
ISO15765TransferStateTypes state; // Transfer state machine. TODO: Can this be initialized here?\r
} ISO15765TransferControlType;\r
}\r
txRuntime->iso15765.NasNarTimeoutCount = CANTP_CONVERT_MS_TO_MAIN_CYCLES(txConfig->CanTpNas); /** @req CANTP075 */\r
txRuntime->iso15765.NasNarPending = TRUE;\r
+#if (CANTP_IMMEDIATE_TX_CONFIRMATION == STD_OFF)\r
+ txRuntime->iso15765.txConfirmed = FALSE;\r
+#endif\r
return CanIf_Transmit(txConfig->CanIf_PduId, PduInfoPtr);\r
}\r
\r
PduInfoType pduInfo;\r
uint8 sduData[8]; // Note that buffer in declared on the stack.\r
uint16 spaceFreePduRBuffer = 0;\r
- uint16 computedBs = 0; // req:CanTp064 and example.\r
+ uint16 computedBs = 0;\r
\r
DEBUG( DEBUG_MEDIUM, "sendFlowControlFrame called!\n");\r
pduInfo.SduDataPtr = &sduData[0];\r
rxRuntime->mode = CANTP_RX_WAIT;\r
} else {\r
currentSegmentMaxSize = CANIF_PDU_MAX_LENGTH - indexCount;\r
- bytesLeftToCopy = rxRuntime->transferTotal\r
- - rxRuntime->transferCount;\r
+ bytesLeftToCopy = rxRuntime->transferTotal - rxRuntime->transferCount;\r
if (bytesLeftToCopy < currentSegmentMaxSize) {\r
currentSegmentSize = bytesLeftToCopy; // 1-5.\r
} else {\r
rxRuntime->mode = CANTP_RX_WAIT;\r
} else if (ret == BUFREQ_BUSY) {\r
boolean dataCopyFailure = FALSE;\r
- PduLengthType bytesNotCopiedToPdurRxBuffer =\r
- currentSegmentSize - bytesCopiedToPdurRxBuffer;\r
+ PduLengthType bytesNotCopiedToPdurRxBuffer = currentSegmentSize - bytesCopiedToPdurRxBuffer;\r
if (rxConfig->CanTpAddressingFormant == CANTP_STANDARD) {\r
if ( copySegmentToLocalRxBuffer(rxRuntime, /** @req CANTP067 */\r
&rxPduData->SduDataPtr[1 + bytesCopiedToPdurRxBuffer],\r
rxRuntime->iso15765.state = IDLE;\r
rxRuntime->mode = CANTP_RX_WAIT;\r
dataCopyFailure = TRUE;\r
- DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' "\r
- "data to local buffer!\n");\r
+ DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' " "data to local buffer!\n");\r
}\r
} else {\r
if ( copySegmentToLocalRxBuffer(rxRuntime, /** @req CANTP067 */\r
rxRuntime->iso15765.state = IDLE;\r
rxRuntime->mode = CANTP_RX_WAIT;\r
dataCopyFailure = TRUE;\r
- DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' "\r
- "data to local buffer!\n");\r
+ DEBUG( DEBUG_MEDIUM, "Unexpected error, could not copy 'unaligned leftover' " "data to local buffer!\n");\r
}\r
}\r
if ( dataCopyFailure == FALSE ) {\r
\r
if (txRuntime->transferTotal <= txRuntime->transferCount) {\r
// Transfer finished!\r
+#if (CANTP_IMMEDIATE_TX_CONFIRMATION == STD_OFF)\r
+ txRuntime->iso15765.state = TX_WAIT_TX_CONFIRMATION;\r
+#else\r
+ PduR_CanTpTxConfirmation(txConfig->PduR_PduId, NTFRSLT_OK); /** @req CANTP074 *//** @req CANTP09 *//** @req CANTP204 */\r
txRuntime->iso15765.state = IDLE;\r
txRuntime->mode = CANTP_TX_WAIT;\r
- PduR_CanTpTxConfirmation(txConfig->PduR_PduId, NTFRSLT_OK); /** @req CANTP074 *//** @req CANTP09 *//** @req CANTP204 */\r
+#endif\r
} else if (txRuntime->iso15765.nextFlowControlCount == 0) {\r
if (txRuntime->iso15765.BS) { // Check if receiver expects flow control.\r
// Time to send flow control!\r
- txRuntime->iso15765.stateTimeoutCount = CANTP_CONVERT_MS_TO_MAIN_CYCLES(txConfig->CanTpNbs); /*CanTp: 264*/\r
+ txRuntime->iso15765.stateTimeoutCount = CANTP_CONVERT_MS_TO_MAIN_CYCLES(txConfig->CanTpNbs); /** @req CANTP264 */\r
txRuntime->iso15765.state = TX_WAIT_FLOW_CONTROL;\r
} else {\r
// Send next consecutive frame!\r
case SINGLE_FRAME:\r
res = sendSingleFrame(txConfig, txRuntime); /** @req CANTP231 */\r
if (res == E_OK) {\r
+#if (CANTP_IMMEDIATE_TX_CONFIRMATION == STD_OFF)\r
+ txRuntime->iso15765.state = TX_WAIT_TX_CONFIRMATION;\r
+#else\r
PduR_CanTpTxConfirmation(txConfig->PduR_PduId, NTFRSLT_OK); /** @req CANTP204 */\r
+ txRuntime->iso15765.state = IDLE;\r
+ txRuntime->mode = CANTP_TX_WAIT;\r
+#endif\r
} else {\r
PduR_CanTpTxConfirmation(txConfig->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP204 */\r
+ txRuntime->iso15765.state = IDLE;\r
+ txRuntime->mode = CANTP_TX_WAIT;\r
}\r
- txRuntime->iso15765.state = IDLE;\r
- txRuntime->mode = CANTP_TX_WAIT;\r
break;\r
case FIRST_FRAME: {\r
txRuntime->iso15765.stateTimeoutCount = CANTP_CONVERT_MS_TO_MAIN_CYCLES(txConfig->CanTpNbs); /** @req CANTP264 */\r
\r
#if FRTP_CANCEL_TRANSMIT_REQUEST\r
Std_ReturnType FrTp_CancelTransmitRequest(PduIdType FrTpTxPduId,\r
- FrTp_CancelReasonType FrTpCancelReason) /** @req CANTP246 */\r
+ FrTp_CancelReasonType FrTpCancelReason)\r
{\r
return E_NOT_OK;\r
}\r
// - - - - - - - - - - - - - -\r
\r
void CanTp_RxIndication(PduIdType CanTpRxPduId, /** @req CANTP078 */ /** @req CANTP035 */\r
- const PduInfoType *CanTpRxPduPtr) /** @req CANTP214 */\r
+ const PduInfoType *CanTpRxPduPtr)\r
{\r
CanTpFifoQueueItem item;\r
VALIDATE_NO_RV( CanTpRunTimeData.internalState == CANTP_ON,\r
// - - - - - - - - - - - - - -\r
\r
void CanTp_RxIndication_Main(PduIdType CanTpRxPduId,\r
- const PduInfoType *CanTpRxPduPtr) /** @req CANTP214 */\r
+ const PduInfoType *CanTpRxPduPtr)\r
{\r
const CanTp_RxNSduType *rxConfigParams; // Params reside in ROM.\r
const CanTp_TxNSduType *txConfigParams;\r
\r
// - - - - - - - - - - - - - -\r
\r
-void CanTp_TxConfirmation(PduIdType PduId) /** @req CANTP215 *//** @req CANTP076 *//** @req CANTP215 */\r
+void CanTp_TxConfirmation(PduIdType PduId) /** @req CANTP076 */\r
{\r
const CanTp_RxNSduType *rxConfigParams = NULL;\r
const CanTp_TxNSduType *txConfigParams = NULL;\r
if ( CanTpConfig.CanTpNSduList[PduId].direction == IS015765_TRANSMIT ) {\r
txConfigParams = (CanTp_TxNSduType*)&CanTpConfig.CanTpNSduList[PduId].configData;\r
CanTpRunTimeData.runtimeDataList[txConfigParams->CanTpTxChannel].iso15765.NasNarPending = FALSE;\r
+#if (CANTP_IMMEDIATE_TX_CONFIRMATION == STD_OFF)\r
+ CanTpRunTimeData.runtimeDataList[txConfigParams->CanTpTxChannel].iso15765.txConfirmed = TRUE;\r
+#endif\r
} else {\r
rxConfigParams = (CanTp_RxNSduType*)&CanTpConfig.CanTpNSduList[PduId].configData;\r
CanTpRunTimeData.runtimeDataList[rxConfigParams->CanTpRxChannel].iso15765.NasNarPending = FALSE;\r
\r
// - - - - - - - - - - - - - -\r
\r
-void CanTp_Shutdown() /** @req CANTP202 *//** @req CANTP200 *//** @req CANTP211 *//** @req CANTP010 */\r
+void CanTp_Shutdown() /** @req CANTP202 *//** @req CANTP200 *//** @req CANTP010 */\r
{\r
VALIDATE_NO_RV( CanTpRunTimeData.internalState == CANTP_ON,\r
SERVICE_ID_CANTP_SHUTDOWN, CANTP_E_UNINIT ); /** @req CANTP031 */\r
// - - - - - - - - - - - - - -\r
\r
\r
-void CanTp_MainFunction() /** @req CANTP213 */\r
+void CanTp_MainFunction()\r
{\r
BufReq_ReturnType ret;\r
CanTpFifoQueueItem item;\r
handleConsecutiveFrameSent(txConfigListItem, txRuntimeListItem);\r
} else {\r
DEBUG( DEBUG_MEDIUM, "ERROR: Consecutive frame could not be sent!\n");\r
+ PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP204 */\r
txRuntimeListItem->iso15765.state = IDLE;\r
txRuntimeListItem->mode = CANTP_TX_WAIT;\r
- PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP204 */\r
}\r
} else {\r
DEBUG( DEBUG_MEDIUM, "Waiting for STmin timer to expire!\n");\r
TIMER_DECREMENT(txRuntimeListItem->iso15765.stateTimeoutCount);\r
if (txRuntimeListItem->iso15765.stateTimeoutCount == 0) {\r
DEBUG( DEBUG_MEDIUM, "State TX_WAIT_FLOW_CONTROL timed out!\n");\r
+ PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP204 */ /** @req CANTP185 */\r
+ txRuntimeListItem->iso15765.state = IDLE;\r
+ txRuntimeListItem->mode = CANTP_TX_WAIT;\r
+ }\r
+ break;\r
+#if (CANTP_IMMEDIATE_TX_CONFIRMATION == STD_OFF)\r
+ case TX_WAIT_TX_CONFIRMATION:\r
+ if (txRuntimeListItem->iso15765.txConfirmed) {\r
+ PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId, NTFRSLT_OK); /** @req CANTP074 *//** @req CANTP09 *//** @req CANTP204 */\r
txRuntimeListItem->iso15765.state = IDLE;\r
txRuntimeListItem->mode = CANTP_TX_WAIT;\r
- PduR_CanTpTxConfirmation(txConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP204 */ /** @req CANTP185 */\r
}\r
break;\r
+#endif\r
default:\r
break;\r
}\r
TIMER_DECREMENT (rxRuntimeListItem->iso15765.stateTimeoutCount);\r
if (rxRuntimeListItem->iso15765.stateTimeoutCount == 0) {\r
DEBUG( DEBUG_MEDIUM, "TIMEOUT!\n");\r
+ PduR_CanTpRxIndication(rxConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK);\r
rxRuntimeListItem->iso15765.state = IDLE;\r
rxRuntimeListItem->mode = CANTP_RX_WAIT;\r
- PduR_CanTpRxIndication(rxConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK);\r
}\r
break;\r
}\r
rxRuntimeListItem->mode = CANTP_RX_WAIT;\r
}\r
} else if (ret == BUFREQ_NOT_OK ) {\r
+ PduR_CanTpRxIndication(rxConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP205 */\r
rxRuntimeListItem->iso15765.state = IDLE;\r
rxRuntimeListItem->mode = CANTP_RX_WAIT;\r
- PduR_CanTpRxIndication(rxConfigListItem->PduR_PduId, NTFRSLT_E_NOT_OK); /** @req CANTP205 */\r
} else if ( ret == BUFREQ_BUSY ) {\r
DEBUG( DEBUG_MEDIUM, "Still busy!\n");\r
}\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
\r
+/* Globally fulfilled requirements */\r
+/** @req COMM43 */\r
+/** @req COMM38 */\r
+/** @req COMM463.partially */\r
+/** @req COMM686 */\r
+/** @req COMM51 */\r
+/** @req COMM191 */\r
+/** @req COMM301 */\r
+/** @req COMM488 */\r
+/** @req COMM599 */\r
+/** @req COMM509 */\r
+/** @req COMM269 */\r
+/** @req COMM458 */\r
+/** @req COMM640 */\r
+/** @req COMM459 */\r
+/** @req COMM462 */\r
+/** @req COMM457.bswbuilder */\r
+/** @req COMM419.bswbuilder */\r
+/** @req COMM460.bswbuilder */\r
+/** @req COMM549.bswbuilder */\r
+/** @req COMM464 */\r
+\r
#include <string.h>\r
#include "ComM.h"\r
#if (COMM_DEV_ERROR_DETECT == STD_ON)\r
#include "Det.h"\r
#endif\r
\r
+/** @req COMM507 @req COMM508 */\r
+#if defined(USE_DEM)\r
+#include "Dem.h"\r
+#endif\r
+\r
#include "ComM_BusSm.h"\r
#include "ComM_Internal.h"\r
\r
+/** @req COMM506 @req COMM353 */\r
#if defined(USE_CANSM)\r
#include "CanSM.h"\r
#endif\r
\r
+/** @req COMM347 */\r
#if defined(USE_NM)\r
#include "Nm.h"\r
#endif\r
ComM_Config = Config;\r
\r
for (int i = 0; i < COMM_CHANNEL_COUNT; ++i) {\r
- /** @req ComM485 */\r
- ComM_Internal.Channels[i].Mode = COMM_NO_COMMUNICATION;\r
+ ComM_Internal.Channels[i].Mode = COMM_NO_COMMUNICATION; /**< @req COMM485 */\r
ComM_Internal.Channels[i].SubMode = COMM_SUBMODE_NONE;\r
ComM_Internal.Channels[i].UserRequestMask = 0;\r
ComM_Internal.Channels[i].InhibitionStatus = COMM_INHIBITION_STATUS_NONE;\r
\r
ComM_Internal.InhibitCounter = 0;\r
ComM_Internal.InitStatus = COMM_INIT;\r
+ /** @req COMM313 */\r
}\r
\r
void ComM_DeInit(){\r
Std_ReturnType ComM_RequestComMode( ComM_UserHandleType User, ComM_ModeType ComMode ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_REQUESTCOMMODE, COMM_E_UNINIT);\r
COMM_VALIDATE_USER(User, COMM_SERVICEID_REQUESTCOMMODE, E_NOT_OK);\r
+ /** @req COMM151 */\r
+ COMM_VALIDATE_PARAMETER((ComMode != COMM_SILENT_COMMUNICATION), COMM_SERVICEID_REQUESTCOMMODE, E_NOT_OK);\r
\r
return ComM_Internal_RequestComMode(User, ComMode);\r
}\r
const ComM_UserType* UserConfig = &ComM_Config->Users[User];\r
ComM_Internal_UserType* UserInternal = &ComM_Internal.Users[User];\r
\r
- UserInternal->RequestedMode = ComMode;\r
+ UserInternal->RequestedMode = ComMode; /**< @req COMM471 @req COMM500 @req COMM92 */\r
uint32 userMask = (1 << User);\r
\r
Std_ReturnType requestStatus = E_OK;\r
const ComM_ChannelType* Channel = UserConfig->ChannelList[i];\r
ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel->Number];\r
\r
+ /** @req COMM784.1 @req COMM304 @req COMM625 */\r
// Put user request into mask\r
if (ComMode == COMM_NO_COMMUNICATION) {\r
ChannelInternal->UserRequestMask &= ~(userMask);\r
return E_NOT_OK;\r
}\r
\r
+/** @req COMM80 */\r
Std_ReturnType ComM_GetRequestedComMode( ComM_UserHandleType User, ComM_ModeType* ComMode ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_GETREQUESTEDCOMMODE, COMM_E_UNINIT);\r
COMM_VALIDATE_USER(User, COMM_SERVICEID_GETREQUESTEDCOMMODE, E_NOT_OK);\r
return E_OK;\r
}\r
\r
+/** @req COMM84 */\r
Std_ReturnType ComM_GetCurrentComMode( ComM_UserHandleType User, ComM_ModeType* ComMode ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_GETCURRENTCOMMODE, COMM_E_UNINIT);\r
COMM_VALIDATE_USER(User, COMM_SERVICEID_GETCURRENTCOMMODE, E_NOT_OK);\r
return ComM_Internal_PropagateGetCurrentComMode(User, ComMode);\r
}\r
\r
-\r
Std_ReturnType ComM_PreventWakeUp( NetworkHandleType Channel, boolean Status ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_PREVENTWAKEUP, COMM_E_UNINIT);\r
COMM_VALIDATE_CHANNEL(Channel, COMM_SERVICEID_PREVENTWAKEUP, E_NOT_OK);\r
#endif\r
}\r
\r
+/** @req COMM361 @req COMM105.1 @req COMM800 */\r
Std_ReturnType ComM_LimitChannelToNoComMode( NetworkHandleType Channel, boolean Status ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_LIMITCHANNELTONOCOMMODE, COMM_E_UNINIT);\r
COMM_VALIDATE_CHANNEL(Channel, COMM_SERVICEID_LIMITCHANNELTONOCOMMODE, E_NOT_OK);\r
#endif\r
}\r
\r
+/** @req COMM105.2 @req COMM801.partially */\r
Std_ReturnType ComM_LimitECUToNoComMode( boolean Status ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_LIMITECUTONOCOMMODE, COMM_E_UNINIT);\r
#if (COMM_MODE_LIMITATION_ENABLED == STD_ON)\r
#endif\r
}\r
\r
-\r
+/** @req COMM143 @req COMM802 */\r
Std_ReturnType ComM_ReadInhibitCounter( uint16* CounterValue ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_READINHIBITCOUNTER, COMM_E_UNINIT);\r
#if (COMM_MODE_LIMITATION_ENABLED == STD_ON)\r
#endif\r
}\r
\r
+/** @req COMM803 */\r
Std_ReturnType ComM_ResetInhibitCounter(){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_RESETINHIBITCOUNTER, COMM_E_UNINIT);\r
#if (COMM_MODE_LIMITATION_ENABLED == STD_ON)\r
\r
// Network Management Interface Callbacks\r
// --------------------------------------\r
-\r
+/** @req COMM804 */\r
void ComM_Nm_NetworkStartIndication( NetworkHandleType Channel ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_NM_NETWORKSTARTINDICATION);\r
COMM_VALIDATE_CHANNEL(Channel, COMM_SERVICEID_NM_NETWORKSTARTINDICATION);\r
ComM_Internal_UpdateChannelState(ChannelConf, FALSE);\r
}\r
\r
+/** @req COMM807 */\r
void ComM_Nm_NetworkMode( NetworkHandleType Channel ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_NM_NETWORKMODE);\r
COMM_VALIDATE_CHANNEL(Channel, COMM_SERVICEID_NM_NETWORKMODE);\r
ComM_Internal_UpdateChannelState(ChannelConf, FALSE);\r
}\r
\r
+/** @req COMM809 */\r
void ComM_Nm_PrepareBusSleepMode( NetworkHandleType Channel ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_NM_PREPAREBUSSLEEPMODE);\r
COMM_VALIDATE_CHANNEL(Channel, COMM_SERVICEID_NM_PREPAREBUSSLEEPMODE);\r
ComM_Internal_UpdateChannelState(ChannelConf, FALSE);\r
}\r
\r
+/** @req COMM811 */\r
void ComM_Nm_BusSleepMode( NetworkHandleType Channel ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_NM_BUSSLEEPMODE);\r
COMM_VALIDATE_CHANNEL(Channel, COMM_SERVICEID_NM_BUSSLEEPMODE);\r
ComM_Internal_UpdateChannelState(ChannelConf, FALSE);\r
}\r
\r
+/** @req COMM813 */\r
void ComM_Nm_RestartIndication( NetworkHandleType Channel ){\r
COMM_VALIDATE_INIT(COMM_SERVICEID_NM_RESTARTINDICATION);\r
COMM_VALIDATE_CHANNEL(Channel, COMM_SERVICEID_NM_RESTARTINDICATION);\r
\r
// Scheduled main function\r
// -----------------------\r
-\r
+/** @req COMM429 */\r
void ComM_MainFunction(NetworkHandleType Channel) {\r
const ComM_ChannelType* ChannelConf = &ComM_Config->Channels[Channel];\r
ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[Channel];\r
}\r
\r
static inline boolean ComM_Internal_FullComMinTime_AllowsExit(const ComM_ChannelType* ChannelConf, ComM_Internal_ChannelType* ChannelInternal) {\r
+ /** @req COMM311 */\r
if ((ChannelConf->NmVariant == COMM_NM_VARIANT_LIGHT) ||\r
(ChannelConf->NmVariant == COMM_NM_VARIANT_NONE)){\r
return (ChannelInternal->FullComMinDurationTimeLeft == 0);\r
}\r
}\r
\r
+/** @req COMM678.2 */\r
static Std_ReturnType ComM_Internal_PropagateGetCurrentComMode( ComM_UserHandleType User, ComM_ModeType* ComMode ){\r
const ComM_UserType* UserConfig = &ComM_Config->Users[User];\r
\r
return E_OK;\r
}\r
\r
+/** @req COMM281.partially @req COMM70 @req COMM73 @req COMM71 @req COMM72\r
+ * @req COMM69 @req COMM402 @req COMM434 @req COMM678.1 @req COMM168 @req COMM676.partially */\r
static Std_ReturnType ComM_Internal_PropagateComMode( const ComM_ChannelType* ChannelConf ){\r
ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[ChannelConf->Number];\r
ComM_ModeType ComMode = ChannelInternal->Mode;\r
return busSMStatus;\r
}\r
\r
+/** @req COMM472 @req COMM602 @req COMM261 */\r
static Std_ReturnType ComM_Internal_NotifyNm( const ComM_ChannelType* ChannelConf){\r
ComM_Internal_ChannelType* ChannelInternal = &ComM_Internal.Channels[ChannelConf->Number];\r
\r
Nm_ReturnType nmStatus = NM_E_OK;\r
if (ChannelInternal->Mode == COMM_FULL_COMMUNICATION) {\r
if (ChannelInternal->SubMode == COMM_SUBMODE_NETWORK_REQUESTED) {\r
- nmStatus = Nm_NetworkRequest(ChannelConf->NmChannelHandle);\r
+ nmStatus = Nm_NetworkRequest(ChannelConf->NmChannelHandle); /**< @req COMM129.1 */\r
} else if (ChannelInternal->SubMode == COMM_SUBMODE_READY_SLEEP) {\r
- nmStatus = Nm_NetworkRelease(ChannelConf->NmChannelHandle);\r
+ nmStatus = Nm_NetworkRelease(ChannelConf->NmChannelHandle); /**< @req COMM133.1 */\r
}\r
}\r
if (nmStatus != NM_E_OK) {\r
static inline Std_ReturnType ComM_Internal_UpdateFromNoCom(const ComM_ChannelType* ChannelConf,\r
ComM_Internal_ChannelType* ChannelInternal, boolean isRequest) {\r
Std_ReturnType status = E_OK;\r
- if (ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_RESTART) {\r
+ if (ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_RESTART) { /**< @req COMM207.partial */\r
// "restart" indication\r
- status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal); /**< @req COMM583 */\r
ChannelInternal->NmIndicationMask &= ~(COMM_NM_INDICATION_RESTART);\r
} else {\r
if ((ChannelInternal->InhibitionStatus & COMM_INHIBITION_STATUS_NO_COMMUNICATION) ||\r
(ChannelInternal->InhibitionStatus & COMM_INHIBITION_STATUS_WAKE_UP) ||\r
(ComM_Internal.NoCommunication == TRUE)) {\r
// Inhibition is active\r
+ /** @req COMM302 @req COMM218 @req COMM219 @req COMM215.3 @req COMM216.3 */\r
if (isRequest) ComM_Internal.InhibitCounter++;\r
} else {\r
if (ChannelInternal->UserRequestMask != 0) {\r
// Channel is requested\r
- status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal); /**< @req COMM784.2 */\r
} else {\r
// Channel is not requested\r
}\r
static inline Std_ReturnType ComM_Internal_UpdateFromSilentCom(const ComM_ChannelType* ChannelConf,\r
ComM_Internal_ChannelType* ChannelInternal, boolean isRequest) {\r
Std_ReturnType status = E_OK;\r
- if (ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_RESTART) {\r
+ if (ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_RESTART) { /**< @req COMM207.partial */\r
// "restart" indication\r
- status = ComM_Internal_Enter_ReadySleep(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_ReadySleep(ChannelConf, ChannelInternal); /**< @req COMM296.1 */\r
ChannelInternal->NmIndicationMask &= ~(COMM_NM_INDICATION_RESTART);\r
} else if (ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_BUS_SLEEP) {\r
// "bus sleep" indication\r
- status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal); /**< @req COMM295 */\r
ChannelInternal->NmIndicationMask &= ~(COMM_NM_INDICATION_BUS_SLEEP);\r
} else if (ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_NETWORK_MODE) {\r
// "network mode" indication\r
- status = ComM_Internal_Enter_ReadySleep(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_ReadySleep(ChannelConf, ChannelInternal); /**< @req COMM296.2 */\r
ChannelInternal->NmIndicationMask &= ~(COMM_NM_INDICATION_NETWORK_MODE);\r
} else {\r
if ((ChannelInternal->InhibitionStatus & COMM_INHIBITION_STATUS_NO_COMMUNICATION) ||\r
(ComM_Internal.NoCommunication == TRUE)) {\r
// Inhibition is active\r
+ /** @req COMM215.2 @req COMM216.2 */\r
if (isRequest) ComM_Internal.InhibitCounter++;\r
} else {\r
if (ChannelInternal->UserRequestMask != 0) {\r
// Channel is requested\r
- status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal); /**< @req COMM785 */\r
} else {\r
// Stay in SILENT\r
}\r
Std_ReturnType status = E_OK;\r
if (ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_BUS_SLEEP) {\r
// "bus sleep" indication\r
- status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal); /**< @req COMM637 */\r
ChannelInternal->NmIndicationMask &= ~(COMM_NM_INDICATION_BUS_SLEEP);\r
} else if ((ChannelInternal->NmIndicationMask & COMM_NM_INDICATION_PREPARE_BUS_SLEEP) &&\r
(ChannelInternal->SubMode == COMM_SUBMODE_READY_SLEEP)) {\r
// "prepare bus sleep" indication\r
- status = ComM_Internal_Enter_SilentCom(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_SilentCom(ChannelConf, ChannelInternal); /**< @req COMM299 */\r
ChannelInternal->NmIndicationMask &= ~(COMM_NM_INDICATION_PREPARE_BUS_SLEEP);\r
} else {\r
if ((ChannelInternal->InhibitionStatus & COMM_INHIBITION_STATUS_NO_COMMUNICATION) ||\r
(ComM_Internal.NoCommunication == TRUE)) {\r
// Inhibition is active\r
- if (ComM_Internal_FullComMinTime_AllowsExit(ChannelConf, ChannelInternal)) {\r
+ if (ComM_Internal_FullComMinTime_AllowsExit(ChannelConf, ChannelInternal)) { /**< @req COMM205.1 */\r
if (ChannelInternal->SubMode == COMM_SUBMODE_READY_SLEEP) {\r
if ((ChannelConf->NmVariant == COMM_NM_VARIANT_LIGHT) &&\r
(ChannelInternal->LightTimeoutTimeLeft == 0)) {\r
- status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal); /**< @req COMM610.1 */\r
}\r
} else {\r
+ /** @req COMM478.seeAlsoCOMM52 @req COMM303 @req COMM215.1 @req COMM216.1 */\r
status = ComM_Internal_Enter_ReadySleep(ChannelConf, ChannelInternal);\r
}\r
}\r
} else {\r
if (ChannelInternal->UserRequestMask == 0) {\r
// Channel no longer requested\r
- if (ComM_Internal_FullComMinTime_AllowsExit(ChannelConf, ChannelInternal)) {\r
+ if (ComM_Internal_FullComMinTime_AllowsExit(ChannelConf, ChannelInternal)) { /**< @req COMM205.1 */\r
if (ChannelInternal->SubMode == COMM_SUBMODE_READY_SLEEP) {\r
if ((ChannelConf->NmVariant == COMM_NM_VARIANT_LIGHT) &&\r
(ChannelInternal->LightTimeoutTimeLeft == 0)) {\r
- status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NoCom(ChannelConf, ChannelInternal); /**< @req COMM610.2 */\r
}\r
} else {\r
status = ComM_Internal_Enter_ReadySleep(ChannelConf, ChannelInternal);\r
} else {\r
// Channel is requested\r
if (ChannelInternal->SubMode != COMM_SUBMODE_NETWORK_REQUESTED) {\r
- status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal);\r
+ status = ComM_Internal_Enter_NetworkRequested(ChannelConf, ChannelInternal); /**< @req COMM479 */\r
}\r
}\r
}\r
ChannelInternal->SubMode = COMM_SUBMODE_NETWORK_REQUESTED;\r
\r
Std_ReturnType status, globalStatus = E_OK;\r
- status = ComM_Internal_NotifyNm(ChannelConf);\r
+ status = ComM_Internal_NotifyNm(ChannelConf); /**< @req COMM129.2 */\r
if (status > globalStatus) globalStatus = status;\r
if (propagateToBusSM) {\r
status = ComM_Internal_PropagateComMode(ChannelConf);\r
ChannelInternal->SubMode = COMM_SUBMODE_READY_SLEEP;\r
\r
Std_ReturnType status, globalStatus = E_OK;\r
- status = ComM_Internal_NotifyNm(ChannelConf);\r
+ status = ComM_Internal_NotifyNm(ChannelConf); /**< @req COMM133.1 */\r
if (status > globalStatus) globalStatus = status;\r
if (propagateToBusSM) {\r
status = ComM_Internal_PropagateComMode(ChannelConf);\r
\r
#include "ComM_Types.h"\r
\r
+/** @req COMM612 @req COMM511 @req COMM512 @req COMM270 @req COMM523 */\r
#if (COMM_DEV_ERROR_DETECT == STD_ON)\r
#define COMM_DET_REPORTERROR(serviceId, errorId) \\r
Det_ReportError(MODULE_ID_COMM, 0, serviceId, errorId)\r
ComM_Internal_ChannelType Channels[COMM_CHANNEL_COUNT];\r
ComM_Internal_UserType Users[COMM_USER_COUNT];\r
boolean NoCommunication;\r
- uint16 InhibitCounter;\r
+ uint16 InhibitCounter; /**< @req COMM138 @req COMM141 */\r
} ComM_InternalType;\r
\r
#define COMM_NM_INDICATION_NONE 0\r
#include "Nm.h"\r
#include "Nm_Internal.h"\r
\r
+/* Globally fulfilled requirements */\r
+/** @req NM006 */\r
+/** @req NM026 */\r
+\r
const Nm_ConfigType* Nm_ConfigPtr;\r
\r
/** Initializes the NM Interface. */\r
/** Notification that a NM-message has been received in the Bus-Sleep Mode, what\r
* indicates that some nodes in the network have already entered the Network Mode.\r
* The callback function shall start the network management state machine. */\r
+/** @req NM012.partially.1 */\r
void Nm_NetworkStartIndication( const NetworkHandleType NetworkHandle ){\r
const Nm_ChannelType* ChannelConf = &Nm_ConfigPtr->Channels[NetworkHandle];\r
ComM_Nm_NetworkStartIndication(ChannelConf->ComMNetworkHandle);\r
\r
/** Notification that the network management has entered Network Mode. The\r
* callback function shall enable transmission of application messages. */\r
+/** @req NM012.partially.2 */\r
void Nm_NetworkMode( const NetworkHandleType NetworkHandle ){\r
const Nm_ChannelType* ChannelConf = &Nm_ConfigPtr->Channels[NetworkHandle];\r
ComM_Nm_NetworkMode(ChannelConf->ComMNetworkHandle);\r
\r
/** Notification that the network management has entered Prepare Bus-Sleep Mode.\r
* The callback function shall disable transmission of application messages. */\r
+/** @req NM012.partially.3 */\r
void Nm_PrepareBusSleepMode( const NetworkHandleType NetworkHandle ){\r
const Nm_ChannelType* ChannelConf = &Nm_ConfigPtr->Channels[NetworkHandle];\r
ComM_Nm_PrepareBusSleepMode(ChannelConf->ComMNetworkHandle);\r
}\r
\r
/** Notification that the network management has entered Bus-Sleep Mode. */\r
+/** @req NM012.partially.4 */\r
void Nm_BusSleepMode( const NetworkHandleType NetworkHandle ){\r
const Nm_ChannelType* ChannelConf = &Nm_ConfigPtr->Channels[NetworkHandle];\r
ComM_Nm_BusSleepMode(ChannelConf->ComMNetworkHandle);\r
/** This function implements the processes of the NM Interface, which need a fix\r
* cyclic scheduling. This function is supplied for the NM coordinator functionality\r
* (Nm020). However, specific implementation may not need it (Nm093) */\r
+/** @req 121 */\r
void Nm_MainFunction(){}\r
\r
\r
\r
\r
+/*\r
+ * General requirements\r
+ */\r
+/** @req DCM054.Partially */ /** @req DCM055.Partially */ /** @req DCM110 */ /** @req DCM107 */ /** @req DCM332 */\r
+/** @req DCM012 */ /** @req DCM044 */ /** @req DCM364 */ /** @req DCM040 */ /** @req DCM041 */\r
+/** @req DCM042 */ /** @req DCM049 */\r
+/** @req DCM033 */\r
+/** @req DCM171 */\r
+/** @req DCM333 */ /** @req DCM334 */\r
+\r
#include <string.h>\r
#include "Dcm.h"\r
#include "Dcm_Internal.h"\r
* Procedure: Dcm_Init\r
* Reentrant: No\r
*/\r
-void Dcm_Init(void)\r
+void Dcm_Init(void) /** @req DCM037 */\r
{\r
if ((DCM_Config.Dsl == NULL) || (DCM_Config.Dsd == NULL) || (DCM_Config.Dsp == NULL)) {\r
#if (DCM_DEV_ERROR_DETECT == STD_ON)\r
/*\r
* Interface for basic software scheduler\r
*/\r
-void Dcm_MainFunction(void)\r
+void Dcm_MainFunction(void) /** @req DCM362 */\r
{\r
DsdMain();\r
DspMain();\r
\r
\r
\r
+/*\r
+ * General requirements\r
+ */\r
+\r
+\r
#include <string.h>\r
#include "Dcm.h"\r
#include "Dcm_Internal.h"\r
static void createAndSendNcr(Dcm_NegativeResponseCodeType responseCode)\r
{\r
if (!((msgData.addrType == DCM_PROTOCOL_FUNCTIONAL_ADDR_TYPE)\r
- && ((responseCode == DCM_E_SERVICENOTSUPPORTED) || (responseCode == DCM_E_SUBFUNCTIONNOTSUPPORTED) || (responseCode == DCM_E_REQUESTOUTOFRANGE)))) { /** @req DCM001 **/\r
+ && ((responseCode == DCM_E_SERVICENOTSUPPORTED) || (responseCode == DCM_E_SUBFUNCTIONNOTSUPPORTED) || (responseCode == DCM_E_REQUESTOUTOFRANGE)))) { /** @req DCM001 */\r
msgData.pduTxData->SduDataPtr[0] = SID_NEGATIVE_RESPONSE;\r
msgData.pduTxData->SduDataPtr[1] = currentSid;\r
msgData.pduTxData->SduDataPtr[2] = responseCode;\r
msgData.pduTxData->SduLength = 3;\r
- DslDsdProcessingDone(msgData.rxPduId, DSD_TX_RESPONSE_READY); /** @req DCM114 **/ /** @req DCM232.1 **/\r
+ DslDsdProcessingDone(msgData.rxPduId, DSD_TX_RESPONSE_READY); /** @req DCM114 */ /** @req DCM232.Ncr */\r
}\r
else {\r
DslDsdProcessingDone(msgData.rxPduId, DSD_TX_RESPONSE_SUPPRESSED);\r
\r
static void selectServiceFunction(uint8 sid)\r
{\r
- switch (sid) /** @req DCM221 **/\r
+ /** @req DCM442.Partially */\r
+ switch (sid) /** @req DCM221 */\r
{\r
case SID_DIAGNOSTIC_SESSION_CONTROL:\r
DspUdsDiagnosticSessionControl(msgData.pduRxData, msgData.pduTxData);\r
Std_ReturnType result;\r
const Dcm_DsdServiceType *sidConfPtr = NULL;\r
\r
- currentSid = msgData.pduRxData->SduDataPtr[0]; /** @req DCM198 **/\r
+ currentSid = msgData.pduRxData->SduDataPtr[0]; /** @req DCM198 */\r
\r
- /** @req DCM178 **/\r
- if (DCM_RESPOND_ALL_REQUEST || ((currentSid & 0x7F) < 0x40)) { /** @req DCM084 **/\r
- if (lookupSid(currentSid, &sidConfPtr)) { /** @req DCM192 **/ /** @req DCM193 **/ /** @req DCM196 **/\r
+ /** @req DCM178 */\r
+ if (DCM_RESPOND_ALL_REQUEST || ((currentSid & 0x7F) < 0x40)) { /** @req DCM084 */\r
+ if (lookupSid(currentSid, &sidConfPtr)) { /** @req DCM192 */ /** @req DCM193 */ /** @req DCM196 */\r
// SID found!\r
- if (DspCheckSessionLevel(sidConfPtr->DsdSidTabSessionLevelRef)) { /** @req DCM211 **/\r
- if (DspCheckSecurityLevel(sidConfPtr->DsdSidTabSecurityLevelRef)) { /** @req DCM217 **/\r
- if (DCM_REQUEST_INDICATION_ENABLED) { /** @req DCM218 **/\r
+ if (DspCheckSessionLevel(sidConfPtr->DsdSidTabSessionLevelRef)) { /** @req DCM211 */\r
+ if (DspCheckSecurityLevel(sidConfPtr->DsdSidTabSecurityLevelRef)) { /** @req DCM217 */\r
+ if (DCM_REQUEST_INDICATION_ENABLED) { /** @req DCM218 */\r
result = askApplicationForServicePermission(msgData.pduRxData->SduDataPtr, msgData.pduRxData->SduLength);\r
}\r
if (!DCM_REQUEST_INDICATION_ENABLED || result == E_OK) {\r
// Yes! All conditions met!\r
// Check if response shall be suppressed\r
- if (sidConfPtr->DsdSidTabSubfuncAvail && (msgData.pduRxData->SduDataPtr[1] & SUPPRESS_POS_RESP_BIT)) { /** @req DCM204 **/\r
- suppressPosRspMsg = TRUE; /** @req DCM202 **/\r
- msgData.pduRxData->SduDataPtr[1] &= ~SUPPRESS_POS_RESP_BIT; /** @req DCM201 **/\r
+ if (sidConfPtr->DsdSidTabSubfuncAvail && (msgData.pduRxData->SduDataPtr[1] & SUPPRESS_POS_RESP_BIT)) { /** @req DCM204 */\r
+ suppressPosRspMsg = TRUE; /** @req DCM202 */\r
+ msgData.pduRxData->SduDataPtr[1] &= ~SUPPRESS_POS_RESP_BIT; /** @req DCM201 */\r
}\r
else\r
{\r
- suppressPosRspMsg = FALSE; /** @req DCM202 **/\r
+ suppressPosRspMsg = FALSE; /** @req DCM202 */\r
}\r
selectServiceFunction(currentSid);\r
}\r
else {\r
if (result == E_REQUEST_ENV_NOK) {\r
- createAndSendNcr(DCM_E_CONDITIONSNOTCORRECT); /** @req DCM463 **/\r
+ createAndSendNcr(DCM_E_CONDITIONSNOTCORRECT); /** @req DCM463 */\r
}\r
else {\r
- // Do not send any response /** @req DCM462 **/\r
+ // Do not send any response /** @req DCM462 */\r
DslDsdProcessingDone(msgData.rxPduId, DSD_TX_RESPONSE_SUPPRESSED);\r
}\r
}\r
}\r
else {\r
- createAndSendNcr(DCM_E_SECUTITYACCESSDENIED); /** @req DCM217 **/\r
+ createAndSendNcr(DCM_E_SECUTITYACCESSDENIED); /** @req DCM217 */\r
}\r
}\r
else {\r
- createAndSendNcr(DCM_E_SERVICENOTSUPPORTEDINACTIVESESSION); /** @req DCM211 **/\r
+ createAndSendNcr(DCM_E_SERVICENOTSUPPORTEDINACTIVESESSION); /** @req DCM211 */\r
}\r
}\r
else {\r
- createAndSendNcr(DCM_E_SERVICENOTSUPPORTED); /** @req DCM197 **/\r
+ createAndSendNcr(DCM_E_SERVICENOTSUPPORTED); /** @req DCM197 */\r
}\r
}\r
else {\r
void DsdDspProcessingDone(Dcm_NegativeResponseCodeType responseCode)\r
{\r
if (responseCode == DCM_E_POSITIVERESPONSE) {\r
- if (!suppressPosRspMsg) { /** @req DCM200 **/ /** @req DCM231 **/\r
- /** @req DCM222 **/\r
- msgData.pduTxData->SduDataPtr[0] = currentSid | SID_RESPONSE_BIT; /** @req DCM223 **/ /** @req DCM224 **/\r
- DslDsdProcessingDone(msgData.rxPduId, DSD_TX_RESPONSE_READY); /** @req DCM114 **/ /** @req DCM225 **/ /** @req DCM232.2 **/\r
+ if (!suppressPosRspMsg) { /** @req DCM200 */ /** @req DCM231 */\r
+ /** @req DCM222 */\r
+ msgData.pduTxData->SduDataPtr[0] = currentSid | SID_RESPONSE_BIT; /** @req DCM223 */ /** @req DCM224 */\r
+ DslDsdProcessingDone(msgData.rxPduId, DSD_TX_RESPONSE_READY); /** @req DCM114 */ /** @req DCM225 */ /** @req DCM232.Ok */\r
}\r
else {\r
- DspDcmConfirmation(msgData.txPduId); /** @req DCM236 **/ /** @req DCM240 **/\r
+ DspDcmConfirmation(msgData.txPduId); /** @req DCM236 */ /** @req DCM240 */\r
DslDsdProcessingDone(msgData.rxPduId, DSD_TX_RESPONSE_SUPPRESSED);\r
}\r
}\r
else {\r
- createAndSendNcr(responseCode); /** @req DCM228 **/\r
+ createAndSendNcr(responseCode); /** @req DCM228 */\r
}\r
\r
}\r
\r
void DsdDataConfirmation(PduIdType confirmPduId, NotifResultType result)\r
{\r
- DspDcmConfirmation(confirmPduId); /** @req DCM236 **/\r
+ DspDcmConfirmation(confirmPduId); /** @req DCM236 */\r
}\r
\r
\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+/*\r
+ * General requirements\r
+ */\r
+/** @req DCM030 */\r
+\r
+\r
#include <string.h>\r
#include "Mcu.h"\r
#include "Dcm.h"\r
\r
//\r
// This function reset/stars the session (S3) timer. See requirement\r
-// @DCM141 when that action should be taken.\r
+// DCM141 when that action should be taken.\r
//\r
static inline void startS3SessionTimer(Dcm_DslRunTimeProtocolParametersType *runtime, const Dcm_DslProtocolRowType *protocolRow) {\r
const Dcm_DslProtocolTimingRowType *timeParams;\r
\r
//\r
// This function reset/stars the session (S3) timer. See requirement\r
-// @DCM141 when that action should be taken.\r
+// DCM141 when that action should be taken.\r
//\r
static inline void stopS3SessionTimer(Dcm_DslRunTimeProtocolParametersType *runtime) {\r
runtime->S3ServerTimeoutCount = 0;\r
// - - - - - - - - - - -\r
\r
//\r
-// This function implements the requirement @DCM139 when\r
+// This function implements the requirement DCM139 when\r
// transition from one session to another.\r
//\r
static void changeDiagnosticSession(Dcm_DslRunTimeProtocolParametersType *runtime,\r
Dcm_SesCtrlType newSession) {\r
\r
- /** @req DCM139 **/\r
+ /** @req DCM139 */\r
\r
switch (runtime->sessionControl) {\r
case DCM_DEFAULT_SESSION: // "default".\r
\r
default:\r
// TODO: Log this error.\r
- DEBUG(DEBUG_MEDIUM, "Old session invalid")\r
+ DEBUG(DEBUG_MEDIUM, "Old session invalid");\r
break;\r
}\r
\r
\r
default:\r
// TODO: Log this error.\r
- DEBUG(DEBUG_MEDIUM, "New session invalid")\r
+ DEBUG(DEBUG_MEDIUM, "New session invalid");\r
break;\r
}\r
}\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
activeProtocol = DcmDslRunTimeData.activeProtocol;\r
runtime = activeProtocol->DslRunTimeProtocolParameters;\r
- startS3SessionTimer(runtime, activeProtocol); // @DCM141\r
+ startS3SessionTimer(runtime, activeProtocol); /** @req DCM141 */\r
}\r
\r
// - - - - - - - - - - -\r
\r
-void DslGetCurrentServiceTable(const Dcm_DsdServiceTableType **currentServiceTable) {\r
+void DslGetCurrentServiceTable(const Dcm_DsdServiceTableType **currentServiceTable) { /** @req DCM195 */\r
const Dcm_DslProtocolRowType *activeProtocol = NULL;\r
activeProtocol = DcmDslRunTimeData.activeProtocol;\r
if (activeProtocol != NULL) {\r
\r
// - - - - - - - - - - -\r
\r
-Std_ReturnType DslGetActiveProtocol(Dcm_ProtocolType *protocolId) { /** @req DCM340 **/\r
+Std_ReturnType DslGetActiveProtocol(Dcm_ProtocolType *protocolId) { /** @req DCM340 */\r
Std_ReturnType ret = E_NOT_OK;\r
const Dcm_DslProtocolRowType *activeProtocol = NULL;\r
activeProtocol = DcmDslRunTimeData.activeProtocol;\r
\r
// - - - - - - - - - - -\r
\r
-void DslSetSecurityLevel(Dcm_SecLevelType secLevel) { /** @req DCM020 **/\r
+void DslSetSecurityLevel(Dcm_SecLevelType secLevel) { /** @req DCM020 */\r
const Dcm_DslProtocolRowType *activeProtocol = NULL;\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
activeProtocol = DcmDslRunTimeData.activeProtocol;\r
\r
// - - - - - - - - - - -\r
\r
-Std_ReturnType DslGetSecurityLevel(Dcm_SecLevelType *secLevel) { /** @req DCM020 **//** @req DCM338 **/\r
+Std_ReturnType DslGetSecurityLevel(Dcm_SecLevelType *secLevel) { /** @req DCM020 *//** @req DCM338 */\r
Std_ReturnType ret = E_NOT_OK;\r
const Dcm_DslProtocolRowType *activeProtocol = NULL;\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
\r
// - - - - - - - - - - -\r
\r
-void DslSetSesCtrlType(Dcm_SesCtrlType sesCtrl) { /** @req DCM022 **/\r
+void DslSetSesCtrlType(Dcm_SesCtrlType sesCtrl) { /** @req DCM022 */\r
const Dcm_DslProtocolRowType *activeProtocol = NULL;\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
activeProtocol = DcmDslRunTimeData.activeProtocol;\r
\r
// - - - - - - - - - - -\r
\r
-Std_ReturnType DslGetSesCtrlType(Dcm_SesCtrlType *sesCtrlType) { /** @req DCM022 **//** @req DCM339 **/\r
+Std_ReturnType DslGetSesCtrlType(Dcm_SesCtrlType *sesCtrlType) { /** @req DCM022 *//** @req DCM339 */\r
Std_ReturnType ret = E_NOT_OK;\r
const Dcm_DslProtocolRowType *activeProtocol = NULL;\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
imask_t state = McuE_EnterCriticalSection();\r
switch (responseResult) {\r
case DSD_TX_RESPONSE_READY:\r
- runtime->externalTxBufferStatus = DSD_PENDING_RESPONSE_SIGNALED; /** @req DCM114 **/\r
+ runtime->externalTxBufferStatus = DSD_PENDING_RESPONSE_SIGNALED; /** @req DCM114 */\r
break;\r
- case DSD_TX_RESPONSE_SUPPRESSED:\r
+ case DSD_TX_RESPONSE_SUPPRESSED: /** @req DCM238 */\r
DEBUG( DEBUG_MEDIUM, "DslDsdProcessingDone called with DSD_TX_RESPONSE_SUPPRESSED.\n");\r
releaseExternalRxTxBuffersHelper(rxPduIdRef);\r
break;\r
const Dcm_DslProtocolRowType *protocolRow = NULL;\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
\r
- /** @req DCM119 **/\r
+ /** @req DCM119 */\r
imask_t state = McuE_EnterCriticalSection();\r
if (findRxPduIdParentConfigurationLeafs(protocol->DslRunTimeProtocolParameters->diagReqestRxPduId, &protocolRx, &mainConnection, &connection, &protocolRow, &runtime)) {\r
if (runtime->localTxBuffer.status == NOT_IN_USE) {\r
runtime->localTxBuffer.PduInfo.SduDataPtr = runtime->localTxBuffer.buffer;\r
runtime->localTxBuffer.PduInfo.SduLength = 3;\r
runtime->localTxBuffer.status = DCM_TRANSMIT_SIGNALED; // In the DslProvideTxBuffer 'callback' this state signals it is the local buffer we are interested in sending.\r
- PduR_DcmTransmit(mainConnection->DslProtocolTx->DcmDslProtocolTxPduId, &(runtime->localTxBuffer.PduInfo));/** @req DCM115, the P2ServerMin has not been implemented. **/\r
+ PduR_DcmTransmit(mainConnection->DslProtocolTx->DcmDslProtocolTxPduId, &(runtime->localTxBuffer.PduInfo));/** @req DCM115.Partially */ /* The P2ServerMin has not been implemented. */\r
}\r
}\r
McuE_ExitCriticalSection(state);\r
uint16 i;\r
\r
for (i = 0; !DCM_Config.Dsl->DslCallbackDCMRequestService[i].Arc_EOL; i++) {\r
- if (DCM_Config.Dsl->DslCallbackDCMRequestService[i].StartProtocol\r
- != NULL) {\r
- ret = DCM_Config.Dsl->DslCallbackDCMRequestService[i]. StartProtocol(\r
- protocolId);\r
- if (ret != E_OK) { // qqq: eqvivalent to DCM_E_OK?\r
+ if (DCM_Config.Dsl->DslCallbackDCMRequestService[i].StartProtocol != NULL) {\r
+ ret = DCM_Config.Dsl->DslCallbackDCMRequestService[i]. StartProtocol(protocolId);\r
+ if (ret != E_OK) {\r
break;\r
}\r
}\r
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r
// Implements 'void Dcm_Init(void)' for DSL.\r
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r
-void DslInit(void) { /** @req DCM037 - for DSL submodule. **/\r
+void DslInit(void) {\r
const Dcm_DslProtocolRowType *listEntry = NULL;\r
Dcm_DslRunTimeProtocolParametersType *runtime = NULL;\r
\r
runtime->externalTxBufferStatus = DCM_IDLE;\r
runtime->localRxBuffer.status = DCM_IDLE;\r
runtime->localTxBuffer.status = DCM_IDLE;\r
- runtime->securityLevel = DCM_SEC_LEV_LOCKED; /** @req DCM033 **/\r
- runtime->sessionControl = DCM_DEFAULT_SESSION;\r
+ runtime->securityLevel = DCM_SEC_LEV_LOCKED; /** @req DCM033 */\r
+ runtime->sessionControl = DCM_DEFAULT_SESSION; /** @req DCM034 */\r
listEntry->DslProtocolRxBufferID->externalBufferRuntimeData->status = BUFFER_AVAILABLE;\r
listEntry->DslProtocolRxBufferID->externalBufferRuntimeData->status = BUFFER_AVAILABLE;\r
listEntry++;\r
if (runtime->sessionControl != DCM_DEFAULT_SESSION) { // Timeout if tester present is lost.\r
DECREMENT(runtime->S3ServerTimeoutCount);\r
if (runtime->S3ServerTimeoutCount == 0) {\r
- changeDiagnosticSession(runtime, DCM_DEFAULT_SESSION); /** @req DCM140 **/\r
+ changeDiagnosticSession(runtime, DCM_DEFAULT_SESSION); /** @req DCM140 */\r
}\r
}\r
switch (runtime->externalTxBufferStatus) { // #### TX buffer state. ####\r
if (DCM_Config.Dsl->DslDiagResp != NULL) {\r
if (DCM_Config.Dsl->DslDiagResp->DslDiagRespForceRespPendEn == TRUE) {\r
if (runtime->responsePendingCount != 0) {\r
- sendResponse(protocolRowEntry, DCM_E_RESPONSEPENDING); /** @req DCM024 **/\r
+ sendResponse(protocolRowEntry, DCM_E_RESPONSEPENDING); /** @req DCM024 */\r
DECREMENT( runtime->responsePendingCount );\r
} else {\r
- sendResponse(protocolRowEntry, DCM_E_GENERALREJECT); /** @req DCM120 **/\r
+ sendResponse(protocolRowEntry, DCM_E_GENERALREJECT); /** @req DCM120 */\r
releaseExternalRxTxBuffers(protocolRowEntry, runtime);\r
}\r
} else {\r
const uint32 txPduId = mainConnection->DslProtocolTx->DcmDslProtocolTxPduId;\r
DEBUG( DEBUG_MEDIUM, "runtime->externalTxBufferStatus enter state DCM_TRANSMIT_SIGNALED.\n" );\r
runtime->externalTxBufferStatus = DCM_TRANSMIT_SIGNALED;\r
- PduR_DcmTransmit(txPduId, &runtime->diagnosticResponseFromDsd); /** @req DCM237 **//* Will trigger PduR (CanTP) to call DslProvideTxBuffer(). */\r
+ PduR_DcmTransmit(txPduId, &runtime->diagnosticResponseFromDsd); /** @req DCM237 *//* Will trigger PduR (CanTP) to call DslProvideTxBuffer(). */\r
} else {\r
DEBUG( DEBUG_MEDIUM, "***** WARNING, THIS IS UNEXPECTED !!! ********.\n" );\r
const uint32 txPduId = protocolRowEntry->DslConnection->DslMainConnection->DslProtocolTx->DcmDslProtocolTxPduId;\r
DEBUG( DEBUG_MEDIUM, "runtime->externalTxBufferStatus enter state DSD_PENDING_RESPONSE_SIGNALED.\n", txPduId);\r
runtime->externalTxBufferStatus = DCM_TRANSMIT_SIGNALED;\r
DEBUG( DEBUG_MEDIUM, "Calling PduR_DcmTransmit with txPduId = %d from DslMain\n", txPduId);\r
- PduR_DcmTransmit(txPduId, &runtime->diagnosticResponseFromDsd); /** @req DCM237 **//* Will trigger PduR (CanTP) to call DslProvideTxBuffer(). */\r
+ PduR_DcmTransmit(txPduId, &runtime->diagnosticResponseFromDsd); /** @req DCM237 *//* Will trigger PduR (CanTP) to call DslProvideTxBuffer(). */\r
}\r
}\r
break;\r
// received a FF or a single frame and needs to obtain a buffer from the\r
// receiver so that received data can be forwarded.\r
\r
-BufReq_ReturnType DslProvideRxBufferToPdur(PduIdType dcmRxPduId, /** @req DCM094 **/\r
+BufReq_ReturnType DslProvideRxBufferToPdur(PduIdType dcmRxPduId,\r
PduLengthType tpSduLength, const PduInfoType **pduInfoPtr) {\r
BufReq_ReturnType ret = BUFREQ_NOT_OK;\r
const Dcm_DslProtocolRxType *protocolRx = NULL;\r
imask_t state = McuE_EnterCriticalSection();\r
if (findRxPduIdParentConfigurationLeafs(dcmRxPduId, &protocolRx, &mainConnection, &connection, &protocolRow, &runtime)) {\r
const Dcm_DslBufferType *externalRxBuffer = protocolRow->DslProtocolRxBufferID;\r
- if (externalRxBuffer->pduInfo.SduLength >= tpSduLength) { /** @req DCM443 **/\r
+ if (externalRxBuffer->pduInfo.SduLength >= tpSduLength) { /** @req DCM443 */\r
if ((runtime->externalRxBufferStatus == NOT_IN_USE) && (externalRxBuffer->externalBufferRuntimeData->status == BUFFER_AVAILABLE)) {\r
DEBUG( DEBUG_MEDIUM, "External buffer available!\n");\r
// ### EXTERNAL BUFFER IS AVAILABLE; GRAB IT AND REMEBER THAT WE OWN IT! ###\r
runtime->diagnosticRequestFromTester.SduDataPtr = externalRxBuffer->pduInfo.SduDataPtr;\r
runtime->diagnosticRequestFromTester.SduLength = tpSduLength;\r
*pduInfoPtr = &(runtime->diagnosticRequestFromTester);\r
- runtime->externalRxBufferStatus = PROVIDED_TO_PDUR; /** @req DCM342 **/\r
+ runtime->externalRxBufferStatus = PROVIDED_TO_PDUR; /** @req DCM342 */\r
ret = BUFREQ_OK;\r
} else {\r
DEBUG( DEBUG_MEDIUM, "Local buffer available!\n");\r
// The buffer is in use by the PduR, we can not help this because then\r
// we would have two different Rx-indications with same PduId but we\r
// will not know which buffer the indication should free.\r
- ret = BUFREQ_BUSY; /** @req DCM445 **/\r
+ ret = BUFREQ_BUSY; /** @req DCM445 */\r
}\r
}\r
} else {\r
- ret = BUFREQ_OVFL; /** @req DCM444 **/\r
+ ret = BUFREQ_OVFL; /** @req DCM444 */\r
}\r
if (ret == BUFREQ_OK) {\r
- stopS3SessionTimer(runtime); /** @req DCM141 **/\r
+ stopS3SessionTimer(runtime); /** @req DCM141 */\r
}\r
}\r
McuE_ExitCriticalSection(state);\r
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r
// This function is called called by the PduR typically when CanTp has\r
// received the diagnostic request, copied it to the provided buffer and need to indicate\r
-// this to the DCM (DSL) module via propritary API.\r
+// this to the DCM (DSL) module via proprietary API.\r
\r
-void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) { /** @req DCM093 **/\r
+void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) {\r
const Dcm_DslProtocolRxType *protocolRx = NULL;\r
const Dcm_DslMainConnectionType *mainConnection = NULL;\r
const Dcm_DslConnectionType *connection = NULL;\r
Std_ReturnType higherLayerResp;\r
imask_t state;\r
\r
- /** @req DCM345, this needs to be verified when connection to CanIf works. **/\r
+ /** @req DCM345, this needs to be verified when connection to CanIf works. */\r
\r
if (findRxPduIdParentConfigurationLeafs(dcmRxPduId, &protocolRx, &mainConnection, &connection, &protocolRow, &runtime)) {\r
timeParams = protocolRow->DslProtocolTimeLimit;\r
// the Concurrent "Test Present" functionality.\r
state = McuE_EnterCriticalSection();\r
if (runtime->externalRxBufferStatus == PROVIDED_TO_PDUR) {\r
- if ( result == NTFRSLT_OK ) { /** @req DCM111 **/\r
+ if ( result == NTFRSLT_OK ) { /** @req DCM111 */\r
if (isTesterPresentCommand(&(protocolRow->DslProtocolRxBufferID->pduInfo))) {\r
- startS3SessionTimer(runtime, protocolRow); /** @req DCM141 **//** @req DCM112 **//** @req DCM113 **/\r
+ startS3SessionTimer(runtime, protocolRow); /** @req DCM141 *//** @req DCM112 *//** @req DCM113 */\r
runtime->externalRxBufferStatus = NOT_IN_USE;\r
protocolRow->DslProtocolRxBufferID->externalBufferRuntimeData->status = BUFFER_AVAILABLE;\r
} else {\r
if (runtime->protocolStarted == FALSE) {\r
- higherLayerResp = StartProtocolHelper(protocolRow->DslProtocolID); /** @req DCM036 **/\r
+ higherLayerResp = StartProtocolHelper(protocolRow->DslProtocolID); /** @req DCM036 */\r
if (higherLayerResp == E_OK) {\r
runtime->protocolStarted = TRUE;\r
DcmDslRunTimeData.activeProtocol = protocolRow;\r
}\r
if (runtime->protocolStarted == TRUE) {\r
if (runtime->diagnosticActiveComM == FALSE) {\r
- ComM_DCM_ActivateDiagnostic(); /* @DCM163 */\r
+ ComM_DCM_ActivateDiagnostic(); /** @req DCM163 */\r
runtime->diagnosticActiveComM = TRUE;\r
}\r
timeParams = protocolRow->DslProtocolTimeLimit;\r
runtime->stateTimeoutCount = DCM_CONVERT_MS_TO_MAIN_CYCLES(timeParams->TimStrP2ServerMax); /* See 9.2.2. */\r
- runtime->externalRxBufferStatus = PROVIDED_TO_DSD; /** @req DCM241 **/\r
+ runtime->externalRxBufferStatus = PROVIDED_TO_DSD; /** @req DCM241 */\r
if (runtime->externalTxBufferStatus == NOT_IN_USE) {\r
DEBUG( DEBUG_MEDIUM, "External Tx buffer available, we can pass it to DSD.\n");\r
} else {\r
DEBUG( DEBUG_MEDIUM, "External buffer not available, a response is being transmitted?\n");\r
}\r
- runtime->externalTxBufferStatus = PROVIDED_TO_DSD; /** @req DCM241 **/\r
+ runtime->externalTxBufferStatus = PROVIDED_TO_DSD; /** @req DCM241 */\r
runtime->responsePendingCount = DCM_Config.Dsl->DslDiagResp->DslDiagRespMaxNumRespPend;\r
runtime->diagnosticResponseFromDsd.SduDataPtr = protocolRow->DslProtocolTxBufferID->pduInfo.SduDataPtr;\r
runtime->diagnosticResponseFromDsd.SduLength = protocolRow->DslProtocolTxBufferID->pduInfo.SduLength;\r
runtime->diagReqestRxPduId = dcmRxPduId;\r
DsdDslDataIndication( // qqq: We are inside a critical section.\r
&(runtime->diagnosticRequestFromTester),\r
- protocolRow->DslProtocolSIDTable,\r
+ protocolRow->DslProtocolSIDTable, /** @req DCM035 */\r
protocolRx->DslProtocolAddrType,\r
mainConnection->DslProtocolTx->DcmDslProtocolTxPduId,\r
&(runtime->diagnosticResponseFromDsd),\r
dcmRxPduId);\r
}\r
}\r
- } else { /** @req DCM344 **/\r
+ } else { /** @req DCM344 */\r
// The indication was not equal to NTFRSLT_OK, release the resources and no forward to DSD.\r
runtime->externalRxBufferStatus = NOT_IN_USE;\r
protocolRow->DslProtocolRxBufferID->externalBufferRuntimeData->status = BUFFER_AVAILABLE;\r
if (runtime->localRxBuffer.status == PROVIDED_TO_PDUR) {\r
if ( result == NTFRSLT_OK ) { // Make sure that the data in buffer is valid.\r
if (isTesterPresentCommand(&(runtime->localRxBuffer.PduInfo))) {\r
- startS3SessionTimer(runtime, protocolRow); /** @req DCM141 **//** @req DCM112 **//** @req DCM113 **/\r
+ startS3SessionTimer(runtime, protocolRow); /** @req DCM141 *//** @req DCM112 *//** @req DCM113 */\r
}\r
}\r
runtime->localRxBuffer.status = NOT_IN_USE;\r
// it has detected that the pending request has been answered by DSD\r
// (or any other module?).\r
\r
-BufReq_ReturnType DslProvideTxBuffer(PduIdType dcmTxPduId, const PduInfoType **pduInfoPtr, PduLengthType length) { /** @req DCM092 **/\r
+BufReq_ReturnType DslProvideTxBuffer(PduIdType dcmTxPduId, const PduInfoType **pduInfoPtr, PduLengthType length) {\r
BufReq_ReturnType ret = BUFREQ_NOT_OK;\r
const Dcm_DslProtocolTxType *protocolTx = NULL;\r
const Dcm_DslMainConnectionType *mainConnection = NULL;\r
if (findTxPduIdParentConfigurationLeafs(dcmTxPduId, &protocolTx, &mainConnection, &connection, &protocolRow, &runtime)) {\r
switch (runtime->externalTxBufferStatus) { // ### EXTERNAL TX BUFFER ###\r
case DCM_TRANSMIT_SIGNALED: {\r
- /** @req DCM346 - length verification is already done if this state is reached. **/\r
+ /** @req DCM346 */ /* Length verification is already done if this state is reached. */\r
*pduInfoPtr = &(protocolRow->DslProtocolTxBufferID->pduInfo);\r
- runtime->externalTxBufferStatus = PROVIDED_TO_PDUR; /** @req DCM349 **/\r
+ runtime->externalTxBufferStatus = PROVIDED_TO_PDUR; /** @req DCM349 */\r
ret = BUFREQ_OK;\r
break;\r
}\r
state = McuE_EnterCriticalSection();\r
switch (runtime->externalTxBufferStatus) { // ### EXTERNAL TX BUFFER ###\r
case PROVIDED_TO_PDUR: {\r
- ComM_DCM_InactivateDiagnostic();\r
- startS3SessionTimer(runtime, protocolRow); // @DCM141\r
- releaseExternalRxTxBuffers(protocolRow, runtime); /** @req DCM118 **//** @req DCM353 **//** @req DCM354 **/\r
+ ComM_DCM_InactivateDiagnostic(); /** @req DCM164 */\r
+ startS3SessionTimer(runtime, protocolRow); /** @req DCM141 */\r
+ releaseExternalRxTxBuffers(protocolRow, runtime); /** @req DCM118 *//** @req DCM352 *//** @req DCM353 *//** @req DCM354 */\r
externalBufferReleased = TRUE;\r
DEBUG( DEBUG_MEDIUM, "Released external buffer OK!\n");\r
- DsdDataConfirmation(mainConnection->DslProtocolTx->DcmDslProtocolTxPduId, result); /** @req DCM117 **//** @req DCM235 **/\r
+ DsdDataConfirmation(mainConnection->DslProtocolTx->DcmDslProtocolTxPduId, result); /** @req DCM117 *//** @req DCM235 */\r
break;\r
}\r
default:\r
\r
\r
\r
+/*\r
+ * General requirements\r
+ */\r
+/** @req DCM273 */ /** @req DCM272 */\r
+/** @req DCM039 */ /** @req DCM038 */ /** @req DCM269 */\r
+/** @req DCM271 */ /** @req DCM274 */ /** @req DCM275 */ /** @req DCM424 */\r
+/** @req DCM007 */\r
+\r
#include <string.h>\r
#include "Dcm.h"\r
#include "Dcm_Internal.h"\r
\r
void DspUdsDiagnosticSessionControl(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
- // @req DCM250 **/\r
+ /** @req DCM250 */\r
const Dcm_DspSessionRowType *sessionRow = DCM_Config.Dsp->DspSession->DspSessionRow;\r
Dcm_SesCtrlType reqSessionType;\r
Std_ReturnType result;\r
if (!sessionRow->Arc_EOL) {\r
result = askApplicationForSessionPermission(reqSessionType);\r
if (result == E_OK) {\r
- DslSetSesCtrlType(reqSessionType); /** @req DCM311 **/\r
+ DslSetSesCtrlType(reqSessionType); /** @req DCM311 */\r
// Create positive response\r
- /** @req DCM039.2 **/\r
pduTxData->SduDataPtr[1] = reqSessionType;\r
pduTxData->SduLength = 2;\r
- DsdDspProcessingDone(DCM_E_POSITIVERESPONSE); /** @req DCM269.2 **/\r
+ DsdDspProcessingDone(DCM_E_POSITIVERESPONSE);\r
}\r
else {\r
// TODO: Add handling of special case of E_FORCE_RCRRP (Dcm138)\r
- DsdDspProcessingDone(DCM_E_CONDITIONSNOTCORRECT); /** @req DCM308 **/\r
+ DsdDspProcessingDone(DCM_E_CONDITIONSNOTCORRECT); /** @req DCM308 */\r
}\r
}\r
else {\r
- DsdDspProcessingDone(DCM_E_SUBFUNCTIONNOTSUPPORTED); /** @req DCM307 **/\r
+ DsdDspProcessingDone(DCM_E_SUBFUNCTIONNOTSUPPORTED); /** @req DCM307 */\r
}\r
}\r
else {\r
// Wrong length\r
- DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT); /** @req DCM272.1 **/\r
+ DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT);\r
}\r
}\r
\r
\r
void DspUdsEcuReset(const PduInfoType *pduRxData, PduIdType txPduId, PduInfoType *pduTxData)\r
{\r
- // @req DCM260 **/\r
+ /** @req DCM260 */\r
uint8 reqResetType;\r
\r
if (pduRxData->SduLength == 2) {\r
dspUdsEcuResetData.resetPduId = txPduId;\r
\r
// Create positive response\r
- /** @req DCM039.1 **/\r
pduTxData->SduDataPtr[1] = reqResetType;\r
pduTxData->SduLength = 2;\r
- DsdDspProcessingDone(DCM_E_POSITIVERESPONSE); /** @req DCM269.3 **/\r
+ DsdDspProcessingDone(DCM_E_POSITIVERESPONSE);\r
break;\r
\r
default:\r
- DsdDspProcessingDone(DCM_E_SUBFUNCTIONNOTSUPPORTED); /** @req DCM273.3 **/\r
+ DsdDspProcessingDone(DCM_E_SUBFUNCTIONNOTSUPPORTED);\r
break;\r
}\r
}\r
else {\r
// Wrong length\r
- DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT); /** @req DCM272.3 **/\r
+ DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT);\r
}\r
}\r
\r
\r
void DspUdsClearDiagnosticInformation(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
+ /** @req DCM247 */\r
uint32 dtc;\r
Dem_ReturnClearDTCType result;\r
\r
if (pduRxData->SduLength == 4) {\r
dtc = BYTES_TO_DTC(pduRxData->SduDataPtr[1], pduRxData->SduDataPtr[2], pduRxData->SduDataPtr[3]);\r
\r
- result = Dem_ClearDTC(dtc, DEM_DTC_KIND_ALL_DTCS, DEM_DTC_ORIGIN_PRIMARY_MEMORY);\r
+ result = Dem_ClearDTC(dtc, DEM_DTC_KIND_ALL_DTCS, DEM_DTC_ORIGIN_PRIMARY_MEMORY); /** @req DCM005 */\r
\r
switch (result)\r
{\r
case DEM_CLEAR_OK:\r
// Create positive response\r
- /** @req DCM039.1 **/\r
pduTxData->SduLength = 1;\r
- DsdDspProcessingDone(DCM_E_POSITIVERESPONSE); /** @req DCM269.4 **/\r
+ DsdDspProcessingDone(DCM_E_POSITIVERESPONSE);\r
break;\r
\r
default:\r
}\r
else {\r
// Wrong length\r
- DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT); /** @req DCM272.1 **/\r
+ DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT);\r
}\r
}\r
\r
Dem_ReturnSetDTCFilterType setDtcFilterResult;\r
\r
// Setup the DTC filter\r
- switch (pduRxData->SduDataPtr[1]) /** @reg DCM293 **/\r
+ switch (pduRxData->SduDataPtr[1]) /** @req DCM293 */\r
{\r
case 0x01: // reportNumberOfDTCByStatusMask\r
setDtcFilterResult = Dem_SetDTCFilter(pduRxData->SduDataPtr[2], DEM_DTC_KIND_ALL_DTCS, DEM_DTC_ORIGIN_PRIMARY_MEMORY, DEM_FILTER_WITH_SEVERITY_NO, VALUE_IS_NOT_USED, DEM_FILTER_FOR_FDC_NO);\r
uint8 dtcStatusMask;\r
TxDataType *txData = (TxDataType*)pduTxData->SduDataPtr;\r
\r
- /** @reg DCM376 **/\r
+ /** @req DCM376 */\r
Dem_GetNumberOfFilteredDtc(&numberOfFilteredDtc);\r
Dem_GetDTCStatusAvailabilityMask(&dtcStatusMask);\r
\r
// Create positive response (ISO 14229-1 table 251)\r
- /** @req DCM039.0x19 **/\r
- txData->reportType = pduRxData->SduDataPtr[1]; // reportType\r
+ txData->reportType = pduRxData->SduDataPtr[1]; // reportType\r
txData->dtcStatusAvailabilityMask = dtcStatusMask; // DTCStatusAvailabilityMask\r
txData->dtcFormatIdentifier = Dem_GetTranslationType(); // DTCFormatIdentifier\r
txData->dtcCountHighByte = (numberOfFilteredDtc >> 8); // DTCCount high byte\r
} TxDataType;\r
\r
// Setup the DTC filter\r
- switch (pduRxData->SduDataPtr[1]) /** @reg DCM378 **/\r
+ switch (pduRxData->SduDataPtr[1]) /** @req DCM378 */\r
{\r
case 0x02: // reportDTCByStatusMask\r
setDtcFilterResult = Dem_SetDTCFilter(pduRxData->SduDataPtr[2], DEM_DTC_KIND_ALL_DTCS, DEM_DTC_ORIGIN_PRIMARY_MEMORY, DEM_FILTER_WITH_SEVERITY_NO, VALUE_IS_NOT_USED, DEM_FILTER_FOR_FDC_NO);\r
Dem_EventStatusExtendedType dtcStatus;\r
uint16 nrOfDtcs = 0;\r
\r
- /** @reg DCM377 **/\r
+ /** @req DCM377 */\r
Dem_GetDTCStatusAvailabilityMask(&dtcStatusMask);\r
\r
// Create positive response (ISO 14229-1 table 252)\r
- /** @req DCM039.0x19 **/\r
txData->reportType = pduRxData->SduDataPtr[1];\r
txData->dtcStatusAvailabilityMask = dtcStatusMask;\r
\r
- if (dtcStatusMask != 0x00) { /** @req DCM008 **/\r
+ if (dtcStatusMask != 0x00) { /** @req DCM008 */\r
getNextFilteredDtcResult = Dem_GetNextFilteredDTC(&dtc, &dtcStatus);\r
while (getNextFilteredDtcResult == DEM_FILTERED_OK) {\r
txData->dtcAndStatusRecord[nrOfDtcs].dtcHighByte = DTC_HIGH_BYTE(dtc);\r
uint8 endRecNum;\r
\r
// Switch on sub function\r
- switch (pduRxData->SduDataPtr[1]) /** @reg DCM378 **/\r
+ switch (pduRxData->SduDataPtr[1]) /** @req DCM378 */\r
{\r
case 0x06: // reportDTCExtendedDataRecordByDTCNumber\r
dtcOrigin = DEM_DTC_ORIGIN_PRIMARY_MEMORY;\r
Dem_EventStatusExtendedType statusOfDtc;\r
\r
dtc = BYTES_TO_DTC(pduRxData->SduDataPtr[2], pduRxData->SduDataPtr[3], pduRxData->SduDataPtr[4]);\r
- getStatusOfDtcResult = Dem_GetStatusOfDTC(dtc, DEM_DTC_KIND_ALL_DTCS, dtcOrigin, &statusOfDtc); /** @req DCM295 **/ /** @req DCM475 **/\r
+ getStatusOfDtcResult = Dem_GetStatusOfDTC(dtc, DEM_DTC_KIND_ALL_DTCS, dtcOrigin, &statusOfDtc); /** @req DCM295 */ /** @req DCM475 */\r
if (getStatusOfDtcResult == DEM_STATUS_OK) {\r
Dem_ReturnGetExtendedDataRecordByDTCType getExtendedDataRecordByDtcResult;\r
uint16 recNum;\r
uint8 recLength;\r
uint16 txIndex = 6;\r
\r
- /** @req DCM297 **/ /** @req DCM474 **/ /** @req DCM386 **/\r
+ /** @req DCM297 */ /** @req DCM474 */ /** @req DCM386 */\r
pduTxData->SduDataPtr[1] = pduRxData->SduDataPtr[1]; // Sub function\r
pduTxData->SduDataPtr[2] = DTC_HIGH_BYTE(dtc); // DTC high byte\r
pduTxData->SduDataPtr[3] = DTC_MID_BYTE(dtc); // DTC mid byte\r
pduTxData->SduDataPtr[5] = statusOfDtc; // DTC status\r
for (recNum = startRecNum; recNum <= endRecNum; recNum++) {\r
recLength = pduTxData->SduLength - txIndex -1; // Calculate what's left in buffer\r
- /** @req DCM296 **/ /** @req DCM476 **/ /** @req DCM382 **/\r
+ /** @req DCM296 */ /** @req DCM476 */ /** @req DCM382 */\r
getExtendedDataRecordByDtcResult = Dem_GetExtendedDataRecordByDTC(dtc, DEM_DTC_KIND_ALL_DTCS, dtcOrigin, recNum, &pduTxData->SduDataPtr[txIndex+1], &recLength);\r
if (getExtendedDataRecordByDtcResult == DEM_RECORD_OK) {\r
pduTxData->SduDataPtr[txIndex++] = recNum;\r
/* Instead of calling Dem_GetSizeOfExtendedDataRecordByDTC() the result from Dem_GetExtendedDataRecordByDTC() is used */\r
- /** @req DCM478 **/ /** @req DCM479 **/ /** @req DCM480 **/\r
+ /** @req DCM478 */ /** @req DCM479 */ /** @req DCM480 */\r
txIndex += recLength;\r
}\r
else {\r
\r
void DspUdsReadDtcInformation(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
- /** @reg DCM248 **/\r
+ /** @req DCM248 */\r
// Sub function number 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15\r
const uint8 sduLength[0x16] = {0, 3, 3, 6, 6, 3, 6, 4, 4, 5, 2, 2, 2, 2, 2, 3, 6, 3, 3, 3, 2, 2};\r
\r
}\r
else {\r
// Wrong length\r
- responseCode = DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT; /** @req DCM272.0x19 **/\r
+ responseCode = DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT;\r
}\r
}\r
else {\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
- if ((didPtr->DspDidInfoRef->DspDidAccess.DspDidRead != NULL) && (didPtr->DspDidConditionCheckReadFnc != NULL) && (didPtr->DspDidReadDataFnc != NULL)) { /** @req DCM433 **/\r
- if (DspCheckSessionLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidRead->DspDidReadSessionRef)) { /** @req DCM434 **/\r
- if (DspCheckSecurityLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidRead->DspDidReadSecurityLevelRef)) { /** @req DCM435 **/\r
+ if ((didPtr->DspDidInfoRef->DspDidAccess.DspDidRead != NULL) && (didPtr->DspDidConditionCheckReadFnc != NULL) && (didPtr->DspDidReadDataFnc != NULL)) { /** @req DCM433 */\r
+ if (DspCheckSessionLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidRead->DspDidReadSessionRef)) { /** @req DCM434 */\r
+ if (DspCheckSecurityLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidRead->DspDidReadSecurityLevelRef)) { /** @req DCM435 */\r
Std_ReturnType result;\r
Dcm_NegativeResponseCodeType errorCode;\r
result = didPtr->DspDidConditionCheckReadFnc(&errorCode);\r
- if ((result == E_OK) && (errorCode == DCM_E_POSITIVERESPONSE)) { /** @req DCM439 **/\r
+ if ((result == E_OK) && (errorCode == DCM_E_POSITIVERESPONSE)) { /** @req DCM439 */\r
uint16 didLen;\r
result = E_NOT_OK;\r
- if (didPtr->DspDidInfoRef->DspDidFixedLength) { /** @req DCM436 **/\r
+ if (didPtr->DspDidInfoRef->DspDidFixedLength) { /** @req DCM436 */\r
didLen = didPtr->DspDidSize;\r
result = E_OK;\r
}\r
(*txPos)++;\r
pduTxData->SduDataPtr[*txPos] = (didPtr->DspDidIdentifier >> 0) & 0xFF;\r
(*txPos)++;\r
- result = didPtr->DspDidReadDataFnc(&pduTxData->SduDataPtr[*txPos]); /** @req DCM437 **/\r
+ result = didPtr->DspDidReadDataFnc(&pduTxData->SduDataPtr[*txPos]); /** @req DCM437 */\r
*txPos += didLen;\r
\r
if (result != E_OK) {\r
}\r
\r
if (responseCode == DCM_E_POSITIVERESPONSE) {\r
- // Recurse trough the rest of the dids. /** @req DCM440 **/\r
+ // Recurse trough the rest of the dids. /** @req DCM440 */\r
uint16 i;\r
for (i=0; (!didPtr->DspDidRef[i]->Arc_EOL) && (responseCode == DCM_E_POSITIVERESPONSE); i++) {\r
responseCode = readDidData(didPtr->DspDidRef[i], pduTxData, txPos);\r
\r
void DspUdsReadDataByIdentifier(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
- /** @req DCM253 **/\r
+ /** @req DCM253 */\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
uint8 nrOfDids;\r
uint16 didNr;\r
\r
for (i = 0; (i < nrOfDids) && (responseCode == DCM_E_POSITIVERESPONSE); i++) {\r
didNr = (pduRxData->SduDataPtr[1+i*2] << 8) + pduRxData->SduDataPtr[2+i*2];\r
- if (lookupDid(didNr, &didPtr)) { /** @req DCM438 **/\r
+ if (lookupDid(didNr, &didPtr)) { /** @req DCM438 */\r
responseCode = readDidData(didPtr, pduTxData, &txPos);\r
}\r
else { // DID not found\r
(*txPos)++;\r
pduTxData->SduDataPtr[*txPos] = (didPtr->DspDidIdentifier >> 0) & 0xFF;\r
(*txPos)++;\r
- result = didPtr->DspDidGetScalingInfoFnc(&pduTxData->SduDataPtr[*txPos], &errorCode); /** @req DCM394 **/\r
+ result = didPtr->DspDidGetScalingInfoFnc(&pduTxData->SduDataPtr[*txPos], &errorCode); /** @req DCM394 */\r
*txPos += scalingInfoLen;\r
\r
if ((result != E_OK) || (errorCode != DCM_E_POSITIVERESPONSE)) {\r
\r
void DspUdsReadScalingDataByIdentifier(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
- /** @req DCM258 **/\r
+ /** @req DCM258 */\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
uint16 didNr;\r
const Dcm_DspDidType *didPtr = NULL;\r
{\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
- if ((didPtr->DspDidInfoRef->DspDidAccess.DspDidWrite != NULL) && (didPtr->DspDidConditionCheckWriteFnc != NULL) && (didPtr->DspDidWriteDataFnc != NULL)) { /** @req DCM468 **/\r
- if (DspCheckSessionLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidWrite->DspDidWriteSessionRef)) { /** @req DCM469 **/\r
- if (DspCheckSecurityLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidWrite->DspDidWriteSecurityLevelRef)) { /** @req DCM470 **/\r
+ if ((didPtr->DspDidInfoRef->DspDidAccess.DspDidWrite != NULL) && (didPtr->DspDidConditionCheckWriteFnc != NULL) && (didPtr->DspDidWriteDataFnc != NULL)) { /** @req DCM468 */\r
+ if (DspCheckSessionLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidWrite->DspDidWriteSessionRef)) { /** @req DCM469 */\r
+ if (DspCheckSecurityLevel(didPtr->DspDidInfoRef->DspDidAccess.DspDidWrite->DspDidWriteSecurityLevelRef)) { /** @req DCM470 */\r
Std_ReturnType result;\r
Dcm_NegativeResponseCodeType errorCode;\r
- result = didPtr->DspDidConditionCheckWriteFnc(&errorCode); /** @req DCM471 **/\r
+ result = didPtr->DspDidConditionCheckWriteFnc(&errorCode); /** @req DCM471 */\r
if ((result == E_OK) && (errorCode == DCM_E_POSITIVERESPONSE)) {\r
uint16 didLen;\r
result = E_NOT_OK;\r
- if (didPtr->DspDidInfoRef->DspDidFixedLength) { /** @req DCM472 **/\r
+ if (didPtr->DspDidInfoRef->DspDidFixedLength) { /** @req DCM472 */\r
didLen = didPtr->DspDidSize;\r
result = E_OK;\r
}\r
}\r
\r
if (result == E_OK) {\r
- if (didLen == writeDidLen) { /** @req DCM473 **/\r
- result = didPtr->DspDidWriteDataFnc(&pduRxData->SduDataPtr[3], didLen, &errorCode); /** @req DCM395 **/\r
+ if (didLen == writeDidLen) { /** @req DCM473 */\r
+ result = didPtr->DspDidWriteDataFnc(&pduRxData->SduDataPtr[3], didLen, &errorCode); /** @req DCM395 */\r
if ((result != E_OK) || (errorCode != DCM_E_POSITIVERESPONSE)) {\r
responseCode = DCM_E_CONDITIONSNOTCORRECT;\r
}\r
\r
void DspUdsWriteDataByIdentifier(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
- /** @req DCM255 **/\r
+ /** @req DCM255 */\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
uint16 didNr;\r
const Dcm_DspDidType *didPtr = NULL;\r
\r
didDataLength = pduRxData->SduLength - 3;\r
didNr = (pduRxData->SduDataPtr[1] << 8) + pduRxData->SduDataPtr[2];\r
- if (lookupDid(didNr, &didPtr)) { /** @req DCM467 **/\r
+ if (lookupDid(didNr, &didPtr)) { /** @req DCM467 */\r
responseCode = writeDidData(didPtr, pduRxData, didDataLength);\r
}\r
else { // DID not found\r
\r
void DspUdsSecurityAccess(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
- /** @req DCM252 **/\r
+ /** @req DCM252 */\r
Dcm_NegativeResponseCodeType responseCode = DCM_E_POSITIVERESPONSE;\r
\r
// Check sub function range (0x01 to 0x42)\r
}\r
if (!securityRow->Arc_EOL) {\r
// Check length\r
- if (pduRxData->SduLength == (2 + securityRow->DspSecurityADRSize)) { /** @req DCM321.1 **/\r
+ if (pduRxData->SduLength == (2 + securityRow->DspSecurityADRSize)) { /** @req DCM321.RequestSeed */\r
Dcm_SecLevelType activeSecLevel;\r
Dcm_GetSecurityLevel(&activeSecLevel);\r
- if (requestedSecurityLevel == activeSecLevel) { /** @req DCM323 **/\r
+ if (requestedSecurityLevel == activeSecLevel) { /** @req DCM323 */\r
pduTxData->SduDataPtr[1] = pduRxData->SduDataPtr[1];\r
// If same level set the seed to zeroes\r
memset(&pduTxData->SduDataPtr[2], 0, securityRow->DspSecuritySeedSize);\r
}\r
else {\r
// New security level ask for seed\r
- getSeedResult = securityRow->GetSeed(&pduRxData->SduDataPtr[2], &pduTxData->SduDataPtr[2], &getSeedErrorCode);\r
+ getSeedResult = securityRow->GetSeed(&pduRxData->SduDataPtr[2], &pduTxData->SduDataPtr[2], &getSeedErrorCode); /** @req DCM324.RequestSeed */\r
if ((getSeedResult == E_OK) && (getSeedErrorCode == E_OK)) {\r
// Everything ok add sub function to tx message and send it.\r
pduTxData->SduDataPtr[1] = pduRxData->SduDataPtr[1];\r
else {\r
// sendKey message\r
if (dspUdsSecurityAccesData.reqInProgress) {\r
- if (pduRxData->SduLength == (2 + dspUdsSecurityAccesData.reqSecLevelRef->DspSecurityKeySize)) { /** @req DCM321 **/\r
+ if (pduRxData->SduLength == (2 + dspUdsSecurityAccesData.reqSecLevelRef->DspSecurityKeySize)) { /** @req DCM321.SendKey */\r
if (requestedSecurityLevel == dspUdsSecurityAccesData.reqSecLevel) {\r
Std_ReturnType compareKeyResult;\r
- compareKeyResult = dspUdsSecurityAccesData.reqSecLevelRef->CompareKey(&pduRxData->SduDataPtr[2]);\r
+ compareKeyResult = dspUdsSecurityAccesData.reqSecLevelRef->CompareKey(&pduRxData->SduDataPtr[2]); /** @req DCM324.SendKey */\r
if (compareKeyResult == E_OK) {\r
// Request accepted\r
// Kill timer\r
- DslSetSecurityLevel(dspUdsSecurityAccesData.reqSecLevelRef->DspSecurityLevel);\r
+ DslSetSecurityLevel(dspUdsSecurityAccesData.reqSecLevelRef->DspSecurityLevel); /** @req DCM325 */\r
dspUdsSecurityAccesData.reqInProgress = FALSE;\r
pduTxData->SduDataPtr[1] = pduRxData->SduDataPtr[1];\r
pduTxData->SduLength = 2;\r
\r
void DspUdsTesterPresent(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
+ /** @req DCM251 */\r
if (pduRxData->SduLength == 2) {\r
switch (pduRxData->SduDataPtr[1])\r
{\r
case ZERO_SUB_FUNCTION:\r
DslResetSessionTimeoutTimer();\r
// Create positive response\r
- /** @req DCM039.1 **/\r
pduTxData->SduDataPtr[1] = ZERO_SUB_FUNCTION;\r
pduTxData->SduLength = 2;\r
- DsdDspProcessingDone(DCM_E_POSITIVERESPONSE); /** @req DCM269.1 **/\r
+ DsdDspProcessingDone(DCM_E_POSITIVERESPONSE);\r
break;\r
\r
default:\r
- DsdDspProcessingDone(DCM_E_SUBFUNCTIONNOTSUPPORTED); /** @req DCM273.1 **/\r
+ DsdDspProcessingDone(DCM_E_SUBFUNCTIONNOTSUPPORTED);\r
break;\r
}\r
}\r
else {\r
// Wrong length\r
- DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT); /** @req DCM272.1 **/\r
+ DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT);\r
}\r
}\r
\r
\r
void DspUdsControlDtcSetting(const PduInfoType *pduRxData, PduInfoType *pduTxData)\r
{\r
+ /** @req DCM249 */\r
Dem_ReturnControlDTCStorageType resultCode;\r
\r
if (pduRxData->SduLength == 2) {\r
switch (pduRxData->SduDataPtr[1])\r
{\r
- case 0x01: // ON /** @req DCM249.1 **/\r
- resultCode = Dem_EnableDTCStorage(DEM_DTC_GROUP_ALL_DTCS, DEM_DTC_KIND_ALL_DTCS); /** @req DCM304 **/\r
+ case 0x01: // ON\r
+ resultCode = Dem_EnableDTCStorage(DEM_DTC_GROUP_ALL_DTCS, DEM_DTC_KIND_ALL_DTCS); /** @req DCM304 */\r
if (resultCode == DEM_CONTROL_DTC_STORAGE_OK) {\r
pduTxData->SduDataPtr[1] = 0x01;\r
pduTxData->SduLength = 2;\r
}\r
break;\r
\r
- case 0x02: // OFF /** @req DCM249.2 **/\r
- resultCode = Dem_DisableDTCStorage(DEM_DTC_GROUP_ALL_DTCS, DEM_DTC_KIND_ALL_DTCS); /** @req DCM406 **/\r
+ case 0x02: // OFF\r
+ resultCode = Dem_DisableDTCStorage(DEM_DTC_GROUP_ALL_DTCS, DEM_DTC_KIND_ALL_DTCS); /** @req DCM406 */\r
if (resultCode == DEM_CONTROL_DTC_STORAGE_OK) {\r
pduTxData->SduDataPtr[1] = 0x02;\r
pduTxData->SduLength = 2;\r
#ifndef DCM_LCFG_H_\r
#define DCM_LCFG_H_\r
\r
+/*\r
+ * General requirements\r
+ */\r
+/** @req DCM075 */ /** @req DCM076 */\r
+\r
+\r
#include "ComStack_Types.h"\r
#include "Dcm_Types.h"\r
\r
\r
// 10.2.44\r
typedef struct {\r
- Dcm_SesCtrlType DspSessionLevel; // (1)\r
- uint16 DspSessionP2ServerMax; // (1)\r
- uint16 DspSessionP2StarServerMax; // (1)\r
- boolean Arc_EOL;\r
-} Dcm_DspSessionRowType;\r
+ Dcm_SesCtrlType DspSessionLevel; // (1)\r
+ uint16 DspSessionP2ServerMax; // (1)\r
+ uint16 DspSessionP2StarServerMax; // (1)\r
+ boolean Arc_EOL;\r
+} Dcm_DspSessionRowType; /** @req DCM072 */\r
\r
// 10.2.42\r
typedef struct {\r
- Dcm_SecLevelType DspSecurityLevel; // (1)\r
- uint16 DspSecurityDelayTimeOnBoot; // (1)\r
- uint8 DspSecurityNumAttDelay; // (1)\r
- uint16 DspSecurityDelayTime; // (1)\r
- uint8 DspSecurityNumAttLock; // (1)\r
- uint8 DspSecurityADRSize; // (0..1)\r
- uint8 DspSecuritySeedSize; // (1)\r
- uint8 DspSecurityKeySize; // (1)\r
- Dcm_CallbackGetSeedFncType GetSeed;\r
- Dcm_CallbackCompareKeyFncType CompareKey;\r
- boolean Arc_EOL;\r
-} Dcm_DspSecurityRowType;\r
+ Dcm_SecLevelType DspSecurityLevel; // (1)\r
+ uint16 DspSecurityDelayTimeOnBoot; // (1)\r
+ uint8 DspSecurityNumAttDelay; // (1)\r
+ uint16 DspSecurityDelayTime; // (1)\r
+ uint8 DspSecurityNumAttLock; // (1)\r
+ uint8 DspSecurityADRSize; // (0..1)\r
+ uint8 DspSecuritySeedSize; // (1)\r
+ uint8 DspSecurityKeySize; // (1)\r
+ Dcm_CallbackGetSeedFncType GetSeed;\r
+ Dcm_CallbackCompareKeyFncType CompareKey;\r
+ boolean Arc_EOL;\r
+} Dcm_DspSecurityRowType; /** @req DCM073 */\r
\r
// 10.2.23\r
typedef struct {\r
- uint8 DspDidControlRecordSize; // (1)\r
- uint8 DspDidControlOptionRecordSize; // (1)\r
- uint8 DspDidControlStatusRecordSize; // (1)\r
+ uint8 DspDidControlRecordSize; // (1)\r
+ uint8 DspDidControlOptionRecordSize; // (1)\r
+ uint8 DspDidControlStatusRecordSize; // (1)\r
} Dcm_DspDidControlRecordSizesType;\r
\r
// 10.2.26\r
typedef struct {\r
- const Dcm_DspSessionRowType **DspDidControlSessionRef; // (1..*)\r
- const Dcm_DspSecurityRowType **DspDidControlSecurityLevelRef; // (1..*)\r
- const Dcm_DspDidControlRecordSizesType *DspDidFreezeCurrentState; // (0..1)\r
- const Dcm_DspDidControlRecordSizesType *DspDidResetToDefault; // (0..1)\r
- const Dcm_DspDidControlRecordSizesType *DspDidReturnControlToEcu; // (0..1)\r
- const Dcm_DspDidControlRecordSizesType *DspDidShortTermAdjustment; // (0..1)\r
-} Dcm_DspDidControlType;\r
+ const Dcm_DspSessionRowType **DspDidControlSessionRef; // (1..*) /** @req DCM621 */\r
+ const Dcm_DspSecurityRowType **DspDidControlSecurityLevelRef; // (1..*) /** @req DCM620 */\r
+ const Dcm_DspDidControlRecordSizesType *DspDidFreezeCurrentState; // (0..1) /** @req DCM624 */\r
+ const Dcm_DspDidControlRecordSizesType *DspDidResetToDefault; // (0..1) /** @req DCM623 */\r
+ const Dcm_DspDidControlRecordSizesType *DspDidReturnControlToEcu; // (0..1) /** @req DCM622 */\r
+ const Dcm_DspDidControlRecordSizesType *DspDidShortTermAdjustment; // (0..1) /** @req DCM625 */\r
+} Dcm_DspDidControlType; /** @req DCM619 */\r
\r
// 10.2.27\r
typedef struct {\r
- const Dcm_DspSessionRowType **DspDidReadSessionRef; // (1..*)\r
- const Dcm_DspSecurityRowType **DspDidReadSecurityLevelRef; // (1..*)\r
-} Dcm_DspDidReadType;\r
+ const Dcm_DspSessionRowType **DspDidReadSessionRef; // (1..*) /** @req DCM615 */\r
+ const Dcm_DspSecurityRowType **DspDidReadSecurityLevelRef; // (1..*) /** @req DCM614 */\r
+} Dcm_DspDidReadType; /** @req DCM613 */\r
\r
// 10.2.28\r
typedef struct {\r
- const Dcm_DspSessionRowType **DspDidWriteSessionRef; // (1..*)\r
- const Dcm_DspSecurityRowType **DspDidWriteSecurityLevelRef; // (1..*)\r
-} Dcm_DspDidWriteType;\r
+ const Dcm_DspSessionRowType **DspDidWriteSessionRef; // (1..*) /** @req DCM618 */\r
+ const Dcm_DspSecurityRowType **DspDidWriteSecurityLevelRef; // (1..*) /** @req DCM617 */\r
+} Dcm_DspDidWriteType; /** @req DCM616 */\r
\r
// 10.2.25\r
typedef struct {\r
const Dcm_DspDidReadType *DspDidRead; // (0..1)\r
const Dcm_DspDidWriteType *DspDidWrite; // (0..1)\r
const Dcm_DspDidControlType *DspDidControl; // (0..1)\r
-} Dcm_DspDidAccessType;\r
+} Dcm_DspDidAccessType; /** @req DCM609 */\r
\r
// 10.2.24\r
typedef struct {\r
- boolean DspDidDynamicllyDefined; // (1)\r
- boolean DspDidFixedLength; // (1)\r
- uint8 DspDidScalingInfoSize; // (0..1)\r
+ boolean DspDidDynamicllyDefined; // (1) /** @req DCM612 */\r
+ boolean DspDidFixedLength; // (1) /** @req DCM608 */\r
+ uint8 DspDidScalingInfoSize; // (0..1) /** @req DCM611 */\r
// Containers\r
- Dcm_DspDidAccessType DspDidAccess; // (1)\r
-} Dcm_DspDidInfoType;\r
+ Dcm_DspDidAccessType DspDidAccess; // (1)\r
+} Dcm_DspDidInfoType; /** @req DCM607 */\r
\r
// 10.2.22\r
typedef struct _Dcm_DspDidType {\r
boolean DspDidUsePort; // (1)\r
- uint16 DspDidIdentifier; // (1)\r
- const Dcm_DspDidInfoType *DspDidInfoRef; // (1)\r
- const struct _Dcm_DspDidType **DspDidRef; // (0..*)\r
- uint16 DspDidSize; // (1)\r
- Dcm_CallbackReadDataLengthFncType DspDidReadDataLengthFnc; // (0..1)\r
- Dcm_CallbackConditionCheckReadFncType DspDidConditionCheckReadFnc; // (0..1)\r
- Dcm_CallbackReadDataFncType DspDidReadDataFnc; // (0..1)\r
- Dcm_CallbackConditionCheckWriteFncType DspDidConditionCheckWriteFnc; // (0..1)\r
- Dcm_CallbackWriteDataFncType DspDidWriteDataFnc; // (0..1)\r
- Dcm_CallbackGetScalingInformationFncType DspDidGetScalingInfoFnc; // (0..1)\r
- Dcm_CallbackFreezeCurrentStateFncType DspDidFreezeCurrentStateFnc; // (0..1)\r
- Dcm_CallbackResetToDefaultFncType DspDidResetToDeaultFnc; // (0..1)\r
- Dcm_CallbackReturnControlToECUFncType DspDidReturnControlToEcuFnc; // (0..1)\r
- Dcm_CallbackShortTermAdjustmentFncType DspDidShortTermAdjustmentFnc; // (0..1)\r
+ uint16 DspDidIdentifier; // (1) /** @req DCM602 */\r
+ const Dcm_DspDidInfoType *DspDidInfoRef; // (1) /** @req DCM604 */\r
+ const struct _Dcm_DspDidType **DspDidRef; // (0..*) /** @req DCM606 */\r
+ uint16 DspDidSize; // (1) /** @req DCM605 */\r
+ Dcm_CallbackReadDataLengthFncType DspDidReadDataLengthFnc; // (0..1) /** @req DCM671 */\r
+ Dcm_CallbackConditionCheckReadFncType DspDidConditionCheckReadFnc; // (0..1) /** @req DCM677 */\r
+ Dcm_CallbackReadDataFncType DspDidReadDataFnc; // (0..1) /** @req DCM669 */\r
+ Dcm_CallbackConditionCheckWriteFncType DspDidConditionCheckWriteFnc; // (0..1) /** @req DCM678 */\r
+ Dcm_CallbackWriteDataFncType DspDidWriteDataFnc; // (0..1) /** @req DCM670 */\r
+ Dcm_CallbackGetScalingInformationFncType DspDidGetScalingInfoFnc; // (0..1) /** @req DCM676 */\r
+ Dcm_CallbackFreezeCurrentStateFncType DspDidFreezeCurrentStateFnc; // (0..1) /** @req DCM674 */\r
+ Dcm_CallbackResetToDefaultFncType DspDidResetToDeaultFnc; // (0..1) /** @req DCM673 */\r
+ Dcm_CallbackReturnControlToECUFncType DspDidReturnControlToEcuFnc; // (0..1) /** @req DCM672 */\r
+ Dcm_CallbackShortTermAdjustmentFncType DspDidShortTermAdjustmentFnc; // (0..1) /** @req DCM675 */\r
// Containers\r
const Dcm_DspDidControlRecordSizesType *DspDidControlRecordSize; // (0..*)\r
boolean Arc_EOL;\r
-} Dcm_DspDidType;\r
+} Dcm_DspDidType; /** @req DCM601 */\r
\r
// 10.2.30\r
typedef struct {\r
- const Dcm_DspSessionRowType **DspEcuResetSessionRef; // (1..*)\r
- const Dcm_DspSecurityRowType **DspEcuResetSecurityLevelRef; // (1..*)\r
-\r
-} Dcm_DspEcuResetType;\r
+ const Dcm_DspSessionRowType **DspEcuResetSessionRef; // (1..*)\r
+ const Dcm_DspSecurityRowType **DspEcuResetSecurityLevelRef; // (1..*)\r
+} Dcm_DspEcuResetType; /** @req DCM657 */\r
\r
// 10.2.31\r
typedef struct {\r
- boolean DspPidUsePort; // (1)\r
- uint8 DspPidIdentifier; // (1)\r
- uint8 DspPidSize; // (1)\r
- Dcm_CallbackGetPIDValueFncType DspGetPidValFnc; // (1)\r
-} Dcm_DspPidType;\r
+ boolean DspPidUsePort; // (1)\r
+ uint8 DspPidIdentifier; // (1) /** @req DCM627 */\r
+ uint8 DspPidSize; // (1) /** @req DCM628 */\r
+ Dcm_CallbackGetPIDValueFncType DspGetPidValFnc; // (1) /** @req DCM629 */\r
+} Dcm_DspPidType; /** @req DCM626 */\r
\r
// 10.2.33\r
typedef struct {\r
- boolean DspDTCInfoSubFuncSupp; // (1)\r
- uint8 DspDTCInfoSubFuncLevel; // (1)\r
- const Dcm_DspSecurityRowType **DspDTCInfoSecLevelRef; // (1..*)\r
-} Dcm_DspReadDTCRowType;\r
+ boolean DspDTCInfoSubFuncSupp; // (1)\r
+ uint8 DspDTCInfoSubFuncLevel; // (1)\r
+ const Dcm_DspSecurityRowType **DspDTCInfoSecLevelRef; // (1..*)\r
+} Dcm_DspReadDTCRowType; /** @req DCM073 */\r
\r
// 10.2.32\r
typedef struct {\r
// Containers\r
Dcm_DspReadDTCRowType *DspReadDTCRow; // (0..*)\r
-} Dcm_DspReadDTCType;\r
+} Dcm_DspReadDTCType; /** @req DCM074 */\r
\r
// 10.2.34\r
typedef struct {\r
- uint8 DspRequestControl; // (1)\r
- uint8 DspRequestControlOutBufferSize; // (1)\r
- uint8 DspRequestControlTestId; // (1)\r
-} Dcm_DspRequestControlType;\r
+ uint8 DspRequestControl; // (1)\r
+ uint8 DspRequestControlOutBufferSize; // (1)\r
+ uint8 DspRequestControlTestId; // (1) /** @req DCM656 */\r
+} Dcm_DspRequestControlType; /** @req DCM637 */\r
\r
// 10.2.37\r
typedef struct {\r
- const Dcm_DspSessionRowType *DspRoutineSessionRef; // (1..*)\r
- const Dcm_DspSecurityRowType *DspRoutineSecurityLevelRef; // (1..*)\r
-} Dcm_DspRoutineAuthorizationType;\r
+ const Dcm_DspSessionRowType *DspRoutineSessionRef; // (1..*) /** @req DCM649 */\r
+ const Dcm_DspSecurityRowType *DspRoutineSecurityLevelRef; // (1..*) /** @req DCM648 */\r
+} Dcm_DspRoutineAuthorizationType; /** @req DCM644 */\r
\r
// 10.2.38\r
typedef struct {\r
- uint8 DspReqResRtnCtrlOptRecSize; // (1)\r
-} Dcm_DspRoutineRequestResType;\r
+ uint8 DspReqResRtnCtrlOptRecSize; // (1) /** @req DCM652 */\r
+} Dcm_DspRoutineRequestResType; /** @req DCM646 */\r
\r
// 10.2.39\r
typedef struct {\r
- uint8 DspStopRoutineCtrlOptRecSize; // (1)\r
- uint8 DspStopRoutineStsOptRecSize; // (1)\r
-} Dcm_DspRoutineStopType;\r
+ uint8 DspStopRoutineCtrlOptRecSize; // (1) /** @req DCM650 */\r
+ uint8 DspStopRoutineStsOptRecSize; // (1) /** @req DCM651 */\r
+} Dcm_DspRoutineStopType; /** @req DCM645 */\r
\r
// 10.2.40\r
typedef struct {\r
- uint8 DspStartRoutineCtrlOptRecSize; // (1)\r
- uint8 DspStartRoutineStsOptRecSize; // (1)\r
-} Dcm_DspStartRoutineType;\r
+ uint8 DspStartRoutineCtrlOptRecSize; // (1) /** @req DCM654 */\r
+ uint8 DspStartRoutineStsOptRecSize; // (1) /** @req DCM655 */\r
+} Dcm_DspStartRoutineType; /** @req DCM647 */\r
\r
// 10.2.36\r
typedef struct {\r
// Containers\r
- const Dcm_DspRoutineAuthorizationType *DspRoutineAuthorization; // (1)\r
- const Dcm_DspRoutineRequestResType *DspRoutineRequestRes; // (0..1)\r
- const Dcm_DspRoutineStopType *DspRoutineStop; // (0..1)\r
- const Dcm_DspStartRoutineType *DspStartRoutine; // (1)\r
-} Dcm_DspRoutineInfoType;\r
+ const Dcm_DspRoutineAuthorizationType *DspRoutineAuthorization; // (1)\r
+ const Dcm_DspRoutineRequestResType *DspRoutineRequestRes; // (0..1)\r
+ const Dcm_DspRoutineStopType *DspRoutineStop; // (0..1)\r
+ const Dcm_DspStartRoutineType *DspStartRoutine; // (1)\r
+} Dcm_DspRoutineInfoType; /** @req DCM643 */\r
\r
// 10.2.35\r
typedef struct {\r
- boolean DspRoutineUsePort; // (1)\r
- uint16 DspRoutineIdentifier; // (1)\r
- const Dcm_DspRoutineInfoType *DspRoutineInfoRef; // (1)\r
- Dcm_CallbackStartFncType DspStartRoutineFnc; // (0..1)\r
- Dcm_CallbackStopFncType DspStopRoutineFnc; // (0..1)\r
- Dcm_CallbackRequestResultFncType DspRequestResultRoutineFnc; // (0..1)\r
-} Dcm_DspRoutineType;\r
+ boolean DspRoutineUsePort; // (1)\r
+ uint16 DspRoutineIdentifier; // (1) /** @req DCM641 */\r
+ const Dcm_DspRoutineInfoType *DspRoutineInfoRef; // (1) /** @req DCM642 */\r
+ Dcm_CallbackStartFncType DspStartRoutineFnc; // (0..1) /** @req DCM664 */\r
+ Dcm_CallbackStopFncType DspStopRoutineFnc; // (0..1) /** @req DCM665 */\r
+ Dcm_CallbackRequestResultFncType DspRequestResultRoutineFnc; // (0..1) /** @req DCM665 */\r
+} Dcm_DspRoutineType; /** @req DCM640 */\r
\r
// 10.2.41\r
typedef struct {\r
// Containers\r
const Dcm_DspSecurityRowType *DspSecurityRow; // (0..31)\r
-} Dcm_DspSecurityType;\r
+} Dcm_DspSecurityType; /** @req DCM073 */\r
\r
// 10.2.43\r
typedef struct {\r
// Containers\r
const Dcm_DspSessionRowType *DspSessionRow; // (0..31)\r
-} Dcm_DspSessionType;\r
+} Dcm_DspSessionType; /** @req DCM072 */\r
\r
// 10.2.47\r
typedef struct {\r
- uint8 DspTestResultTestId; // (1)\r
- uint8 DspTestResultUaSid; // (1)\r
-} Dcm_DspTestResultTidType;\r
+ uint8 DspTestResultTestId; // (1) /** @req DCM635 */\r
+ uint8 DspTestResultUaSid; // (1) /** @req DCM686 */\r
+} Dcm_DspTestResultTidType; /** @req DCM634 */\r
\r
// 10.2.46\r
typedef struct {\r
- uint8 DspTestResultObdmid; // (1)\r
- const Dcm_DspTestResultTidType **DspTestResultObdmidTidRef; // (1..*)\r
-} Dcm_DspTestResultObdmidTidType;\r
+ uint8 DspTestResultObdmid; // (1) /** @req DCM684 */\r
+ const Dcm_DspTestResultTidType **DspTestResultObdmidTidRef; // (1..*) /** @req DCM685 */\r
+} Dcm_DspTestResultObdmidTidType; /** @req DCM683 */\r
\r
// 10.2.45\r
typedef struct {\r
// Containers\r
- const Dcm_DspTestResultObdmidTidType *DspTestResultObdmidTid; // (0..*)\r
- const Dcm_DspTestResultTidType *DspTestResultTid; // (0..*)\r
-} Dcm_DspTestResultByObdmidType;\r
+ const Dcm_DspTestResultObdmidTidType *DspTestResultObdmidTid; // (0..*)\r
+ const Dcm_DspTestResultTidType *DspTestResultTid; // (0..*)\r
+} Dcm_DspTestResultByObdmidType; /** @req DCM682 */\r
\r
// 10.2.48\r
typedef struct {\r
- boolean DspVehInfoUsePort; // (1)\r
- uint8 DspVehInfoType; // (1)\r
- uint8 DspVehInfoSize; // (1)\r
- Dcm_CallbackGetInfoTypeValueFncType DspGetVehInfoTypeFnc; // (1)\r
-} Dcm_DspVehInfoType;\r
+ boolean DspVehInfoUsePort; // (1)\r
+ uint8 DspVehInfoType; // (1) /** @req DCM631 */\r
+ uint8 DspVehInfoSize; // (1) /** @req DCM632 */\r
+ Dcm_CallbackGetInfoTypeValueFncType DspGetVehInfoTypeFnc; // (1) /** @req DCM633 */\r
+} Dcm_DspVehInfoType; /** @req DCM630 */\r
\r
// 10.2.21\r
typedef struct {\r
- uint8 DspMaxDidToRead; // (0..1)\r
+ uint8 DspMaxDidToRead; // (0..1) /** @req DCM638 */\r
// Containers\r
- const Dcm_DspDidType *DspDid; // (0..*)\r
- const Dcm_DspDidInfoType *DspDidInfo; // (0..*)\r
- const Dcm_DspEcuResetType *DspEcuReset; // (0..*)\r
- const Dcm_DspPidType *DspPid; // (0..*)\r
- const Dcm_DspReadDTCType *DspReadDTC; // (1)\r
- const Dcm_DspRequestControlType *DspRequestControl; // (0..*)\r
- const Dcm_DspRoutineType *DspRoutine; // (0..*)\r
- const Dcm_DspRoutineInfoType *DspRoutineInfo; // (0..*)\r
- const Dcm_DspSecurityType *DspSecurity; // (0..*)\r
- const Dcm_DspSessionType *DspSession; // (1)\r
- const Dcm_DspTestResultByObdmidType *DspTestResultByObdmid; // (0..*)\r
- const Dcm_DspVehInfoType *DspVehInfo;\r
+ const Dcm_DspDidType *DspDid; // (0..*)\r
+ const Dcm_DspDidInfoType *DspDidInfo; // (0..*)\r
+ const Dcm_DspEcuResetType *DspEcuReset; // (0..*)\r
+ const Dcm_DspPidType *DspPid; // (0..*)\r
+ const Dcm_DspReadDTCType *DspReadDTC; // (1)\r
+ const Dcm_DspRequestControlType *DspRequestControl; // (0..*)\r
+ const Dcm_DspRoutineType *DspRoutine; // (0..*)\r
+ const Dcm_DspRoutineInfoType *DspRoutineInfo; // (0..*)\r
+ const Dcm_DspSecurityType *DspSecurity; // (0..*)\r
+ const Dcm_DspSessionType *DspSession; // (1)\r
+ const Dcm_DspTestResultByObdmidType *DspTestResultByObdmid; // (0..*)\r
+ const Dcm_DspVehInfoType *DspVehInfo;\r
} Dcm_DspType;\r
\r
/*******\r
*******/\r
// 10.2.4 DcmDsdService\r
typedef struct {\r
- uint8 DsdSidTabServiceId; // (1)\r
- boolean DsdSidTabSubfuncAvail; // (1)\r
- const Dcm_DspSecurityRowType **DsdSidTabSecurityLevelRef; // (1..*)\r
- const Dcm_DspSessionRowType **DsdSidTabSessionLevelRef; // (1..*)\r
+ uint8 DsdSidTabServiceId; // (1)\r
+ boolean DsdSidTabSubfuncAvail; // (1)\r
+ const Dcm_DspSecurityRowType **DsdSidTabSecurityLevelRef; // (1..*)\r
+ const Dcm_DspSessionRowType **DsdSidTabSessionLevelRef; // (1..*)\r
// Containers\r
- boolean Arc_EOL;\r
+ boolean Arc_EOL;\r
} Dcm_DsdServiceType;\r
\r
// 10.2.3 DcmDsdServiceTable\r
typedef struct {\r
- uint8 DsdSidTabId; // (1)\r
+ uint8 DsdSidTabId; // (1)\r
// Containers\r
- const Dcm_DsdServiceType *DsdService; // (1..*)\r
- boolean Arc_EOL;\r
-} Dcm_DsdServiceTableType;\r
+ const Dcm_DsdServiceType *DsdService; // (1..*)\r
+ boolean Arc_EOL;\r
+} Dcm_DsdServiceTableType; /** @req DCM071 */\r
\r
// 10.2.2 DcmDsd\r
typedef struct {\r
\r
typedef struct {\r
Dcm_DslBufferStatusType status; // Flag for buffer in use.\r
-\r
} Dcm_DslBufferRuntimeType;\r
\r
// 10.2.6\r
typedef struct {\r
- uint8 DslBufferID; // (1) // Kept for reference, will be removed (polite calls will be made).\r
- uint16 DslBufferSize; // (1)\r
- PduInfoType pduInfo;\r
- Dcm_DslBufferRuntimeType *externalBufferRuntimeData;\r
-} Dcm_DslBufferType;\r
+ uint8 DslBufferID; // (1) // Kept for reference, will be removed (polite calls will be made).\r
+ uint16 DslBufferSize; // (1)\r
+ PduInfoType pduInfo;\r
+ Dcm_DslBufferRuntimeType *externalBufferRuntimeData;\r
+} Dcm_DslBufferType; /** @req DCM032 */\r
\r
// 10.2.7\r
typedef struct {\r
- Dcm_CallbackStartProtocolFncType StartProtocol;\r
- Dcm_CallbackStopProtocolFncType StopProtocol;\r
- boolean Arc_EOL;\r
-} Dcm_DslCallbackDCMRequestServiceType;\r
+ Dcm_CallbackStartProtocolFncType StartProtocol;\r
+ Dcm_CallbackStopProtocolFncType StopProtocol;\r
+ boolean Arc_EOL;\r
+} Dcm_DslCallbackDCMRequestServiceType; /** @req DCM679 */\r
\r
// 10.2.8\r
typedef struct {\r
- boolean DslDiagRespForceRespPendEn; // (1)\r
- uint8 DslDiagRespMaxNumRespPend; // (1)\r
+ boolean DslDiagRespForceRespPendEn; // (1)\r
+ uint8 DslDiagRespMaxNumRespPend; // (1)\r
} Dcm_DslDiagRespType;\r
\r
// 10.2.18\r
typedef struct {\r
- uint16 TimStrP2ServerMax; // (1)\r
- uint16 TimStrP2ServerMin; // (1)\r
- uint16 TimStrP2StarServerMax; // (1)\r
- uint16 TimStrP2StarServerMin; // (1)\r
- uint16 TimStrS3Server; // (1)\r
- const boolean Arc_EOL;\r
+ uint16 TimStrP2ServerMax; // (1)\r
+ uint16 TimStrP2ServerMin; // (1)\r
+ uint16 TimStrP2StarServerMax; // (1)\r
+ uint16 TimStrP2StarServerMin; // (1)\r
+ uint16 TimStrS3Server; // (1)\r
+ const boolean Arc_EOL;\r
} Dcm_DslProtocolTimingRowType;\r
\r
// 10.2.17\r
typedef struct {\r
const Dcm_DslProtocolTimingRowType *DslProtocolTimingRow; // (0..*)\r
-} Dcm_DslProtocolTimingType;\r
+} Dcm_DslProtocolTimingType; /** @req DCM031 */\r
\r
// 10.2.15\r
typedef struct {\r
\r
// 10.2.13\r
struct Dcm_DslProtocolRxType_t {\r
- const Dcm_DslMainConnectionType *DslMainConnectionParent; // (1) /* Cross reference. */\r
- const Dcm_ProtocolAddrTypeType DslProtocolAddrType; // (1)\r
- const uint32 DcmDslProtocolRxPduId; // (1)\r
- const uint32 DcmDslProtocolRxTesterSourceAddr_v4; // (1)\r
- const uint8 DcmDslProtocolRxChannelId_v4; // (1)\r
- const boolean Arc_EOL;\r
+ const Dcm_DslMainConnectionType *DslMainConnectionParent; // (1) /* Cross reference. */\r
+ const Dcm_ProtocolAddrTypeType DslProtocolAddrType; // (1)\r
+ const uint32 DcmDslProtocolRxPduId; // (1)\r
+ const uint32 DcmDslProtocolRxTesterSourceAddr_v4; // (1)\r
+ const uint8 DcmDslProtocolRxChannelId_v4; // (1)\r
+ const boolean Arc_EOL;\r
};\r
\r
/* Makes it possible to cross-reference structures. */\r
\r
// 10.2.14\r
struct Dcm_DslProtocolTxType_t {\r
- const Dcm_DslMainConnectionType *DslMainConnectionParent; // (1) /* Cross reference. */\r
- const uint32 DcmDslProtocolTxPduId; // (1) /* Will be removed (polite), kept for reference. */\r
- const boolean Arc_EOL;\r
+ const Dcm_DslMainConnectionType *DslMainConnectionParent; // (1) /* Cross reference. */\r
+ const uint32 DcmDslProtocolTxPduId; // (1) /* Will be removed (polite), kept for reference. */\r
+ const boolean Arc_EOL;\r
};\r
\r
// -- UH\r
\r
// 10.2.12\r
struct Dcm_DslMainConnectionType_t { // Cross referenced from Dcm_DslProtocolRxType_t.\r
- const Dcm_DslConnectionType *DslConnectionParent; // Cross reference.\r
- const Dcm_DslPeriodicTransmissionType *DslPeriodicTransmissionConRef; // (0..1)\r
- const Dcm_DslResponseOnEventType *DslROEConnectionRef; // (0..*)\r
+ const Dcm_DslConnectionType *DslConnectionParent; // Cross reference.\r
+ const Dcm_DslPeriodicTransmissionType *DslPeriodicTransmissionConRef; // (0..1)\r
+ const Dcm_DslResponseOnEventType *DslROEConnectionRef; // (0..*)\r
// Containers\r
- const Dcm_DslProtocolRxType *DslProtocolRx; // (1..*) Remove?\r
- const Dcm_DslProtocolTxType *DslProtocolTx; // (1)\r
+ const Dcm_DslProtocolRxType *DslProtocolRx; // (1..*) Remove?\r
+ const Dcm_DslProtocolTxType *DslProtocolTx; // (1)\r
};\r
\r
/* Make it possible to cross reference. */\r
// 10.2.11\r
struct Dcm_DslConnectionType_t {\r
// Containers\r
- const Dcm_DslProtocolRowType *DslProtocolRow; // Cross reference.\r
- const Dcm_DslMainConnectionType *DslMainConnection; // (1)\r
- const Dcm_DslPeriodicTransmissionType *DslPeriodicTransmission; // (0..1)\r
- const Dcm_DslResponseOnEventType *DslResponseOnEvent; // (0..1)\r
- boolean Arc_EOL;\r
+ const Dcm_DslProtocolRowType *DslProtocolRow; // Cross reference.\r
+ const Dcm_DslMainConnectionType *DslMainConnection; // (1)\r
+ const Dcm_DslPeriodicTransmissionType *DslPeriodicTransmission; // (0..1)\r
+ const Dcm_DslResponseOnEventType *DslResponseOnEvent; // (0..1)\r
+ boolean Arc_EOL;\r
};\r
\r
typedef enum {\r
#define DCM_DSL_LOCAL_BUFFER_LENGTH 8\r
\r
typedef struct {\r
- Dcm_DslBufferUserType status;\r
- uint8 buffer[DCM_DSL_LOCAL_BUFFER_LENGTH];\r
- PduLengthType messageLenght;\r
- PduInfoType PduInfo;\r
+ Dcm_DslBufferUserType status;\r
+ uint8 buffer[DCM_DSL_LOCAL_BUFFER_LENGTH];\r
+ PduLengthType messageLenght;\r
+ PduInfoType PduInfo;\r
} Dcm_DslLocalBufferType;\r
\r
\r
typedef struct {\r
- PduIdType diagReqestRxPduId; // Tester request PduId.\r
- uint32 stateTimeoutCount; // Counter for timeout.\r
- Dcm_DslBufferUserType externalRxBufferStatus;\r
- PduInfoType diagnosticRequestFromTester;\r
- PduInfoType diagnosticResponseFromDsd;\r
- Dcm_DslBufferUserType externalTxBufferStatus;\r
- boolean protocolStarted; // Has the protocol been started?\r
- Dcm_DslLocalBufferType localRxBuffer;\r
- Dcm_DslLocalBufferType localTxBuffer;\r
- boolean diagnosticActiveComM; //\r
- uint16 S3ServerTimeoutCount;\r
- uint8 responsePendingCount;\r
- Dcm_SecLevelType securityLevel;\r
- Dcm_SesCtrlType sessionControl;\r
+ PduIdType diagReqestRxPduId; // Tester request PduId.\r
+ uint32 stateTimeoutCount; // Counter for timeout.\r
+ Dcm_DslBufferUserType externalRxBufferStatus;\r
+ PduInfoType diagnosticRequestFromTester;\r
+ PduInfoType diagnosticResponseFromDsd;\r
+ Dcm_DslBufferUserType externalTxBufferStatus;\r
+ boolean protocolStarted; // Has the protocol been started?\r
+ Dcm_DslLocalBufferType localRxBuffer;\r
+ Dcm_DslLocalBufferType localTxBuffer;\r
+ boolean diagnosticActiveComM; //\r
+ uint16 S3ServerTimeoutCount;\r
+ uint8 responsePendingCount;\r
+ Dcm_SecLevelType securityLevel;\r
+ Dcm_SesCtrlType sessionControl;\r
} Dcm_DslRunTimeProtocolParametersType;\r
\r
// 10.2.10\r
struct Dcm_DslProtocolRowType_t { // Cross referenced from Dcm_DslConnectionType_t.\r
- Dcm_ProtocolType DslProtocolID; // (1)\r
- boolean DslProtocolIsParallelExecutab; // (1)\r
- uint16 DslProtocolPreemptTimeout; // (1)\r
- uint8 DslProtocolPriority; // (1)\r
- Dcm_ProtocolTransTypeType DslProtocolTransType; // (1)\r
- const Dcm_DslBufferType *DslProtocolRxBufferID; // (1)\r
- const Dcm_DslBufferType *DslProtocolTxBufferID; // (1)\r
- const Dcm_DsdServiceTableType *DslProtocolSIDTable; // (1)\r
- const Dcm_DslProtocolTimingRowType *DslProtocolTimeLimit; // (0..1)\r
+ Dcm_ProtocolType DslProtocolID; // (1)\r
+ boolean DslProtocolIsParallelExecutab; // (1)\r
+ uint16 DslProtocolPreemptTimeout; // (1)\r
+ uint8 DslProtocolPriority; // (1)\r
+ Dcm_ProtocolTransTypeType DslProtocolTransType; // (1)\r
+ const Dcm_DslBufferType *DslProtocolRxBufferID; // (1)\r
+ const Dcm_DslBufferType *DslProtocolTxBufferID; // (1)\r
+ const Dcm_DsdServiceTableType *DslProtocolSIDTable; // (1)\r
+ const Dcm_DslProtocolTimingRowType *DslProtocolTimeLimit; // (0..1)\r
// Containers\r
- const Dcm_DslConnectionType *DslConnection; // (1..*)\r
+ const Dcm_DslConnectionType *DslConnection; // (1..*)\r
// Reference to runtime parameters to this protocol.\r
- Dcm_DslRunTimeProtocolParametersType *DslRunTimeProtocolParameters; // Maybe this needs to change to index.\r
- boolean Arc_EOL;\r
+ Dcm_DslRunTimeProtocolParametersType *DslRunTimeProtocolParameters; // Maybe this needs to change to index.\r
+ boolean Arc_EOL;\r
};\r
\r
// 10.2.9\r
typedef struct {\r
-// Containers\r
- const Dcm_DslProtocolRxType *DslProtocolRxGlobalList; // (1..*) A polite list for all RX protocol configurations.\r
- const Dcm_DslProtocolTxType *DslProtocolTxGlobalList; // (1..*) A polite list for all TX protocol configurations.\r
-const Dcm_DslProtocolRowType *DslProtocolRowList; // (1..*)\r
+ // Containers\r
+ const Dcm_DslProtocolRxType *DslProtocolRxGlobalList; // (1..*) A polite list for all RX protocol configurations.\r
+ const Dcm_DslProtocolTxType *DslProtocolTxGlobalList; // (1..*) A polite list for all TX protocol configurations.\r
+ const Dcm_DslProtocolRowType *DslProtocolRowList; // (1..*)\r
} Dcm_DslProtocolType;\r
\r
// 10.2.19\r
typedef struct {\r
-Dcm_CallbackIndicationFncType Indication;\r
-boolean Arc_EOL;\r
-} Dcm_DslServiceRequestIndicationType;\r
+ Dcm_CallbackIndicationFncType Indication;\r
+ boolean Arc_EOL;\r
+} Dcm_DslServiceRequestIndicationType; /** @req DCM681 */\r
\r
// 10.2.20\r
typedef struct {\r
-Dcm_CallbackGetSesChgPermissionFncType GetSesChgPermission;\r
-Dcm_CallbackChangeIndicationFncType ChangeIndication;\r
-Dcm_CallbackConfirmationRespPendFncType ConfirmationRespPend;\r
-boolean Arc_EOL;\r
-} Dcm_DslSessionControlType;\r
+ Dcm_CallbackGetSesChgPermissionFncType GetSesChgPermission;\r
+ Dcm_CallbackChangeIndicationFncType ChangeIndication;\r
+ Dcm_CallbackConfirmationRespPendFncType ConfirmationRespPend;\r
+ boolean Arc_EOL;\r
+} Dcm_DslSessionControlType; /** @req DCM680 */\r
\r
// 10.2.5\r
typedef struct {\r
-// Containers\r
-const Dcm_DslBufferType *DslBuffer; // (1..256)\r
-const Dcm_DslCallbackDCMRequestServiceType *DslCallbackDCMRequestService; // (1..*)\r
-const Dcm_DslDiagRespType *DslDiagResp; // (1)\r
-const Dcm_DslProtocolType *DslProtocol; // (1)\r
-const Dcm_DslProtocolTimingType *DslProtocolTiming; // (1)\r
-const Dcm_DslServiceRequestIndicationType *DslServiceRequestIndication; // (0..*)\r
-const Dcm_DslSessionControlType *DslSessionControl; // (1..*)\r
+ // Containers\r
+ const Dcm_DslBufferType *DslBuffer; // (1..256)\r
+ const Dcm_DslCallbackDCMRequestServiceType *DslCallbackDCMRequestService; // (1..*)\r
+ const Dcm_DslDiagRespType *DslDiagResp; // (1)\r
+ const Dcm_DslProtocolType *DslProtocol; // (1)\r
+ const Dcm_DslProtocolTimingType *DslProtocolTiming; // (1)\r
+ const Dcm_DslServiceRequestIndicationType *DslServiceRequestIndication; // (0..*)\r
+ const Dcm_DslSessionControlType *DslSessionControl; // (1..*)\r
} Dcm_DslType;\r
\r
// 10.2.1 Dcm\r
typedef struct {\r
-// Containers\r
-const Dcm_DspType *Dsp; // (1)\r
-const Dcm_DsdType *Dsd; // (1)\r
-const Dcm_DslType *Dsl; // (1)\r
+ // Containers\r
+ const Dcm_DspType *Dsp; // (1)\r
+ const Dcm_DsdType *Dsd; // (1)\r
+ const Dcm_DslType *Dsl; // (1)\r
} Dcm_ConfigType;\r
\r
/*\r
\r
\r
\r
+/*\r
+ * General requirements\r
+ */\r
+/** @req DEM126 */\r
+/** @req DEM151.partially */\r
+/** @req DEM152 */\r
+/** @req DEM013.14229-1 */\r
+/** @req DEM277 */\r
+/** @req DEM363 */\r
+/** @req DEM113 */ /** @req DEM174 */\r
+/** @req DEM286 */\r
+/** @req DEM267 */\r
+\r
+\r
#include <string.h>\r
#include "Dem.h"\r
#include "Det.h"\r
Dem_EventIdType eventId;\r
const Dem_EventParameterType *eventParamRef;\r
sint8 faultDetectionCounter;\r
- uint16 occurrence;\r
- Dem_EventStatusExtendedType eventStatusExtended;\r
+ uint16 occurrence; /** @req DEM011 */\r
+ Dem_EventStatusExtendedType eventStatusExtended; /** @req DEM006 */\r
boolean errorStatusChanged;\r
} EventStatusRecType;\r
\r
DEM_UNINITIALIZED = 0,\r
DEM_PREINITIALIZED,\r
DEM_INITIALIZED\r
-} Dem_StateType;\r
+} Dem_StateType; /** @req DEM169 */\r
\r
\r
static Dem_StateType demState = DEM_UNINITIALIZED;\r
/*\r
* Allocation of pre-init event memory (used between pre-init and init)\r
*/\r
+/** @req DEM207 */\r
static FreezeFrameRecType preInitFreezeFrameBuffer[DEM_MAX_NUMBER_FF_DATA_PRE_INIT];\r
static ExtDataRecType preInitExtDataBuffer[DEM_MAX_NUMBER_EXT_DATA_PRE_INIT];\r
\r
/*\r
* Allocation of primary event memory ramlog (after init) in uninitialized memory\r
*/\r
+/** @req DEM162 */\r
static EventRecType priMemEventBuffer[DEM_MAX_NUMBER_EVENT_PRI_MEM] __attribute__ ((section (".dem_eventmemory_pri")));\r
static FreezeFrameRecType priMemFreezeFrameBuffer[DEM_MAX_NUMBER_FF_DATA_PRI_MEM] __attribute__ ((section (".dem_eventmemory_pri")));\r
static ExtDataRecType priMemExtDataBuffer[DEM_MAX_NUMBER_EXT_DATA_PRI_MEM] __attribute__ ((section (".dem_eventmemory_pri")));\r
Dem_EventStatusType returnCode;\r
\r
switch (reportedStatus) {\r
- case DEM_EVENT_STATUS_FAILED:\r
- case DEM_EVENT_STATUS_PASSED:\r
+ case DEM_EVENT_STATUS_FAILED: /** @req DEM091.NoneFailed */\r
+ case DEM_EVENT_STATUS_PASSED: /** @req DEM091.NonePassed */\r
// Already debounced, do nothing.\r
break;\r
\r
default:\r
// TODO: What to do with PREFAIL and PREPASSED on no debouncing?\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_PREDEBOUNCE_NONE_ID, DEM_E_PARAM_DATA);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_PREDEBOUNCE_NONE_ID, DEM_E_PARAM_DATA); /** @req DEM117 */\r
#endif\r
break;\r
}\r
break;\r
\r
case DEM_EVENT_STATUS_FAILED:\r
- statusRecord->faultDetectionCounter = DEBOUNCE_FDC_TEST_FAILED;\r
+ statusRecord->faultDetectionCounter = DEBOUNCE_FDC_TEST_FAILED; /** @req DEM091.CounterFailed */\r
break;\r
\r
case DEM_EVENT_STATUS_PASSED:\r
- statusRecord->faultDetectionCounter = DEBOUNCE_FDC_TEST_PASSED;\r
+ statusRecord->faultDetectionCounter = DEBOUNCE_FDC_TEST_PASSED; /** @req DEM091.CounterPassed */\r
break;\r
\r
default:\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_PREDEBOUNCE_COUNTER_BASED_ID, DEM_E_PARAM_DATA);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_PREDEBOUNCE_COUNTER_BASED_ID, DEM_E_PARAM_DATA); /** @req DEM117 */\r
#endif\r
break;\r
\r
else {\r
// Error: Event status buffer full\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_UPDATE_EVENT_STATUS_ID, DEM_E_EVENT_STATUS_BUFF_FULL);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_UPDATE_EVENT_STATUS_ID, DEM_E_EVENT_STATUS_BUFF_FULL); /** @req DEM117 */\r
#endif\r
}\r
}\r
\r
if (eventStatusRecPtr != NULL) {\r
// Handle debouncing\r
- switch (eventParam->EventClass->PreDebounceAlgorithmClass->PreDebounceName) {\r
+ switch (eventParam->EventClass->PreDebounceAlgorithmClass->PreDebounceName) { /** @req DEM004 */ /** @req DEM342 */\r
case DEM_NO_PRE_DEBOUNCE:\r
eventStatus = preDebounceNone(eventStatus, eventStatusRecPtr);\r
break;\r
default:\r
// Don't know how to handle this.\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_UPDATE_EVENT_STATUS_ID, DEM_E_NOT_IMPLEMENTED_YET);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_UPDATE_EVENT_STATUS_ID, DEM_E_NOT_IMPLEMENTED_YET); /** @req DEM117 */\r
#endif\r
break;\r
}\r
eventStatusRecPtr->occurrence++;\r
eventStatusRecPtr->errorStatusChanged = TRUE;\r
}\r
+ /** @req DEM036 */ /** @req DEM379.PendingSet */\r
eventStatusRecPtr->eventStatusExtended |= (DEM_TEST_FAILED | DEM_TEST_FAILED_THIS_OPERATION_CYCLE | DEM_TEST_FAILED_SINCE_LAST_CLEAR | DEM_PENDING_DTC);\r
eventStatusRecPtr->eventStatusExtended &= ~(DEM_TEST_NOT_COMPLETED_SINCE_LAST_CLEAR | DEM_TEST_NOT_COMPLETED_THIS_OPERATION_CYCLE);\r
}\r
if (eventStatusRecPtr->eventStatusExtended & DEM_TEST_FAILED) {\r
eventStatusRecPtr->errorStatusChanged = TRUE;\r
}\r
+ /** @req DEM036 */\r
eventStatusRecPtr->eventStatusExtended &= ~DEM_TEST_FAILED;\r
eventStatusRecPtr->eventStatusExtended &= ~(DEM_TEST_NOT_COMPLETED_SINCE_LAST_CLEAR | DEM_TEST_NOT_COMPLETED_THIS_OPERATION_CYCLE);\r
}\r
else {\r
// Error: Event status buffer full\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_MERGE_EVENT_STATUS_ID, DEM_E_EVENT_STATUS_BUFF_FULL);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_MERGE_EVENT_STATUS_ID, DEM_E_EVENT_STATUS_BUFF_FULL); /** @req DEM117 */\r
#endif\r
}\r
}\r
for (i = 0; (i < DEM_MAX_NR_OF_RECORDS_IN_EXTENDED_DATA) && (eventParam->ExtendedDataClassRef->ExtendedDataRecordClassRef[i] != NULL); i++) {\r
recordSize = eventParam->ExtendedDataClassRef->ExtendedDataRecordClassRef[i]->DataSize;\r
if ((storeIndex + recordSize) <= DEM_MAX_SIZE_EXT_DATA) {\r
- callbackReturnCode = eventParam->ExtendedDataClassRef->ExtendedDataRecordClassRef[i]->CallbackGetExtDataRecord(&extData->data[storeIndex]);\r
+ callbackReturnCode = eventParam->ExtendedDataClassRef->ExtendedDataRecordClassRef[i]->CallbackGetExtDataRecord(&extData->data[storeIndex]); /** @req DEM282 */\r
if (callbackReturnCode != E_OK) {\r
// Callback data currently not available, clear space.\r
memset(&extData->data[storeIndex], 0xFF, recordSize);\r
else {\r
// Error: Size of extended data record is bigger than reserved space.\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GET_EXTENDED_DATA_ID, DEM_E_EXT_DATA_TOO_BIG);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GET_EXTENDED_DATA_ID, DEM_E_EXT_DATA_TOO_BIG); /** @req DEM117 */\r
#endif\r
break; // Break the loop\r
}\r
else {\r
// Error: Pre init extended data buffer full\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_STORE_EXT_DATA_PRE_INIT_ID, DEM_E_PRE_INIT_EXT_DATA_BUFF_FULL);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_STORE_EXT_DATA_PRE_INIT_ID, DEM_E_PRE_INIT_EXT_DATA_BUFF_FULL); /** @req DEM117 */\r
#endif\r
}\r
}\r
else {\r
// Error: Pri mem event buffer full\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_STORE_EVENT_PRI_MEM_ID, DEM_E_PRI_MEM_EVENT_BUFF_FULL);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_STORE_EVENT_PRI_MEM_ID, DEM_E_PRI_MEM_EVENT_BUFF_FULL); /** @req DEM117 */\r
#endif\r
}\r
}\r
switch (eventParam->EventClass->EventDestination[i])\r
{\r
case DEM_DTC_ORIGIN_PRIMARY_MEMORY:\r
- storeEventPriMem(eventParam, eventStatus);\r
+ storeEventPriMem(eventParam, eventStatus); /** @req DEM010 */\r
break;\r
\r
case DEM_DTC_ORIGIN_SECONDARY_MEMORY:\r
case DEM_DTC_ORIGIN_MIRROR_MEMORY:\r
// Not yet supported\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GLOBAL_ID, DEM_E_NOT_IMPLEMENTED_YET);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GLOBAL_ID, DEM_E_NOT_IMPLEMENTED_YET); /** @req DEM117 */\r
#endif\r
break;\r
default:\r
* Description: Store the extended data pointed by "extendedData" to the "priMemExtDataBuffer",\r
* if non existent a new entry is created.\r
*/\r
-static void storeExtendedDataPriMem(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData)\r
+static void storeExtendedDataPriMem(const Dem_EventParameterType *eventParam, ExtDataRecType *extendedData) /** @req DEM041 */\r
{\r
uint16 i;\r
imask_t state = McuE_EnterCriticalSection();\r
else {\r
// Error: Pri mem extended data buffer full\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_STORE_EXT_DATA_PRI_MEM_ID, DEM_E_PRI_MEM_EXT_DATA_BUFF_FULL);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_STORE_EXT_DATA_PRI_MEM_ID, DEM_E_PRI_MEM_EXT_DATA_BUFF_FULL); /** @req DEM117 */\r
#endif\r
}\r
}\r
case DEM_DTC_ORIGIN_MIRROR_MEMORY:\r
// Not yet supported\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GLOBAL_ID, DEM_E_NOT_IMPLEMENTED_YET);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GLOBAL_ID, DEM_E_NOT_IMPLEMENTED_YET); /** @req DEM117 */\r
#endif\r
break;\r
\r
case DEM_DTC_ORIGIN_MIRROR_MEMORY:\r
// Not yet supported\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GLOBAL_ID, DEM_E_NOT_IMPLEMENTED_YET);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GLOBAL_ID, DEM_E_NOT_IMPLEMENTED_YET); /** @req DEM117 */\r
#endif\r
break;\r
default:\r
updateEventStatusRec(eventParam, eventStatus, TRUE, &eventStatusLocal);\r
if (eventStatusLocal.errorStatusChanged) {\r
if (eventStatusLocal.eventStatusExtended & DEM_TEST_FAILED) {\r
- storeEventEvtMem(eventParam, &eventStatusLocal);\r
+ storeEventEvtMem(eventParam, &eventStatusLocal); /** @req DEM184 */\r
// Collect freeze frame data\r
getFreezeFrameData(eventParam, &freezeFrameLocal);\r
if (freezeFrameLocal.eventId != DEM_EVENT_ID_NULL) {\r
- storeFreezeFrameDataEvtMem(eventParam, &freezeFrameLocal);\r
+ storeFreezeFrameDataEvtMem(eventParam, &freezeFrameLocal); /** @req DEM190 */\r
}\r
\r
// Collect extended data\r
\r
lookupEventStatusRec(eventId, &eventStatusRecPtr);\r
if (eventStatusRecPtr != NULL) {\r
- eventStatusRecPtr->eventStatusExtended &= ~DEM_TEST_FAILED;\r
+ eventStatusRecPtr->eventStatusExtended &= ~DEM_TEST_FAILED; /** @req DEM187 */\r
}\r
\r
McuE_ExitCriticalSection(state);\r
// Get recorded status\r
getEventStatusRec(eventId, &eventStatusLocal);\r
if (eventStatusLocal.eventId == eventId) {\r
- *eventStatusExtended = eventStatusLocal.eventStatusExtended;\r
+ *eventStatusExtended = eventStatusLocal.eventStatusExtended; /** @req DEM051 */\r
}\r
else {\r
// Event Id not found, no report received.\r
// Get recorded status\r
getEventStatusRec(eventId, &eventStatusLocal);\r
if (eventStatusLocal.eventId == eventId) {\r
- if (eventStatusLocal.eventStatusExtended & DEM_TEST_FAILED) {\r
+ if (eventStatusLocal.eventStatusExtended & DEM_TEST_FAILED) { /** @req DEM052 */\r
*eventFailed = TRUE;\r
}\r
else {\r
// Get recorded status\r
getEventStatusRec(eventId, &eventStatusLocal);\r
if (eventStatusLocal.eventId == eventId) {\r
- if ( !(eventStatusLocal.eventStatusExtended & DEM_TEST_NOT_COMPLETED_THIS_OPERATION_CYCLE)) {\r
+ if ( !(eventStatusLocal.eventStatusExtended & DEM_TEST_NOT_COMPLETED_THIS_OPERATION_CYCLE)) { /** @req DEM053 */\r
*eventTested = TRUE;\r
}\r
else {\r
case DEM_NO_PRE_DEBOUNCE:\r
if (eventParam->EventClass->PreDebounceAlgorithmClass->PreDebounceAlgorithm.PreDebounceMonitorInternal != NULL) {\r
if (eventParam->EventClass->PreDebounceAlgorithmClass->PreDebounceAlgorithm.PreDebounceMonitorInternal->CallbackGetFDCntFnc != NULL) {\r
- returnCode = eventParam->EventClass->PreDebounceAlgorithmClass->PreDebounceAlgorithm.PreDebounceMonitorInternal->CallbackGetFDCntFnc(counter);\r
+ returnCode = eventParam->EventClass->PreDebounceAlgorithmClass->PreDebounceAlgorithm.PreDebounceMonitorInternal->CallbackGetFDCntFnc(counter); /** @req DEM204.None */ /** @req DEM264 */ /** @req DEM265 */\r
}\r
}\r
break;\r
\r
lookupEventStatusRec(eventId, &eventStatusRec);\r
if (eventStatusRec != NULL) {\r
- *counter = eventStatusRec->faultDetectionCounter;\r
+ *counter = eventStatusRec->faultDetectionCounter; /** @req DEM204.Counter */\r
} else {\r
*counter = 0;\r
}\r
case DEM_PRE_DEBOUNCE_FREQUENCY_BASED:\r
case DEM_PRE_DEBOUNCE_TIME_BASED:\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GETFAULTDETECTIONCOUNTER_ID, DEM_E_NOT_IMPLEMENTED_YET);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GETFAULTDETECTIONCOUNTER_ID, DEM_E_NOT_IMPLEMENTED_YET); /** @req DEM117 */\r
#endif\r
break;\r
\r
default:\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GETFAULTDETECTIONCOUNTER_ID, DEM_E_PARAM_DATA);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GETFAULTDETECTIONCOUNTER_ID, DEM_E_PARAM_DATA); /** @req DEM117 */\r
#endif\r
break;\r
}\r
* event connected to this cycle id.\r
* Returns E_OK if operation was successful else E_NOT_OK.\r
*/\r
-static Std_ReturnType setOperationCycleState(Dem_OperationCycleIdType operationCycleId, Dem_OperationCycleStateType cycleState)\r
+static Std_ReturnType setOperationCycleState(Dem_OperationCycleIdType operationCycleId, Dem_OperationCycleStateType cycleState) /** @req DEM338 */\r
{\r
uint16 i;\r
Std_ReturnType returnCode = E_OK;\r
for (i = 0; i < DEM_MAX_NUMBER_EVENT; i++) {\r
if ((eventStatusBuffer[i].eventId != DEM_EVENT_ID_NULL) && (eventStatusBuffer[i].eventParamRef->EventClass->OperationCycleRef == operationCycleId)) {\r
if (!(eventStatusBuffer[i].eventStatusExtended & DEM_TEST_FAILED_THIS_OPERATION_CYCLE) && !(eventStatusBuffer[i].eventStatusExtended & DEM_TEST_NOT_COMPLETED_THIS_OPERATION_CYCLE)) {\r
- eventStatusBuffer[i].eventStatusExtended &= ~DEM_PENDING_DTC; // Clear pendingDTC bit\r
+ eventStatusBuffer[i].eventStatusExtended &= ~DEM_PENDING_DTC; // Clear pendingDTC bit /** @req DEM379.PendingClear\r
}\r
}\r
}\r
break;\r
default:\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_SETOPERATIONCYCLESTATE_ID, DEM_E_PARAM_DATA);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_SETOPERATIONCYCLESTATE_ID, DEM_E_PARAM_DATA); /** @req DEM117 */\r
#endif\r
returnCode = E_NOT_OK;\r
break;\r
}\r
else {\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_SETOPERATIONCYCLESTATE_ID, DEM_E_PARAM_DATA);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_SETOPERATIONCYCLESTATE_ID, DEM_E_PARAM_DATA); /** @req DEM117 */\r
#endif\r
returnCode = E_NOT_OK;\r
}\r
*/\r
void Dem_PreInit(void)\r
{\r
+ /** @req DEM180 */\r
int i, j;\r
\r
if (DEM_Config.ConfigSet == NULL) {\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_PREINIT_ID, DEM_E_CONFIG_PTR_INVALID);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_PREINIT_ID, DEM_E_CONFIG_PTR_INVALID); /** @req DEM117 */\r
#endif\r
return;\r
} else {\r
\r
disableDtcStorage.storageDisabled = FALSE;\r
\r
- setOperationCycleState(DEM_ACTIVE, DEM_CYCLE_STATE_START);\r
+ setOperationCycleState(DEM_ACTIVE, DEM_CYCLE_STATE_START); /** @req DEM047 */\r
\r
demState = DEM_PREINITIALIZED;\r
}\r
*/\r
void Dem_Shutdown(void)\r
{\r
- setOperationCycleState(DEM_ACTIVE, DEM_CYCLE_STATE_END);\r
+ setOperationCycleState(DEM_ACTIVE, DEM_CYCLE_STATE_END); /** @req DEM047 */\r
\r
- demState = DEM_UNINITIALIZED;\r
+ demState = DEM_UNINITIALIZED; /** @req DEM368 */\r
}\r
\r
\r
*/\r
void Dem_MainFunction(void)\r
{\r
+ /** @req DEM125 */\r
\r
}\r
\r
* Procedure: Dem_SetEventStatus\r
* Reentrant: Yes\r
*/\r
-Std_ReturnType Dem_SetEventStatus(Dem_EventIdType eventId, Dem_EventStatusType eventStatus)\r
+Std_ReturnType Dem_SetEventStatus(Dem_EventIdType eventId, Dem_EventStatusType eventStatus) /** @req DEM330 */\r
{\r
Std_ReturnType returnCode = E_OK;\r
\r
else\r
{\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_SETEVENTSTATUS_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_SETEVENTSTATUS_ID, DEM_E_UNINIT); /** @req DEM124.SetEventStatus */ /** @req DEM117 */\r
#endif\r
- returnCode = E_NOT_OK;\r
+ returnCode = E_NOT_OK; /** @req DEM370.SetEventStatus */\r
}\r
\r
return returnCode;\r
* Procedure: Dem_ResetEventStatus\r
* Reentrant: Yes\r
*/\r
-Std_ReturnType Dem_ResetEventStatus(Dem_EventIdType eventId)\r
+Std_ReturnType Dem_ResetEventStatus(Dem_EventIdType eventId) /** @req DEM331 */\r
{\r
Std_ReturnType returnCode = E_OK;\r
\r
if (demState == DEM_INITIALIZED) // No action is taken if the module is not started\r
{\r
- resetEventStatus(eventId);\r
+ resetEventStatus(eventId); /** @req DEM186 */\r
}\r
else\r
{\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_RESETEVENTSTATUS_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_RESETEVENTSTATUS_ID, DEM_E_UNINIT); /** @req DEM124.ResetEventStatus */ /** @req DEM117 */\r
#endif\r
- returnCode = E_NOT_OK;\r
+ returnCode = E_NOT_OK; /** @req DEM370.ResetEventStatus */\r
}\r
\r
return returnCode;\r
* Procedure: Dem_GetEventStatus\r
* Reentrant: Yes\r
*/\r
-Std_ReturnType Dem_GetEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtendedType *eventStatusExtended)\r
+Std_ReturnType Dem_GetEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtendedType *eventStatusExtended) /** @req DEM332 */\r
{\r
Std_ReturnType returnCode = E_OK;\r
\r
else\r
{\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEVENTSTATUS_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEVENTSTATUS_ID, DEM_E_UNINIT); /** @req DEM124.GetEventStatus */ /** @req DEM117 */\r
#endif\r
- returnCode = E_NOT_OK;\r
+ returnCode = E_NOT_OK; /** @req DEM370.GetEventStatus */\r
}\r
\r
return returnCode;\r
* Procedure: Dem_GetEventFailed\r
* Reentrant: Yes\r
*/\r
-Std_ReturnType Dem_GetEventFailed(Dem_EventIdType eventId, boolean *eventFailed)\r
+Std_ReturnType Dem_GetEventFailed(Dem_EventIdType eventId, boolean *eventFailed) /** @req DEM333 */\r
{\r
Std_ReturnType returnCode = E_OK;\r
\r
else\r
{\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEVENTFAILED_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEVENTFAILED_ID, DEM_E_UNINIT); /** @req DEM124.GetEventFailed */ /** @req DEM117 */\r
#endif\r
- returnCode = E_NOT_OK;\r
+ returnCode = E_NOT_OK; /** @req DEM370.GetEventFailed */\r
}\r
\r
return returnCode;\r
else\r
{\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEVENTTESTED_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEVENTTESTED_ID, DEM_E_UNINIT); /** @req DEM124.GetEventTested */ /** @req DEM117 */\r
#endif\r
- returnCode = E_NOT_OK;\r
+ returnCode = E_NOT_OK; /** @req DEM370.GetEventTested */\r
}\r
\r
return returnCode;\r
else\r
{\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GETFAULTDETECTIONCOUNTER_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GETFAULTDETECTIONCOUNTER_ID, DEM_E_UNINIT); /** @req DEM124.GetFaultDetectionCounter */ /** @req DEM117 */\r
#endif\r
- returnCode = E_NOT_OK;\r
+ returnCode = E_NOT_OK; /** @req DEM370.GetFaultDetectionCounter */\r
}\r
\r
return returnCode;\r
else\r
{\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_SETOPERATIONCYCLESTATE_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_SETOPERATIONCYCLESTATE_ID, DEM_E_UNINIT); /** @req DEM124.SetOperationCycleState */ /** @req DEM117 */\r
#endif\r
- returnCode = E_NOT_OK;\r
+ returnCode = E_NOT_OK; /** @req DEM370.SetOperationCycleState */\r
}\r
\r
return returnCode;\r
if (eventParam != NULL) {\r
if (checkDtcKind(dtcKind, eventParam)) {\r
if (eventParam->DTCClassRef != NULL) {\r
- *dtcOfEvent = eventParam->DTCClassRef->DTC;\r
+ *dtcOfEvent = eventParam->DTCClassRef->DTC; /** @req DEM269 */\r
returnCode = E_OK;\r
}\r
}\r
* Procedure: Dem_ReportErrorStatus\r
* Reentrant: Yes\r
*/\r
-void Dem_ReportErrorStatus( Dem_EventIdType eventId, Dem_EventStatusType eventStatus )\r
+void Dem_ReportErrorStatus( Dem_EventIdType eventId, Dem_EventStatusType eventStatus ) /** @req DEM107 */\r
{\r
\r
switch (demState) {\r
case DEM_PREINITIALIZED:\r
// Update status and check if is to be stored\r
if ((eventStatus == DEM_EVENT_STATUS_PASSED) || (eventStatus == DEM_EVENT_STATUS_FAILED)) {\r
- handlePreInitEvent(eventId, eventStatus);\r
+ handlePreInitEvent(eventId, eventStatus); /** @req DEM168 */\r
}\r
break;\r
\r
case DEM_INITIALIZED:\r
- (void)handleEvent(eventId, eventStatus);\r
+ (void)handleEvent(eventId, eventStatus); /** @req DEM167 */\r
break;\r
\r
case DEM_UNINITIALIZED:\r
default:\r
// Uninitialized can not do anything\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_REPORTERRORSTATUS_ID, DEM_E_UNINIT);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_REPORTERRORSTATUS_ID, DEM_E_UNINIT); /** @req DEM124.ReportErrorStatus */ /** @req DEM364 */ /** @req DEM117 */\r
#endif\r
break;\r
\r
* Procedure: Dem_GetDTCStatusAvailabilityMask\r
* Reentrant: No\r
*/\r
-Std_ReturnType Dem_GetDTCStatusAvailabilityMask(uint8 *dtcStatusMask)\r
+Std_ReturnType Dem_GetDTCStatusAvailabilityMask(uint8 *dtcStatusMask) /** @req DEM014 */\r
{\r
*dtcStatusMask = DEM_DTC_STATUS_AVAILABILITY_MASK; // User configuration mask\r
- *dtcStatusMask &= DEM_TEST_FAILED // Mask with supported bits\r
+ *dtcStatusMask &= DEM_TEST_FAILED // Mask with supported bits /** @req DEM060 */\r
| DEM_TEST_FAILED_THIS_OPERATION_CYCLE\r
| DEM_PENDING_DTC\r
// | DEM_CONFIRMED_DTC TODO: Add support for this bit\r
\r
// Check filterForFaultDetectionCounter parameter\r
if ((filterForFaultDetectionCounter == DEM_FILTER_FOR_FDC_YES) || (filterForFaultDetectionCounter == DEM_FILTER_FOR_FDC_NO)) {\r
- // Yes all parameters correct, set the new filters.\r
+ // Yes all parameters correct, set the new filters. /** @req DEM057 */\r
dtcFilter.dtcStatusMask = dtcStatusMask;\r
dtcFilter.dtcKind = dtcKind;\r
dtcFilter.dtcOrigin = dtcOrigin;\r
if (lookupDtcEvent(dtc, &eventRec)) {\r
if (checkDtcKind(dtcKind, eventRec->eventParamRef)) {\r
if (checkDtcOrigin(dtcOrigin,eventRec->eventParamRef)) {\r
- *status = eventRec->eventStatusExtended;\r
+ *status = eventRec->eventStatusExtended; /** @req DEM059 */\r
returnCode = DEM_STATUS_OK;\r
}\r
else {\r
- returnCode = DEM_STATUS_WRONG_DTCORIGIN;\r
+ returnCode = DEM_STATUS_WRONG_DTCORIGIN; /** @req DEM171 */\r
}\r
}\r
else {\r
}\r
}\r
else {\r
- returnCode = DEM_STATUS_WRONG_DTC;\r
+ returnCode = DEM_STATUS_WRONG_DTC; /** @req DEM172 */\r
}\r
\r
return returnCode;\r
\r
//Dem_EnableEventStatusUpdate();\r
\r
- *numberOfFilteredDTC = numberOfFaults;\r
+ *numberOfFilteredDTC = numberOfFaults; /** @req DEM061 */\r
\r
return DEM_NUMBER_OK;\r
}\r
Dem_ReturnGetNextFilteredDTCType returnCode = DEM_FILTERED_OK;\r
boolean dtcFound = FALSE;\r
\r
- // TODO: This job should be done in an more advanced way according to Dem288\r
+ // TODO: This job should be done in an more advanced way according to Dem217\r
while (!dtcFound && (dtcFilter.faultIndex != 0)) {\r
dtcFilter.faultIndex--;\r
if (eventStatusBuffer[dtcFilter.faultIndex].eventId != DEM_EVENT_ID_NULL) {\r
if (matchEventWithDtcFilter(&eventStatusBuffer[dtcFilter.faultIndex])) {\r
if (eventStatusBuffer[dtcFilter.faultIndex].eventParamRef->DTCClassRef != NULL) {\r
- *dtc = eventStatusBuffer[dtcFilter.faultIndex].eventParamRef->DTCClassRef->DTC;\r
+ *dtc = eventStatusBuffer[dtcFilter.faultIndex].eventParamRef->DTCClassRef->DTC; /** @req DEM216 */\r
*dtcStatus = eventStatusBuffer[dtcFilter.faultIndex].eventStatusExtended;\r
dtcFound = TRUE;\r
}\r
*/\r
Dem_ReturnTypeOfDtcSupportedType Dem_GetTranslationType(void)\r
{\r
- return DEM_TYPE_OF_DTC_SUPPORTED;\r
+ return DEM_TYPE_OF_DTC_SUPPORTED; /** @req DEM231 */\r
}\r
\r
\r
* Procedure: Dem_ClearDTC\r
* Reentrant: No\r
*/\r
-Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin)\r
+Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin) /** @req DEM009 */\r
{\r
Dem_ReturnClearDTCType returnCode = DEM_CLEAR_OK;\r
Dem_EventIdType eventId;\r
switch (dtcOrigin)\r
{\r
case DEM_DTC_ORIGIN_PRIMARY_MEMORY:\r
+ /** @req DEM077 */\r
deleteEventPriMem(eventParam);\r
deleteFreezeFrameDataPriMem(eventParam);\r
deleteExtendedDataPriMem(eventParam);\r
// Not yet supported\r
returnCode = DEM_CLEAR_WRONG_DTCORIGIN;\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_CLEARDTC_ID, DEM_E_NOT_IMPLEMENTED_YET);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_CLEARDTC_ID, DEM_E_NOT_IMPLEMENTED_YET); /** @req DEM117 */\r
#endif\r
break;\r
default:\r
else {\r
// Fatal error, no event parameters found for the stored event!\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_CLEARDTC_ID, DEM_E_UNEXPECTED_EXECUTION);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_CLEARDTC_ID, DEM_E_UNEXPECTED_EXECUTION); /** @req DEM117 */\r
#endif\r
}\r
}\r
* Procedure: Dem_DisableDTCStorage\r
* Reentrant: No\r
*/\r
-Dem_ReturnControlDTCStorageType Dem_DisableDTCStorage(Dem_DTCGroupType dtcGroup, Dem_DTCKindType dtcKind)\r
+Dem_ReturnControlDTCStorageType Dem_DisableDTCStorage(Dem_DTCGroupType dtcGroup, Dem_DTCKindType dtcKind) /** @req DEM035 */\r
{\r
Dem_ReturnControlDTCStorageType returnCode = DEM_CONTROL_DTC_STORAGE_N_OK;\r
\r
if (dtcGroup == DEM_DTC_GROUP_ALL_DTCS) {\r
// Check dtcKind parameter\r
if ((dtcKind == DEM_DTC_KIND_ALL_DTCS) || (dtcKind == DEM_DTC_KIND_EMISSION_REL_DTCS)) {\r
+ /** @req DEM079 */\r
disableDtcStorage.dtcGroup = dtcGroup;\r
disableDtcStorage.dtcKind = dtcKind;\r
disableDtcStorage.storageDisabled = TRUE;\r
Dem_ReturnControlDTCStorageType Dem_EnableDTCStorage(Dem_DTCGroupType dtcGroup, Dem_DTCKindType dtcKind)\r
{\r
// TODO: Behavior is not defined if group or kind do not match active settings, therefore the filter is just switched off.\r
- disableDtcStorage.storageDisabled = FALSE;\r
+ disableDtcStorage.storageDisabled = FALSE; /** @req DEM080 */\r
\r
return DEM_CONTROL_DTC_STORAGE_OK;\r
}\r
case DEM_DTC_ORIGIN_PRIMARY_MEMORY:\r
if (lookupExtendedDataPriMem(eventRec->eventId, &extData)) {\r
// Yes all conditions met, copy the extended data record to destination buffer.\r
- memcpy(destBuffer, &extData->data[posInExtData], extendedDataRecordClass->DataSize);\r
+ memcpy(destBuffer, &extData->data[posInExtData], extendedDataRecordClass->DataSize); /** @req DEM075 */\r
*bufSize = extendedDataRecordClass->DataSize;\r
returnCode = DEM_RECORD_OK;\r
}\r
// Not yet supported\r
returnCode = DEM_RECORD_WRONG_DTCORIGIN;\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
- Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEXTENDEDDATARECORDBYDTC_ID, DEM_E_NOT_IMPLEMENTED_YET);\r
+ Det_ReportError(MODULE_ID_DEM, 0, DEM_GETEXTENDEDDATARECORDBYDTC_ID, DEM_E_NOT_IMPLEMENTED_YET); /** @req DEM117 */\r
#endif\r
break;\r
default:\r
if (checkDtcKind(dtcKind, eventRec->eventParamRef)) {\r
if (checkDtcOrigin(dtcOrigin, eventRec->eventParamRef)) {\r
if (lookupExtendedDataRecNumParam(extendedDataNumber, eventRec->eventParamRef, &extendedDataRecordClass, &posInExtData)) {\r
- *sizeOfExtendedDataRecord = extendedDataRecordClass->DataSize;\r
+ *sizeOfExtendedDataRecord = extendedDataRecordClass->DataSize; /** @req DEM076 */\r
returnCode = DEM_GET_SIZEOFEDRBYDTC_OK;\r
}\r
else {\r
\r
\r
\r
+/*\r
+ * General requirements\r
+ */\r
+/** @req DEM128 */\r
+\r
+\r
+\r
#ifndef DEM_LCFG_H_\r
#define DEM_LCFG_H_\r
\r
#include "Dem_Types.h"\r
#if defined(USE_DCM)\r
-#include "Dcm_Types.h"\r
+#include "Dcm_Types.h" /** @req DEM176.Dcm */\r
#endif\r
\r
\r
*/\r
\r
// InitMonitorForEvent\r
-typedef Std_ReturnType (*Dem_CallbackInitMonitorForEventFncType)(Dem_InitMonitorKindType InitMonitorKind);\r
+typedef Std_ReturnType (*Dem_CallbackInitMonitorForEventFncType)(Dem_InitMonitorKindType InitMonitorKind); /** @req DEM256 */\r
\r
// InitMonitorForFunction\r
-typedef Std_ReturnType (*Dem_CallbackInitMonitorForFunctionFncType)(void);\r
+typedef Std_ReturnType (*Dem_CallbackInitMonitorForFunctionFncType)(void); /** @req DEM258 */\r
\r
// EventStatusChanged\r
-typedef Std_ReturnType (*Dem_CallbackEventStatusChangedFncType)(Dem_EventStatusExtendedType EventStatusOld, Dem_EventStatusExtendedType EventStatusNew);\r
+typedef Std_ReturnType (*Dem_CallbackEventStatusChangedFncType)(Dem_EventStatusExtendedType EventStatusOld, Dem_EventStatusExtendedType EventStatusNew); /** @req DEM259 */\r
\r
// DTCStatusChanged\r
-typedef Std_ReturnType (*Dem_CallbackDTCStatusChangedFncType)(uint8 DTCStatusOld, uint8 DTCStatusNew);\r
+typedef Std_ReturnType (*Dem_CallbackDTCStatusChangedFncType)(uint8 DTCStatusOld, uint8 DTCStatusNew); /** @req DEM260 */\r
\r
-// DIDServices\r
+// DIDServices /** @req DEM261 */\r
#if defined(USE_DCM)\r
typedef Std_ReturnType (*Dem_CallbackConditionCheckReadFncType)(Dcm_NegativeResponseCodeType *Nrc);\r
typedef Std_ReturnType (*Dem_CallbackReadDataFncType)(uint8 *Data);\r
#endif\r
\r
// GetExtendedDataRecord\r
-typedef Std_ReturnType (*Dem_CallbackGetExtDataRecordFncType)(uint8 *ExtendedDataRecord);\r
+typedef Std_ReturnType (*Dem_CallbackGetExtDataRecordFncType)(uint8 *ExtendedDataRecord); /** @req DEM262 */\r
\r
// GetFaultDetectionCounter\r
-typedef Std_ReturnType (*Dem_CallbackGetFaultDetectionCounterFncType)(sint8 *EventIdFaultDetectionCounter);\r
+typedef Std_ReturnType (*Dem_CallbackGetFaultDetectionCounterFncType)(sint8 *EventIdFaultDetectionCounter); /** @req DEM263 */\r
\r
// GetPIDValue\r
-typedef Std_ReturnType (*Dem_CallbackGetPIDValueFncType)(uint8 *DataValueBuffer);\r
+typedef Std_ReturnType (*Dem_CallbackGetPIDValueFncType)(uint8 *DataValueBuffer); /** @req DEM326 */\r
\r
/*\r
* DemGeneral types\r
*/\r
+/** @req DEM128 */\r
\r
// 10.2.25 DemEnableCondition\r
typedef struct {\r
uint16 RecordNumber; // (1)\r
uint16 DataSize; // (1)\r
Dem_CallbackGetExtDataRecordFncType CallbackGetExtDataRecord;// (1)\r
-} Dem_ExtendedDataRecordClassType;\r
+} Dem_ExtendedDataRecordClassType; /** @req DEM135 */\r
\r
// 10.2.13 DemExtendedDataClass\r
typedef struct {\r
const Dem_ExtendedDataRecordClassType *const ExtendedDataRecordClassRef[DEM_MAX_NR_OF_RECORDS_IN_EXTENDED_DATA+1]; // (1..253)\r
-} Dem_ExtendedDataClassType;\r
+} Dem_ExtendedDataClassType; /** @req DEM135 */\r
\r
// 10.2.8 DemPidOrDid\r
typedef struct {\r
const uint8 *PidIndentifier; // (0..1)\r
Dem_CallbackGetPIDValueFncType PidReadFnc; // (0..1)\r
boolean Arc_EOL;\r
-} Dem_PidOrDidType;\r
+} Dem_PidOrDidType; /** @req DEM136 */\r
\r
// 10.2.18 DemFreezeFrameClass\r
typedef struct {\r
Dem_FreezeFrameKindType FFKind; // (1)\r
uint8 FFRecordNumber; // (1)\r
const Dem_PidOrDidType *FFIdClassRef; // (1..255)\r
-} Dem_FreezeFrameClassType;\r
+} Dem_FreezeFrameClassType; /** @req DEM136 */\r
\r
// 10.2.4 DemIndicator\r
typedef struct {\r
uint16 Indicator; // (1)\r
-} Dem_IndicatorType;\r
+} Dem_IndicatorType; /** @req DEM129 */\r
\r
// 10.2.28 DemNvramBlockId\r
typedef struct {\r
// 10.2.6 DemCallbackDTCStatusChanged\r
typedef struct {\r
Dem_CallbackDTCStatusChangedFncType CallbackDTCStatusChangedFnc; // (0..1)\r
-} Dem_CallbackDTCStatusChangedType;\r
+} Dem_CallbackDTCStatusChangedType; /** @req DEM140 */\r
\r
// 10.2.26 DemCallbackInitMForF\r
typedef struct {\r
const Dem_CallbackInitMForFType *CallbackInitMForF; // (0..*)\r
// Dem_DTCSeverityType DTCSeverity // (0..1) Optional\r
boolean Arc_EOL;\r
-} Dem_DTCClassType;\r
+} Dem_DTCClassType; /** @req DEM132 */\r
\r
// 10.2.5 DemCallbackEventStatusChanged\r
typedef struct {\r
Dem_CallbackEventStatusChangedFncType CallbackEventStatusChangedFnc; // (0..1)\r
-} Dem_CallbackEventStatusChangedType;\r
+} Dem_CallbackEventStatusChangedType; /** @req DEM140 */\r
\r
// 10.2.27 DemCallbackInitMForE\r
typedef struct {\r
Dem_CallbackInitMonitorForEventFncType CallbackInitMForEFnc; // (0..1)\r
-} Dem_CallbackInitMforEType;\r
+} Dem_CallbackInitMforEType; /** @req DEM130 */\r
\r
+// 10.2.15\r
typedef struct {\r
Dem_IndicatorStatusType IndicatorBehaviour; // (1)\r
Dem_IndicatorType *LinkedIndicator; // (1)\r
-} Dem_IndicatorAttributeType;\r
+} Dem_IndicatorAttributeType; /** @req DEM133 */\r
\r
// 10.2.23 DemPreDebounceMonitorInternal\r
typedef struct {\r
Dem_CallbackGetFaultDetectionCounterFncType CallbackGetFDCntFnc; // (1)\r
-} Dem_PreDebounceMonitorInternalType;\r
+} Dem_PreDebounceMonitorInternalType; /** @req DEM146 */\r
\r
// 10.2.21 DemPreDebounceCounterBased\r
typedef struct {\r
boolean JumpDown;\r
uint8 CountInStepSize;\r
uint8 CountOutStepSize;\r
-} Dem_PreDebounceCounterBasedType;\r
+} Dem_PreDebounceCounterBasedType; /** @req DEM144 */\r
\r
// 10.2.22 DemPreDebounceFrequencyBased\r
typedef struct {\r
// TODO: Fill out\r
} Dem_PreDebounceTimeBasedType;\r
\r
+// 10.2.20\r
typedef struct {\r
Dem_PreDebounceNameType PreDebounceName; // (1)\r
union {\r
const Dem_PreDebounceAlgorithmClassType *PreDebounceAlgorithmClass; // (0..255) (Only 0..1 supported)\r
const Dem_IndicatorAttributeType *IndicatorAttribute; // (0..255)\r
// Dem_OEMSPecific\r
-} Dem_EventClassType;\r
+} Dem_EventClassType; /** @req DEM131 */\r
\r
// 10.2.12 DemEventParameter\r
typedef struct {\r
const Dem_CallbackEventStatusChangedType *CallbackEventStatusChanged;// (0..*)\r
const Dem_DTCClassType *DTCClassRef; // (0..1)\r
boolean Arc_EOL;\r
-} Dem_EventParameterType;\r
+} Dem_EventParameterType; /** @req DEM130 */\r
\r
// 10.2.19 DemGroupOfDTC\r
typedef struct {\r
\r
// 10.2.10 DemOemIdClass\r
typedef struct {\r
- uint8 OemID; // (Pre+Post)\r
-} Dem_OemIdClassType;\r
+ uint8 OemID;\r
+} Dem_OemIdClassType; /** @req DEM141 */\r
\r
// 10.2.9 DemConfigSet\r
typedef struct {\r
const Dem_DTCClassType *DTCClass; // (1..16777214)\r
const Dem_GroupOfDtcType *GroupOfDtc; // (1.16777214)\r
const Dem_OemIdClassType *OemIdClass; // (0..*)\r
-} Dem_ConfigSetType;\r
+} Dem_ConfigSetType; /** @req DEM130 */\r
\r
// 10.2.2 Dem\r
typedef struct {\r
\r
#ifndef DEM_TYPES_H_\r
#define DEM_TYPES_H_\r
-#include "Std_Types.h"\r
+#include "Std_Types.h" /** @req DEM176.Std */\r
\r
/*\r
* DTC storage types\r
DEM_OBD_DCY, // OBD Driving Cycle\r
\r
DEM_OPERATION_CYCLE_ID_ENDMARK\r
-};\r
+}; /** @req DEM142 */\r
\r
/*\r
* Dem_OperationCycleStateType\r
-
-# Our object files
-obj-y += blinker_main.o
-obj-y += Tasks.o
-obj-y += Hooks.o
-obj-y += Rte.o
-
-# OS object files.
-obj-y += Os_Cfg.o
-# Board object files
-include $(ROOTDIR)/boards/board_common.mk
-
-ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
-
-# The more precise configuration, the higher preceedance.
-VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
-inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
-
-inc-y += $(ROOTDIR)/system/kernel/$(objdir)
-inc-y += $(ROOTDIR)/system/kernel/include
-
-#TODO: Remove?, Build other way?
-VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
-inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
-VPATH += $(ROOTDIR)/components/blinker
-inc-y += $(ROOTDIR)/components/blinker
-
-
-# libs needed by us
-#libitem-y +=
-
-#linkfile
-ldcmdfile-y = linkscript_gcc.ldp
-vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
-
-# What I want to build
-build-exe-y = blinker_node.elf
-
-
-
-
-
+\r
+# Our object files\r
+obj-y += blinker_main.o\r
+obj-y += Tasks.o\r
+obj-y += Hooks.o\r
+obj-y += Rte.o\r
+\r
+# OS object files.\r
+obj-y += Os_Cfg.o\r
+# Board object files\r
+include $(ROOTDIR)/boards/board_common.mk\r
+\r
+ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
+\r
+# The more precise configuration, the higher preceedance.\r
+VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
+inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
+\r
+inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
+inc-y += $(ROOTDIR)/system/kernel/include\r
+\r
+#TODO: Remove?, Build other way?\r
+VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
+inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
+VPATH += $(ROOTDIR)/components/blinker\r
+inc-y += $(ROOTDIR)/components/blinker\r
+\r
+\r
+# libs needed by us \r
+#libitem-y +=\r
+\r
+#linkfile\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
+\r
+# What I want to build\r
+build-exe-y = blinker_node.elf\r
+\r
+\r
+\r
+\r
+\r
+-include ../config/*.mk\r
+-include ../config/$(BOARDDIR)/*.mk\r
\r
-include ../config/*.mk\r
-include ../config/$(BOARDDIR)/*.mk\r
-
-# Our object files
-obj-y += pwm_sine_main.o
-obj-y += Tasks.o
-obj-y += Hooks.o
-obj-y += Rte.o
-
-# OS object files.
-obj-y += Os_Cfg.o
-# Board object files
-include $(ROOTDIR)/boards/board_common.mk
-
-ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
-
-# The more precise configuration, the higher preceedance.
-VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
-inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
-
-
-
-inc-y += $(ROOTDIR)/system/kernel/$(objdir)
-inc-y += $(ROOTDIR)/system/kernel/include
-
-#TODO: Remove?, Build other way?
-VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
-inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
-VPATH += $(ROOTDIR)/components/pwm_sine
-inc-y += $(ROOTDIR)/components/pwm_sine
-
-
-# libs needed by us
-#libitem-y +=
-
-#linkfile
-ldcmdfile-y = linkscript_gcc.ldp
-vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
-
-# What I want to build
-build-exe-y = pwm_node.elf
-
-
-
-
-
+\r
+# Our object files\r
+obj-y += pwm_sine_main.o\r
+obj-y += Tasks.o\r
+obj-y += Hooks.o\r
+obj-y += Rte.o\r
+\r
+# OS object files.\r
+obj-y += Os_Cfg.o\r
+# Board object files\r
+include $(ROOTDIR)/boards/board_common.mk\r
+\r
+ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
+\r
+# The more precise configuration, the higher preceedance.\r
+VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
+inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
+\r
+\r
+\r
+inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
+inc-y += $(ROOTDIR)/system/kernel/include\r
+\r
+#TODO: Remove?, Build other way?\r
+VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
+inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
+VPATH += $(ROOTDIR)/components/pwm_sine\r
+inc-y += $(ROOTDIR)/components/pwm_sine\r
+\r
+\r
+# libs needed by us \r
+#libitem-y +=\r
+\r
+#linkfile\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
+\r
+# What I want to build\r
+build-exe-y = pwm_node.elf\r
+\r
+\r
+\r
+\r
+\r
-
-# Our object files
-obj-y += pwm_node2_helpers.o
-obj-y += fading_led.o
-obj-y += Rte.o
-obj-y += Tasks.o
-obj-y += Hooks.o
-
-inc-y += $(ROOTDIR)/system/kernel/$(objdir)
-inc-y += $(ROOTDIR)/system/kernel/include
-
-# OS object files.
-obj-y += Os_Cfg.o
-# Board object files
-include $(ROOTDIR)/boards/board_common.mk
-
-ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
-
-# The more precise configuration, the higher preceedance.
-VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
-inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
-
-inc-y += $(ROOTDIR)/system/kernel/$(objdir)
-
-#TODO: Remove?, Build other way?
-VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
-inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
-VPATH += $(ROOTDIR)/components/fading_led
-inc-y += $(ROOTDIR)/components/fading_led
-
-
-# libs needed by us
-#libitem-y +=
-
-#linkfile
-ldcmdfile-y = linkscript_gcc.ldp
-vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
-
-# What I want to build
-build-exe-y = pwm_node2.elf
-
-
-
-
-
+\r
+# Our object files\r
+obj-y += pwm_node2_helpers.o\r
+obj-y += fading_led.o\r
+obj-y += Rte.o\r
+obj-y += Tasks.o\r
+obj-y += Hooks.o\r
+\r
+inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
+inc-y += $(ROOTDIR)/system/kernel/include\r
+\r
+# OS object files.\r
+obj-y += Os_Cfg.o\r
+# Board object files\r
+include $(ROOTDIR)/boards/board_common.mk\r
+\r
+ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
+\r
+# The more precise configuration, the higher preceedance.\r
+VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
+inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
+\r
+inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
+\r
+#TODO: Remove?, Build other way?\r
+VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
+inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
+VPATH += $(ROOTDIR)/components/fading_led\r
+inc-y += $(ROOTDIR)/components/fading_led\r
+\r
+\r
+# libs needed by us \r
+#libitem-y +=\r
+\r
+#linkfile\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
+\r
+# What I want to build\r
+build-exe-y = pwm_node2.elf\r
+\r
+\r
+\r
+\r
+\r
+-include ../config/*.mk\r
+-include ../config/$(BOARDDIR)/*.mk\r
\r
-include ../config/*.mk\r
-include ../config/$(BOARDDIR)/*.mk\r
-
-# Our object files
-obj-y += switch_node_helpers.o
-obj-y += switch.o
-obj-y += Rte.o
-obj-y += Tasks.o
-obj-y += Hooks.o
-
-inc-y += $(ROOTDIR)/system/kernel/$(objdir)
-inc-y += $(ROOTDIR)/system/kernel/include
-
-# OS object files.
-obj-y += Os_Cfg.o
-# Board object files
-include $(ROOTDIR)/boards/board_common.mk
-
-ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))
-
-# The more precise configuration, the higher preceedance.
-VPATH := ../config/$(BOARDDIR) ../config $(VPATH)
-inc-y := ../config/$(BOARDDIR) ../config $(inc-y)
-
-inc-y += $(ROOTDIR)/system/kernel/$(objdir)
-
-#TODO: Remove?, Build other way?
-VPATH += $(ROOTDIR)/$(SUBDIR)/Rte
-inc-y += $(ROOTDIR)/$(SUBDIR)/Rte
-VPATH += $(ROOTDIR)/components/switch
-inc-y += $(ROOTDIR)/components/switch
-
-
-# libs needed by us
-#libitem-y +=
-
-#linkfile
-ldcmdfile-y = linkscript_gcc.ldp
-vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts
-
-# What I want to build
-build-exe-y = switch_node.elf
-
-
-
-
-
+\r
+# Our object files\r
+obj-y += switch_node_helpers.o\r
+obj-y += switch.o\r
+obj-y += Rte.o\r
+obj-y += Tasks.o\r
+obj-y += Hooks.o\r
+\r
+inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
+inc-y += $(ROOTDIR)/system/kernel/include\r
+\r
+# OS object files.\r
+obj-y += Os_Cfg.o\r
+# Board object files\r
+include $(ROOTDIR)/boards/board_common.mk\r
+\r
+ABSDIR := $(subst $(TOPDIR)/,,$(CURDIR))\r
+\r
+# The more precise configuration, the higher preceedance.\r
+VPATH := ../config/$(BOARDDIR) ../config $(VPATH)\r
+inc-y := ../config/$(BOARDDIR) ../config $(inc-y)\r
+\r
+inc-y += $(ROOTDIR)/system/kernel/$(objdir)\r
+\r
+#TODO: Remove?, Build other way?\r
+VPATH += $(ROOTDIR)/$(SUBDIR)/Rte\r
+inc-y += $(ROOTDIR)/$(SUBDIR)/Rte\r
+VPATH += $(ROOTDIR)/components/switch\r
+inc-y += $(ROOTDIR)/components/switch\r
+\r
+\r
+# libs needed by us \r
+#libitem-y +=\r
+\r
+#linkfile\r
+ldcmdfile-y = linkscript_gcc.ldp\r
+vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts\r
+\r
+# What I want to build\r
+build-exe-y = switch_node.elf\r
+\r
+\r
+\r
+\r
+\r
+-include ../config/*.mk\r
+-include ../config/$(BOARDDIR)/*.mk\r
\r
-include ../config/*.mk\r
-include ../config/$(BOARDDIR)/*.mk\r
#include "Modules.h"\r
#include "CanNm_Cbk.h"\r
\r
+/** @req CANNM021 */\r
+#define CANNM_VENDOR_ID 1\r
+#define CANNM_MODULE_ID MODULE_ID_CANNM\r
+\r
#define CANNM_AR_MAJOR_VERSION 3\r
#define CANNM_AR_MINOR_VERSION 0\r
#define CANNM_AR_PATCH_VERSION 1\r
#define CANNM_SW_MINOR_VERSION 0\r
#define CANNM_SW_PATCH_VERSION 0\r
\r
+/** @req CANNM200.configFiles */\r
#include "CanNm_Cfg.h"\r
\r
-\r
+/** @req CANNM018 */\r
#define CANNM_E_NO_INIT 0x01 /**< API service used */\r
#define CANNM_E_INVALID_CHANNEL 0x02 /**< API service called with wrong channel handle */\r
/** NM-Timeout Timer has abnormally expired outside of the Ready Sleep State;\r
#define CANNM_SERVICEID_RXINDICATION 0x10\r
#define CANNM_SERVICEID_ARC_MAINFUNCTION 0x13\r
\r
-#define CANNM_CBV_REPEAT_MESSAGE_REQUEST (1 << 0)\r
+#define CANNM_CBV_REPEAT_MESSAGE_REQUEST (1 << 0) /**< @req CANNM045 */\r
\r
// Functions called by NM Interface\r
// --------------------------------\r
CANNM_PDU_OFF = 0xFF,\r
} CanNm_PduBytePositionType;\r
\r
+/** @req CANNM202 @req CANNM203 */\r
typedef struct {\r
const boolean Active;\r
const NetworkHandleType NmNetworkHandle;\r
const uint8 NodeId;\r
const uint32 MainFunctionPeriod;\r
const uint32 TimeoutTime;\r
- const uint32 RepeatMessageTime;\r
- const uint32 WaitBusSleepTime;\r
- const uint32 MessageCycleTime;\r
+ const uint32 RepeatMessageTime; /**< @req CANNM148.1 */\r
+ const uint32 WaitBusSleepTime; /**< @req CANNM148.2 */\r
+ const uint32 MessageCycleTime; /**< @req CANNM148.3 */\r
const uint32 MessageCycleOffsetTime;\r
const PduIdType CanIfPduId;\r
- const uint8 PduLength;\r
- const CanNm_PduBytePositionType NidPosition;\r
- const CanNm_PduBytePositionType CbvPosition;\r
+ const uint8 PduLength; /**< @req CANNM076 */\r
+ const CanNm_PduBytePositionType NidPosition; /**< @req CANNM074 */\r
+ const CanNm_PduBytePositionType CbvPosition; /**< @req CANNM075 */\r
} CanNm_ChannelType;\r
\r
typedef struct {\r
#ifndef CANNM_INTERNAL_H_\r
#define CANNM_INTERNAL_H_\r
\r
+/** @req CANNM188 @req CANNM196 @req CANNM199 */\r
#if (CANNM_DEV_ERROR_DETECT == STD_ON)\r
-#define CANNM_DET_REPORTERROR(serviceId, errorId) \\r
- Det_ReportError(MODULE_ID_CANNM, 0, serviceId, errorId)\r
+#define CANNM_DET_REPORTERROR(serviceId, errorId, instanceId) \\r
+ Det_ReportError(MODULE_ID_CANNM, instanceId, serviceId, errorId)\r
\r
-#define CANNM_VALIDATE(expression, serviceId, errorId, ...) \\r
+#define CANNM_VALIDATE(expression, serviceId, errorId, instanceId, ...) \\r
if (!(expression)) { \\r
- CANNM_DET_REPORTERROR(serviceId, errorId); \\r
+ CANNM_DET_REPORTERROR(serviceId, errorId, instanceId); \\r
return __VA_ARGS__; \\r
}\r
\r
#endif\r
\r
#define CANNM_VALIDATE_INIT(serviceID, ...) \\r
- CANNM_VALIDATE((CanNm_Internal.InitStatus == CANNM_INIT), serviceID, CANNM_E_NO_INIT, __VA_ARGS__)\r
+ CANNM_VALIDATE((CanNm_Internal.InitStatus == CANNM_INIT), serviceID, CANNM_E_NO_INIT, 0, __VA_ARGS__)\r
\r
+/** @req CANNM192 */\r
#define CANNM_VALIDATE_CHANNEL(channel, serviceID, ...) \\r
- CANNM_VALIDATE( (channel < CANNM_CHANNEL_COUNT), serviceID, CANNM_E_INVALID_CHANNEL, __VA_ARGS__)\r
+ CANNM_VALIDATE( (channel < CANNM_CHANNEL_COUNT), serviceID, CANNM_E_INVALID_CHANNEL, channel, __VA_ARGS__)\r
\r
#define CANNM_VALIDATE_NOTNULL(ptr, serviceID, ...) \\r
- CANNM_VALIDATE( (ptr != NULL), serviceID, NM_E_NULL_POINTER, __VA_ARGS__)\r
+ CANNM_VALIDATE( (ptr != NULL), serviceID, NM_E_NULL_POINTER, 0, __VA_ARGS__)\r
\r
typedef enum {\r
CANNM_INIT,\r
} CanNm_InitStatusType;\r
\r
typedef struct {\r
- Nm_ModeType Mode;\r
- Nm_StateType State;\r
+ Nm_ModeType Mode; /**< @req CANNM092 */\r
+ Nm_StateType State; /**< @req CANNM094 */\r
boolean Requested;\r
uint32 TimeoutTimeLeft;\r
uint32 RepeatMessageTimeLeft;\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+/** @req CANSM008 */\r
\r
#ifndef CANSM_H_\r
#define CANSM_H_\r
\r
-#include "ComStack_Types.h"\r
+#include "ComStack_Types.h" /**< @req CANSM238 */\r
#include "ComM.h"\r
#include "CanSM_ConfigTypes.h"\r
+#include "Modules.h"\r
+\r
+#define CANSM_VENDOR_ID 1\r
+#define CANSM_MODULE_ID MODULE_ID_CANSM\r
\r
#define CANSM_AR_MAJOR_VERSION 1\r
#define CANSM_AR_MINOR_VERSION 0\r
#define CANSM_SW_MINOR_VERSION 0\r
#define CANSM_SW_PATCH_VERSION 0\r
\r
-#include "CanSM_Cfg.h"\r
+#include "CanSM_Cfg.h" /**< @req CANSM239 @req CANSM025.configuration */\r
\r
\r
#define CANSM_E_UNINIT 0x01 /**< API service used without module initialization */\r
CANSM_BOR_CHECK_L2, /**< Bus-off recovery level 2 state, TX enabled again */\r
};\r
\r
+/** @req CANSM037 */\r
\r
/** This service initializes the CanSM module */\r
+/** @req CANSM023 */\r
void CanSM_Init( const CanSM_ConfigType* ConfigPtr );\r
\r
/** This service puts out the version information of this module */\r
-void CanSM_GetVersionInfo( Std_VersionInfoType* VersionInfo );\r
+/** @req CANSM024 @req CANSM180 */\r
+#if (CANSM_VERSION_INFO_API == STD_ON)\r
+#define CanSM_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,CANSM)\r
+#endif\r
\r
/** This service shall change the communication mode of a CAN network to the requested one. */\r
+/** @req CANSM062 */\r
Std_ReturnType CanSM_RequestComMode( NetworkHandleType NetworkHandle, ComM_ModeType ComM_Mode );\r
\r
/** This service shall put out the current communication mode of a CAN network. */\r
+/** @req CANSM063 */\r
Std_ReturnType CanSM_GetCurrentComMode( NetworkHandleType NetworkHandle, ComM_ModeType* ComM_ModePtr );\r
\r
\r
/** Scheduled function of the CanSM */\r
+/** @req CANSM065 */\r
void CanSM_MainFunction();\r
\r
\r
#ifndef CANSM_CBK_H_\r
#define CANSM_CBK_H_\r
\r
+/** @req CANSM011 */\r
+\r
/** The CanSM is notified about a bus-off event on a certain CAN controller with this\r
* call-out function. It shall execute the bus-off recovery state machine for the\r
* corresponding network handle. */\r
#ifndef CANSM_CONFIGTYPES_H_\r
#define CANSM_CONFIGTYPES_H_\r
\r
+/** @req CANSM010.bswbuilder */\r
+\r
#include "Com.h"\r
\r
typedef struct {\r
const CanSM_ControllerType* Controllers;\r
const uint8 ControllerCount;\r
const uint8 ComMNetworkHandle;\r
- const Com_PduGroupIdType ComRxPduGroupId;\r
+ const Com_PduGroupIdType ComRxPduGroupId; /**< @req CANSM091 */\r
const Com_PduGroupIdType ComTxPduGroupId;\r
} CanSM_NetworkType;\r
\r
typedef struct {\r
const CanSM_NetworkType* Networks;\r
-} CanSM_ConfigType;\r
+} CanSM_ConfigType; /**< @req CANSM061 */\r
\r
#endif /* CANSM_CONFIGTYPES_H_ */\r
#include "ComStack_Types.h"\r
#include "Std_Types.h"\r
#include "CanTp_Cfg.h" /** @req CANTP221 */\r
-//#include "Dem.h" // TODO: req: CanTp156\r
+//#include "Dem.h"\r
\r
/*\r
*\r
* Implemented functions\r
****************************/\r
\r
-void CanTp_Init(); /** req : CanTp208 **/\r
+void CanTp_Init(); /** @req CANTP208 **/\r
\r
#if ( CANTP_VERSION_INFO_API == STD_ON ) /** @req CANTP162 *//** @req CANTP163 */\r
-#define CanTp_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,CANTP) /** req : CanTp210 */\r
+#define CanTp_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,CANTP) /** @req CANTP210 */ /* @req CANTP218 */\r
#endif /* CANTP_VERSION_INFO_API */\r
\r
-void CanTp_Shutdown();\r
+void CanTp_Shutdown(); /** @req CANTP211 */\r
\r
-Std_ReturnType CanTp_Transmit( PduIdType CanTpTxSduId, const PduInfoType * CanTpTxInfoPtr );\r
+Std_ReturnType CanTp_Transmit( PduIdType CanTpTxSduId, const PduInfoType * CanTpTxInfoPtr ); /** @req CANTP212 */\r
\r
-Std_ReturnType FrTp_CancelTransmitRequest( PduIdType FrTpTxPduId, FrTp_CancelReasonType FrTpCancelReason );\r
+Std_ReturnType FrTp_CancelTransmitRequest( PduIdType FrTpTxPduId, FrTp_CancelReasonType FrTpCancelReason ); /** @req CANTP246 */\r
\r
-void CanTp_MainFunction();\r
+void CanTp_MainFunction(); /** @req CANTP213 */\r
\r
\r
#endif /* CANTP_H_ */\r
#include "ComStack_Types.h"\r
\r
\r
-void CanTp_RxIndication( PduIdType CanTpRxPduId, const PduInfoType *CanTpRxPduPtr );\r
+void CanTp_RxIndication( PduIdType CanTpRxPduId, const PduInfoType *CanTpRxPduPtr ); /** @req CANTP214 */\r
\r
-void CanTp_TxConfirmation( PduIdType CanTpTxPduId );\r
+void CanTp_TxConfirmation( PduIdType CanTpTxPduId ); /** @req CANTP215 */\r
\r
\r
#endif /* CANTP_CBK_H_ */\r
* for more details.\r
* -------------------------------- Arctic Core ------------------------------*/\r
\r
+/*\r
+ * General requirements\r
+ */\r
/** @req CANTP160 */\r
\r
+/*\r
+ * Definitions generated by tools
+ */\r
+/** @req CANTP239 */\r
+/** @req CANTP242 */\r
+\r
#ifndef CANTP_TYPES_H_\r
#define CANTP_TYPES_H_\r
\r
CANTP_OFF, CANTP_ON\r
} CanTp_StateType;\r
\r
-typedef enum { /* req: CanTp030 */\r
+typedef enum {\r
CANTP_RX_WAIT,\r
CANTP_RX_PROCESSING,\r
CANTP_TX_WAIT,\r
\r
\r
typedef struct {\r
- uint32 CanTpNSa; /** req: CanTp254 */\r
-} CanTp_NSaType; /** req: CanTp256: .. */\r
+ uint32 CanTpNSa; /** @req CANTP254 */\r
+} CanTp_NSaType; /** @req CANTP253 */\r
\r
typedef struct {\r
- uint32 CanTpNTa; /** req: CanTp255 */\r
-} CanTp_NTaType;\r
+ uint32 CanTpNTa; /** @req CANTP255 */\r
+} CanTp_NTaType; /** @req CANTP139 */\r
\r
typedef struct {\r
- const uint32 CanTpRxNPduId; /** req: CanTp258: */\r
- const uint32 CanTpRxNPduRef; /** req: CanTp257: */\r
-} CanTp_RxNPduType;\r
+ const uint32 CanTpRxNPduId; /** @req CANTP258 */\r
+ const uint32 CanTpRxNPduRef; /** @req CANTP257 */\r
+} CanTp_RxNPduType; /** @req CANTP256 */\r
\r
typedef struct {\r
- const uint32 CanTpTxNPduId; /** req: CanTp258: */\r
- const uint32 CanTpTxNPduRef; /** req: CanTp257: */\r
-} CanTp_TxNPduType;\r
+ const uint32 CanTpTxNPduId; /* TODO: Remove this? */\r
+ const uint32 CanTpTxNPduRef; /** @req CANTP275 */\r
+} CanTp_TxNPduType; /** @req CANTP274 */\r
\r
typedef struct {\r
- const uint32 CanTpTxFcNPduRef; /** req: CanTp259: Reference to a PDU in the COM stack. */\r
-} CanTp_TxFcNPduType;\r
+ const uint32 CanTpTxFcNPduRef; /** @req CANTP260 */ /* Reference to a PDU in the COM stack. */\r
+} CanTp_TxFcNPduType; /** @req CANTP259 */\r
\r
typedef struct {\r
- const uint32 CanTpRxFcNPduRef; /** req: CanTp259: Reference to a PDU in the COM stack. */\r
- const uint32 CanTpRxFcNPduId; /** req: CanTp274: */\r
-} CanTp_RxFcNPduType;\r
+ const uint32 CanTpRxFcNPduRef; /** @req CANTP272 */ /* Reference to a PDU in the COM stack. */\r
+ const uint32 CanTpRxFcNPduId; /** @req CANTP273 */\r
+} CanTp_RxFcNPduType; /** @req CANTP271 */\r
\r
\r
typedef struct {\r
const int CanIf_FcPduId; // The polite CanIf PDU index.\r
const int PduR_PduId; // The polite PduR index.\r
- const CanTp_AddressingFormantType CanTpAddressingFormant;\r
- const uint8 CanTpBs; /** req: CanTp243: Sets the maximum number of messages of N-PDUs before flow control. */\r
- const uint16 CanTpNar; /** req: CanTp244: Timeout for transmission of a CAN frame (ms). */\r
- const uint16 CanTpNbr; /** req: CanTp245: ?? */\r
- const uint16 CanTpNcr; /** req: CanTp246: Time out for consecutive frames (ms). */\r
- const uint8 CanTpRxChannel; /* Connection to runtime variable index, see CanTp 266. */\r
- const uint16 CanTpRxDI; /** req: CanTp248: Data length code for of this RxNsdu. */\r
- CanTp_StateType CanTpRxPaddingActivation; /** req: CanTp249: Enable use of padding. */\r
- CanTp_TaTypeType CanTpRxTaType; /** req: CanTp250: Functional or physical addressing. */\r
- const uint8 CanTpWftMax; /** req: CanTp251: Max number FC wait that can be transmitted consecutively. */\r
- const uint16 CanTpSTmin; /** req: CanTp252: Minimum time the sender shall wait between transmissions of two N-PDU. */\r
+ const CanTp_AddressingFormantType CanTpAddressingFormant; /** @req CANTP242 */\r
+ const uint8 CanTpBs; /** @req CANTP243 */ /* Sets the maximum number of messages of N-PDUs before flow control. */\r
+ const uint16 CanTpNar; /** @req CANTP244 */ /* Timeout for transmission of a CAN frame (ms). */\r
+ const uint16 CanTpNbr; /** @req CANTP245 */\r
+ const uint16 CanTpNcr; /** @req CANTP246 */ /* Time out for consecutive frames (ms). */\r
+ const uint8 CanTpRxChannel; /** @req CANTP247 */ /* Connection to runtime variable index, see CanTp 266. */\r
+ const uint16 CanTpRxDI; /** @req CANTP248 */ /* Data length code for of this RxNsdu. */\r
+ CanTp_StateType CanTpRxPaddingActivation; /** @req CANTP249 */ /* Enable use of padding. */\r
+ CanTp_TaTypeType CanTpRxTaType; /** @req CANTP250 */ /* Functional or physical addressing. */\r
+ const uint8 CanTpWftMax; /** @req CANTP251 */ /* Max number FC wait that can be transmitted consecutively. */\r
+ const uint16 CanTpSTmin; /** @req CANTP252 */ /* Minimum time the sender shall wait between transmissions of two N-PDU. */\r
/*const uint32 CanTpNSduRef ** req: CanTp241. This is PDU id - typeless enum. */\r
const CanTp_NSaType *CanTpNSa;\r
const CanTp_NTaType *CanTpNTa;\r
//CanTp_TxFcNPduType *CanTpTxFcNPdu;\r
//const PduIdType CanTpRxPduId;\r
\r
-} CanTp_RxNSduType;\r
+} CanTp_RxNSduType; /** @req CANTP137 */\r
\r
typedef struct {\r
const int CanIf_PduId; // The polite CanIf index.\r
const int PduR_PduId; // The polite PduR index.\r
- const CanTp_AddressingFormantType CanTpAddressingMode; /** req: CanTp138: */\r
- const uint16 CanTpNas; /** req: CanTp263: N_As timeout for transmission of any CAN frame. */\r
- const uint16 CanTpNbs; /** req: CanTp264: N_Bs timeout of transmission until reception of next Flow Control. */\r
- const uint16 CanTpNcs; /** req: CanTp265: N_Bs timeout of transmission until reception of next Flow Control. */\r
- const uint8 CanTpTxChannel; /** req: CanTp266: Link to the TX connection channel (why?). */\r
- const uint16 CanTpTxDI; /** req: CanTp267: Data length code for of this TxNsdu. */\r
+ const CanTp_AddressingFormantType CanTpAddressingMode; /** @req CANTP262 */\r
+ const uint16 CanTpNas; /** @req CANTP263 */ /* N_As timeout for transmission of any CAN frame. */\r
+ const uint16 CanTpNbs; /** @req CANTP264 */ /* N_Bs timeout of transmission until reception of next Flow Control. */\r
+ const uint16 CanTpNcs; /** @req CANTP265 */ /* N_Bs timeout of transmission until reception of next Flow Control. */\r
+ const uint8 CanTpTxChannel; /** @req CANTP266 */ /* Link to the TX connection channel (why?). */\r
+ const uint16 CanTpTxDI; /** @req CANTP267 */ /* Data length code for of this TxNsdu. */\r
/*const uint32 CanTpTxNSduId; / ** req: CanTp268: Data length code for of this TxNsdu. */\r
- CanTp_StateType CanTpTxPaddingActivation; /** req: CanTp249: Enable use of padding. */\r
- CanTp_TaTypeType CanTpTxTaType; /** req: CanTp270: Functional or physical addressing. */\r
+ CanTp_StateType CanTpTxPaddingActivation; /** @req CANTP269 */ /* Enable use of padding. */\r
+ CanTp_TaTypeType CanTpTxTaType; /** @req CANTP270 */ /* Functional or physical addressing. */\r
/*const uint32 CanTpNSduRef ** req: CanTp261. This is PDU id - typeless enum. */\r
const CanTp_NSaType *CanTpNSa;\r
const CanTp_NTaType *CanTpNTa;\r
//CanTp_TxNPduType *CanTpTxNPdu;\r
//PduIdType CanTpTxPduId;\r
\r
-} CanTp_TxNSduType; /** req: CanTp138: */\r
+} CanTp_TxNSduType; /** @req CANTP138 */\r
\r
// - - - - - - - - - - -\r
\r
typedef struct {\r
- uint32 main_function_period; /** req: CanTp240: ?? */\r
-} CanTp_GeneralType;\r
+ uint32 main_function_period; /** @req CANTP240 */\r
+} CanTp_GeneralType; /** @req CANTP238 */\r
\r
// - - - - - - - - - - -\r
\r
#ifndef COMM_H_\r
#define COMM_H_\r
\r
+/** @req COMM466 @req COMM518 @req COMM692 */\r
#include "ComStack_Types.h"\r
#include "ComM_Types.h"\r
#include "ComM_ConfigTypes.h"\r
#define COMM_MODULE_ID MODULE_ID_COMM\r
#define COMM_VENDOR_ID 1\r
\r
+/** @req COMM469 */\r
#define COMM_AR_MAJOR_VERSION 2\r
#define COMM_AR_MINOR_VERSION 0\r
#define COMM_AR_PATCH_VERSION 1\r
#define COMM_SW_MINOR_VERSION 0\r
#define COMM_SW_PATCH_VERSION 0\r
\r
+/** @req COMM328 @req COMM456 */\r
#include "ComM_Cfg.h"\r
\r
/** Function call has been successfully but mode can not\r
#define COMM_E_MODE_LIMITATION 2\r
\r
/** ComM not initialized */\r
+/** @req COMM650 */\r
#define COMM_E_UNINIT 3\r
\r
#define COMM_E_NOT_INITED 0x1 /**< API service used without module initialization */\r
\r
\r
/** Initializes the AUTOSAR Communication Manager and restarts the internal state machines.*/\r
-void ComM_Init( ComM_ConfigType *);\r
+void ComM_Init( ComM_ConfigType *); /**< @req COMM146 */\r
\r
/** De-initializes (terminates) the AUTOSAR Communication Manager. */\r
-void ComM_DeInit();\r
+void ComM_DeInit(); /**< @req COMM147 */\r
\r
+/** @req COMM370 */\r
#if (COMM_VERSION_INFO_API == STD_ON)\r
#define ComM_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,COMM)\r
#endif\r
\r
/** Returns the initialization status of the AUTOSAR Communication Manager. */\r
-Std_ReturnType ComM_GetStatus( ComM_InitStatusType* Status );\r
-Std_ReturnType ComM_GetInhibitionStatus( NetworkHandleType Channel, ComM_InhibitionStatusType* Status );\r
+Std_ReturnType ComM_GetStatus( ComM_InitStatusType* Status ); /**< @req COMM242 */\r
+Std_ReturnType ComM_GetInhibitionStatus( NetworkHandleType Channel, ComM_InhibitionStatusType* Status ); /**< @req COMM619 */\r
\r
-Std_ReturnType ComM_RequestComMode( ComM_UserHandleType User, ComM_ModeType ComMode );\r
+Std_ReturnType ComM_RequestComMode( ComM_UserHandleType User, ComM_ModeType ComMode ); /**< @req COMM110 */\r
Std_ReturnType ComM_GetMaxComMode( ComM_UserHandleType User, ComM_ModeType* ComMode );\r
-Std_ReturnType ComM_GetRequestedComMode( ComM_UserHandleType User, ComM_ModeType* ComMode );\r
-Std_ReturnType ComM_GetCurrentComMode( ComM_UserHandleType User, ComM_ModeType* ComMode );\r
-\r
-Std_ReturnType ComM_PreventWakeUp( NetworkHandleType Channel, boolean Status );\r
-Std_ReturnType ComM_LimitChannelToNoComMode( NetworkHandleType Channel, boolean Status );\r
-Std_ReturnType ComM_LimitECUToNoComMode( boolean Status );\r
-Std_ReturnType ComM_ReadInhibitCounter( uint16* CounterValue );\r
-Std_ReturnType ComM_ResetInhibitCounter();\r
+Std_ReturnType ComM_GetRequestedComMode( ComM_UserHandleType User, ComM_ModeType* ComMode ); /**< @req COMM79 */\r
+Std_ReturnType ComM_GetCurrentComMode( ComM_UserHandleType User, ComM_ModeType* ComMode ); /**< @req COMM83 */\r
+\r
+Std_ReturnType ComM_PreventWakeUp( NetworkHandleType Channel, boolean Status ); /**< @req COMM156 */\r
+Std_ReturnType ComM_LimitChannelToNoComMode( NetworkHandleType Channel, boolean Status ); /**< @req COMM163 */\r
+Std_ReturnType ComM_LimitECUToNoComMode( boolean Status ); /**< @req COMM124 */\r
+Std_ReturnType ComM_ReadInhibitCounter( uint16* CounterValue ); /**< @req COMM224 */\r
+Std_ReturnType ComM_ResetInhibitCounter(); /**< @req COMM108 */\r
Std_ReturnType ComM_SetECUGroupClassification( ComM_InhibitionStatusType Status );\r
\r
\r
#ifndef COMM_CONFIGTYPES_H_\r
#define COMM_CONFIGTYPES_H_\r
\r
+/* Configuration requirements */\r
+/** @req COMM554.bswbuilder @req COMM555.bswbuilder @req COMM563.bswbuilder @req COMM560.bswbuilder\r
+ * @req COMM561.bswbuilder @req COMM557.bswbuilder @req COMM622.bswbuilder @req COMM653.bswbuilder\r
+ * @req COMM654.bswbuilder @req COMM565.bswbuilder @req COMM567.bswbuilder @req COMM635.bswbuilder\r
+ * @req COMM556.bswbuilder @req COMM607.bswbuilder @req COMM606.bswbuilder @req COMM568.bswbuilder\r
+ * @req COMM657.bswbuilder @req COMM658.bswbuilder @req COMM246.bswbuilder */\r
+\r
typedef enum {\r
COMM_BUS_TYPE_CAN,\r
COMM_BUS_TYPE_FR,\r
} ComM_NmVariantType;\r
\r
typedef struct {\r
- const ComM_BusTypeType BusType;\r
+ const ComM_BusTypeType BusType; /**< @req COMM322 */\r
const NetworkHandleType BusSMNetworkHandle;\r
const NetworkHandleType NmChannelHandle;\r
const ComM_NmVariantType NmVariant;\r
\r
\r
typedef struct {\r
+ /** @req COMM795 @req COMM796 @req COMM797 @req COMM798 @req COMM327 @req COMM159 */\r
const ComM_ChannelType** ChannelList;\r
const uint8 ChannelCount;\r
} ComM_UserType;\r
#ifndef COMM_NM_H_\r
#define COMM_NM_H_\r
\r
-void ComM_Nm_NetworkStartIndication( NetworkHandleType Channel );\r
-void ComM_Nm_NetworkMode( NetworkHandleType Channel );\r
-void ComM_Nm_PrepareBusSleepMode( NetworkHandleType Channel );\r
-void ComM_Nm_BusSleepMode( NetworkHandleType Channel );\r
-void ComM_Nm_RestartIndication( NetworkHandleType Channel );\r
+void ComM_Nm_NetworkStartIndication( NetworkHandleType Channel ); /**< @req COMM383 */\r
+void ComM_Nm_NetworkMode( NetworkHandleType Channel ); /**< @req COMM390 */\r
+void ComM_Nm_PrepareBusSleepMode( NetworkHandleType Channel ); /**< @req COMM391 */\r
+void ComM_Nm_BusSleepMode( NetworkHandleType Channel ); /**< @req COMM392 */\r
+void ComM_Nm_RestartIndication( NetworkHandleType Channel ); /**< @req COMM792 */\r
\r
#endif /*COMM_NM_H_*/\r
#define COMM_TYPES_H_\r
\r
/** Current mode of the Communication Manager (main state of the state machine). */\r
+/** @req COMM484 @req COMM190 @req COMM248 */\r
typedef enum {\r
COMM_NO_COMMUNICATION = 0,\r
COMM_SILENT_COMMUNICATION = 1,\r
typedef enum {\r
COMM_UNINIT,\r
COMM_INIT,\r
-} ComM_InitStatusType;\r
+} ComM_InitStatusType; /**< @req COMM494 */\r
\r
/** Inhibition status of ComM. */\r
-typedef uint8 ComM_InhibitionStatusType;\r
+typedef uint8 ComM_InhibitionStatusType; /**< @req COMM496 */\r
\r
#define COMM_INHIBITION_STATUS_NONE (0)\r
/** Wake Up inhibition active */\r
\r
#include "Std_Types.h"\r
\r
-// Proposed by Mattias\r
-// We need a place to store the global PDU ids?\r
-#include "ComGlobals.h"\r
-\r
\r
// Zero-based integer number\r
// The size of this global type depends on the maximum\r
#ifndef DCM_H_\r
#define DCM_H_\r
\r
-#define DCM_MODULE_ID MODULE_ID_DCM\r
+#define DCM_MODULE_ID MODULE_ID_DCM /** @req DCM052 */\r
#define DCM_VENDOR_ID 1\r
\r
#define DCM_SW_MAJOR_VERSION 1\r
/*\r
* Interfaces for BSW components (8.3.1)\r
*/\r
-#if ( DCM_VERSION_INFO_API == STD_ON )\r
-#define Dcm_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,DCM)\r
+#if ( DCM_VERSION_INFO_API == STD_ON ) /** @req DCM337 */\r
+#define Dcm_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,DCM) /** @req DCM065 */ /** @req DCM335 */ /** @req DCM336 */\r
#endif /* DCM_VERSION_INFO_API */\r
\r
-void Dcm_Init( void );\r
+void Dcm_Init( void ); /** @req DCM037 */\r
\r
\r
/*\r
* Interfaces for BSW modules and to SW-Cs (8.3.2)\r
*/\r
-Std_ReturnType Dcm_GetSecurityLevel(Dcm_SecLevelType *secLevel);\r
-Std_ReturnType Dcm_GetSesCtrlType(Dcm_SesCtrlType *sesCtrlType);\r
-Std_ReturnType Dcm_GetActiveProtocol(Dcm_ProtocolType *activeProtocol);\r
+Std_ReturnType Dcm_GetSecurityLevel(Dcm_SecLevelType *secLevel); /** @req DCM338 */\r
+Std_ReturnType Dcm_GetSesCtrlType(Dcm_SesCtrlType *sesCtrlType); /** @req DCM339 */\r
+Std_ReturnType Dcm_GetActiveProtocol(Dcm_ProtocolType *activeProtocol); /** @req DCM340 */\r
\r
/*\r
* Interface for basic software scheduler (8.5)\r
*/\r
-void Dcm_MainFunction( void );\r
+void Dcm_MainFunction( void ); /** @req DCM053 */\r
\r
\r
#endif /*DCM_H_*/\r
/*\r
* Interfaces for callback notifications from PduR and ComM (8.4)\r
*/\r
-BufReq_ReturnType Dcm_ProvideRxBuffer(PduIdType dcmRxPduId, PduLengthType tpSduLength, PduInfoType **pduInfoPtr);\r
-void Dcm_RxIndication(PduIdType dcmRxPduId, NotifResultType result);\r
-BufReq_ReturnType Dcm_ProvideTxBuffer(PduIdType dcmTxPduId, PduInfoType **pduInfoPtr, PduLengthType length);\r
-void Dcm_TxConfirmation(PduIdType dcmTxPduId, NotifResultType result);\r
-void Dcm_ComM_NoComModeEntered(void);\r
-void Dcm_ComM_SilentComModeEntered(void);\r
-void Dcm_ComM_FullComModeEntered(void);\r
+BufReq_ReturnType Dcm_ProvideRxBuffer(PduIdType dcmRxPduId, PduLengthType tpSduLength, PduInfoType **pduInfoPtr); /** @req DCM094 */\r
+void Dcm_RxIndication(PduIdType dcmRxPduId, NotifResultType result); /** @req DCM093 */\r
+BufReq_ReturnType Dcm_ProvideTxBuffer(PduIdType dcmTxPduId, PduInfoType **pduInfoPtr, PduLengthType length); /** @req DCM092 */\r
+void Dcm_TxConfirmation(PduIdType dcmTxPduId, NotifResultType result); /** @req DCM351 */\r
+void Dcm_ComM_NoComModeEntered(void); /** @req DCM356 */\r
+void Dcm_ComM_SilentComModeEntered(void); /** @req DCM358 */\r
+void Dcm_ComM_FullComModeEntered(void); /** @req DCM360 */\r
\r
#endif /*DCM_CBK_H_*/\r
#define DEM_AR_MINOR_VERSION 0\r
#define DEM_AR_PATCH_VERSION 1\r
\r
+/** @req DCM067.Cfg-files */\r
#include "Dem_Types.h"\r
#include "Dem_Cfg.h"\r
#include "Dem_Lcfg.h"\r
-#include "Dem_IntErrId.h"\r
+#include "Dem_IntErrId.h" /** @req DEM115 */\r
#include "Dem_IntEvtId.h"\r
+/** @req DEM153 */ /** @req DEM154 */ /* Realized in Dem_IntErrId.h and Dem_IntEvtId.h */\r
// #include "Rte_Dem.h"\r
\r
\r
#if (DEM_DEV_ERROR_DETECT == STD_ON)\r
-// Error codes produced by this module\r
+// Error codes reported by this module defined by AUTOSAR /** @req DEM116 */ /** @req DEM173 */\r
#define DEM_E_CONFIG_PTR_INVALID 0x01\r
#define DEM_E_PARAM_CONFIG 0x10\r
#define DEM_E_PARAM_ADDRESS 0x11\r
#define DEM_E_UNINIT 0x20\r
#define DEM_E_NODATAAVAILABLE 0x30\r
\r
+// Other error codes reported by this module\r
#define DEM_E_EVENT_STATUS_BUFF_FULL 0x40\r
#define DEM_E_EXT_DATA_TOO_BIG 0x41\r
#define DEM_E_PRE_INIT_EXT_DATA_BUFF_FULL 0x42\r
/*\r
* Interface for upper layer modules (8.3.1)\r
*/\r
-#if ( DEM_VERSION_INFO_API == STD_ON )\r
-#define Dem_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,DEM)\r
+#if ( DEM_VERSION_INFO_API == STD_ON ) /** @req DEM111 */\r
+#define Dem_GetVersionInfo(_vi) STD_GET_VERSION_INFO(_vi,DEM) /** @req DEM177 */ /** @req DEM110 */ /** @req DEM178 */\r
#endif /* DEM_VERSION_INFO_API */\r
\r
/*\r
* Interface ECU State Manager <-> DEM (8.3.2)\r
*/\r
-void Dem_PreInit( void );\r
-void Dem_Init( void );\r
-void Dem_Shutdown( void );\r
+void Dem_PreInit( void ); /** @req DEM179 */\r
+void Dem_Init( void ); /** @req DEM181 */\r
+void Dem_Shutdown( void ); /** @req DEM182 */\r
\r
\r
/*\r
* Interface for basic software scheduler\r
*/\r
-void Dem_MainFunction( void );\r
+void Dem_MainFunction( void ); /** @req DEM266 */\r
\r
\r
/*\r
* Interface SW-Components via RTE <-> DEM (8.3.3)\r
*/\r
-Std_ReturnType Dem_SetEventStatus(Dem_EventIdType eventId, uint8 eventStatus);\r
-Std_ReturnType Dem_ResetEventStatus(Dem_EventIdType eventId);\r
-Std_ReturnType Dem_GetEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtendedType *eventStatusExtended);\r
-Std_ReturnType Dem_GetEventFailed(Dem_EventIdType eventId, boolean *eventFailed);\r
-Std_ReturnType Dem_GetEventTested(Dem_EventIdType eventId, boolean *eventTested);\r
-Std_ReturnType Dem_GetFaultDetectionCounter(Dem_EventIdType eventId, sint8 *counter);\r
-Std_ReturnType Dem_SetOperationCycleState(Dem_OperationCycleIdType OperationCycleId, Dem_OperationCycleStateType CycleState);\r
-Std_ReturnType Dem_GetDTCOfEvent(Dem_EventIdType eventId, Dem_DTCKindType dtcKind, uint32* dtcOfEvent);\r
+Std_ReturnType Dem_SetEventStatus(Dem_EventIdType eventId, uint8 eventStatus); /** @req DEM183 */\r
+Std_ReturnType Dem_ResetEventStatus(Dem_EventIdType eventId); /** @req DEM185 */\r
+Std_ReturnType Dem_GetEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtendedType *eventStatusExtended); /** @req DEM195 */\r
+Std_ReturnType Dem_GetEventFailed(Dem_EventIdType eventId, boolean *eventFailed); /** @req DEM196 */\r
+Std_ReturnType Dem_GetEventTested(Dem_EventIdType eventId, boolean *eventTested); /** @req DEM197 */\r
+Std_ReturnType Dem_GetFaultDetectionCounter(Dem_EventIdType eventId, sint8 *counter); /** @req DEM203 */\r
+Std_ReturnType Dem_SetOperationCycleState(Dem_OperationCycleIdType OperationCycleId, Dem_OperationCycleStateType CycleState); /** @req DEM194 */\r
+Std_ReturnType Dem_GetDTCOfEvent(Dem_EventIdType eventId, Dem_DTCKindType dtcKind, uint32* dtcOfEvent); /** @req DEM198 */\r
\r
\r
/*\r
* Interface BSW-Components <-> DEM (8.3.4)\r
*/\r
-void Dem_ReportErrorStatus(Dem_EventIdType eventId ,uint8 eventStatus);\r
+void Dem_ReportErrorStatus(Dem_EventIdType eventId ,uint8 eventStatus); /** @req DEM206 */\r
\r
\r
/*\r
* Interface DCM <-> DEM (8.3.5)\r
*/\r
-Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin);\r
-Dem_ReturnSetDTCFilterType Dem_SetDTCFilter(uint8 dtcStatusMask,\r
- Dem_DTCKindType dtcKind,\r
- Dem_DTCOriginType dtcOrigin,\r
- Dem_FilterWithSeverityType filterWithSeverity,\r
- Dem_DTCSeverityType dtcSeverityMask,\r
- Dem_FilterForFDCType filterForFaultDetectionCounter);\r
-Dem_ReturnGetStatusOfDTCType Dem_GetStatusOfDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin, Dem_EventStatusExtendedType* dtcStatus);\r
-Std_ReturnType Dem_GetDTCStatusAvailabilityMask(uint8 *dtcStatusMask);\r
-Dem_ReturnGetNumberOfFilteredDTCType Dem_GetNumberOfFilteredDtc(uint16* numberOfFilteredDTC);\r
-Dem_ReturnGetNextFilteredDTCType Dem_GetNextFilteredDTC(uint32* dtc, Dem_EventStatusExtendedType* dtcStatus);\r
-Dem_ReturnTypeOfDtcSupportedType Dem_GetTranslationType(void);\r
-Dem_ReturnControlDTCStorageType Dem_DisableDTCStorage(Dem_DTCGroupType dtcGroup, Dem_DTCKindType dtcKind);\r
-Dem_ReturnControlDTCStorageType Dem_EnableDTCStorage(Dem_DTCGroupType dtcGroup, Dem_DTCKindType dtcKind);\r
-Dem_ReturnGetExtendedDataRecordByDTCType Dem_GetExtendedDataRecordByDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin, uint8 extendedDataNumber, uint8 *destBuffer, uint8 *bufSize);\r
-Dem_ReturnGetSizeOfExtendedDataRecordByDTCType Dem_GetSizeOfExtendedDataRecordByDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin, uint8 extendedDataNumber, uint16 *sizeOfExtendedDataRecord);\r
+Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin); /** @req DEM241 */\r
+Dem_ReturnSetDTCFilterType Dem_SetDTCFilter(uint8 dtcStatusMask, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin, Dem_FilterWithSeverityType filterWithSeverity, Dem_DTCSeverityType dtcSeverityMask, Dem_FilterForFDCType filterForFaultDetectionCounter); /** @req DEM208 */\r
+Dem_ReturnGetStatusOfDTCType Dem_GetStatusOfDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin, Dem_EventStatusExtendedType* dtcStatus); /** @req DEM212 */\r
+Std_ReturnType Dem_GetDTCStatusAvailabilityMask(uint8 *dtcStatusMask); /** @req DEM213 */\r
+Dem_ReturnGetNumberOfFilteredDTCType Dem_GetNumberOfFilteredDtc(uint16* numberOfFilteredDTC); /** @req DEM214 */\r
+Dem_ReturnGetNextFilteredDTCType Dem_GetNextFilteredDTC(uint32* dtc, Dem_EventStatusExtendedType* dtcStatus); /** @req DEM215 */\r
+Dem_ReturnTypeOfDtcSupportedType Dem_GetTranslationType(void); /** @req DEM230 */\r
+Dem_ReturnControlDTCStorageType Dem_DisableDTCStorage(Dem_DTCGroupType dtcGroup, Dem_DTCKindType dtcKind); /** @req DEM242 */\r
+Dem_ReturnControlDTCStorageType Dem_EnableDTCStorage(Dem_DTCGroupType dtcGroup, Dem_DTCKindType dtcKind); /** @req DEM243 */\r
+Dem_ReturnGetExtendedDataRecordByDTCType Dem_GetExtendedDataRecordByDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin, uint8 extendedDataNumber, uint8 *destBuffer, uint8 *bufSize); /** @req DEM239 */\r
+Dem_ReturnGetSizeOfExtendedDataRecordByDTCType Dem_GetSizeOfExtendedDataRecordByDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTCOriginType dtcOrigin, uint8 extendedDataNumber, uint16 *sizeOfExtendedDataRecord); /** @req DEM240 */\r
\r
\r
\r
#ifndef NM_H_\r
#define NM_H_\r
\r
+/** @req NM117.partially */\r
#include "Std_Types.h"\r
#include "ComStack_Types.h"\r
#include "NmStack_Types.h"\r
#include "Nm_Cfg.h"\r
\r
/** Initializes the NM Interface. */\r
+/** @req NM030 */\r
void Nm_Init( Nm_ConfigType * const nmConfigPtr );\r
\r
/** This service returns the version information of this module */\r
+/** @req NM044 */\r
void Nm_GetVersionInfo( Std_VersionInfoType* nmVerInfoPtr );\r
\r
/** This function calls the <BusNm>_PassiveStartUp function\r
* (e.g. CanNm_PassiveStartUp function is called if channel is configured as CAN). */\r
+/** @req NM031 */\r
Nm_ReturnType Nm_PassiveStartUp( const NetworkHandleType NetworkHandle );\r
\r
/** This function calls the <BusNm>_NetworkRequest\r
* (e.g. CanNm_NetworkRequest function is called if channel is configured as CAN). */\r
+/** @req NM032 */\r
Nm_ReturnType Nm_NetworkRequest( const NetworkHandleType NetworkHandle );\r
\r
/** This function calls the <BusNm>_NetworkRelease bus specific function\r
* (e.g. CanNm_NetworkRelease function is called if channel is configured as CAN). */\r
+/** @req NM046 */\r
Nm_ReturnType Nm_NetworkRelease( const NetworkHandleType NetworkHandle );\r
\r
/** This function calls the CanNm_NetworkRelease bus specific function, to disable\r
* the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service */\r
+/** @req NM033 */\r
Nm_ReturnType Nm_DisableCommunication( const NetworkHandleType NetworkHandle );\r
\r
/** This function calls the CanNm_NetworkRequest bus specific function, to enable\r
* the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service */\r
+/** @req NM034 */\r
Nm_ReturnType Nm_EnableCommunication( const NetworkHandleType NetworkHandle );\r
\r
/** Set user data for NM messages transmitted next on the bus.\r
* For that purpose <BusNm>_SetUserData shall be called\r
* (e.g. CanNm_SetUserData function is called if channel is configured as CAN). */\r
+/** @req NM035 */\r
Nm_ReturnType Nm_SetUserData( const NetworkHandleType NetworkHandle, const uint8 * const nmUserDataPtr );\r
\r
/** Get user data out of the last successfully received NM message.\r
* For that purpose <BusNm>_GetUserData shall be called\r
* (e.g. CanNm_GetUserData function is called if channel is configured as CAN). */\r
+/** @req NM036 */\r
Nm_ReturnType Nm_GetUserData( const NetworkHandleType NetworkHandle, uint8 * const nmUserDataPtr, uint8 * const nmNodeIdPtr );\r
\r
/** Get the whole PDU data out of the most recently received NM message.\r
* For that purpose CanNm_GetPduData shall be called. */\r
+/** @req NM037 */\r
Nm_ReturnType Nm_GetPduData( const NetworkHandleType NetworkHandle, uint8 * const nmPduData );\r
\r
/** Set Repeat Message Request Bit for NM messages transmitted next on the bus.\r
* For that purpose <BusNm>_RepeatMessageRequest shall be called\r
* (e.g. CanNm_RepeatMessageRequest function is called if channel is configured as CAN) */\r
+/** @req NM038 */\r
Nm_ReturnType Nm_RepeatMessageRequest( const NetworkHandleType NetworkHandle );\r
\r
/** Get node identifier out of the last successfully received NM-message.\r
* The function <BusNm>_GetNodeIdentifier shall be called. */\r
+/** @req NM039 */\r
Nm_ReturnType Nm_GetNodeIdentifier( const NetworkHandleType NetworkHandle, uint8 * const nmNodeIdPtr );\r
\r
/** Get node identifier configured for the local node.\r
* For that purpose <BusNm>_GetLocalNodeIdentifier shall be called\r
* (e.g. CanNm_GetLocalNodeIdentifier function is called if channel is configured as CAN). */\r
+/** @req NM040 */\r
Nm_ReturnType Nm_GetLocalNodeIdentifier( const NetworkHandleType NetworkHandle, uint8 * const nmNodeIdPtr );\r
\r
/** Check if remote sleep indication takes place or not. This in turn calls the\r
* <BusNm>_CheckRemoteSleepIndication for the bus specific NM layer\r
* (e.g. CanNm_CheckRemoteSleepIndication function is called if channel is configured as CAN). */\r
+/** @req NM042 */\r
Nm_ReturnType Nm_CheckRemoteSleepIndication( const NetworkHandleType nmNetworkHandle, boolean * const nmRemoteSleepIndPtr );\r
\r
/** Returns the state of the network management. This function in turn calls the\r
* <BusNm>_GetState function (e.g. CanNm_GetState function is called if channel is configured as CAN). */\r
+/** @req NM043 */\r
Nm_ReturnType Nm_GetState( const NetworkHandleType nmNetworkHandle, Nm_StateType* const nmStatePtr, Nm_ModeType* const nmModePtr );\r
\r
/** Notification that a NM-message has been received in the Bus-Sleep Mode, what\r
* indicates that some nodes in the network have already entered the Network Mode.\r
* The callback function shall start the network management state machine. */\r
+/** @req NM104 */\r
void Nm_NetworkStartIndication( const NetworkHandleType nmNetworkHandle );\r
\r
/** Notification that the network management has entered Network Mode. The\r
* callback function shall enable transmission of application messages. */\r
+/** @req NM105 */\r
void Nm_NetworkMode( const NetworkHandleType nmNetworkHandle );\r
\r
/** Notification that the network management has entered Prepare Bus-Sleep Mode.\r
* The callback function shall disable transmission of application messages. */\r
+/** @req NM106 */\r
void Nm_PrepareBusSleepMode( const NetworkHandleType nmNetworkHandle );\r
\r
/** Notification that the network management has entered Bus-Sleep Mode. */\r
+/** @req NM107 */\r
void Nm_BusSleepMode( const NetworkHandleType nmNetworkHandle );\r
\r
/** Notification that a NM message has been received. */\r
+/** @req NM112 */\r
void Nm_PduRxIndication( const NetworkHandleType nmNetworkHandle );\r
\r
/** Notification that the CAN Generic NM state has changed. */\r
+/** @req NM114 */\r
void Nm_StateChangeNotification(\r
const NetworkHandleType nmNetworkHandle,\r
const Nm_StateType nmPreviousState,\r
/** This function implements the processes of the NM Interface, which need a fix\r
* cyclic scheduling. This function is supplied for the NM coordinator functionality\r
* (Nm020). However, specific implementation may not need it (Nm093) */\r
+/** @req NM118 */\r
void Nm_MainFunction();\r
\r
\r
Irq_Disable();\r
Os_IntDisableAllCnt++;\r
/* No nesting allowed */\r
- assert(Os_IntDisableAllCnt>1);\r
+ assert(Os_IntDisableAllCnt==1);\r
}\r
\r
static inline void EnableAllInterrupts( void ) {\r
#ifndef RTE_H_\r
#define RTE_H_\r
\r
-\r
+#include "Std_Types.h"\r
\r
/* Contract \r
* rte_sws_1143\r
\r
\r
// Errors\r
-typedef uint8 Std_ReturnType;\r
#define RTE_E_OK ((Std_ReturnType) 0)\r
#define RTE_E_INVALID ((Std_ReturnType) 1)\r
#define RTE_E_COMMS_ERROR ((Std_ReturnType) 128)\r
//\r
\r
\r
-// RTE Lifecycle API reference.( see chap 5.8 )\r
-Std_ReturnType Rte_Start( void );\r
-Std_ReturnType Rte_Stop( void );\r
+\r
\r
#endif /*RTE_H_*/\r
\r
# It seems some versions of make want "\=" and some "="\r
# "=" - msys cpmake on windows 7 \r
gcc_lib_path := "$(subst /libgcc.a,,$(shell $(CC) $(CFLAGS) --print-libgcc-file-name))" \r
+gcc_lib_path := $(subst \libgcc.a,,$(gcc_lib_path)) \r
lib_lib_path := "$(subst /libc.a,,$(shell $(CC) $(CFLAGS) --print-file-name=libc.a))"\r
+lib_lib_path := $(subst \libc.a,,$(lib_lib_path))\r
libpath-y += -L$(lib_lib_path)\r
libpath-y += -L$(gcc_lib_path)\r
\r
\r
// Prepare the system to startup RTE\r
// TODO EcuM_OnRTEStartup();\r
-\r
- //Rte_Start();\r
+#if defined(USE_RTE)\r
+ Rte_Start();\r
+#endif\r
\r
#if (ECUM_INCLUDE_NVRAM_MGR == STD_ON)\r
// Wait for the NVM job to terminate\r
#obj-y += stack.o\r
obj-y += isr.o\r
obj-y += os_arctest.o\r
+#obj-y += application.o\r
\r
\r
# These are VERY cpu dependent.. remove\r