This is the multi-page printable view of this section. Click here to print.
Component Implementation
1 - DiagcMgr Review
Overview
Summary SheetSynergy Project
DiagcMgr
PolySpace
Sheet 1: Summary Sheet

Sheet 2: Synergy Project
Sheet 3: DiagcMgr
Rev 1.2 | 8-Jun-15 | |||||||||||||||||||||||
Peer Review Meeting Log (Source Code Review) | ||||||||||||||||||||||||
Source File Name: | DiagcMgr.c | Source File Revision: | 14 | |||||||||||||||||||||
Header File Name: | StaticType.h | Header File Revision: | ||||||||||||||||||||||
Header File Name: | Private.h | Header File Revision: | ||||||||||||||||||||||
Header File Name: | Header File Revision: | |||||||||||||||||||||||
Header File Name: | Header File Revision: | |||||||||||||||||||||||
MDD Name: | DiagcMgr_MDD.doc | Revision: | 6 | |||||||||||||||||||||
FDD/SCIR/DSR/FDR/CM Name: | ES101_DiagcMgr_Design | Revision: | 4.4.0 | |||||||||||||||||||||
Quality Check Items: | ||||||||||||||||||||||||
Rationale is required for all answers of No | ||||||||||||||||||||||||
Working EA4 Software Naming Convention followed: | ||||||||||||||||||||||||
for variable names | N/A | Comments: | ||||||||||||||||||||||
for constant names | N/A | Comments: | ||||||||||||||||||||||
for function names | N/A | Comments: | ||||||||||||||||||||||
for other names (component, memory | N/A | Comments: | ||||||||||||||||||||||
mapping handles, typedefs, etc.) | ||||||||||||||||||||||||
All paths assign a value to outputs, ensuring | Yes | Comments: | ||||||||||||||||||||||
all outputs are initialized prior to being written | ||||||||||||||||||||||||
Requirements Tracability tags in code match the requirements tracability in the FDD | N/A | Comments: | ||||||||||||||||||||||
requirements tracability in the FDD | ||||||||||||||||||||||||
All variables are declared at the function level. | N/A | Comments: | ||||||||||||||||||||||
Synergy version matches change history | Yes | Comments: | ||||||||||||||||||||||
and Version Control version in file comment block | ||||||||||||||||||||||||
Change log contains detailed description of changes | Yes | Comments: | ||||||||||||||||||||||
and Work CR number | ||||||||||||||||||||||||
Code accurately implements FDD (Document or Model) | Yes | Comments: | ||||||||||||||||||||||
Verified no Compiler Errors or Warnings | Yes | Comments: | ||||||||||||||||||||||
Component.h is included | Yes | Comments: | ||||||||||||||||||||||
All other includes are actually needed. (System includes | Yes | Comments: | ||||||||||||||||||||||
only allowed in Nexteer library components) | ||||||||||||||||||||||||
Software Design and Coding Standards followed: | Version:2.1 | |||||||||||||||||||||||
Code comments are clear, correct, and adequate | Yes | Comments: | ||||||||||||||||||||||
and have been updated for the change: [N40] and | ||||||||||||||||||||||||
all other rules in the same section as rule [N40], | ||||||||||||||||||||||||
plus [N75], [N12], [N23], [N33], [N37], [N38], | ||||||||||||||||||||||||
[N48], [N54], [N77], [N79], [N72] | ||||||||||||||||||||||||
Source file (.c and .h) comment blocks are per | Yes | Comments: | ||||||||||||||||||||||
standards and contain correct information: [N41], [N42] | ||||||||||||||||||||||||
Function comment blocks are per standards and | N/A | Comments: | ||||||||||||||||||||||
contain correct information: [N43] | ||||||||||||||||||||||||
Code formatting (indentation, placement of | Yes | Comments: | ||||||||||||||||||||||
braces, etc.) is per standards: [N5], [N55], [N56], | ||||||||||||||||||||||||
[N57], [N58], [N59] | ||||||||||||||||||||||||
Embedded constants used per standards; no | Yes | Comments: | ||||||||||||||||||||||
"magic numbers": [N12] | ||||||||||||||||||||||||
Memory mapping for non-RTE code | N/A | Comments: | ||||||||||||||||||||||
is per standard | ||||||||||||||||||||||||
All execution-order-dependent code can be | N/A | Comments: | ||||||||||||||||||||||
recognized by the compiler: [N80] | ||||||||||||||||||||||||
All loops have termination conditions that ensure | N/A | Comments: | ||||||||||||||||||||||
finite loop iterations: [N63] | ||||||||||||||||||||||||
All divides protect against divide by zero | N/A | Comments: | ||||||||||||||||||||||
if needed: [N65] | ||||||||||||||||||||||||
All integer division and modulus operations | N/A | Comments: | ||||||||||||||||||||||
handle negative numbers correctly: [N76] | ||||||||||||||||||||||||
All typecasting and fixed point arithmetic, | N/A | Comments: | ||||||||||||||||||||||
including all use of fixed point macros and | ||||||||||||||||||||||||
timer functions, is correct and has no possibility | ||||||||||||||||||||||||
of unintended overflow or underflow: [N66] | ||||||||||||||||||||||||
All float-to-unsiged conversions ensure the. | N/A | Comments: | ||||||||||||||||||||||
float value is non-negative: [N67] | ||||||||||||||||||||||||
All conversions between signed and unsigned | N/A | Comments: | ||||||||||||||||||||||
types handle msb==1 as intended: [N78] | ||||||||||||||||||||||||
All pointer dereferencing protects against | N/A | Comments: | ||||||||||||||||||||||
null pointer if needed: [N70] | ||||||||||||||||||||||||
Component outputs are limited to the legal range | N/A | Comments: | ||||||||||||||||||||||
defined in the FDD DataDict.m file : [N53] | ||||||||||||||||||||||||
All code is mapped with FDD (all FDD | Yes | Comments: | ||||||||||||||||||||||
subfunctions and/or model blocks identified | ||||||||||||||||||||||||
with code comments; all code corresponds to | ||||||||||||||||||||||||
some FDD subfunction and/or model block): [N40] | ||||||||||||||||||||||||
Review did not identify violations of other | Yes | Comments: | ||||||||||||||||||||||
coding standard rules | ||||||||||||||||||||||||
Anomaly or Design Work CR created | N/A | Comments: List Anomaly or CR numbers | ||||||||||||||||||||||
for any FDD corrections needed | ||||||||||||||||||||||||
General Notes / Comments: | ||||||||||||||||||||||||
Change Owner: | Spandana Balani | Review Date : | 10/05/16 | |||||||||||||||||||||
Lead Peer Reviewer: | Avinash James | Approved by Reviewer(s): | Yes | |||||||||||||||||||||
Other Reviewer(s): | ||||||||||||||||||||||||
Sheet 4: PolySpace
2 - DiagcMgr_IntegrationManual
Integration Manual
For
Diagnostic Manager
VERSION: 4.0
DATE: 22-JUN-2016
Prepared By:
Software Group,
Nexteer Automotive,
Saginaw, MI, USA
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
Sl. No. | Description | Author | Version | Date |
1 | Initial version | Spandana Balani | 1.0 | 23-Apr-2015 |
2 | Updated to FDD version 2 | Spandana Balani | 2.0 | 11-Mar-2016 |
3 | Updated to FDD version 3 | Spandana balani | 3.0 | 22-APR-2016 |
4 | Updated to FDD version 4 | Spandana balani | 4.0 | 22-Jun-2016 |
Table of Contents
3.2 Global Functions(Non RTE) to be provided to Integration Project 6
4 Configuration REQUIREMeNTS 7
4.2 Configuration Files to be provided by Integration Project 7
4.3 Da Vinci Parameter Configuration Changes 7
4.4 DaVinci Interrupt Configuration Changes 8
4.5 Manual Configuration Changes 8
5 Integration DATAFLOW REQUIREMENTS 9
5.1 Required Global Data Inputs 9
5.2 Required Global Data Outputs 9
5.3 Specific Include Path present 9
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
Sr. No. | Title | Version |
<1> | <MDD Guidelines> | Process 04.02.01 |
<2> | <Software Naming Conventions> | Process 04.02.01 |
<3> | <Coding standards> | Process 04.02.01 |
<4> | FDD – ES101A Diagnostic Manager | See Synergy Subproject version |
<Add if more available> |
Dependencies
SWCs
Module | Required Feature |
None | N/A |
Note : Referencing the external components should be avoided in most cases. Only in unavoidable circumstance external components should be referred. Developer should track the references.
Global Functions(Non RTE) to be provided to Integration Project
DiagcMgrPwrDwn() –Non RTE Server Runnable, called from BswM. It copies the appropriate information for upto 20 NTCs from Application NtcInfoArys and stores it to Nvm PIM. And, calls "SetRamBlockSts".
RestoreNtcFltAryDft() , RestoreSnpshtAryDft() – Non RTE Server Runnables, called from Nvm Manager if the Nvm Data is corrupted.
Configuration REQUIREMeNTS
Only proxies components that have active NTCs should be brought into developer worksace. Stub needs to be integrated for connection to the core's client ports for all the un-implemented applications. Proper .gpj fles needs to be selected for inclusion in the project’s .gpj file.
The Integrator must configure one and only one “/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn” for configured DTC in the DEM
Build Time Config.
Modules | Notes | |
None |
Configuration Files to be provided by Integration Project
DiagcMgr_Cfg.h
DiagcMgr_Cfg.c
Note: Include “DiagcMgr_Cfg.h” in the “Rte_UserTypes.h” header file
Da Vinci Parameter Configuration Changes
Parameter | Notes | SWC |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr | Configuration of the DiagcMgr module | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR | Container with NTC number properties | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/NTCOsApplicationRef | NTC Os Application. This defines the application corresponding to a particular NTC | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/Debounce | Set to true if NTC is type debounce | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn | Container with DTC ENABLE Criteria | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/DTC | This defines the DEM DTC Class. | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/Bit_X1 | Set to true if Enable Condition for Bit X1 is applicable to configured DTC | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/DiagcMgrDTCIdx | Value represents index value DiagcMgr uses internally for NTC mapping to DTCs to the Event ID that the Dem identifies for a particular DTC | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DiagcMgrGeneral | Container with General DiagcMgr configuration | DiagcMgr |
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DiagcMgrGeneral/DIAGCMGR_DEMCHK | Set to true to enable DET consistency check between DEM and DiagcMgr DTC configuration. This check assumes the Dem will generate the constant table named” Dem_C_DtcTable” that will be sized to the configured DTCs + 1. If this assumption is not true, turn this parameter OFF. | DiagcMgr |
1 Note: X = _0 to 15
DaVinci Interrupt Configuration Changes
ISR Name | VIM # | Priority Dependency | Notes |
N/A |
Manual Configuration Changes
Constant | Notes | SWC |
N/A |
Integration DATAFLOW REQUIREMENTS
Required Global Data Inputs
Refer DataDict.m file
Required Global Data Outputs
Refer DataDict.m file
Specific Include Path present
Yes
Runnable Scheduling
This section specifies the required runnable scheduling.
Init | Scheduling Requirements | Trigger |
DiagcMgProxyApplXInit1 | Init function needs to run before any other init function that is trying to set an NTC and it therefore should be called early on in the initialization tasks. | Rte_Init |
Runnable | Scheduling Requirements | Trigger |
DiagcMgrPer1 | None | RTE 2ms Task |
DiagcMgrPer2 | None | RTE 100ms Task |
ClrAllDiagc_Oper | Server Runnable | Client Call |
ClrSnpshtData_Oper | Server Runnable | Client Call |
DiagcMgrIninCore_Oper | Server Runnable | Internal to DiagcMgr2 |
GetNtcActvCore_Oper | Server Runnable | Internal to DiagcMgr2 |
GetNtcQlfrStsCore_Oper | Server Runnable | Internal to DiagcMgr2 |
GetNtcStsCore_Oper | Server Runnable | Internal to DiagcMgr2 |
ReadNtcFltAryCore_Oper | Server Runnable | Client Call |
ReadNtcInfoAndDebCntr_Oper | Server Runnable | Client Call |
ReadSnpshtData_Oper | Server Runnable | Client Call |
SetNtcStsCore_Oper | Server Runnable | Internal to DiagcMgr2 |
DiagcMgrPwrDwn | Non RTE Server Runnable | Client Call |
RestoreNtcFltAryDft | Non RTE Server Runnable | Client Call |
RestoreSnpshtAryDft | Non RTE Server Runnable | Client Call |
DiagcMgrProxyApplXInit11 | On Init | RTE Init |
DiagcMgrProxyApplXPer11 | None | RTE 10ms Task |
GetDiagcDataApplX_Oper1 | Server Runnable | Internal to DiagcMgr2 |
GetNtcActvX_Oper1,3 | Server Runnable | Client Call |
GetNtcDebCntrAppl0_Oper1 | Server Runnable | Client Call |
GetNtcInfoApplX_Oper1 | Server Runnable | Internal to DiagcMgr2 |
GetNtcQlfrStsX_Oper1,3 | Server Runnable | Client Call |
GetNtcStsX_Oper1,3 | Server Runnable | Client Call |
SetNtcStsX_Oper1,3 | Server Runnable | Client Call |
UpdDtcEnaCdn4 | Non RTE Server Runnable | Client Call |
Note: 1 – X in the Runnable name represent the application number. There 11 applications varying from 0 to 10 and each application has a ProxyDiagcMgr component. One set of all these server runnables exist in each proxy component.
2 – Runnables with trigger ‘Internal to DiagcMgr’ are local to DiagcMgr main component and 11 proxy components, other components will not have access to these functions. Whenever a component inside an application calls one of the server runnables, the ProxyDiagcMgr of that application will make a client call to the DiagcMgr main component.
3 – These Server Runnables must be defined with “can be invoked concurrently” enabled in Developer.
4 – This function is assumed to be called by bswm providing periodic updates of DTC enable condition.
DTC enable conditions should be defined by the fault code requirement.
Memory Map REQUIREMENTS
Mapping
Memory Section | Contents | Notes |
< Memory mapping Info>* | ||
* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.
Usage
Feature | RAM | ROM |
<Memmap usuage info> |
Table 1: ARM Cortex R4 Memory Usage
NvM Blocks
*See DataDict.m
This component assumes that the integrator will keep the default NvM block name and the Block ID name will be "NvMConf_NvMBlockDescriptor_Rte_NvmBlock_DiagcMgr_DiagcMgrNtcFltAry”.
Compiler Settings
Preprocessor MACRO
None
Optimization Settings
None
Appendix
<This section is for appendix>
3 - DiagcMgr_MDD
Module Design Document
For
Diagnostic Manager
VERSION: 5.0
DATE: 26-SEP-2016
Prepared By:
Spandana Balani
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
Sl. No. | Description | Author | Version | Date |
1 | Initial Version | SB | 1.0 | 23-Apr-2015 |
2 | Added to Design Limitations section | KMC | 2.0 | 03-Jun-2015 |
3 | ES101A_DiagcMgr_Design version 2 implementation | SB | 3.0 | 11-Mar-2016 |
4 | ES101A_DiagcMgr_Design version 3 implementation | SB | 4.0 | 19-Apr-2016 |
5 | ES101A_DiagcMgr_Design version 4 implementation | SB | 5.0 | 22-Jun-2016 |
6 | Added DETs to “SetNtcStsCore_Oper” server runnables | SB | 6.0 | 26-Sep-2016 |
Table of Contents
3 DiagcMgr & High-Level Description 8
4 Design details of software module 9
4.1 Graphical representation of Diagcmgr 9
5.1 User defined typedef definition/declaration 11
5.2 Variable definition for enumerated types 11
6.1 Program(fixed) Constants 12
6.1.2 Module specific Lookup Tables Constants 12
7 Software Module Implementation 13
7.1.1 Initialization Functions 13
7.1.2.1.2 Store Module Inputs to Local copies 13
7.1.2.1.3 (Processing of function)……… 13
7.1.2.1.4 Store Local copy of outputs into Module Outputs 13
7.1.2.2.2 Store Module Inputs to Local copies 15
7.1.2.2.3 (Processing of function)……… 15
7.1.2.2.4 Store Local copy of outputs into Module Outputs 15
7.1.4 Server Runnable Functions 16
7.1.4.3 DiagcMgrIninCore_Oper 16
7.1.4.6 GetNtcActvCORE_Oper 19
7.1.4.7 GetNtcQlfrStsCORE_Oper 19
7.1.4.10 ReadNtcInfoAndDebCntr_Oper 19
7.1.4.10.1 Design Rationale 19
7.1.4.11 ReadSnpshtData_Oper 19
7.1.4.12 SetNtcStsCORE_Oper 19
7.1.4.13 RestoreNtcFltAryDft 19
7.1.4.14 RestoreSnpshtAryDft 20
7.1.5 Local Function/Macro Definitions 20
7.1.6 GLObAL Function/Macro Definitions 20
7.1.6.10 GLObAL Function #7 22
7.1.6.12 GLObAL Function #8 22
8 Known Limitations With Design 23
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
Sr. No. | Title | Version |
<1> | <MDD Guidelines> | Process 04.02.01 |
<2> | <Software Naming Conventions> | Process 04.02.01 |
<3> | <Coding standards> | Process 04.02.01 |
<4> | FDD – ES101A Diagnostic Manager | See Synergy Subproject version |
<Add if more available> |
DiagcMgr & High-Level Description
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 | |
NtcInfoRec4 | NtcStInfo | Uint8 | ||
Sts | Uint8 | |||
AgiCntr | Uint8 | |||
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 |
Constant Data Dictionary
Program(fixed) Constants
Embedded Constants
< All program specific constants will be defined in detail >
Local
Constant Name | Resolution | Units | Value |
See DataDict.m file | |||
IMDTSHTDWNFLT_CNT_U32 | 1 | Counts | 13 |
CTRLDSHTDWNFLT_CNT_U32 | 1 | Counts | 14 |
INFOONLYFLT_CNT_U32 | 1 | Counts | 15 |
TOTNROFDTC_CNT_U084 | 1 | Counts | Configured |
4 - Number of DTCs for that program.
Global
<This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application>
Constant Name |
See DataDict.m file |
Module specific Lookup Tables Constants
<(This is for lookup tables (arrays) with fixed values, same name as other tables)>
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[13] | Single Precision Float | {0.1F,0.125F,0.1428F,0.1667F,0.2F,0.25F,0.333F,0.5F,1.0F,2.0F,3.333F,10.0F,500.0F} | 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.
Software Module Implementation
Sub-Module Functions
None
Initialization Functions
None
PERIODIC FUNCTIONS
(Note: For multiple periodic functions, insert new headers at the “Header 2” level – subset of “7.1.2 Periodic Functions” and follow the same sub-section design shown below). If none required, place the text “None”)>
Per: diagcmgrPer1
This function exists in “DiagcMgr.c” file.
Design Rationale
“Rte_Call_GetDiagcDataApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg_private.h
Store Module Inputs to Local copies
Refer to FDD
(Processing of function)………
Refer to FDD
Store Local copy of outputs into Module Outputs
Refer to FDD
Per: diagcmgrPer2
This function exists in “DiagcMgr.c” file.
Design Rationale
“Rte_Call_GetDiagcDataApplX_Oper” for each application(X) is called based on conditional compile using constants generated in DiagcMgr_Cfg_private.h
Store Module Inputs to Local copies
Refer to FDD
(Processing of function)………
Refer to FDD
Store Local copy of outputs into Module Outputs
Refer to FDD
Interrupt Functions
None
Server Runnable Functions
(Note: For multiple periodic functions, insert new headers at the “Header 2” level – subset of “7.1.2 Periodic Functions” and follow the same sub-section design shown below). If none required, place the text “None”)>
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.
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_private.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_private.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_private.h
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_private.h
ReadSnpshtData_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.
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
<If these are numerous and defined in a separate source file then reference the source file only.>
Local Function #1
Function Name | ProcRampResp | Type | Min | Max |
Arguments Passed | NtcNr_Cnt_T_u16 | uint16 | 0 | 511 |
DiagcData_T_rec | DiagcDataRec1 | 0 | 65535 | |
ProxySetNtcData_T_rec | DiagcDataRec1 | 0 | 65535 | |
Return Value | N/A |
Description
Refer ‘ProcessRampResponse and DiagcSts’ block in Simulink model
This function exists in “DiagcMgr.c” file.
Local Function #2
Function Name | UpdSnpshtData | Type | Min | Max |
Arguments Passed | RegInBRAMDAT1_Cnt_T_u32 | uint32 | 0 | 4294967295 |
HwTq_Cnt_T_s5p10 | sint16 | -10 | 10 | |
MotTqCmdMrfScad_Cnt_T_s5p10 | sint16 | -8.8 | 8.8 | |
IgnCntr_Cnt_T_u32 | uint32 | 0 | 4294967295 | |
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 | |
VehSpd_Cnt_T_u9p7 | Uint16 | 0 | 511 | |
Return Value | N/A |
Description
Refer ‘UpdSnpshtData’ block in Simulink model
This function exists in “DiagcMgr.c” file
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 | ProcessDiagSts | Type | Min | Max |
Arguments Passed | FltRsp_Cnt_T_u32 | uint32 | 0 | 4294967295 |
DiagStsX_Cnt_T_u16 | uint16 | 0 | 65535 | |
Return Value | N/A |
Description
Refer to “ES101A_DiagcMgr/DiagcMgr/SetNtcStsCore/NtcNr is Valid/Diagnostics Not Inhibited/NtcEnabled/NTCSTS_PREFAILD/Update NtcInfoSts, DebCntr and Process RampRate/DebCntr = MAXDEBCNTRVAL_CNT_S16/ProcessRampResponse and DiagcSts/ControlledShutdown Fault/ProcessDiagcSts” Simulink path in the FDD.
GLObAL Function #2
Function Name | ProcProxyRampResp | Type | Min | Max |
Arguments Passed | NtcNr_Cnt_T_u16 | uint16 | 0 | 511 |
ProxyDiagcData_T_rec | DiagcDataRec1 | 0 | 65535 | |
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 #3
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 #4
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 #5
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 #6
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 #7
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
GLObAL Function #8
Function Name | DiagcMgrReadBit_u32 | Type | Min | Max |
Arguments Passed | Data | uint16 | 0 | 511 |
BitMask | Uint16 | 0 | 65535 | |
Return Value | Data | Uint16 | 0 |
Description
This function will return TRUE if any bits are set based on the passed BitMask for a uint32 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.
UNIT TEST CONSIDERATION
Config files in the contract folder are for a test project with sample configurations using Application 6 and Application 10. Therefore with this configuration, the following files cannot be tested – DiagcMgrProxyAppl0, DiagcMgrProxyAppl1, DiagcMgrProxyAppl2, DiagcMgrProxyAppl3, DiagcMgrProxyAppl4, DiagcMgrProxyAppl5, DiagcMgrProxyAppl7, DiagcMgrProxyAppl8, DiagcMgrProxyAppl9.
Appendix
None
4 - DiagcMgrProxy_MDD
Module Design Document
For
Diagnostic Manager Proxy
VERSION: 2.0
DATE: 22-JUN-2016
Prepared By:
Spandana Balani
Location: The official version of this document is stored in the Nexteer Configuration Management System.
Revision History
Sl. No. | Description | Author | Version | Date |
1 | ES101A_DiagcMgr_Design version 2 implementation | SB | 1.0 | 11-Mar-2016 |
2 | ES101A_DiagcMgr_Design version 4 implementation | SB | 2.0 | 22-Jun-2016 |
Table of Contents
3 DiagcMgrPROXYAPPLX & High-Level Description 7
4 Design details of software module 8
4.1 Graphical representation of DiagcmgrPRoxyApplX 8
5.1 User defined typedef definition/declaration 9
5.2 Variable definition for enumerated types 9
6.1 Program(fixed) Constants 10
6.1.2 Module specific Lookup Tables Constants 10
7 Software Module Implementation 11
7.1.1 Initialization Functions 11
7.1.1.1 INIT: DiagcMgrPROXYAPPLXInit1 11
7.1.1.3 Store Module Inputs to Local copies 11
7.1.1.4 (Processing of function)……… 11
7.1.1.5 Store Local copy of outputs into Module Outputs 11
7.1.2.1 Per: diagcmgrPROXYAPPLXPer1 11
7.1.2.3 Store Module Inputs to Local copies 11
7.1.2.4 (Processing of function)……… 11
7.1.2.5 Store Local copy of outputs into Module Outputs 11
7.1.4 Server Runnable Functions 12
7.1.4.1 GetDiagcDataApplX_Oper 12
7.1.4.3 GetNtcDebCntrAppl0_Oper 12
7.1.4.4 GetNtcInfoApplX_Oper 12
7.1.4.5 GetNtcQlfrStsX_Oper 12
7.1.5 Local Function/Macro Definitions 14
8 Known Limitations With Design 15
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
Sr. No. | Title | Version |
<1> | <MDD Guidelines> | Process 04.02.01 |
<2> | <Software Naming Conventions> | Process 04.02.01 |
<3> | <Coding standards> | Process 04.02.01 |
<4> | FDD – ES101A Diagnostic Manager | See Synergy Subproject version |
<Add if more available> |
DiagcMgrPROXYAPPLX & High-Level Description
There are 11 proxy components whose design is same but the name of the components is based on the application number. ApplX is used through out the document in place of application number.
Design details of software module
Graphical representation of DiagcmgrPRoxyApplX
Graphical representation below is for the application 6 proxy component.
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) |
Refer DiagcMgr_MDD |
Variable definition for enumerated types
Enum Name | Element Name | Value |
N/A |
Constant Data Dictionary
Program(fixed) Constants
Embedded Constants
< All program specific constants will be defined in detail >
Local
Constant Name | Resolution | Units | Value |
See DataDict.m file | |||
Refer DiagcMgr_MDD |
Global
<This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application>
Constant Name |
See DataDict.m file |
Module specific Lookup Tables Constants
<(This is for lookup tables (arrays) with fixed values, same name as other tables)>
Constant Name | Resolution | Value | Software Segment |
Refer DiagcMgr_MDD |
Software Module Implementation
Sub-Module Functions
None
Initialization Functions
INIT: DiagcMgrPROXYAPPLXInit1
Design Rationale
Store Module Inputs to Local copies
Refer to FDD
(Processing of function)………
Refer to FDD
Store Local copy of outputs into Module Outputs
Refer to FDD
PERIODIC FUNCTIONS
(Note: For multiple periodic functions, insert new headers at the “Header 2” level – subset of “7.1.2 Periodic Functions” and follow the same sub-section design shown below). If none required, place the text “None”)>
Per: diagcmgrPROXYAPPLXPer1
Design Rationale
Store Module Inputs to Local copies
Refer to FDD
(Processing of function)………
Refer to FDD
Store Local copy of outputs into Module Outputs
Refer to FDD
Interrupt Functions
None
Server Runnable Functions
(Note: For multiple periodic functions, insert new headers at the “Header 2” level – subset of “7.1.2 Periodic Functions” and follow the same sub-section design shown below). If none required, place the text “None”)>
GetDiagcDataApplX_Oper
See DataDict.m file and model for detailed description.
GetNtcActvX_Oper
See DataDict.m file and model for detailed description.
X in the flowchart will change based on the proxy application number.
ErrorID ‘0’ is ensuring if NtcNr is within the valid range.
ErrorID ‘1’ is ensuring if ApplIdx is valid.
GetNtcDebCntrAppl0_Oper
See DataDict.m file and model for detailed description.
GetNtcInfoApplX_Oper
See DataDict.m file and model for detailed description.
GetNtcQlfrStsX_Oper
See DataDict.m file and model for detailed description.
X in the flowchart will change based on the proxy application number.
ErrorID ‘0’ is ensuring if NtcNr is within the valid range.
ErrorID ‘1’ is ensuring if ApplIdx is valid.
GetNtcStsX_Oper
See DataDict.m file and model for detailed description.
X in the flowchart will change based on the proxy application number.
ErrorID ‘0’ is ensuring if NtcNr is within the valid range.
ErrorID ‘1’ is ensuring if ApplIdx is valid.
SetNtcStsX_Oper
See DataDict.m file and model for detailed description.
X in the flowchart will change based on the proxy application number.
ErrorID ‘0’ is ensuring if NtcNr is within the valid range.
ErrorID ‘1’ is ensuring if ApplIdx is valid.
Local Function/Macro Definitions
Description
Proxies use functions from the private.c file, refer DiagcMgr MDD for function descriptions.
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 DiagcMgrProxy Simulink model.
UNIT TEST CONSIDERATION
Config files in the contract folder are for a test project with sample configurations using Application 6 and Application 10. Therefore with this configuration, the following files cannot be tested – DiagcMgrProxyAppl0, DiagcMgrProxyAppl1, DiagcMgrProxyAppl2, DiagcMgrProxyAppl3, DiagcMgrProxyAppl4, DiagcMgrProxyAppl5, DiagcMgrProxyAppl7, DiagcMgrProxyAppl8, DiagcMgrProxyAppl9.
Appendix
None