]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Merge with c40862b2536786becf4172ec2b16eab166952161
authorjcar <devnull@localhost>
Tue, 24 Aug 2010 11:19:28 +0000 (13:19 +0200)
committerjcar <devnull@localhost>
Tue, 24 Aug 2010 11:19:28 +0000 (13:19 +0200)
193 files changed:
arch/hc1x/hcs12d/scripts/linkscript_gcc.ldf
arch/ppc/mpc55xx/scripts/gcc.mk
boards/et_stm32_stamp/config/Adc_Cfg.c
boards/et_stm32_stamp/config/Adc_Cfg.h
boards/et_stm32_stamp/config/Mcu_Cfg.c
boards/et_stm32_stamp/config/Mcu_Cfg.h
boards/et_stm32_stamp/config/Pwm_Cfg.h
boards/generic/CanTp_Cfg.c
boards/generic/CanTp_Cfg.h
boards/generic/Dcm_Cfg.h
boards/generic/Dcm_LCfg.c
boards/generic/Dem_Cfg.h
boards/generic/Dem_IntErrId.h
boards/generic/Dem_IntEvtId.h
boards/generic/Dem_LCfg.c
boards/generic/Det_Cfg.h
boards/hcs12_elmicro_card12/config/Adc_Cfg.c
boards/hcs12_elmicro_card12/config/Adc_Cfg.h
boards/hcs12_elmicro_card12/config/Can_Cfg.h
boards/hcs12_elmicro_card12/config/Can_Lcfg.c
boards/hcs12_elmicro_card12/config/ComGlobals.h
boards/hcs12_elmicro_card12/config/Dio_Cfg.h
boards/hcs12_elmicro_card12/config/Dio_Lcfg.c
boards/hcs12_elmicro_card12/config/Gpt_Cfg.c
boards/hcs12_elmicro_card12/config/Gpt_Cfg.h
boards/hcs12_elmicro_card12/config/Mcu_Cfg.c
boards/hcs12_elmicro_card12/config/Mcu_Cfg.h
boards/hcs12_elmicro_card12/config/Port_Cfg.c
boards/hcs12_elmicro_card12/config/Port_Cfg.h
boards/hcs12_elmicro_card12/config/Pwm_Cfg.c
boards/hcs12_elmicro_card12/config/Pwm_Cfg.h
boards/mpc5516it/config/Adc_Cfg.c
boards/mpc5516it/config/Adc_Cfg.h
boards/mpc5516it/config/CanIf_Cfg.c
boards/mpc5516it/config/CanIf_Cfg.h
boards/mpc5516it/config/Can_Cfg.h
boards/mpc5516it/config/Can_Lcfg.c
boards/mpc5516it/config/ComGlobals.h
boards/mpc5516it/config/Com_Cfg.h
boards/mpc5516it/config/Com_PbCfg.c
boards/mpc5516it/config/Com_PbCfg.h
boards/mpc5516it/config/Det_Cfg.h
boards/mpc5516it/config/Dio_Cfg.h
boards/mpc5516it/config/Dio_Lcfg.c
boards/mpc5516it/config/Dma_Cfg.c
boards/mpc5516it/config/Dma_Cfg.h
boards/mpc5516it/config/EcuM_Cfg.h
boards/mpc5516it/config/Eep_Cfg.h
boards/mpc5516it/config/Eep_Lcfg.c
boards/mpc5516it/config/Eeprom_Lcfg.c
boards/mpc5516it/config/Fls_Cfg.c
boards/mpc5516it/config/Fls_Cfg.h
boards/mpc5516it/config/Fls_SST25xx_Cfg.c
boards/mpc5516it/config/Fls_SST25xx_Cfg.h
boards/mpc5516it/config/Gpt_Cfg.c
boards/mpc5516it/config/Gpt_Cfg.h
boards/mpc5516it/config/LinIf_Cfg.h
boards/mpc5516it/config/LinIf_Lcfg.c
boards/mpc5516it/config/LinIf_PBcfg.c
boards/mpc5516it/config/LinSM_Cfg.c
boards/mpc5516it/config/LinSM_Cfg.h
boards/mpc5516it/config/LinSM_Lcfg.c
boards/mpc5516it/config/LinSM_PBcfg.c
boards/mpc5516it/config/Lin_Cfg.h
boards/mpc5516it/config/Lin_Lcfg.c
boards/mpc5516it/config/Lin_PBcfg.c
boards/mpc5516it/config/Mcu_Cfg.c
boards/mpc5516it/config/Mcu_Cfg.h
boards/mpc5516it/config/MemIf_Cfg.h
boards/mpc5516it/config/PduR_Cfg.h
boards/mpc5516it/config/PduR_PbCfg.c
boards/mpc5516it/config/PduR_PbCfg.h
boards/mpc5516it/config/Port_Cfg.c
boards/mpc5516it/config/Port_Cfg.h
boards/mpc5516it/config/Pwm_Cfg.c
boards/mpc5516it/config/Pwm_Cfg.h
boards/mpc5516it/config/Spi_Cfg.h
boards/mpc5516it/config/Spi_Lcfg.c
boards/mpc5516it/memory.ldf
boards/mpc551xsim/config/CanIf_Cfg.h
boards/mpc551xsim/config/Can_Cfg.h
boards/mpc551xsim/config/Can_Lcfg.c
boards/mpc551xsim/config/Com_Cfg.h
boards/mpc551xsim/config/Det_Cfg.h
boards/mpc551xsim/config/EcuM_Lcfg.c
boards/mpc551xsim/config/Gpt_Cfg.c
boards/mpc551xsim/config/Gpt_Cfg.h
boards/mpc551xsim/config/Mcu_Cfg.c
boards/mpc551xsim/config/Mcu_Cfg.h
boards/mpc551xsim/config/MemIf_Cfg.h
boards/mpc551xsim/memory.ldf
boards/mpc5554sim/config/Det_Cfg.h
boards/mpc5554sim/config/Mcu_Cfg.c
boards/mpc5554sim/config/Mcu_Cfg.h
boards/mpc5554sim/config/MemIf_Cfg.h
boards/mpc5554sim/memory.ldf
boards/mpc5567qrtech/config/Adc_Cfg.c
boards/mpc5567qrtech/config/Adc_Cfg.h
boards/mpc5567qrtech/config/CanIf_Cfg.c
boards/mpc5567qrtech/config/CanIf_Cfg.h
boards/mpc5567qrtech/config/Can_Cfg.h
boards/mpc5567qrtech/config/Can_Lcfg.c
boards/mpc5567qrtech/config/ComGlobals.h
boards/mpc5567qrtech/config/Com_Cfg.h
boards/mpc5567qrtech/config/Com_PbCfg.c
boards/mpc5567qrtech/config/Com_PbCfg.h
boards/mpc5567qrtech/config/Det_Cfg.h
boards/mpc5567qrtech/config/Dio_Cfg.h
boards/mpc5567qrtech/config/Dio_Lcfg.c
boards/mpc5567qrtech/config/Dma_Cfg.c
boards/mpc5567qrtech/config/Dma_Cfg.h
boards/mpc5567qrtech/config/EcuM_Cfg.h
boards/mpc5567qrtech/config/Eep_Cfg.h
boards/mpc5567qrtech/config/Eep_Lcfg.c
boards/mpc5567qrtech/config/Eeprom_Lcfg.c
boards/mpc5567qrtech/config/Fls_Cfg.c
boards/mpc5567qrtech/config/Fls_Cfg.h
boards/mpc5567qrtech/config/Fls_SST25xx_Cfg.c
boards/mpc5567qrtech/config/Fls_SST25xx_Cfg.h
boards/mpc5567qrtech/config/Gpt_Cfg.c
boards/mpc5567qrtech/config/Gpt_Cfg.h
boards/mpc5567qrtech/config/LinIf_Cfg.h
boards/mpc5567qrtech/config/LinIf_Lcfg.c
boards/mpc5567qrtech/config/LinIf_PBcfg.c
boards/mpc5567qrtech/config/LinSM_Cfg.c
boards/mpc5567qrtech/config/LinSM_Cfg.h
boards/mpc5567qrtech/config/LinSM_Lcfg.c
boards/mpc5567qrtech/config/LinSM_PBcfg.c
boards/mpc5567qrtech/config/Lin_Cfg.h
boards/mpc5567qrtech/config/Lin_Lcfg.c
boards/mpc5567qrtech/config/Lin_PBcfg.c
boards/mpc5567qrtech/config/Mcu_Cfg.c
boards/mpc5567qrtech/config/Mcu_Cfg.h
boards/mpc5567qrtech/config/MemIf_Cfg.h
boards/mpc5567qrtech/config/PduR_Cfg.h
boards/mpc5567qrtech/config/PduR_PbCfg.c
boards/mpc5567qrtech/config/PduR_PbCfg.h
boards/mpc5567qrtech/config/Port_Cfg.c
boards/mpc5567qrtech/config/Port_Cfg.h
boards/mpc5567qrtech/config/Pwm_Cfg.h
boards/mpc5567qrtech/config/Spi_Cfg.h
boards/mpc5567qrtech/config/Spi_Lcfg.c
boards/mpc5567qrtech/memory.ldf
boards/mpc563xsim/config/Mcu_Cfg.c
boards/mpc563xsim/config/Mcu_Cfg.h
boards/mpc563xsim/memory.ldf
common/newlib_port.c
common/printf.c
communication/CanNm/CanNm.c
communication/CanSM/CanSM.c
communication/CanSM/CanSM_Internal.h
communication/CanTp/CanTp.c
communication/ComM/ComM.c
communication/ComM/ComM_Internal.h
communication/Nm/Nm.c
diagnostic/Dcm/Dcm.c
diagnostic/Dcm/Dcm_Dsd.c
diagnostic/Dcm/Dcm_Dsl.c
diagnostic/Dcm/Dcm_Dsp.c
diagnostic/Dcm/Dcm_Lcfg.h
diagnostic/Dem/Dem.c
diagnostic/Dem/Dem_Lcfg.h
diagnostic/Dem/Dem_Types.h
examples/blinker_node/makefile
examples/pwm_node/build_config.mk
examples/pwm_node/makefile
examples/pwm_node2/makefile
examples/simple/build_config.mk
examples/switch_node/makefile
examples/tiny/build_config.mk
include/CanNm.h
include/CanNm_ConfigTypes.h
include/CanNm_Internal.h
include/CanSM.h
include/CanSM_Cbk.h
include/CanSM_ConfigTypes.h
include/CanTp.h
include/CanTp_Cbk.h
include/CanTp_Types.h
include/ComM.h
include/ComM_ConfigTypes.h
include/ComM_Nm.h
include/ComM_Types.h
include/ComStack_Types.h
include/Dcm.h
include/Dcm_Cbk.h
include/Dem.h
include/Nm.h
include/Os.h
include/Rte.h
scripts/cc_gcc.mk
system/EcuM/EcuM.c
system/kernel/makefile

index f87b97917737650806907768449fffccede2e40e..ac116f9eb9565ee1f153ae56c18f3e4f0b41a071 100644 (file)
@@ -151,7 +151,6 @@ SECTIONS
     init.o(.text)\r
     arch.o(.text)\r
     task.o(.text)\r
-    resource.o(.text)\r
     alarm.o(.text)\r
        \r
     . = ALIGN(2);\r
@@ -163,6 +162,7 @@ SECTIONS
     *(.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
index d3b86a50378f878a0402cde00bad19938c615a77..37838d323558fa7a5a5ab4f43e3a5e3beb5261c1 100644 (file)
@@ -8,12 +8,12 @@ ppc_common-y  += -msdata=none
 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
index 70a54d84589cd1d777b009763935fbea952ce3c8..f7c2c31b477c06f3f8ba3b7b3ac9d695b3409377 100644 (file)
  * 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
index d3bd2126ceb5b44d2d027357ba0b6fce654fe9f7..8c491be0d463befea83cf831f9736d575f854102 100644 (file)
@@ -21,6 +21,9 @@
 #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
index a3638800f849e39ea51227472de7a3dd2aef67a7..88d578ffae252219388c363f108c367efb1581c6 100644 (file)
@@ -16,6 +16,7 @@
 \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
index 72044d2048a7f4b0e650f1e996163e98f6c7ca77..d0ae25f2e28fd8b39b718ff147f8a88dcf746e5a 100644 (file)
@@ -17,6 +17,8 @@
 #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
index 9870c6b99414a58ef52488972a9015751f641eee..8c602a438079ca9037fa976f6ee6aaa302b7712d 100644 (file)
@@ -22,6 +22,8 @@
 #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
index 84b2e377eafdea91c6127cc5f45b6cc9015835a2..da89baea87bd11787d9055dc22d69a3fcaa3a977 100644 (file)
@@ -13,6 +13,8 @@
 */\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
index babfdcbefdf6c68fa721e52d2f8bb75ab22297c3..e544c164c2a907496fc8217bee75ddc5e7a3c8b2 100644 (file)
@@ -14,6 +14,8 @@
  * -------------------------------- 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
index 70eba0030e4eeef632b7bb9d847b49e304f0ee03..78fa874327c7deb43d6dca2d0d55931326edb802 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 529757e6a2dd8392684486dc1f9b12160ba4550c..915739660bf0d5787c5ebec6b986a2eeac1d7dab 100644 (file)
@@ -20,6 +20,8 @@
 \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
index e0608d1f0888389b699a660f1558dd0a938e15c9..86e0e5103ef2c7c7e616b9eec6f39e9f850a3054 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 547b40fdf4486e27e1367659095d0b0a65444edc..3476ada5aba4dce4fc2eb98812e7c0b427864299 100644 (file)
@@ -20,6 +20,8 @@
 \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
@@ -41,7 +43,7 @@ enum {
        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
index 0e6a55325ca518920926834acdebf870ebf8a6eb..85baf849dfb411110a65940bb5a8d6edde4337be 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 27fde619c0326c03598f37a7bf2dd68c708ed10d..411b5ed4440e243e253613ca17dfb34b2b848497 100644 (file)
@@ -20,6 +20,8 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 #include "Dem.h"\r
 \r
 /*********************\r
index 5d5be3619025c51c4f9b7429dfb1f87b235b0eb9..781ff27652a40a8a552888ef59bb117bde29e8fe 100644 (file)
@@ -26,6 +26,8 @@
  * 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
index 125e3e1d5f0cb4fd12f84e201b0a2bba113d6b4e..df4b5f47a291529bac630bbbadb9ee958bcc84b1 100644 (file)
@@ -19,6 +19,8 @@
  *      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
index f9084456c16b735cad0815352c612a67ea6ab101..8bf60cd6ce45b60319d070b0f6bdbb63450cddf8 100644 (file)
@@ -21,6 +21,8 @@
 #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
index 8e57630635c3b02ef1b319571523f58a03c17fc5..52a99a77a490b9e8b0785720c7bf788e658b2ca1 100644 (file)
@@ -23,6 +23,8 @@
 #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
index 19697ee56d93453b4b37b407be2e26d58a4721ac..9e183ce5a5b98a6d04ef38f90027553a760d3339 100644 (file)
@@ -12,6 +12,7 @@
 *           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
index 73f09b8426c88d383340354a6127bc441f8540d2..a71155b77de3bdd0b49c6e9ac66dd2ebc220a590 100644 (file)
@@ -30,6 +30,7 @@
 #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
index fa7dc574fd917c38974a7b2fdf8b8f42e312525a..5552998e15662ce615a521d265758bfb392762c4 100644 (file)
@@ -24,6 +24,8 @@
 #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
@@ -148,6 +150,9 @@ typedef enum
 \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
index 349ca30ec7a954d1d6c545b9e1e8cedc371ef9e1..7975194fb8fb6d6e083239facf50278ee268924b 100644 (file)
@@ -12,6 +12,9 @@
  * 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
index 8a0d79b1b48676376fe2f9afd6c219a44a33bd5a..0473818757150679d69df378b6042ac4ec34b74e 100644 (file)
@@ -19,6 +19,7 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
 \r
 \r
 #include "Gpt.h"\r
index a703bd2d919d4bcff85fd6d69885b3489915fc1d..f1e59ff5704bc6b4aff632cca33dc04e1784ec45 100644 (file)
@@ -22,6 +22,9 @@
 \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
index 6bcb3eb02986df4228e536dbd02542dd56c77c48..f7b66b0a884b63dfac6b5b5764bac52b2768757f 100644 (file)
@@ -16,6 +16,8 @@
 #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
index dae76e07255f6bb0f4e14565da9b75092523f3a2..698d4b9f39602d228a68c6320482e94c17be633d 100644 (file)
@@ -17,6 +17,8 @@
 #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
index 3a0ab99d5254a28048cfeb3b56a228908cc9535d..2fcd0919a46c4cecad0f70fefb4a83fde11eeec9 100644 (file)
@@ -13,6 +13,8 @@
  * 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
index 216986bac187d0a8e74b0a859374e6f1cdb9be07..7da56f03c9d2dcd5d31820e26e8c8588efa87af3 100644 (file)
@@ -16,6 +16,8 @@
 #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
index 1028cf40446f1a0cf9b9d0266fcb15f4f74d204f..0cedb4b3f543b71e25c84377e01b2c9e43f34490 100644 (file)
@@ -17,6 +17,8 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 \r
 \r
 \r
index 3a7eff8e95499ed7596d9870a27547f094d87c49..f17b4e35f30481568b21977cd9716031cf350888 100644 (file)
@@ -23,6 +23,8 @@
 #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
index 96dc0a3f96976fb878a00bd0213e718fc7c291ce..fde6069ee7fe3c20cbbf5572296632bb06023716 100644 (file)
@@ -15,6 +15,8 @@
 \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
index 21d69940245ce9e1d273770539e22a831f932fec..973b80ec42f385c8b2642ff93fa6a2b935d7a882 100644 (file)
@@ -20,6 +20,8 @@
  * 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
index fb22ff257059c389a37e4c605b3c52eab7da3d02..dd59a23b40b8b37cb4b6878d3124153829832093 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 65bbb3007da30943ab20d8bb447f0a13bcccb999..f164be807bb1342a6e4885360e9ba9ac9403b93d 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index 4292e0bdf59b645722ff1901109bd2dda64f4979..e2c200f09c83f377ad2db220e048e93ba58d298d 100644 (file)
@@ -20,6 +20,8 @@
  * 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
index 99f946e82a92f7fad0c7a2c845f41811dcb949ed..9f81eade6dff02f680630b69bfd4d3f9b7c5c027 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 73f09b8426c88d383340354a6127bc441f8540d2..05ab30c6e735670ca962c58c7d833603f470e14d 100644 (file)
@@ -27,6 +27,8 @@
  *      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
index 83f5c3bf2c7b58f797f91803bdc14309ad8afafb..01cb2960d5d83949525560bf6617065338537d2f 100644 (file)
@@ -22,6 +22,8 @@
  */\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
index 7f3a0891c755417608114de4f7a90f5e861bae2c..01a2b9d46da66c49fb3eb06044b632652a4e843f 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 56dbb2da26bb760ff6dc8340a6d695441a604ac0..e51ae0e94e851f73152f8ddf61d64689ec2fb989 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 3b24294c86f1aa639f6692e7d42b9ee1277a8723..2f00bd5ae0ebc32f2d60ea3b23e93c61dd9d7090 100644 (file)
@@ -21,6 +21,8 @@
  *  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
index 227e21a16de7bb32d2920dce76788ad8e82b23a2..1d72b3bd54c04ff96e4bd2d6370fa53bbe43461c 100644 (file)
@@ -21,6 +21,8 @@
 /** @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
@@ -219,6 +221,10 @@ extern const Dio_ChannelGroupType DioConfigData[];
 #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
index 95f850a87610443ef3c2a77e89ca1b957a7754f5..653414b0e2a48fee643ee4192b039f4c92ffd6bf 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 131e373acfaff9db4415ce2c4e34cbb8d455d913..9e21b1b0258114c32e41031d3cf9cf823de5fd55 100644 (file)
@@ -20,6 +20,8 @@
 \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
index d77152bb49add686f46629137d62817d7375eb31..14e80ee75f9903c070ec267b3656881c29a26863 100644 (file)
@@ -20,6 +20,8 @@
 \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
index c5a93a97aed15212d72f2cf569ce6392913f018b..e1a7b5407a20e76b65115c561df0bf0bab07d669 100644 (file)
@@ -21,6 +21,8 @@
  *  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
index 28f746a957afd11654ce1af8bf977dbc2f924230..2545637d435c30e37237aa36c73a4cba16eb80b7 100644 (file)
@@ -20,6 +20,8 @@
 \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
index a38b82db1e58018e0f1f23ff281a04a9773872e5..713c7b0a52fe3af4bc95f0ab45a5669bc3063352 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 9601081a053d43c232658af0e933dac2ae550405..04b537d93a5ee48ec14d66b8040dac86b21e7022 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 6ec1a794fe858a96aea7f66b888a7f46f52209c4..54e936de0b378d38aadead256bd6235274f4b1dd 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 9490ea00541b5581c5d86fcc3595a734bb578947..8227197830227fe84e298db4172c3b2e7f8bf8d8 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index 0723f02e83cf144795ceaf423421b23eb51e31fb..d1c9f83098c208fa1d383d657de6b4c8d3d4c152 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 6628f12764a990878ae309be5983db57044b1f1b..ae5460c6cfa0feafc957e4fb4ef2e7ba92eee9e6 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 73574b5293e20685efca49c3930b20d36b18c3af..de6105087691018b4a980579e1e70112beffb45b 100644 (file)
@@ -21,6 +21,8 @@
 \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
index b6c06a269fc4c1be5d3397c2ca4200456448cf51..43911b325ad85d9ff6e0604612bb2afbbb4ebc03 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index 7b6b06cd9ceadd159a8ca647c0976eb6289c7a6c..8bca9bf46f6761312a68b154ca3da17a9d83c3d2 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index 880c040905b743df8626028819a7c8ad95daa3bc..774db167b315f69896dda4afd34b4a0e39b7b3e8 100644 (file)
@@ -20,6 +20,8 @@
 \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
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index add8274435253d8c7027db5c2dc9b71b8980e0f0..6d90306db67a146cf285613858f016caf39a872b 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 7d0455b177b47cdf8e506bc6591e74f7452e80a6..0be2c9f6418c6fc8a3dea30b89b77143d87d8957 100644 (file)
@@ -20,6 +20,8 @@
 \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
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index ea6cde0a1cddb7ea309f40d97e6e31d3c5298798..c101b3407351f2b7b2d1189319ed612236f0cf17 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index 0dde63566a3d17ab281ddb530ba1da23f5fcb881..0f12d02b2cb00db0af76b82b4e64d4d59b2cb702 100644 (file)
@@ -20,6 +20,8 @@
 \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
index bf2d87f9bb539b79be650eff6ff7c711d66bf9c7..015f28ab8737da8be13c0535667e70c6d900f6f5 100644 (file)
@@ -20,4 +20,6 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 #include "Lin_Cfg.h"\r
index ae304f06d52a314ac1a5ed181c3d3ee2a3af16c4..76d348a1aa048a7a77b5a971ec7b4c94b18f7229 100644 (file)
@@ -13,6 +13,8 @@
  * 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
index 0ca7b05de93433ef06580130202f716ffeb0eeec..f2c9d0ace0fc8212d0b4c0b0ae1d6ddb5a8f2f2f 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index f5a8acff498b614401c0339138e5dc21effe7725..b8f25e2d7f7283dfef62cec25ce958fd1cf4dd34 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 3a9634b01489736b46c6cde5a2a15f77137364ef..824b164086b4717314f8a7cbdf4cbd58d9b7656d 100644 (file)
@@ -21,6 +21,8 @@
 \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
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index 9d93cadce1a84af3ee84e32c2051785e84669d81..0de642d84b8df4378399c9f87f090c8ff4209ec9 100644 (file)
@@ -20,4 +20,6 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 #define PDUR_ZERO_COST_OPERATION       STD_ON\r
index cebdf0ab569f805c9642b414946ac5430aa34c77..cba2f59ba50e8bbf738c04a9103889c2cf99e8ab 100644 (file)
@@ -21,6 +21,8 @@
 \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
index ac1cde8711bc9fc26d09301f4b46977940e389ba..a8b1f86a39cf2bef46c187816e95449fe5d336e2 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index 6aa9e4075821239e821c4bc1bae4e752a519805b..bbd776ba2c0a8e0fde318a5a2671b410c3455c92 100644 (file)
@@ -27,6 +27,8 @@
  *      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
index 0f676bf0ec399325e8ebebd0212f9cab85a25994..25a7a782d2123e94c2f107d7648f45d3cfccbde4 100644 (file)
@@ -20,6 +20,8 @@
  *  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
index ddf8b0f8bbe1bd9699b02ee9aa78e5d5b41c58e8..b704185ba32eb0e3552fbae7b4c2006341d6f419 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 029094d73112d0ef1f1dd12cab77925142c82c0b..2951349c4701eb24ccf0f24d87bf8746343f950e 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 76b7d684d79afab887c51ccafb45d638682bb62a..3754c8a17a48019f6ca2b0228d985fd52e8863df 100644 (file)
@@ -1,7 +1,7 @@
 \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
index cc2f77035b25cd5ecfc7058c387afd32d274f792..5b25a91423d8eef7a1c857cb645cf54a4c2a4dca 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 9fba51fddfc784ed68e6daf40a14f4622a2d5ff6..caae895bd6e6c5bca8b7f79e1e6a495e28d76364 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 99f946e82a92f7fad0c7a2c845f41811dcb949ed..9f81eade6dff02f680630b69bfd4d3f9b7c5c027 100644 (file)
@@ -20,6 +20,8 @@
 \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
index ce86b06fa0751ac384bd3e735e9194339f6f2da6..0da26203f0899d2f5099064c518d324f4688f144 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 5d5be3619025c51c4f9b7429dfb1f87b235b0eb9..781ff27652a40a8a552888ef59bb117bde29e8fe 100644 (file)
@@ -26,6 +26,8 @@
  * 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
index 1c7c1822bf3a1d536118ce341af0651f9c0c7156..845925f7a3438e62cdd669d30053ecd005fa049f 100644 (file)
@@ -23,6 +23,8 @@
 \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
index 670a0156e2630665f8689bdef251b1d679594173..63d63291137993db21b3ed618ef177a0e7aad045 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 917b358dd4767ca8a0985fc6f3f8d887d7ab801c..a47636cf7fee1680b246944fbc266577304da25b 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 9f6a53e328685af0c754b2c0c6e1a07466aa9c57..d3a745bda1e243b0181c6c8a95cd01c729a47314 100644 (file)
@@ -20,6 +20,8 @@
 \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
index b7031846d00eb1523644ab630db1e609def2a95e..d09135d40f1b567cf260f3c97831d1701acdf963 100644 (file)
@@ -20,6 +20,8 @@
 \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
index f5a8acff498b614401c0339138e5dc21effe7725..b8f25e2d7f7283dfef62cec25ce958fd1cf4dd34 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 76b7d684d79afab887c51ccafb45d638682bb62a..3754c8a17a48019f6ca2b0228d985fd52e8863df 100644 (file)
@@ -1,7 +1,7 @@
 \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
index 5d5be3619025c51c4f9b7429dfb1f87b235b0eb9..781ff27652a40a8a552888ef59bb117bde29e8fe 100644 (file)
@@ -26,6 +26,8 @@
  * 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
index 7993a12624b7fbfe62f1e390834ef0d6cfb9981b..fe07f608294c7210775a0dbd6c7ab2e5a225f843 100644 (file)
@@ -20,6 +20,8 @@
 \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
index ccdb93bd213668f15ddc56671b5a07f2511916cd..713fde9499bc1bdcfade3a82c3fcce6d359558b6 100644 (file)
@@ -20,6 +20,8 @@
 \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
index f5a8acff498b614401c0339138e5dc21effe7725..b8f25e2d7f7283dfef62cec25ce958fd1cf4dd34 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 93f540cba74ad77a0e93ebfccddc9fb5f771556e..8a447b389fd18b87dda486643a27ce586bad1843 100644 (file)
@@ -1,7 +1,7 @@
 \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
index 78e98905765a77d3beb9b9e0a7266042c8004c02..37e63d953662024edf9f8da8cd623bbe3d1dc7e1 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 5e00ed17294ba27871260be7b66815639258a7f0..f43cc650760e55ffcf1d112f3960e920900fd6ee 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 05339d74ef85d7ce7772fb81f0db321e72fefe9e..43ed3e1ecc5421193cec323f1a47e8360ec659d7 100644 (file)
@@ -20,6 +20,8 @@
 \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
index cc2f77035b25cd5ecfc7058c387afd32d274f792..5b25a91423d8eef7a1c857cb645cf54a4c2a4dca 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 7c3b00f630c768af1b4b79e53a115f6627741788..4714801464fb40f713708a5f278c99fe2bdbe23c 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 99f946e82a92f7fad0c7a2c845f41811dcb949ed..9f81eade6dff02f680630b69bfd4d3f9b7c5c027 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 73f09b8426c88d383340354a6127bc441f8540d2..0fdcb2f4ecbbf9d7ba95c1b52b91ceedf916a563 100644 (file)
 \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
index 2615c71ca13c94c6d2d59f0cef1618973ed57b67..b20c99e5ec5e3f25a012e6389b126b1bf034175e 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 7f3a0891c755417608114de4f7a90f5e861bae2c..01a2b9d46da66c49fb3eb06044b632652a4e843f 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 56dbb2da26bb760ff6dc8340a6d695441a604ac0..e51ae0e94e851f73152f8ddf61d64689ec2fb989 100644 (file)
@@ -20,6 +20,8 @@
 \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
index b6c5e43a9797375219f1c9215d87ddce92ec2ce3..28c5761e15c98d57f2447816500834036a68da4c 100644 (file)
@@ -20,6 +20,8 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 /*\r
  * Development Error Tracer driver\r
  *\r
index 5096c778b968f9a1ef5b1da32899ce6e8b585ba4..09b1083d38e99c702756c9bd2a8f8e390e20c507 100644 (file)
@@ -20,6 +20,8 @@
 \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
@@ -39,6 +41,9 @@ extern const Dio_ChannelGroupType DioConfigData[];
 // 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
index a8342980d13a75bfd6316dbaa05b0fd6f2091b23..0c8013f9b8a4d6d0672a0f981f5f9d06b3b165c9 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 3c3bd3f035da077dc6f4bea47b521627471839e0..ec15a141c8d0e1d03f7aac47575d9e851fc027e2 100644 (file)
@@ -20,6 +20,8 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 #include "Dma.h"\r
 \r
 \r
index 53cbb540a0e7b652b552d49ad177169a3146a776..146186d887b3f5896d3ccb273329760bd96de920 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 3c785057876521b7275b24a75716b30460873dab..baed8dd2f2a1300e0f61fe7bb1eedc53004a97ee 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 28f746a957afd11654ce1af8bf977dbc2f924230..2545637d435c30e37237aa36c73a4cba16eb80b7 100644 (file)
@@ -20,6 +20,8 @@
 \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
index a38b82db1e58018e0f1f23ff281a04a9773872e5..713c7b0a52fe3af4bc95f0ab45a5669bc3063352 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 9601081a053d43c232658af0e933dac2ae550405..04b537d93a5ee48ec14d66b8040dac86b21e7022 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 6ec1a794fe858a96aea7f66b888a7f46f52209c4..54e936de0b378d38aadead256bd6235274f4b1dd 100644 (file)
@@ -20,6 +20,8 @@
 \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
index bb82f98135a9297510ce4db7c0f521a7e5e16ef8..7be51ece33862d7b811503905d51f81916ee69e8 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 0723f02e83cf144795ceaf423421b23eb51e31fb..d1c9f83098c208fa1d383d657de6b4c8d3d4c152 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 6628f12764a990878ae309be5983db57044b1f1b..ae5460c6cfa0feafc957e4fb4ef2e7ba92eee9e6 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 73574b5293e20685efca49c3930b20d36b18c3af..de6105087691018b4a980579e1e70112beffb45b 100644 (file)
@@ -21,6 +21,8 @@
 \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
index 917b358dd4767ca8a0985fc6f3f8d887d7ab801c..a47636cf7fee1680b246944fbc266577304da25b 100644 (file)
@@ -20,6 +20,8 @@
 \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
index df8ea49e74104872d617a6ed39559778817ec9e3..b4b5cc99ad82385737878a382f168afc104306fa 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 880c040905b743df8626028819a7c8ad95daa3bc..774db167b315f69896dda4afd34b4a0e39b7b3e8 100644 (file)
@@ -20,6 +20,8 @@
 \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
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index add8274435253d8c7027db5c2dc9b71b8980e0f0..6d90306db67a146cf285613858f016caf39a872b 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 7d0455b177b47cdf8e506bc6591e74f7452e80a6..0be2c9f6418c6fc8a3dea30b89b77143d87d8957 100644 (file)
@@ -20,6 +20,8 @@
 \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
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index 8ef094c7ae033206d7564771fbedef4ea847bbab..c6bc5af29f50b73ca0dc5bd382b3808703a37027 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 0dde63566a3d17ab281ddb530ba1da23f5fcb881..0f12d02b2cb00db0af76b82b4e64d4d59b2cb702 100644 (file)
@@ -20,6 +20,8 @@
 \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
index bf2d87f9bb539b79be650eff6ff7c711d66bf9c7..015f28ab8737da8be13c0535667e70c6d900f6f5 100644 (file)
@@ -20,4 +20,6 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 #include "Lin_Cfg.h"\r
index 1dee9f381da7b9437ccd730b880daac7d333cd94..c22d8350a59d4ce70a92d4117e4b1ac7c3bfefe9 100644 (file)
@@ -20,6 +20,8 @@
 \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
index df849da9b1b8eb61d332f351c7dc3f85a18ea5e2..de3a0cc7dca7b608ce3f5a6ae7c0015fcfb62312 100644 (file)
@@ -20,6 +20,8 @@
 \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
index f5a8acff498b614401c0339138e5dc21effe7725..b8f25e2d7f7283dfef62cec25ce958fd1cf4dd34 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 3a9634b01489736b46c6cde5a2a15f77137364ef..824b164086b4717314f8a7cbdf4cbd58d9b7656d 100644 (file)
@@ -21,6 +21,8 @@
 \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
index f1638f85aadd07539e302a22d97a6240cd3bfee7..bb3590c3fa4c7af3ef1e311a5139d8d0a311fdd0 100644 (file)
@@ -20,3 +20,5 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
index 9d93cadce1a84af3ee84e32c2051785e84669d81..0de642d84b8df4378399c9f87f090c8ff4209ec9 100644 (file)
@@ -20,4 +20,6 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 #define PDUR_ZERO_COST_OPERATION       STD_ON\r
index 22246a4b47a44dfc6345945889fd6e8cfc4ad61a..cda2fe1070306807d7bdf4467fd90902e6a368e1 100644 (file)
@@ -20,6 +20,8 @@
 \r
 \r
 \r
+#warning "This default file may only be used as an example!"\r
+\r
 /*\r
  * Port_Cfg.c\r
  *\r
index 7e8342e0e01f9ad77126dd46fb8708ddbee1355d..ebe1619573a76b75dd0f9c78bb93f2f43a0cebf2 100644 (file)
@@ -20,6 +20,8 @@
 \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
index ee6e9bbb9756bab35798bdfcdc2e1154b5b0c6a9..4aab12e2b3860f4ac39c255a9a357fff2432db0b 100644 (file)
@@ -13,6 +13,8 @@
  * 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
index aa514263d089531cf458c1db502e6fffbd07f7b8..c4de99ac200dcdda1b2d6196b51e6ddd2282f4e8 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 029094d73112d0ef1f1dd12cab77925142c82c0b..2951349c4701eb24ccf0f24d87bf8746343f950e 100644 (file)
@@ -20,6 +20,8 @@
 \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
index 93f540cba74ad77a0e93ebfccddc9fb5f771556e..8a447b389fd18b87dda486643a27ce586bad1843 100644 (file)
@@ -1,7 +1,7 @@
 \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
index 5d4b5a3823ccf7fcc156daea2f12434d3a7716d2..0036b3addaec74e0ac27fd63b6798e278670df27 100644 (file)
@@ -20,6 +20,8 @@
 \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
index ef0f6d88ca4703345ab29eb2ded3bb674f4b8f33..cf7981051dd4fbae1c9bcb1534fda124fd8a479a 100644 (file)
@@ -20,6 +20,8 @@
 \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
index dfe21ab6953b6207a8546098835d2a45b3c8d3c2..dc83d2df3853fd9c8c6ab62fb3abef6ff5d5ef51 100644 (file)
@@ -1,7 +1,7 @@
 \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
index fd123b0bfde56af9348f29b795a5f5a65d2d2c6d..3d13f79836871b0ac5c12a0e139bdd0fc22cad90 100644 (file)
@@ -197,7 +197,6 @@ int read( int fd, void *buf, size_t nbytes )
 \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
@@ -206,6 +205,7 @@ int write(  int fd, const void *_buf, size_t nbytes)
 #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
@@ -219,6 +219,7 @@ int write(  int fd, const void *_buf, size_t nbytes)
 #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
@@ -229,12 +230,14 @@ int write(  int fd, const void *_buf, size_t nbytes)
 #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
@@ -246,6 +249,7 @@ int write(  int fd, const void *_buf, size_t nbytes)
 #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
index e2572764259a406de97c02d3b40a059d40f39ddf..20efbaacc55a66e3223b80afcd23308091dc848a 100644 (file)
-/*
- * 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
index 53eabb5a165df3345f82b1ec99f0ec773ee54b5a..3924cab6f4f42e83512196e144f60376bf44f5a8 100644 (file)
  * 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
@@ -24,6 +57,8 @@
 #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
@@ -36,24 +71,32 @@ CanNm_InternalType CanNm_Internal = {
 };\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
@@ -64,6 +107,9 @@ void CanNm_Init( const CanNm_ConfigType * const cannmConfigPtr ){
        }\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
@@ -78,10 +124,10 @@ Nm_ReturnType CanNm_PassiveStartUp( const NetworkHandleType nmChannelHandle ){
        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
@@ -94,15 +140,15 @@ Nm_ReturnType CanNm_NetworkRequest( const NetworkHandleType nmChannelHandle ){
        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
@@ -116,11 +162,11 @@ Nm_ReturnType CanNm_NetworkRelease( const NetworkHandleType nmChannelHandle ){
        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
@@ -142,7 +188,9 @@ Nm_ReturnType CanNm_EnableCommunication( const NetworkHandleType nmChannelHandle
        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
@@ -156,8 +204,11 @@ Nm_ReturnType CanNm_SetUserData( const NetworkHandleType nmChannelHandle, const
 \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
@@ -171,9 +222,11 @@ Nm_ReturnType CanNm_GetUserData( const NetworkHandleType nmChannelHandle, uint8*
 \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
@@ -190,6 +243,7 @@ Nm_ReturnType CanNm_GetNodeIdentifier( const NetworkHandleType nmChannelHandle,
 }\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
@@ -203,6 +257,7 @@ Nm_ReturnType CanNm_GetLocalNodeIdentifier( const NetworkHandleType nmChannelHan
 \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
@@ -212,21 +267,22 @@ Nm_ReturnType CanNm_RepeatMessageRequest( const NetworkHandleType nmChannelHandl
 \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
@@ -241,6 +297,7 @@ Nm_ReturnType CanNm_GetPduData( const NetworkHandleType nmChannelHandle, uint8 *
 #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
@@ -277,6 +334,7 @@ Nm_ReturnType CanNm_CheckRemoteSleepIndication( const NetworkHandleType nmChanne
 \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
@@ -285,7 +343,7 @@ void CanNm_TxConfirmation( PduIdType canNmTxPduId ){
        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
@@ -299,7 +357,7 @@ void CanNm_RxIndication( PduIdType canNmRxPduId, const uint8 *canSduPtr ){
        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
@@ -308,16 +366,16 @@ void CanNm_RxIndication( PduIdType canNmRxPduId, const uint8 *canSduPtr ){
        }\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
@@ -336,21 +394,24 @@ void CanNm_RxIndication( PduIdType canNmRxPduId, const uint8 *canSduPtr ){
 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
@@ -361,25 +422,32 @@ static inline void CanNm_Internal_TickTimeoutTime( const CanNm_ChannelType* Chan
        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
@@ -387,6 +455,7 @@ static inline void CanNm_Internal_TickRepeatMessageTime( const CanNm_ChannelType
        }\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
@@ -403,7 +472,8 @@ static inline void CanNm_Internal_TickMessageCycleTime( const CanNm_ChannelType*
                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
@@ -451,81 +521,88 @@ static inline void CanNm_Internal_ClearCbv( const CanNm_ChannelType* ChannelConf
 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
index 52189d23ec76d407a97909c3a1a16ab0883599d6..bda3542f7bed0ef8cc4be3ff2386bf75cac1bff8 100644 (file)
  * 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
@@ -27,13 +40,14 @@ static CanSM_InternalType CanSM_Internal = {
 \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
@@ -43,6 +57,7 @@ void CanSM_GetVersionInfo( Std_VersionInfoType* VersionInfo ) {
        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
@@ -51,25 +66,28 @@ Std_ReturnType CanSM_RequestComMode( NetworkHandleType NetworkHandle, ComM_ModeT
        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
@@ -105,6 +123,7 @@ Std_ReturnType CanSM_Internal_RequestCanIfMode( NetworkHandleType NetworkHandle,
        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
@@ -127,6 +146,8 @@ Std_ReturnType CanSM_Internal_RequestComGroupMode( NetworkHandleType NetworkHand
        }\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
index 2c8b5a32dfcac5c6f3a4300677decfe20c6ac83e..f7be6b0bc4d1fe747236cd81c757d76461d433ae 100644 (file)
@@ -19,6 +19,7 @@
 \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
index 8855c38b87478273d55a0faf7bb1049f37f2c540..346f5596f03b7c62d65c9a004924f0ec3ff9c98d 100644 (file)
  * 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
@@ -143,7 +149,8 @@ typedef enum {
 \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
@@ -178,6 +185,9 @@ typedef struct {
        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
@@ -486,6 +496,9 @@ static INLINE Std_ReturnType canTansmitPaddingHelper(
        }\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
@@ -497,7 +510,7 @@ static INLINE void sendFlowControlFrame(const CanTp_RxNSduType *rxConfig, CanTp_
        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
@@ -573,8 +586,7 @@ static INLINE void handleConsecutiveFrame(const CanTp_RxNSduType *rxConfig,
                        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
@@ -591,8 +603,7 @@ static INLINE void handleConsecutiveFrame(const CanTp_RxNSduType *rxConfig,
                                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
@@ -600,8 +611,7 @@ static INLINE void handleConsecutiveFrame(const CanTp_RxNSduType *rxConfig,
                                                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
@@ -610,8 +620,7 @@ static INLINE void handleConsecutiveFrame(const CanTp_RxNSduType *rxConfig,
                                                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
@@ -722,13 +731,17 @@ static INLINE void handleConsecutiveFrameSent(
 \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
@@ -1029,12 +1042,18 @@ static INLINE BufReq_ReturnType canTpTransmitHelper(const CanTp_TxNSduType *txCo
                        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
@@ -1126,7 +1145,7 @@ Std_ReturnType CanTp_Transmit(PduIdType CanTpTxSduId,
 \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
@@ -1167,7 +1186,7 @@ void CanTp_Init() /** @req CANTP208 */
 // - - - - - - - - - - - - - -\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
@@ -1186,7 +1205,7 @@ void CanTp_RxIndication(PduIdType CanTpRxPduId, /** @req CANTP078 */ /** @req CA
 // - - - - - - - - - - - - - -\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
@@ -1262,7 +1281,7 @@ void CanTp_RxIndication_Main(PduIdType CanTpRxPduId,
 \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
@@ -1278,6 +1297,9 @@ void CanTp_TxConfirmation(PduIdType PduId) /** @req CANTP215 *//** @req CANTP076
        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
@@ -1286,7 +1308,7 @@ void CanTp_TxConfirmation(PduIdType PduId) /** @req CANTP215 *//** @req CANTP076
 \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
@@ -1314,7 +1336,7 @@ static inline boolean checkNasNarTimeout(CanTp_ChannelPrivateType *runtimeData)
 // - - - - - - - - - - - - - -\r
 \r
 \r
-void CanTp_MainFunction() /** @req CANTP213 */\r
+void CanTp_MainFunction()\r
 {\r
        BufReq_ReturnType ret;\r
        CanTpFifoQueueItem item;\r
@@ -1370,9 +1392,9 @@ void CanTp_MainFunction() /** @req CANTP213 */
                                                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
@@ -1384,11 +1406,20 @@ void CanTp_MainFunction() /** @req CANTP213 */
                                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
@@ -1400,9 +1431,9 @@ void CanTp_MainFunction() /** @req CANTP213 */
                                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
@@ -1439,9 +1470,9 @@ void CanTp_MainFunction() /** @req CANTP213 */
                                                        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
index 1a700bd48ab17b8870b192db87dcfa45510b4368..ebb5794e65dda8fd65cc6b708f8ffb4ef25b11b3 100644 (file)
  * -------------------------------- 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
@@ -52,8 +81,7 @@ void ComM_Init( ComM_ConfigType * Config ){
        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
@@ -66,6 +94,7 @@ void ComM_Init( ComM_ConfigType * Config ){
 \r
        ComM_Internal.InhibitCounter = 0;\r
        ComM_Internal.InitStatus = COMM_INIT;\r
+       /** @req COMM313 */\r
 }\r
 \r
 void ComM_DeInit(){\r
@@ -93,6 +122,8 @@ Std_ReturnType ComM_GetInhibitionStatus( NetworkHandleType Channel, ComM_Inhibit
 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
@@ -103,7 +134,7 @@ static Std_ReturnType ComM_Internal_RequestComMode(
        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
@@ -113,6 +144,7 @@ static Std_ReturnType ComM_Internal_RequestComMode(
                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
@@ -136,6 +168,7 @@ Std_ReturnType ComM_GetMaxComMode( ComM_UserHandleType User, ComM_ModeType* ComM
        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
@@ -145,6 +178,7 @@ Std_ReturnType ComM_GetRequestedComMode( ComM_UserHandleType User, ComM_ModeType
        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
@@ -152,7 +186,6 @@ Std_ReturnType ComM_GetCurrentComMode( ComM_UserHandleType User, ComM_ModeType*
        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
@@ -169,6 +202,7 @@ Std_ReturnType ComM_PreventWakeUp( NetworkHandleType Channel, boolean Status ){
 #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
@@ -186,6 +220,7 @@ Std_ReturnType ComM_LimitChannelToNoComMode( NetworkHandleType Channel, boolean
 #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
@@ -201,7 +236,7 @@ Std_ReturnType ComM_LimitECUToNoComMode( boolean Status ){
 #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
@@ -212,6 +247,7 @@ Std_ReturnType ComM_ReadInhibitCounter( uint16* CounterValue ){
 #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
@@ -231,7 +267,7 @@ Std_ReturnType ComM_SetECUGroupClassification( ComM_InhibitionStatusType Status
 \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
@@ -243,6 +279,7 @@ void ComM_Nm_NetworkStartIndication( NetworkHandleType Channel ){
        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
@@ -253,6 +290,7 @@ void ComM_Nm_NetworkMode( NetworkHandleType Channel ){
        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
@@ -263,6 +301,7 @@ void ComM_Nm_PrepareBusSleepMode( NetworkHandleType Channel ){
        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
@@ -273,6 +312,7 @@ void ComM_Nm_BusSleepMode( NetworkHandleType Channel ){
        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
@@ -321,7 +361,7 @@ void ComM_BusSM_ModeIndication( NetworkHandleType Channel, ComM_ModeType ComMode
 \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
@@ -352,6 +392,7 @@ static inline void ComM_Internal_TickFullComMinTime(const ComM_ChannelType* Chan
 }\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
@@ -372,6 +413,7 @@ static inline void ComM_Internal_TickLightTime(const ComM_ChannelType* ChannelCo
        }\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
@@ -401,6 +443,8 @@ static Std_ReturnType ComM_Internal_PropagateGetCurrentComMode( ComM_UserHandleT
        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
@@ -424,6 +468,7 @@ static Std_ReturnType ComM_Internal_PropagateComMode( const ComM_ChannelType* Ch
        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
@@ -435,9 +480,9 @@ static Std_ReturnType ComM_Internal_NotifyNm( const ComM_ChannelType* ChannelCon
                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
@@ -470,20 +515,21 @@ static Std_ReturnType ComM_Internal_UpdateChannelState( const ComM_ChannelType*
 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
@@ -495,27 +541,28 @@ static inline Std_ReturnType ComM_Internal_UpdateFromNoCom(const ComM_ChannelTyp
 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
@@ -529,24 +576,25 @@ static inline Std_ReturnType ComM_Internal_UpdateFromFullCom(const ComM_ChannelT
        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
@@ -554,11 +602,11 @@ static inline Std_ReturnType ComM_Internal_UpdateFromFullCom(const ComM_ChannelT
                } 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
@@ -567,7 +615,7 @@ static inline Std_ReturnType ComM_Internal_UpdateFromFullCom(const ComM_ChannelT
                        } 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
@@ -595,7 +643,7 @@ static inline Std_ReturnType ComM_Internal_Enter_NetworkRequested(const ComM_Cha
        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
@@ -612,7 +660,7 @@ static inline Std_ReturnType ComM_Internal_Enter_ReadySleep(const ComM_ChannelTy
        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
index 2e70f70039a132eb14559023399c901eb6439dd2..843d693a59a57c94c2665b28fa3f31cd5698858f 100644 (file)
@@ -19,6 +19,7 @@
 \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
@@ -72,7 +73,7 @@ typedef struct {
        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
index b5d87dc6445af1582f345d0e5deeb1cc5b179e64..e42674b73b871a7049a94bfafbc0542d399aa822 100644 (file)
 #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
@@ -140,6 +144,7 @@ Nm_ReturnType Nm_GetState( const NetworkHandleType NetworkHandle, Nm_StateType*
 /** 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
@@ -147,6 +152,7 @@ void Nm_NetworkStartIndication( const NetworkHandleType NetworkHandle ){
 \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
@@ -154,12 +160,14 @@ void Nm_NetworkMode( const NetworkHandleType NetworkHandle ){
 \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
@@ -177,5 +185,6 @@ void Nm_StateChangeNotification(
 /** 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
index b724089baeeee7a75dcdf4bd4dd356d78d8e83c2..8eff7e3353dcb4b180db23ced025c92eea6918e6 100644 (file)
 \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
@@ -55,7 +65,7 @@ static Dcm_StateType dcmState = DCM_UNINITIALIZED;
  * 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
@@ -78,7 +88,7 @@ void Dcm_Init(void)
 /*\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
index 2dab4020ab2674d42b481e21a9f23f2ef05fb21d..d6a95fc45e82d967d28b80dad2fac10beb9dac23 100644 (file)
 \r
 \r
 \r
+/*\r
+ *  General requirements\r
+ */\r
+\r
+\r
 #include <string.h>\r
 #include "Dcm.h"\r
 #include "Dcm_Internal.h"\r
@@ -64,12 +69,12 @@ static boolean askApplicationForServicePermission(uint8 *requestData, uint16 dat
 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
@@ -79,7 +84,8 @@ static void createAndSendNcr(Dcm_NegativeResponseCodeType responseCode)
 \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
@@ -178,50 +184,50 @@ void DsdHandleRequest(void)
        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
@@ -234,18 +240,18 @@ void DsdHandleRequest(void)
 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
@@ -253,7 +259,7 @@ void DsdDspProcessingDone(Dcm_NegativeResponseCodeType responseCode)
 \r
 void DsdDataConfirmation(PduIdType confirmPduId, NotifResultType result)\r
 {\r
-       DspDcmConfirmation(confirmPduId);       /** @req DCM236 **/\r
+       DspDcmConfirmation(confirmPduId);       /** @req DCM236 */\r
 }\r
 \r
 \r
index 0e2af259cd01c53388093809465843b1a4e02d34..0d8d8d3ecc43c8338adc3d00783bfd604ac3a4ae 100644 (file)
  * 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
@@ -73,7 +79,7 @@ void ComM_DCM_InactivateDiagnostic() {
 \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
@@ -85,7 +91,7 @@ static inline void startS3SessionTimer(Dcm_DslRunTimeProtocolParametersType *run
 \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
@@ -94,13 +100,13 @@ static inline void stopS3SessionTimer(Dcm_DslRunTimeProtocolParametersType *runt
 // - - - - - - - - - - -\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
@@ -115,7 +121,7 @@ static void changeDiagnosticSession(Dcm_DslRunTimeProtocolParametersType *runtim
 \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
@@ -130,7 +136,7 @@ static void changeDiagnosticSession(Dcm_DslRunTimeProtocolParametersType *runtim
 \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
@@ -142,12 +148,12 @@ void DslResetSessionTimeoutTimer() {
        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
@@ -157,7 +163,7 @@ void DslGetCurrentServiceTable(const Dcm_DsdServiceTableType **currentServiceTab
 \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
@@ -170,7 +176,7 @@ Std_ReturnType DslGetActiveProtocol(Dcm_ProtocolType *protocolId) { /** @req DCM
 \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
@@ -180,7 +186,7 @@ void DslSetSecurityLevel(Dcm_SecLevelType secLevel) { /** @req DCM020 **/
 \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
@@ -195,7 +201,7 @@ Std_ReturnType DslGetSecurityLevel(Dcm_SecLevelType *secLevel) {  /** @req DCM02
 \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
@@ -210,7 +216,7 @@ void DslSetSesCtrlType(Dcm_SesCtrlType sesCtrl) {  /** @req DCM022 **/
 \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
@@ -311,9 +317,9 @@ void DslDsdProcessingDone(PduIdType rxPduIdRef, DsdProcessingDoneResultType resp
                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
@@ -340,7 +346,7 @@ static void sendResponse(const Dcm_DslProtocolRowType *protocol,
        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
@@ -351,7 +357,7 @@ static void sendResponse(const Dcm_DslProtocolRowType *protocol,
                        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
@@ -364,11 +370,9 @@ static Std_ReturnType StartProtocolHelper(Dcm_ProtocolType protocolId) {
        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
@@ -389,7 +393,7 @@ static boolean isTesterPresentCommand(const PduInfoType *rxPdu) {
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\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
@@ -400,8 +404,8 @@ void DslInit(void) { /** @req DCM037 - for DSL submodule. **/
                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
@@ -428,7 +432,7 @@ void DslMain(void) {
                        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
@@ -445,10 +449,10 @@ void DslMain(void) {
                                        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
@@ -475,14 +479,14 @@ void DslMain(void) {
                                                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
@@ -509,7 +513,7 @@ void DslMain(void) {
 //  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
@@ -522,7 +526,7 @@ BufReq_ReturnType DslProvideRxBufferToPdur(PduIdType dcmRxPduId, /** @req DCM094
        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
@@ -530,7 +534,7 @@ BufReq_ReturnType DslProvideRxBufferToPdur(PduIdType dcmRxPduId, /** @req DCM094
                                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
@@ -551,14 +555,14 @@ BufReq_ReturnType DslProvideRxBufferToPdur(PduIdType dcmRxPduId, /** @req DCM094
                                        // 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
@@ -570,9 +574,9 @@ BufReq_ReturnType DslProvideRxBufferToPdur(PduIdType dcmRxPduId, /** @req DCM094
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\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
@@ -582,7 +586,7 @@ void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) {  /*
        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
@@ -591,14 +595,14 @@ void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) {  /*
                // 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
@@ -606,18 +610,18 @@ void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) {  /*
                                        }\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
@@ -625,14 +629,14 @@ void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) {  /*
                                                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
@@ -644,7 +648,7 @@ void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) {  /*
                        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
@@ -664,7 +668,7 @@ void DslRxIndicationFromPduR(PduIdType dcmRxPduId, NotifResultType result) {  /*
 //  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
@@ -676,9 +680,9 @@ BufReq_ReturnType DslProvideTxBuffer(PduIdType dcmTxPduId, const PduInfoType **p
        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
@@ -730,12 +734,12 @@ void DslTxConfirmation(PduIdType dcmTxPduId, NotifResultType result) {
                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
index aa5aa02c1f73aca3fdff8a2607a0eb18a30616b4..63ea9e118cc3428cbb3aa9327f2954a193384dff 100644 (file)
 \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
@@ -123,7 +131,7 @@ static Std_ReturnType askApplicationForSessionPermission(Dcm_SesCtrlType newSess
 \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
@@ -138,32 +146,31 @@ void DspUdsDiagnosticSessionControl(const PduInfoType *pduRxData, PduInfoType *p
                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
@@ -179,41 +186,40 @@ void DspUdsEcuReset(const PduInfoType *pduRxData, PduIdType txPduId, PduInfoType
                        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
@@ -223,7 +229,7 @@ void DspUdsClearDiagnosticInformation(const PduInfoType *pduRxData, PduInfoType
        }\r
        else {\r
                // Wrong length\r
-               DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT);      /** @req DCM272.1 **/\r
+               DsdDspProcessingDone(DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT);\r
        }\r
 }\r
 \r
@@ -243,7 +249,7 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x01_0x07_0x11_0x12(const
        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
@@ -274,13 +280,12 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x01_0x07_0x11_0x12(const
                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
@@ -315,7 +320,7 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x02_0x0A_0x0F_0x13_0x15(c
        } 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
@@ -353,15 +358,14 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x02_0x0A_0x0F_0x13_0x15(c
                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
@@ -416,7 +420,7 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x06_0x10(const PduInfoTyp
        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
@@ -459,14 +463,14 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x06_0x10(const PduInfoTyp
                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
@@ -474,12 +478,12 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x06_0x10(const PduInfoTyp
                        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
@@ -554,7 +558,7 @@ static Dcm_NegativeResponseCodeType udsReadDtcInfoSub_0x14(const PduInfoType *pd
 \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
@@ -626,7 +630,7 @@ void DspUdsReadDtcInformation(const PduInfoType *pduRxData, PduInfoType *pduTxDa
                }\r
                else {\r
                        // Wrong length\r
-                       responseCode = DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT;     /** @req DCM272.0x19 **/\r
+                       responseCode = DCM_E_INCORRECTMESSAGELENGTHORINVALIDFORMAT;\r
                }\r
        }\r
        else {\r
@@ -660,16 +664,16 @@ static Dcm_NegativeResponseCodeType readDidData(const Dcm_DspDidType *didPtr, Pd
 {\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
@@ -686,7 +690,7 @@ static Dcm_NegativeResponseCodeType readDidData(const Dcm_DspDidType *didPtr, Pd
                                                        (*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
@@ -718,7 +722,7 @@ static Dcm_NegativeResponseCodeType readDidData(const Dcm_DspDidType *didPtr, Pd
        }\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
@@ -730,7 +734,7 @@ static Dcm_NegativeResponseCodeType readDidData(const Dcm_DspDidType *didPtr, Pd
 \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
@@ -744,7 +748,7 @@ void DspUdsReadDataByIdentifier(const PduInfoType *pduRxData, PduInfoType *pduTx
 \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
@@ -780,7 +784,7 @@ static Dcm_NegativeResponseCodeType readDidScalingData(const Dcm_DspDidType *did
                        (*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
@@ -800,7 +804,7 @@ static Dcm_NegativeResponseCodeType readDidScalingData(const Dcm_DspDidType *did
 \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
@@ -833,16 +837,16 @@ static Dcm_NegativeResponseCodeType writeDidData(const Dcm_DspDidType *didPtr, c
 {\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
@@ -853,8 +857,8 @@ static Dcm_NegativeResponseCodeType writeDidData(const Dcm_DspDidType *didPtr, c
                                        }\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
@@ -888,7 +892,7 @@ static Dcm_NegativeResponseCodeType writeDidData(const Dcm_DspDidType *didPtr, c
 \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
@@ -897,7 +901,7 @@ void DspUdsWriteDataByIdentifier(const PduInfoType *pduRxData, PduInfoType *pduT
 \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
@@ -916,7 +920,7 @@ void DspUdsWriteDataByIdentifier(const PduInfoType *pduRxData, PduInfoType *pduT
 \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
@@ -935,10 +939,10 @@ void DspUdsSecurityAccess(const PduInfoType *pduRxData, PduInfoType *pduTxData)
                        }\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
@@ -946,7 +950,7 @@ void DspUdsSecurityAccess(const PduInfoType *pduRxData, PduInfoType *pduTxData)
                                        }\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
@@ -975,14 +979,14 @@ void DspUdsSecurityAccess(const PduInfoType *pduRxData, PduInfoType *pduTxData)
                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
@@ -1016,39 +1020,40 @@ void DspUdsSecurityAccess(const PduInfoType *pduRxData, PduInfoType *pduTxData)
 \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
@@ -1059,8 +1064,8 @@ void DspUdsControlDtcSetting(const PduInfoType *pduRxData, PduInfoType *pduTxDat
                        }\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
index 33e9f2c0a3fc040d1e0a6d3b1510a543f2a604c7..083c995e67929abdbddd1861a282e93e0079e1d0 100644 (file)
 #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
@@ -91,55 +97,55 @@ typedef Std_ReturnType (*Dcm_CallbackEcuResetType)(uint8 resetType, Dcm_Negative
 \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
@@ -147,171 +153,170 @@ typedef struct {
        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
@@ -319,21 +324,21 @@ typedef struct {
  *******/\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
@@ -365,44 +370,43 @@ typedef enum
 \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
@@ -420,12 +424,12 @@ typedef struct Dcm_DslProtocolRxType_t Dcm_DslProtocolRxType;
 \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
@@ -434,9 +438,9 @@ typedef struct Dcm_DslProtocolTxType_t Dcm_DslProtocolTxType;
 \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
@@ -458,12 +462,12 @@ typedef struct Dcm_DslConnectionType_t Dcm_DslConnectionType;
 \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
@@ -472,11 +476,11 @@ typedef struct Dcm_DslProtocolRowType_t Dcm_DslProtocolRowType;
 // 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
@@ -503,88 +507,88 @@ typedef enum {
 #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
index d4454a6c31fa9a14ea318ec7aaae1c8a0fe282c0..1525859e90862aa9146a3ed05b9fb38b70f4afe8 100644 (file)
 \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
@@ -61,8 +75,8 @@ typedef struct {
        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
@@ -96,7 +110,7 @@ typedef enum
   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
@@ -127,12 +141,14 @@ static EventStatusRecType eventStatusBuffer[DEM_MAX_NUMBER_EVENT];
 /*\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
@@ -311,15 +327,15 @@ static Dem_EventStatusType preDebounceNone(Dem_EventStatusType reportedStatus, E
        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
@@ -367,16 +383,16 @@ static Dem_EventStatusType preDebounceCounterBased(Dem_EventStatusType reportedS
                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
@@ -429,7 +445,7 @@ static void updateEventStatusRec(const Dem_EventParameterType *eventParam, Dem_E
                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
@@ -437,7 +453,7 @@ static void updateEventStatusRec(const Dem_EventParameterType *eventParam, Dem_E
 \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
@@ -449,7 +465,7 @@ static void updateEventStatusRec(const Dem_EventParameterType *eventParam, Dem_E
                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
@@ -463,6 +479,7 @@ static void updateEventStatusRec(const Dem_EventParameterType *eventParam, Dem_E
                                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
@@ -472,6 +489,7 @@ static void updateEventStatusRec(const Dem_EventParameterType *eventParam, Dem_E
                        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
@@ -525,7 +543,7 @@ static void mergeEventStatusRec(EventRecType *eventRec)
                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
@@ -683,7 +701,7 @@ static void getExtendedData(const Dem_EventParameterType *eventParam, ExtDataRec
                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
@@ -693,7 +711,7 @@ static void getExtendedData(const Dem_EventParameterType *eventParam, ExtDataRec
                        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
@@ -741,7 +759,7 @@ static void storeExtendedDataPreInit(const Dem_EventParameterType *eventParam, E
                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
@@ -781,7 +799,7 @@ static void storeEventPriMem(const Dem_EventParameterType *eventParam, EventStat
                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
@@ -825,7 +843,7 @@ static void storeEventEvtMem(const Dem_EventParameterType *eventParam, EventStat
                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
@@ -833,7 +851,7 @@ static void storeEventEvtMem(const Dem_EventParameterType *eventParam, EventStat
                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
@@ -848,7 +866,7 @@ static void storeEventEvtMem(const Dem_EventParameterType *eventParam, EventStat
  * 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
@@ -869,7 +887,7 @@ static void storeExtendedDataPriMem(const Dem_EventParameterType *eventParam, Ex
                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
@@ -920,7 +938,7 @@ static void storeExtendedDataEvtMem(const Dem_EventParameterType *eventParam, Ex
                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
@@ -1015,7 +1033,7 @@ static void storeFreezeFrameDataEvtMem(const Dem_EventParameterType *eventParam,
                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
@@ -1105,11 +1123,11 @@ static Std_ReturnType handleEvent(Dem_EventIdType eventId, Dem_EventStatusType e
                                        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
@@ -1152,7 +1170,7 @@ static void resetEventStatus(Dem_EventIdType eventId)
 \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
@@ -1170,7 +1188,7 @@ static void getEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtendedType
        // 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
@@ -1190,7 +1208,7 @@ static void getEventFailed(Dem_EventIdType eventId, boolean *eventFailed)
        // 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
@@ -1216,7 +1234,7 @@ static void getEventTested(Dem_EventIdType eventId, boolean *eventTested)
        // 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
@@ -1248,7 +1266,7 @@ static Std_ReturnType getFaultDetectionCounter(Dem_EventIdType eventId, sint8 *c
                        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
@@ -1259,7 +1277,7 @@ static Std_ReturnType getFaultDetectionCounter(Dem_EventIdType eventId, sint8 *c
 \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
@@ -1270,13 +1288,13 @@ static Std_ReturnType getFaultDetectionCounter(Dem_EventIdType eventId, sint8 *c
                        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
@@ -1293,7 +1311,7 @@ static Std_ReturnType getFaultDetectionCounter(Dem_EventIdType eventId, sint8 *c
  *                             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
@@ -1318,14 +1336,14 @@ static Std_ReturnType setOperationCycleState(Dem_OperationCycleIdType operationC
                        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
@@ -1333,7 +1351,7 @@ static Std_ReturnType setOperationCycleState(Dem_OperationCycleIdType operationC
        }\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
@@ -1369,11 +1387,12 @@ static Std_ReturnType setOperationCycleState(Dem_OperationCycleIdType operationC
  */\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
@@ -1415,7 +1434,7 @@ void Dem_PreInit(void)
 \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
@@ -1520,9 +1539,9 @@ void Dem_Init(void)
  */\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
@@ -1531,6 +1550,7 @@ void Dem_Shutdown(void)
  */\r
 void Dem_MainFunction(void)\r
 {\r
+       /** @req DEM125 */\r
 \r
 }\r
 \r
@@ -1543,7 +1563,7 @@ void Dem_MainFunction(void)
  * 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
@@ -1554,9 +1574,9 @@ Std_ReturnType Dem_SetEventStatus(Dem_EventIdType eventId, Dem_EventStatusType e
        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
@@ -1567,20 +1587,20 @@ Std_ReturnType Dem_SetEventStatus(Dem_EventIdType eventId, Dem_EventStatusType e
  * 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
@@ -1591,7 +1611,7 @@ Std_ReturnType Dem_ResetEventStatus(Dem_EventIdType eventId)
  * 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
@@ -1602,9 +1622,9 @@ Std_ReturnType Dem_GetEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtend
        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
@@ -1615,7 +1635,7 @@ Std_ReturnType Dem_GetEventStatus(Dem_EventIdType eventId, Dem_EventStatusExtend
  * 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
@@ -1626,9 +1646,9 @@ Std_ReturnType Dem_GetEventFailed(Dem_EventIdType eventId, boolean *eventFailed)
        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
@@ -1650,9 +1670,9 @@ Std_ReturnType Dem_GetEventTested(Dem_EventIdType eventId, boolean *eventTested)
        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
@@ -1674,9 +1694,9 @@ Std_ReturnType Dem_GetFaultDetectionCounter(Dem_EventIdType eventId, sint8 *coun
        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
@@ -1699,9 +1719,9 @@ Std_ReturnType Dem_SetOperationCycleState(Dem_OperationCycleIdType operationCycl
        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
@@ -1722,7 +1742,7 @@ Std_ReturnType Dem_GetDTCOfEvent(Dem_EventIdType eventId, Dem_DTCKindType dtcKin
        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
@@ -1744,26 +1764,26 @@ Std_ReturnType Dem_GetDTCOfEvent(Dem_EventIdType eventId, Dem_DTCKindType dtcKin
  * 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
@@ -1777,10 +1797,10 @@ void Dem_ReportErrorStatus( Dem_EventIdType eventId, Dem_EventStatusType eventSt
  * 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
@@ -1820,7 +1840,7 @@ Dem_ReturnSetDTCFilterType Dem_SetDTCFilter(uint8 dtcStatusMask,
 \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
@@ -1849,11 +1869,11 @@ Dem_ReturnGetStatusOfDTCType Dem_GetStatusOfDTC(uint32 dtc, Dem_DTCKindType dtcK
        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
@@ -1861,7 +1881,7 @@ Dem_ReturnGetStatusOfDTCType Dem_GetStatusOfDTC(uint32 dtc, Dem_DTCKindType dtcK
                }\r
        }\r
        else {\r
-               returnCode = DEM_STATUS_WRONG_DTC;\r
+               returnCode = DEM_STATUS_WRONG_DTC; /** @req DEM172 */\r
        }\r
 \r
        return returnCode;\r
@@ -1890,7 +1910,7 @@ Dem_ReturnGetNumberOfFilteredDTCType Dem_GetNumberOfFilteredDtc(uint16 *numberOf
 \r
        //Dem_EnableEventStatusUpdate();\r
 \r
-       *numberOfFilteredDTC = numberOfFaults;\r
+       *numberOfFilteredDTC = numberOfFaults; /** @req DEM061 */\r
 \r
        return DEM_NUMBER_OK;\r
 }\r
@@ -1905,13 +1925,13 @@ Dem_ReturnGetNextFilteredDTCType Dem_GetNextFilteredDTC(uint32 *dtc, Dem_EventSt
        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
@@ -1934,7 +1954,7 @@ Dem_ReturnGetNextFilteredDTCType Dem_GetNextFilteredDTC(uint32 *dtc, Dem_EventSt
  */\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
@@ -1942,7 +1962,7 @@ Dem_ReturnTypeOfDtcSupportedType Dem_GetTranslationType(void)
  * 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
@@ -1964,6 +1984,7 @@ Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTC
                                                                switch (dtcOrigin)\r
                                                                {\r
                                                                case DEM_DTC_ORIGIN_PRIMARY_MEMORY:\r
+                                                                       /** @req DEM077 */\r
                                                                        deleteEventPriMem(eventParam);\r
                                                                        deleteFreezeFrameDataPriMem(eventParam);\r
                                                                        deleteExtendedDataPriMem(eventParam);\r
@@ -1976,7 +1997,7 @@ Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTC
                                                                        // 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
@@ -1991,7 +2012,7 @@ Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTC
                        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
@@ -2005,7 +2026,7 @@ Dem_ReturnClearDTCType Dem_ClearDTC(uint32 dtc, Dem_DTCKindType dtcKind, Dem_DTC
  * 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
@@ -2013,6 +2034,7 @@ Dem_ReturnControlDTCStorageType Dem_DisableDTCStorage(Dem_DTCGroupType dtcGroup,
        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
@@ -2035,7 +2057,7 @@ Dem_ReturnControlDTCStorageType Dem_DisableDTCStorage(Dem_DTCGroupType dtcGroup,
 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
@@ -2062,7 +2084,7 @@ Dem_ReturnGetExtendedDataRecordByDTCType Dem_GetExtendedDataRecordByDTC(uint32 d
                                                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
@@ -2079,7 +2101,7 @@ Dem_ReturnGetExtendedDataRecordByDTCType Dem_GetExtendedDataRecordByDTC(uint32 d
                                                        // 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
@@ -2123,7 +2145,7 @@ Dem_ReturnGetSizeOfExtendedDataRecordByDTCType Dem_GetSizeOfExtendedDataRecordBy
                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
index 2f905d804a64382a511d4c1de601d905d8eed072..dd62cf75a1fc03f40032edfdbd80beca7a6f4489 100644 (file)
 \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
@@ -57,17 +64,18 @@ typedef Std_ReturnType (*Dem_CallbackReadDataLength)(uint16 *DidLength);
 #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
@@ -80,12 +88,12 @@ typedef struct {
        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
@@ -98,19 +106,19 @@ typedef struct {
        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
@@ -124,7 +132,7 @@ typedef struct {
 // 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
@@ -140,27 +148,28 @@ typedef struct {
        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
@@ -168,7 +177,7 @@ typedef struct {
        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
@@ -180,6 +189,7 @@ typedef struct {
        // TODO: Fill out\r
 } Dem_PreDebounceTimeBasedType;\r
 \r
+// 10.2.20\r
 typedef struct {\r
        Dem_PreDebounceNameType                                         PreDebounceName;                                // (1)\r
        union {\r
@@ -204,7 +214,7 @@ typedef struct {
        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
@@ -217,7 +227,7 @@ typedef struct {
        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
@@ -226,8 +236,8 @@ typedef struct {
 \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
@@ -235,7 +245,7 @@ typedef struct {
        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
index e1e64e8213b490b48d6aa8373cff759c4c4cacf2..759e7591deac781e9c499dcad708fc31d66f221e 100644 (file)
@@ -22,7 +22,7 @@
 \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
@@ -92,7 +92,7 @@ enum {
        DEM_OBD_DCY,    // OBD Driving Cycle\r
 \r
        DEM_OPERATION_CYCLE_ID_ENDMARK\r
-};\r
+}; /** @req DEM142 */\r
 \r
 /*\r
  * Dem_OperationCycleStateType\r
index a64521f17844ca794f045dcdaf243e54f0b399ba..ee696f67259d6ce9f168e48eb1e7e1cc171802ae 100644 (file)
@@ -1,42 +1,42 @@
-
-# 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
index ddc3e4e12fbae34458b3333d57b13d2a3ecd26f1..067f3d9fef689385c2f1b32683f7e67a71c5db86 100644 (file)
@@ -1,3 +1,5 @@
+-include ../config/*.mk\r
+-include ../config/$(BOARDDIR)/*.mk\r
 \r
 -include ../config/*.mk\r
 -include ../config/$(BOARDDIR)/*.mk\r
index 2260be0ce3e8efe8c0ba688f25282786ee936811..195b735a66267607ad898fbcf44d812098d9b254 100644 (file)
@@ -1,44 +1,44 @@
-
-# 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
index 41297f8e9c0adfaa15b8b7ddb413c1a43200373b..9e330df0bf0ab262fa6bf92648edde323fde48cb 100644 (file)
@@ -1,45 +1,45 @@
-
-# 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
index a1d32b06ef1550bca4d8f75ac8f8fe40310c2693..34aa9bfe6d95c152aec5f32bc61d460f70233ac5 100644 (file)
@@ -1,3 +1,5 @@
+-include ../config/*.mk\r
+-include ../config/$(BOARDDIR)/*.mk\r
 \r
 -include ../config/*.mk\r
 -include ../config/$(BOARDDIR)/*.mk\r
index d9bf0e99cd9dd69beb9186ebdac08e9727e4c228..8ef59e3702351431fc237db9840af66dbc6ca366 100644 (file)
@@ -1,45 +1,45 @@
-
-# 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
index 82c87f2b742959d52f728c6640bb18b96d9f2ea1..cfacb3920b242372efa1e7943f41e852e90f6f5a 100644 (file)
@@ -1,3 +1,5 @@
+-include ../config/*.mk\r
+-include ../config/$(BOARDDIR)/*.mk\r
 \r
 -include ../config/*.mk\r
 -include ../config/$(BOARDDIR)/*.mk\r
index d6144a14a60618b3ae88889086ba9f142bf61e7a..3d2a328bcd5202ac69229d7367e874092e4c6a80 100644 (file)
 #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
@@ -64,7 +69,7 @@ this race condition applies to event-triggered systems */
 #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
index bc7b8bdeddd9b6521a5aa13e4a2001272ca98db6..114e1cd12fe5ec9b5140074ef61e1ad5e525b6ae 100644 (file)
@@ -23,20 +23,21 @@ typedef enum {
        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
index 1d77d88fd59e14f4262195454fb105a8a702da8d..52250d917a1f87357c9e786894b48a9cd45e3213 100644 (file)
 #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
@@ -47,8 +49,8 @@ typedef enum {
 } 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
index b0060d170929c9d496e5d35d95cc422b50553cc5..1568caf8a8e84d4a924396a322cd657d7a719dae 100644 (file)
  * 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
@@ -29,7 +34,7 @@
 #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
@@ -65,21 +70,29 @@ typedef enum {
        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
index e892f21e87c5a2f78d76e8642fc17f1feb97b933..4a587932621c684f1129b14e010eeb9042e14493 100644 (file)
@@ -17,6 +17,8 @@
 #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
index 058c4a2d01fb5fb15688e68e0ea6043445d071c9..e436acb2101c9f94ea734526ba7d79edc627d225 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef CANSM_CONFIGTYPES_H_\r
 #define CANSM_CONFIGTYPES_H_\r
 \r
+/** @req CANSM010.bswbuilder */\r
+\r
 #include "Com.h"\r
 \r
 typedef struct {\r
@@ -27,12 +29,12 @@ typedef struct {
        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
index 07e0f20697d5aea50cfaf7ef22aa374f92e92e1b..b88d5e0b676ae66d7b0b9be009d95c0cf6298e26 100644 (file)
@@ -39,7 +39,7 @@
 #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
@@ -90,19 +90,19 @@ typedef enum {
  * 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
index 21abd10d2d0b18a7b282c3eb45458fb48221fcdf..d8d0aca363cde6d9b10237c9db314457456d3662 100644 (file)
@@ -27,9 +27,9 @@
 #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
index ae05c7323996e47ee5db69a93c2bcb5ed1fe347f..cc59d591ce15c0544d6728d10d1343a9eb294885 100644 (file)
  * 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
@@ -36,7 +45,7 @@ typedef enum {
        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
@@ -50,47 +59,47 @@ typedef enum {
 \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
@@ -98,20 +107,20 @@ typedef struct {
        //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
@@ -119,13 +128,13 @@ typedef struct {
        //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
index 95b427441e73eec2f0aff7764609deecb98a0656..e0436470ae9c49e3801ddde6607edbdcdf4c60cb 100644 (file)
@@ -20,6 +20,7 @@
 #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
@@ -28,6 +29,7 @@
 #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
@@ -36,6 +38,7 @@
 #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
@@ -43,6 +46,7 @@
 #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
@@ -87,29 +91,30 @@ void ComM_MainFunction_##channel (void) { \
 \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
index 098384ffa59845ce4da259f279ffaeb2ae092a3c..dc057b91ffa0bfb4e5828ab337f5c4e3556f134b 100644 (file)
 #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
@@ -32,7 +39,7 @@ typedef enum {
 } 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
@@ -43,6 +50,7 @@ typedef struct {
 \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
index e357f89a8a8eea137d1571da58069423fce9b965..7fe3b14de035267f0c2c0f554f64c385133bea7a 100644 (file)
 #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
index f22272eb1b819f33b11d88920d46aaeea1a0a7be..6777bc842ce90d8986efe27d5a32d4af9e34a82f 100644 (file)
@@ -24,6 +24,7 @@
 #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
@@ -34,10 +35,10 @@ typedef enum {
 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
index 63f9d88afd2db4c8b2fd1d23f60214d170cf777c..84d8831f52a2b1524d98f4d38e7748c77360bc1b 100644 (file)
 \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
index cac3e6121a2aa530e17066caffbbf1b13d699b65..88fcc5a867b9024f13b4d702579dcb9fb1243fb1 100644 (file)
@@ -23,7 +23,7 @@
 #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
index 39ec3b4eccb762305b89bb8243aed602e673192a..8398918cb0f9531f3e1bbe5249a28b1896173a42 100644 (file)
 /*\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
index 14dd15282fc0a85e0124b3728ad8af629c63d739..0478482f50f4db80796647e313253413614e60eb 100644 (file)
 #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
@@ -51,6 +53,7 @@
 #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
index ed282f12c391ea96fc3d285071bb54c46e285824..d707106dd68367214b7057ea5056c103b65ae8fc 100644 (file)
@@ -17,6 +17,7 @@
 #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
@@ -124,6 +146,7 @@ void Nm_StateChangeNotification(
 /** 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
index 55dd70b8eb1de5f32a6bc4dbcd10a75409d7c616..744f4b0bb59724fcb5af55d41163cdd523c38633 100644 (file)
@@ -169,7 +169,7 @@ static inline void DisableAllInterrupts( void ) {
        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
index fe9cae9b264a075cdbb0a8691c63716a378c3050..38a2614a73c855e6d7ebf8afecacd41fe6526196 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef RTE_H_\r
 #define RTE_H_\r
 \r
-\r
+#include "Std_Types.h"\r
 \r
 /* Contract \r
  * rte_sws_1143\r
@@ -55,7 +55,6 @@
 \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
@@ -129,9 +128,7 @@ typedef uint8 Std_ReturnType;
 //\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
index b5595299c74e0fd6f74e28680da18ece2fb347b4..312f9a8c63e7bc15435ab34ba273db0651192424 100644 (file)
@@ -65,7 +65,9 @@ space = $(empty) $(empty)
 # 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
index d4da75a34d54dbc83419490f09d39f90c6211813..935eebc29e7a4946976231bc00cc00676c492b32 100644 (file)
@@ -85,8 +85,9 @@ void EcuM_StartupTwo()
 \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
index 88374dfbdd63aa4194cf4e1db70849de717a9851..319217c72519ecc132d79fa620216404595aedb6 100644 (file)
@@ -26,6 +26,7 @@ obj-y += sys_tick.o
 #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