DiagcMgr_MDD
Module Design Document
For
Diagnostic Manager
VERSION: 11.0
DATE: 14-DEC-2017
Prepared By:
Shruthi Raghavan
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
| Description | Author | Version | Date |
| Initial Version | SB | 1.0 | 23-Apr-2015 |
| Added to Design Limitations section | KMC | 2.0 | 03-Jun-2015 |
| ES101A_DiagcMgr_Design version 2 implementation | SB | 3.0 | 11-Mar-2016 |
| ES101A_DiagcMgr_Design version 3 implementation | SB | 4.0 | 19-Apr-2016 |
| ES101A_DiagcMgr_Design version 4 implementation | SB | 5.0 | 22-Jun-2016 |
| Added DETs to “SetNtcStsCore_Oper” server runnables | SB | 6.0 | 26-Sep-2016 |
| Updated to fix anomalies EA4#8118 and EA4#8115 | SB | 7.0 | 02-Dec-2016 |
| Updated the graphical representation. Added server runnables CnvSnpshtData_*, noted design limitations and design rationales and added local functions | SR | 8.0 | 21-Apr-2017 |
| Updated Unit Test considerations as per EA4#9649 | SR | 9.0 | 29-Jun-2017 |
| Updated Unit Test considerations for new process to handle configuration parameters for PIL testing. Also updated design limitations per latest design baseline. | SR | 10.0 | 26-Sep-2017 |
| Removed Static analysis explanation from DiagcMgr PwrDwn function’s rationale because it is no longer applicable. Also removed design limitation that was corrected in the current design version (5.3.0) | SR | 11.0 | 14-Dec-2017 |
Table of Contents
3 DiagcMgr & High-Level Description 8
4 Design details of software module 9
Graphical representation of Diagcmgr 9
5.1 User defined typedef definition/declaration 10
5.2 Variable definition for enumerated types 10
5.3 Global Variable definition 10
6.1 Program(fixed) Constants 11
Module specific Lookup Tables Constants 11
7 Software Module Implementation 12
7.1.1 Initialization Functions 12
7.1.4.3 DiagcMgrIninCore_Oper 13
7.1.4.6 GetNtcActvCORE_Oper 15
7.1.4.7 GetNtcQlfrStsCORE_Oper 15
7.1.4.10 ReadNtcInfoAndDebCntr_Oper 15
7.1.4.10.1 Design Rationale 15
7.1.4.11 ReadSnpshtData_Oper 15
7.1.4.12 CnvSnpshtData_f32_Oper 15
7.1.4.13 CnvSnpshtData_logl_Oper 15
7.1.4.14 CnvSnpshtData_s08_Oper 15
7.1.4.15 CnvSnpshtData_s16_Oper 15
7.1.4.16 CnvSnpshtData_s32_Oper 15
7.1.4.17 CnvSnpshtData_u08_Oper 16
7.1.4.18 CnvSnpshtData_u16_Oper 16
7.1.4.19 SetNtcStsCore_Oper 16
7.1.4.19.1 Design Rationale 16
7.1.4.20 ClrLtchCntrData_Oper 16
7.1.4.21 ReadLtchCntrData_Oper 16
7.1.4.22 RestoreDiagcMgrLtchCntrAryDft 17
7.1.4.23 RestoreNtcFltAryDft 17
7.1.4.24 RestoreSnpshtAryDft 17
7.1.5 Local Function/Macro Definitions 17
7.1.6 GLObAL Function/Macro Definitions 19
8 Known Limitations With Design 22
Abbrevations And Acronyms
| Abbreviation | Description |
| DFD | Design functional diagram |
| MDD | Module design Document |
| <ADD more to the table if applicable> | |
References
This section lists the title & version of all the documents that are referred for development of this document
| # | Title | Version |
| 1 | MDD Guideline EA4 | 1.02 |
| 2 | EA4 Software Naming Conventions | 1.02 |
| 3 | Software Design and Coding standards | 2.01 |
| 4 | ES101A_DiagcMgr_Design | See Synergy Subproject version |
DiagcMgr & High-Level Description
This function is responsible for handling all the NTCs that are used by different FDDs. The Diagnostic Manager sets the Ntc called by any component and requests the system to either ramp down to Disable or take no action. It also handles latched Ntcs & owns the associated NTCNR_0x0A Ntc.
Design details of software module
Graphical representation of Diagcmgr

Data Flow Diagram
Module level DFD
N/A
Sub-Module level DFD
N/A
COMPONENT FLOW DIAGRAM
N/A
Variable Data Dictionary
User defined typedef definition/declaration
<This section documents any user types uniquely used for the module.>
| Typedef Name | Element Name | User Defined Type | Legal Range (min) | Legal Range (max) |
| NtcMapRec1 | ApplIdx | Uint8 | 0 | 10 |
| NtcInfoIdx | uint8 | 0 | 255 | |
| DebCntrIdx | Uint8 | 0 | 255 | |
| NtcInfoRec4 | NtcStInfo | Uint8 | 0 | 255 |
| Sts | Uint8 | 0 | 255 | |
| AgiCntr | Uint8 | 0 | 255 | |
| Ary1D_NtcInfoRec4 | NtcInfoRec4[]1 | |||
| Ary1D_NtcInfoRec4_DiagcMgrProxyApplX3 | NtcInfoRec4[]1 | |||
| Ary1D_s16_DiagcMgrProxyApplX3 | Sint16[]2 |
1 – Array of NtcInfoRec4
2 – Array of sint16
3 – One for each Application configured with NTCs
For example – Application 6 and 10 have NTCs then - Ary1D_NtcInfoRec4_DiagcMgrProxyAppl6, Ary1D_NtcInfoRec4_DiagcMgrProxyAppl10, Ary1D_s16_DiagcMgrProxyAppl6, Ary1D_s16_DiagcMgrProxyAppl10 would exist with configured sizes.
Variable definition for enumerated types
| Enum Name | Element Name | Value |
| See DataDict.m file |
Global Variable definition
| Name | Type | ||
| SnpshtDataAry_M[8]1 | SnpshtDataRec2 |
| Name | Element Name | Type | Min | Max |
| SnpshtDataRec2 | SpclSnpshtData0 | uint32 | 0 | 4294967295 |
| SpclSnpshtData1 | uint32 | 0 | 4294967295 | |
| SpclSnpshtData2 | uint32 | 0 | 4294967295 | |
| MicroDiagcData | uint32 | 0 | 4294967295 | |
| IgnCntr | uint32 | 0 | 4294967295 | |
| HwTq | sint16 | -10 | 10 | |
| MotTqCmdMrfScad | sint16 | -8.8 | 8.8 | |
| BrdgVltg | uint16 | 6 | 26.5 | |
| EcuTFild | sint16 | -50 | 150 | |
| NtcNr | NtcNr1 | NTCNR_0X001 | NTCNR_0X1FF | |
| NtcStInfo | uint8 | 0 | 255 | |
| SysSt | SysSt1 | SYSST_DI | SYSST_WRMININ |
Notes:
1- This variable is mapped to MemMap – “GlobalShared_START_SEC_VAR_NOINIT_UNSPECIFIED”
Constant Data Dictionary
Program(fixed) Constants
Embedded Constants
Local
| Constant Name | Resolution | Units | Value |
| See DataDict.m file | N/A | N/A | N/A |
| IMDTSHTDWNFLT_CNT_U16 | 1 | Counts | 5U |
| CTRLDSHTDWNFLT_CNT_U16 | 1 | Counts | 6U |
| INFOONLYFLT_CNT_U16 | 1 | Counts | 7U |
| TOTNROFDTC_CNT_U084 | 1 | Counts | Configured |
| PimSnpshtDataAry_rec | N/A | N/A | SnpshtDataAry_M |
| D_MAXNUMBEROFNTCS_CNT_U16 | 1 | CNT | 512U |
4 - Number of DTCs for that program.
Global
| Constant Name | Value |
| See DataDict.m file | N/A |
Module specific Lookup Tables Constants
| Constant Name | Resolution | Value | Software Segment |
| DIAGCMGRNTCMAP_CNT_REC [512] | NtcMapRec1 | Configured | DiagcMgr_START_SEC_CODE |
| NTCNRARYAPPLX_CNT_U16 [Configured]5 | 1 | Configured | DiagcMgr_START_SEC_CODE |
| DTCENAMASK [Configured]6 | 1 | Configured | DiagcMgr_START_SEC_CODE |
| DEMDTCEVEIDMAP [Configured]6 | 1 | Configured | DiagcMgr_START_SEC_CODE |
| FLTRESPRAMPTBL_ULS_F32 [5] | Single Precision Float | {0.1F,0.125F,0.2F,1.0F,10.0F} | DiagcMgr_START_SEC_CODE |
| DIAGCMGRNTCPPTYARY_CNT_U08[512] | 1 | Configured | DiagcMgr_START_SEC_CODE |
| DIAGCMGRLISTOFLTCHGNTC_CNT_ENUM[207] | 1 | Configured | DiagcMgr_START_SEC_CODE |
| DIAGCMGRNTCLTCHCNTRTHD_CNT_U08[207] | 1 | Configured | DiagcMgr_START_SEC_CODE |
5 - One for each Application configured with NTCs.
6 - Variable Length (TOTNROFDTC_CNT_U08 + 1) for each build/program depending on the Number of DTCs
for that program.
7 – The length of this array depends on MaximumNumberOfLatching Ntcs the software is designed to handle – currently it is 20.
Software Module Implementation
Sub-Module Functions
None
Initialization Functions
None
PERIODIC FUNCTIONS
Per: diagcmgrPer1
This function exists in “DiagcMgr.c” file. Refer Simulink model for details
Design Rationale
“Rte_Call_GetDiagcDataApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg.h
Per: diagcmgrPer2
This function exists in “DiagcMgr.c” file. Refer Simulink model for details
Design Rationale
“Rte_Call_GetDiagcDataApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg.h
Interrupt Functions
None
Server Runnable Functions
ClrAllDiagc_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
ClrSnpshtData_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
Design Rationale
“NvMConf_NvMBlockDescriptor_Rte_NvmBlock_DiagcMgr_SnpshtDataAry” is used instead of BlockID Number in “NvMProxy_SetRamBlockStatus” call so that the Integrator doesn’t have to configure the DiagcMgr to know about the Nvm block Ids.
DiagcMgrIninCore_Oper
See DataDict.m file and modelThis function exists in “DiagcMgr.c” file.
DiagcMgrPwrDwN
See DataDict.m file and model
This function exists in “DiagcMgrNonRte.c” file.
Design Rationale
“GetNtcInfoApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg.h.
“NvMConf_NvMBlockDescriptor_Rte_NvmBlock_DiagcMgr_DiagcMgrNtcFltAry” is used instead of BlockID Number in “NvMProxy_SetRamBlockStatus” call so that the Integrator doesn’t have to configure the DiagcMgr to know about the Nvm block Ids.
UpdDtcEnaCdn
See DataDict.m file and model. This function exists in “DiagcMgrNonRte.c” file.
Design Rationale
“GetNtcInfoApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg.h.
GetNtcActvCORE_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
GetNtcQlfrStsCORE_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
GetNtcStsCORE_Oper
See DataDict.m file and model
This function exists in “DiagcMgr.c” file.
ReadNtcFltAry_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
Design Rationale
“GetNtcInfoApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg.h
QAC flags MISRA Rule 9.1 for HistNtcFltAry_T_rec being used to write to PIM before initialization but it isn’t actually an issue because the logic only uses the elements of the array that have been written to.
ReadNtcInfoAndDebCntr_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
Design Rationale
“GetNtcDebCntrApplX” and “GetNtcInfoApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg.h
ReadSnpshtData_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
CnvSnpshtData_f32_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
CnvSnpshtData_logl_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
CnvSnpshtData_s08_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
CnvSnpshtData_s16_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
CnvSnpshtData_s32_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
CnvSnpshtData_u08_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
CnvSnpshtData_u16_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
SetNtcStsCore_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
Design Rationale
The array DTCENAMASK is indexed by DtctempIdx_Cnt_T_u08 which corresponds to the lower 8-bits of the FltRespTbl. So the index can range from [0,255].
However the calibration PrmDiagcMgrFltResp_u16 is checked (using DET) at init functions of each ApplProxy such that the value of the lower 8-bits of each of its elements are in the range of [0,sizeof(DTCENAMASK)]. So there will never be an out-of-bounds array access scenario on the DTCENAMASK array.
Note: Lower 8-bits corresponds to FLTRESPDTCIDX_CNT_U16 mask being 0xFF.
ClrLtchCntrData_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
ReadLtchCntrData_Oper
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
RestoreDiagcMgrLtchCntrAryDft
See DataDict.m file and model. This function exists in “DiagcMgr.c” file.
RestoreNtcFltAryDft
See DataDict.m file and model. This function exists in “DiagcMgrNonRte.c” file.
RestoreSnpshtAryDft
See DataDict.m file and model. This function exists in “DiagcMgrNonRte.c” file.
Local Function/Macro Definitions
Local Function #1
| Function Name | ProcRampResp | Type | Min | Max |
| Arguments Passed | NtcNr_Cnt_T_u16 | uint16 | 0 | 511 |
| DiagcData_T_rec | DiagcDataRec2 | |||
| DiagcData_T_rec .DiagcSts | 0 | 255 | ||
| DiagcData_T_rec .ActvRampRate | 0.1 | 500 | ||
| DiagcData_T_rec ActvMotTqCmdSca | 0 | 1 | ||
| ProxySetNtcData_T_rec | DiagcDataRec2 | |||
| ProxySetNtcData_T_rec .DiagcSts | 0 | 255 | ||
| ProxySetNtcData_T_rec .ActvRampRate | 0.1 | 500 | ||
| ProxySetNtcData_T_rec ActvMotTqCmdSca | 0 | 1 | ||
| Return Value | N/A |
Description
Refer ‘ProcessRampResponse and DiagcSts’ block in Simulink model for DiagcMgr
This function exists in “DiagcMgr.c” file.
Local Function #2
| Function Name | UpdSnpshtData | Type | Min | Max |
| Arguments Passed | SpclSnpshtData0_Cnt_T_u32 | uint32 | 0 | 4294967295 |
| SpclSnpshtData1_Cnt_T_u32 | uint32 | 0 | 4294967295 | |
| SpclSnpshtData2_Cnt_T_u32 | uint32 | 0 | 4294967295 | |
| McuDiagcSpplData_Cnt_T_u32 | uint32 | 0 | 4294967295 | |
| IgnCntr_Cnt_T_u32 | uint32 | 0 | 4294967295 | |
| HwTq_Cnt_T_s5p10 | sint16 | -10 | 10 | |
| MotTqCmdMrfScad_Cnt_T_s5p10 | sint16 | -8.8 | 8.8 | |
| BrdgVltg_Cnt_T_u6p10 | uint16 | 6 | 26.5 | |
| EcuTFild_Cnt_T_s8p7 | sint16 | -50 | 150 | |
| NtcNr_Cnt_T_u16 | NtcNr1 | NTCNR_0X001 | NTCNR_0X1FF | |
| NtcStInfo_Cnt_T_u08 | uint8 | 0 | 255 | |
| SysSt_Cnt_T_enum | SysSt1 | SYSST_DI | SYSST_WRMININ | |
| Return Value | N/A |
Description
Refer ‘UpdSnpshtData’ block in Simulink model for DiagcMgr. This function exists in “DiagcMgr.c” file
Design Rationale
“NvMConf_NvMBlockDescriptor_Rte_NvmBlock_DiagcMgr_SnpshtDataAry” is used instead of BlockID Number in “NvMProxy_SetRamBlockStatus” call so that the Integrator doesn’t have to configure the DiagcMgr to know about the Nvm block Ids.
Local Function #3
| Function Name | GetNtcInfoApplX | Type | Min | Max |
| Arguments Passed | ApplIdx_Cnt_T_u08 | uint8 | 0 | 255 |
| NtcInfoIdx_Cnt_T_u08 | uint8 | 0 | 255 | |
| *NtcInfoPtr_Cnt_T_rec | NtcInfoRec4 | See DT def | See DT def | |
| Return Value | ApplIDValid_Cnt_T_logl | boolean | FALSE | TRUE |
Design Rationale
The function is a switch case that calls the GetNtcInfo of correct application to modify the value of NtcInfo at the address passed as an argument. It should be used in Non-RTE context only.
Local Function #4
| Function Name | GetNtcInfoApplXRte | Type | Min | Max |
| Arguments Passed | ApplIdx_Cnt_T_u08 | uint8 | 0 | 255 |
| NtcInfoIdx_Cnt_T_u08 | uint8 | 0 | 255 | |
| *NtcInfoPtr_Cnt_T_rec | NtcInfoRec4 | See DT def | See DT def | |
| Return Value | ApplIDValid_Cnt_T_logl | boolean | FALSE | TRUE |
Design Rationale
The function is a switch case that calls the GetNtcInfo of correct application to modify the value of NtcInfo at the address passed as an argument. It should be used in RTE context only.
Local Function #5
| Function Name | UpdDtcSts | Type | Min | Max |
| Arguments Passed | NtcMapIdx_Cnt_T_u16 | Uint16 | 0 | 511 |
| NtcInfoRecSts_Cnt_T_u08 | uint8 | 0 | 255 | |
| DtctempIdx_Cnt_T_u08 | Uint8 | 0 | TOTNROFDTC_CNT_U08? | |
| * DtcIdxCurrSts_Cnt_T_u08 | Uint | 0 | 255 | |
| Return Value | None | N/A | N/A | N/A |
? – This is a configurable constant.
Design Rationale
Implement "Update DTC Status" subblock from Per2 in the FDD. Note that it is called inside a while loop. Created for complexity metrics compliance with design and coding standards.
Local Function #6
| Function Name | ProcNtcStsPassd | Type | Min | Max |
| Arguments Passed | NtcNr_Cnt_T_enum | NtcNr1 | 1 | 511 |
| *NtcInfo_Cnt_T_rec | NtcInfoRec4 | See DT def | See DT def | |
| *NtcInfoDebCntr_Cnt_T_s16 | Sint16 | -32768 | 32767 | |
| Return Value | None | N/A | N/A | N/A |
Design Rationale
Implements 'NTCSTS_PASSD' inside SetNtcStsCore block of the DiagcMgr simulink model in the FDD. Created to reduce the cyclomatic complexity of SetNtcStsCore_Oper() server runnable.
Local Function #7
| Function Name | ProcNtcStsPrePassd | Type | Min | Max |
| Arguments Passed | NtcNr_Cnt_T_enum | NtcNr1 | 1 | 511 |
| DebStep_Cnt_T_u16 | Uint16 | 0 | 65535 | |
| *NtcInfo_Cnt_T_rec | NtcInfoRec4 | See DT def | See DT def | |
| *NtcInfoDebCntr_Cnt_T_s16 | Sint16 | -32768 | 32767 | |
| Return Value | None | N/A | N/A | N/A |
Design Rationale
Implements 'NTCSTS_PREPASSD' inside SetNtcStsCore block of the DiagcMgr simulink model in the FDD. Created to reduce the cyclomatic complexity of SetNtcStsCore_Oper() server runnable.
Local Function #8
| Function Name | ChkAgiCntr | Type | Min | Max |
| Arguments Passed | AgiCntr_Cnt_T_u08 | uint8 | 0 | 255 |
| Sts_Cnt_T_u08 | uint8 | 0 | 255 | |
| NtcMapIdx_Cnt_T_u16 | uint16 | 0 | 511 | |
| *NtcFltAryIdx_Cnt_T_u16 | uint16 | 0 | 20 | |
| *HistFltAryIdx_Cnt_T_u16 | uint16 | 0 | 20 | |
| HistNtcFltAry_T_rec | NtcFltInfoRec2 | - | - | |
| HistNtcFltAry_T_rec.NtcNr | NtcNrWithResd1 | 0 | 511 | |
| HistNtcFltAry_T_rec.AgiCntr | uint8 | 0 | 255 | |
| HistNtcFltAry_T_rec.Sts | uint8 | 0 | 255 | |
| Return Value | None | N/A | N/A | N/A |
Design Rationale
Implements the 'Check Aging Counter' in DiagcMgrPwr block of DiagcMgr simulink model in FDD. Created to reduce the static path count of DiagMgrPwrDwn() server runnable.
GLObAL Function/Macro Definitions
All the global functions described below are declared in DiagcMgr_private.h and are intended to be used only by DiagcMgr and the DiagcMgrProxyApplX components. These functions exist in “DiagcMgr_private.c” file.
GLObAL Function #1
| Function Name | ProcProxyRampRespAndDiagcSts | Type | Min | Max |
| Arguments Passed | NtcNr_Cnt_T_u16 | uint16 | 0 | 511 |
| ProxyDiagcData_T_rec | DiagcDataRec2 | |||
| ProxyDiagcData_T_rec .DiagcSts | 0 | 255 | ||
| ProxyDiagcData_T_rec .ActvRampRate | 0.1 | 500 | ||
| ProxyDiagcData_T_rec ActvMotTqCmdSca | 0 | 1 | ||
| Return Value | N/A |
Description
Refer ‘ProcessRampResponse and DiagcSts’ block in Simulink path ” ES101A_DiagcMgrProxyX/DiagcMgrProxyApplX/DiagcMgrProxyApplXPer1/Update the DiagcSts/For Number of NTCs/Update DiagcSts and Ramp Response/Update Latest Values/ProcessRampResponse”
GLObAL Function #2
| Function Name | DiagcMgrSetBits_u16 | Type | Min | Max |
| Arguments Passed | Data | uint16 | 0 | 511 |
| BitMask | Uint16 | 0 | 511 | |
| Return Value | Data | Uint16 | 0 | 511 |
Description
This function will set bits based on the passed BitMask for a uint16 datatype.
GLObAL Function #3
| Function Name | DiagcMgrSetBits_u08 | Type | Min | Max |
| Arguments Passed | Data | Uint8 | 0 | 255 |
| BitMask | Uint8 | 0 | 255 | |
| Return Value | Data | Uint8 | 0 | 255 |
Description
This function will set bits based on the passed BitMask for a uint8 datatype
GLObAL Function #4
| Function Name | DiagcMgrClrBits_u08 | Type | Min | Max |
| Arguments Passed | Data | Uint8 | 0 | 255 |
| BitMask | Uint8 | 0 | 255 | |
| Return Value | Data | Uint8 | 0 | 255 |
Description
This function will clear bits based on the passed BitMask for a uint8 datatype
GLObAL Function #5
| Function Name | DiagcMgrReadBit_u08 | Type | Min | Max |
| Arguments Passed | Data | Uint8 | 0 | 255 |
| BitMask | Uint8 | 0 | 255 | |
| Return Value | Data | Uint8 | 0 | 255 |
Description
This function will return TRUE if any bits are set based on the passed BitMask for a uint8 datatype
GLObAL Function #6
| Function Name | DiagcMgrReadBit_u16 | Type | Min | Max |
| Arguments Passed | Data | uint16 | 0 | 511 |
| BitMask | Uint16 | 0 | 511 | |
| Return Value | Data | Uint16 | 0 | 511 |
Description
This function will return TRUE if any bits are set based on the passed BitMask for a uint16 datatype
TRANSIENT FUNCTIONS
None
Known Limitations With Design
Per the FDD author, safety critical data is protected in an exclusive area but there is a possibility of corruption of non critical data.
Refer to Design Rationale section on the top level of DiagcMgr Simulink model.
GetErrorStatus() for NVM block isnt used in the FDD because
Default block is used that resets appln crc to zero, so the latch counter array will get reset as it will enter the condition swapplcrc!=nvmapplcrc
Above point assumed that a valid swapplncrc will never be zero
It is known and noted that if there is an nvm read problem while ntcs are set we clear the ntcs as well
This design does not support having multiple Flash application CRC regions being allowed to set latching ntcs [Note: As of today, no programs have more than 1 Flash application crc region]
DiagcMgr_Cfg.c and DiagcMgr_Cfg.h files define the NTC arrays as uint16 (base type of NtcNrwithResd1) arrays instead of the NtcNrResd1 type arrays because they do not have visibility to Rte types. [Not actually a design limitation : noted here for future reference]
In v3.0.0 of the implementation it was found that the DiagcMgr_Cfg_Private.h file was being included in the integration project’s Rte_UserTypes.h file because of the need for visibility to the Ary Types that are defined as typedefs in there. At that point it was decided that it was better to rename it as DiagcMgr_Cfg.h file instead. [Not actually a design limitation : noted here for future reference]
UNIT TEST CONSIDERATION
For SetNtcStsCore_Oper: The input value of the lower 8 bits of each element of PrmDiagcMgrFltResp_u16 calibration while unit testing this runnable should be such that its maximum is [sizeof(DTCENAMASK)-1] and minimum is 0.
Appendix
None