This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Component Implementation

Component Implementation

Component Documentation

1 - 2392.0_ADD_Nexteer_CBD_GMLAN_31_Mch_Renesas RH850 -CBD1400346.D01

Vector Addendum (draft)

2 - 2392.0_ADD_Nexteer_CBD_GMLAN_31_Mch_Renesas RH850 -CBD1400346.D01_ind

Page 1
Page 2
Page 3

3 - 2392.0_ADD_Nexteer_CBD_GMLAN_31_Mch_Renesas RH850 -CBD1400346.D01s

ADDENDUM TO
MASTER SOFTWARE LICENSE AGREEMENT 
Notice: This Addendum shall be deemed accepted regardless of signature pursuant to Section 7.1 of the Master Software License Agreement
between Vector CANtech, Inc. and Nexteer Automotive Corporation (Agreement") if not otherwise rejected along with the Licensed Software in
accordance with Section 7.2 of the Agreement.

0.1
Addendum Effective Date:
2016/04/29
0.2
Pursuant to and fully incorporated into the Vector CANtech, Inc. 
2009/11/01
Master Software License Agreement, dated:
0.3
License Serial Number
CBD1400346
1.0
GENERAL TERMS
APPLICABLE TO ALL  SOFTWARE LISTED IN ADDENDUM

1.1
Licensee (Licensee Division):
Nexteer Automotive Corporation
1.2
Sublicense Affiliate(s):
Not Applicable
1.3
Excluded Affiliates and/or Divisions:
Not Applicable
1.4
Sublicense Contractor(s):
All Licensee software engineering sub-contractors which are not affiliated with a competitor of
Vector
1.5
Excluded Contractors:
All contractors competitive with Vector, including but not limited to, the Elektrobit Group Plc, all
affiliates thereof (including 3SOFT), Mentor Graphics Corp. and all affiliates thereof (including
Volcano Communications Technologies AB, and Dearborn Group Inc.
1.6
License Term:
Perpetual
1.7
Geographical Restriction on License:
North America (the geographic restriction applies only to the "Point of Sale" location of the 
Licensee business entities that may enter into business agreements for the sale of products 
incorporating the Vector Licensed Software listed below. The geographic restriction does not 
restrict the location in which the Licensee or Licensee's contractors develop, and/or 
manufacture the Licensee's products.
1.8
Standard Warranty for Licensed Software:
Two (2) Years
1.9
Extended Warranty and Extended Warranty Fee:
Two (2) Years
1.10 Total Warranty Period for Licensed Software:
Four (4) Years
2.0
Identification of Protocol-Specific (CAN, LIN, Flexray, ect.) 
Multi Channel CAN Driver- High End
Embedded Software:
2.1
OEM Restriction:
No OEM Restriction
2.2
Licensed Application:
Restricted solely to the development of electronic modules manufactured by the Licensee.
2.3
Excluded Applications:
All applications not specified in Part 2.2 of this Addendum, including but in no way limited to:
network development and analysis tools for sale, aerospace, locomotive, medical, military and
earth moving applications, and for those safety-critical component applications, Licensee hereby
acknowledges, agrees, and assumes sole responsibility for the fact that Vector is unable to
assess and warrant the fitness of the Licensed Software for integration and use with the safety-
critical applications contemplated by Licensee; however, irrespective of such, Vector would be
willing (for an additional cost) to assess and consult on the Licensed Software for integration
and use with such applications without assuming any additional responsibility or liability
therefore.
2.4
General Microcontroller Family:
Renesas RH850 P1X
2.5
General Compiler Family:
Greenhills
2.6
Specific Microcontroller:
R7F701311
2.7
Specific Compiler Version:
2015.1.7
2.8
Applicable Specifications:
Vector User Manual supplied with the CAN-Specific Embedded Software, to the exclusion of all
other specifications, documents, previous or subsequent manual versions, and/or written or oral
communications.
2.9
Corresponding Software License Fee:
Included In Total Software Fee.
3.0
Identification of OEM-Specific Embedded Software:
GMLAN_3.1 Multi Channel-SIP
-GMLAN Interaction Layer Multi Channel
-GMLAN Network Management Multi Channel  
-GMLAN Transport Protocol Multi Channel 
- CANdesc (GM)
-GMLAN Gateway Diagnostics Add-on (GGDA)
-XCP-on-CAN

3.1
OEM Restriction:
Restricted solely to the following original equipment manufacturer (OEM): General Motors, LLC,
to the exclusion of all subsidiaries and affiliates of the same.
3.2
Licensed Application:
Restricted solely to the development and manufacturing of electronic modules for the
automotive industry, on GM product/vehicle applications, and for component application for
integration into those products manufactured by GM.
© 2016 Vector CANtech, Inc.
Page 1 of  3
CBD1400346_ PO#_UI129133

ADDENDUM TO
MASTER SOFTWARE LICENSE AGREEMENT 
3.3
Excluded Applications:
All applications not specified in Part 3.2 of this Addendum, including but in no way limited to:
network development and analysis tools for sale, aerospace, locomotive, medical, military and
earth moving applications, and for those safety-critical component applications, Licensee hereby
acknowledges, agrees, and assumes sole responsibility for the fact that Vector is unable to
assess and warrant the fitness of the Licensed Software for integration and use with the safety-
critical applications contemplated by Licensee; however, irrespective of such, Vector would be
willing (for an additional cost) to assess and consult on the Licensed Software for integration
and use with such applications without assuming any additional responsibility or liability
therefore.
3.4
General Microcontroller Family:
Renesas RH850 P1X
3.5
General Compiler Family:
Greenhills
3.6
Specific Microcontroller:
R7F701311
3.7
Specific Compiler Version:
2015.1.7
3.8
Applicable Specifications:
To the exclusion of all other specifications, documents, previous or subsequent GMLAN 
versions, and/or written or oral communications, the following specifications apply: 
Based on the following specifications:
GMW3104_Communication_Strategy_Specification_v1-5R03Final and ISO15765-2.2.

The CANdesc software component provides services according to the specification
ISO/DIS 15765-3 (Diagnostics on CAN) dated 1999-11-30. In addition the
diagnostics layer provides enhancements of application functions as specified
by GMW 3110 Version 1.6.

3.8
Applicable Specifications:
The CANdesc AddOn "GMLAN Extension Gateway" fulfills the requirements
(multi channel ECUs) of the GMW3110 V1.6 specification (s. chapter 6.3.4).

XCP-on-CAN: ASAM specification, version 1.0 and the XCP on CAN transport Layer for 
the Vector CAN Driver.

3.9
Corresponding Software License Fee:
Included In Total Software Fee.
4.0
Identification of Application-Specific Embedded Software:
Not Applicable
4.1
OEM Restriction:
Not Applicable
4.2
Licensed Application:
Not Applicable
4.3
Excluded Applications:
Not Applicable
4.4
General Microcontroller Family:
Not Applicable
4.5
General Compiler Family:
Not Applicable
4.6
Specific Microcontroller:
Not Applicable
4.7
Specific Compiler Version:
Not Applicable
4.8
Applicable Specifications:
Not Applicable
4.9
Corresponding Software License Fee:
Not Applicable
5.0
Identification of Flash-Specific Embedded Software:
Not Applicable
5.1
OEM Restriction:
Not Applicable
5.2
Licensed Application:
Not Applicable
5.3
Excluded Applications:
Not Applicable
5.4
General Microcontroller Family:
Not Applicable
5.5
General Compiler Family:
Not Applicable
5.6
Specific Microcontroller:
Not Applicable
5.7
Specific Compiler Version:
Not Applicable
5.8
Applicable Specifications:
Not Applicable
5.9
Corresponding Software License Fee:
Not Applicable
6.0
Identification of Generation Tool PC Software:
GMLAN Generation Tool
6.1
OEM Restriction:
Restricted solely to the following original equipment manufacturer (OEM): General Motors, LLC,
to the exclusion of all subsidiaries and affiliates of the same.
6.2
Licensed Application:
Restricted solely to the development and manufacturing of electronic modules for the
automotive industry, on GM product/vehicle applications, and for component application for
integration into those products manufactured by GM.
6.3
Excluded Applications:
All applications not specified in Part 6.2 of this Addendum, including but in no way limited to:
network development and analysis tools for sale, aerospace, locomotive, medical, military and
earth moving applications, and for those safety-critical component applications, Licensee hereby
acknowledges, agrees, and assumes sole responsibility for the fact that Vector is unable to
assess and warrant the fitness of the Licensed Software for integration and use with the safety-
critical applications contemplated by Licensee; however, irrespective of such, Vector would be
willing (for an additional cost) to assess and consult on the Licensed Software for integration
and use with such applications without assuming any additional responsibility or liability
therefore.
6.4
General Microcontroller Family:
Renesas RH850 P1X
© 2016 Vector CANtech, Inc.
Page 2 of  3
CBD1400346_ PO#_UI129133

ADDENDUM TO
MASTER SOFTWARE LICENSE AGREEMENT 
6.5
General Compiler Family:
Greenhills
6.6
Specific Microcontroller:
R7F701311
6.7
Specific Compiler Version:
2015.1.7
6.8
Applicable Specifications:
To the exclusion of all other specifications, documents, previous or subsequent GMLAN 
versions, and/or written or oral communications, the following specifications apply: 
Based on the following specifications:
GMW3104_Communication_Strategy_Specification_v1-5R03Final and ISO15765-2.2.

The CANdesc software component provides services according to the specification
ISO/DIS 15765-3 (Diagnostics on CAN) dated 1999-11-30. In addition the
diagnostics layer provides enhancements of application functions as specified
by GMW 3110 Version 1.6.

6.8
Applicable Specifications:
The CANdesc AddOn "GMLAN Extension Gateway" fulfills the requirements
(multi channel ECUs) of the GMW3110 V1.6 specification (s. chapter 6.3.4).

XCP-on-CAN: ASAM specification, version 1.0 and the XCP on CAN transport Layer for 
the Vector CAN Driver.

6.9
Corresponding Software License Fee:
Included In Total Software Fee.
7.0
Identification of Flash Programming Tool PC Software:
Not Applicable
7.1
OEM Restriction:
Not Applicable
7.2
Licensed Application:
Not Applicable
7.3
Excluded Applications:
Not Applicable
7.4
General Microcontroller Family:
Not Applicable
7.5
General Compiler Family:
Not Applicable
7.6
Specific Microcontroller:
Not Applicable
7.7
Specific Compiler Version:
Not Applicable
7.8
Applicable Specifications:
Not Applicable
7.9
Corresponding Software License Fee:
Not Applicable
8.0
Total License Fee for All Software Listed in This Addendum:
$198,653 
$198,653 
9.0
This Addendum, having an effective date set forth above in Part 0.1 hereof, shall be subject to the terms, conditions, and limitations of the Master Software License
Agreement specified in Part 0.2 hereof, which are  hereby incorporated into and made a part of this Addendum by reference as though fully set forth herein.
© 2016 Vector CANtech, Inc.
Page 3 of  3
CBD1400346_ PO#_UI129133

4 - AN-IND-8-003_GM_Support_in_CANoe_7.2

GM Support in CANoe 7.2

6 - AN-IND-8-003_GM_Support_in_CANoe_7.2s


 
GM Support in CANoe 7.2 
Version 2.1 
2010-02-23  
Application Note AN-IND-8-003 
 
 
 
Author(s) 
Siegfried Beeh, Friederike Gengenbach 
Restrictions 
Customer Confidential: GM worldwide and GM suppliers  
Abstract 
This application note explains the current stage of GM support in CANoe 7.2 and its 
component Test Feature Set. 
 
Table of Contents 
 
1.0 
Overview ..........................................................................................................................................................2 
1.1 
Introduction....................................................................................................................................................2 
1.2 
Terms and Abbreviations ..............................................................................................................................2 
2.0 
Basic Support in CANoe ..................................................................................................................................3 
2.1 
Trace Window ...............................................................................................................................................3 
2.2 
Logging..........................................................................................................................................................3 
2.3 
Export ............................................................................................................................................................3 
2.4 
Interactive Generator Block...........................................................................................................................3 
2.5 
Generator Block ............................................................................................................................................3 
2.6 
Symbol Selection Dialog ...............................................................................................................................3 
2.7 
Data Window .................................................................................................................................................5 
2.8 
Graphics Window ..........................................................................................................................................6 
2.9 
Panels............................................................................................................................................................6 
2.10 
CAPL .............................................................................................................................................................7 
3.0 
“GM Package” Modeling Package ...................................................................................................................8 
3.1 
Model Generation..........................................................................................................................................8 
3.2 
Node Panels, Message Panels .....................................................................................................................8 
3.3 
Interaction Layer..........................................................................................................................................10 
3.4 
Network Management .................................................................................................................................10 
4.0 
Modeling Control Units (ECUs) in CAPL .......................................................................................................11 
4.1 
Signal Access..............................................................................................................................................11 
4.2 
Receiving Standard Messages ...................................................................................................................11 
4.3 
Receiving GM-Extended Messages............................................................................................................11 
4.4 
Receiving Signals Directly...........................................................................................................................11 
4.5 
Sending Standard Messages ......................................................................................................................12 
4.6 
Sending GM-Extended Messages ..............................................................................................................12 
5.0 
Test Feature Set ............................................................................................................................................13 
5.1 
Test Feature Set in CAPL ...........................................................................................................................13 
5.2 
Test Feature Set in XML .............................................................................................................................16 
5.3 
Test Service Library in CAPL and XML Test Modules................................................................................18 
5.4 
Test Automation Editor................................................................................................................................19 
5.5 
CANdb++ Test Module Generator ..............................................................................................................19 
6.0 
Additional Resources .....................................................................................................................................19 
7.0 
Contact...........................................................................................................................................................19 
 
 
 1  
Copyright © 2010 - Vector Informatik GmbH 
Contact Information:   www.vector.com   or ++49-711-80 670-0 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
1.0  Overview 
1.1  Introduction 
As a simulation, analysis and testing tool for electronic control units, CANoe supports the GMLAN 3.0 protocol in a 
special way. This document briefly describes the support provided by CANoe specifically for GMLAN and explains 
the possible use cases of the “Test Feature Set” for GMLAN in detail. This document is based on CANoe version 
7.2. Because CANoe support for GMLAN is extended continuously, we recommend that the reader checks whether 
a newer version of this document is available. 
The general Test Feature Set concept is explained in a separate document; see chapter 6.0. Familiarity with the 
Test Feature Set is assumed in this document. 
1.2  Terms and Abbreviations 
Term 
Meaning 
CANoe Vector 
product 
SUT 
System under Test 
TFS Test 
Feature 
Set 
ÆCANoe component 
TSL Test 
Service 
Library 
ÆTFS component 
CAPL 
CANoe Access Programming Language 
ÆLanguage used for programming simulation 
nodes, test modules etc. in CANoe. 
hsCAN 
High speed CAN Bus (GM-specific terminology)
swCAN 
Single wire CAN Bus (GM-specific terminology) 
GM extended 
Message with a 29-bit identifier 
message 
Standard message  Message with an 11-bit identifier 
Panel Designer 
Vector product for editing panels 
Panel Editor 
Vector product for editing panels 
Test Automation 
Vector product for editing XML test modules 
Editor 
Table 1: Terms and Abbreviations 
 
2 
Application Note AN-IND-8-003 
 



 
 
GM Support in CANoe 7.2 
 
 
 
 
 
2.0  Basic Support in CANoe 
Basic support for GMLAN is activated automatically as soon as a GMLAN network file is identified. The existence 
and contents of the “UseGMParameterIds” network attribute are used as identification criteria. 
Details about basic support, which are available in the Online Help for CANoe, are referenced briefly in the 
following chapters. 
2.1  Trace Window 
Separate columns display GM-specific “SourceID”, “Prio” and “ParameterID” information. The “GMLAN” base 
configuration can be selected. This contains basic information along with additional GM-relevant default columns 
such as “Prio”, “PID”, “SourceID” and “CAN-ID”. 
2.2  Logging 
GM-extended messages are logged along with standard messages. The CAN-ID is decoded in the comment field 
and documented separately as “ParameterID”, “SourceID” and “Prio”. 
2.3  Export 
Signal histories for standard messages can be exported from the log block, but this is not possible for signals on 
GM-extended messages. 
2.4  Interactive Generator Block 
The Interactive Generator Block (IG) allows GM-extended messages to be sent. A special “GMLAN” tab is 
provided for this purpose, as well as the ability to modify the message priority and SourceID. 
 
Figure 1: Defining a message in the Interactive Generator Block 
2.5  Generator Block 
The Generator Block makes it possible to send GM-extended messages in symbolic entry mode. 
2.6  Symbol Selection Dialog 
The symbolic selection dialog makes it possible to select symbols from the network database (*.dbc). 
 
3 
Application Note AN-IND-8-003 
 



 
 
GM Support in CANoe 7.2 
 
 
 
 
 
2.6.1  Selecting a Message 
Messages can be selected, for example, in filters, in the Interactive Generator Block and in the CAPL browser. 
 
Figure 2: Message selection in the symbolic selection dialog 
 
Only the message name is included in the CAPL browser, regardless of the path followed in the selection dialog. 
 
 
4 
Application Note AN-IND-8-003 
 




 
 
GM Support in CANoe 7.2 
 
 
 
 
 
2.6.2  Selecting a signal 
Signals can be selected, for instance, in the CAPL browser, the Data Window and the Graphics Window. 
 
Figure 3: Signal selection in the symbolic selection dialog  
 
Only the signal name is included in the CAPL browser, regardless of how the selection dialog is navigated. If 
additional qualifiers are required, these can be inserted in the CAPL browser by choosing “Insert message from 
CANdb++…”. 
2.7  Data Window 
Application signals are fully supported in the Data Window.  

 
Figure 4: Data Window 
 
5 
Application Note AN-IND-8-003 
 




 
 
GM Support in CANoe 7.2 
 
 
 
 
 
The send node of the signals can be checked in the special dialog “configuration overview” that is accessible from 
the context menu of the Data Window: 
 
 
Figure 5: Configuration overview 
2.7.1  Special signals in the Data window 
Message-specific statistical signals can be selected in the Data and Graphics windows. These are available for 
standard messages but not for GM-extended messages. 
2.8  Graphics Window 
The Graphics Window allows the display of signals on a timeline. The notes that apply to the Data Window apply 
equally to the selection of signals and special signals in the Graphics Window (see 2.7). 
2.9  Panels 
A panel may contain elements used to visualize and control signal values. The notes that apply to the Data 
Window apply similar to the selection of signals here (see 2.7).  
The Panel Editor selects a signal via a symbol path that contains the database name, the tx node, the tx message 
and the signal. For older configurations (created with older versions than CANoe 7.0), it must be ensured that the 
tx node is part of the symbol path (see area highlighted in red).  
 
6 
Application Note AN-IND-8-003 
 



 
 
GM Support in CANoe 7.2 
 
 
 
 
 
 
Figure 6: Configuration dialog for an “Input/Output Box” panel control 
The Panel Designer fully supports GM by automatically inserting the tx node. 
2.10 CAPL 
A special message type – “gmlanMessage” – is available for GM-extended messages in CAPL, the CANoe 
programming language. With this message type, the Prio and SourceID parameters present in addition to the 
ParameterID can be queried using operators and set using special functions.  
Relevant CAPL code fragments are available e.g. in chapter 4.3. 
 
7 
Application Note AN-IND-8-003 
 



 
 
GM Support in CANoe 7.2 
 
 
 
 
 
3.0  “GM Package” Modeling Package 
The “GM Package” modeling package contains the following special GM-specific components: 
• Interaction 
layer 
• Network 
management 
• Model 
generation 
•  Message panels for visualizing and controlling signal values. 
 
Since the supplied manual of the GM Package provides details on the modeling package and the components 
included in it, the following chapter discusses the functionality of the package only briefly. 
The modeling package is not included in the default CANoe installation, but can be requested from Vector support 
mailto:support@de.vector.com as a separate package free of charge. 
3.1  Model Generation 
The model generation wizard included in CANoe has been extended to include a GM option. swCAN and hsCAN 
networks can be generated. 
 
Figure 7: Model Generation Wizard 
 
It is also possible to generate a multi-bus configuration. 
Generation produces a complete CANoe configuration; the only action required is to select a node from the 
alternative nodes in the GM network file and to deactivate or delete unused nodes in the simulation setup. 
3.2  Node Panels, Message Panels 
The configuration generated by the model generation wizard uses message controls developed especially for GM. 
These message controls make it possible, for example, to modify the signal values that are transmitted by the 
simulated nodes. The panels can be used to visualize signal values for concretely existing nodes. 
These controls can be created/changed in the “Panel Editor”. 
 
8 
Application Note AN-IND-8-003 
 




 
 
GM Support in CANoe 7.2 
 
 
 
 
 
 
Figure 8: Panel for changing and visualizing all send signals of a node in their messages 
 
In addition, a network management panel is generated for each node with which the virtual network status for 
existing simulated nodes can be visualized and modified.  
 
Figure 9: Panel for controlling and visualizing the network status for the current node 
 
9 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
3.3  Interaction Layer 
The interaction layer can be integrated into individual simulation nodes as a modeling DLL. It is used automatically 
when a model is generated using the model generation wizard. The interaction layer configures itself on the basis 
of the network database. Changes to the network database are therefore integrated automatically. The tasks of the 
individual components are: 
•  To provide a signal-oriented interface, i.e. individual signal values can be set as signal stimulants from 
within in CAPL, panels and the Test Feature Set. When using the COM server, then ensure to use the 
signal objects that are “outputs” or “inputs” of nodes. 
•  To utilize the network database’s transmission model. Cyclical transmissions, spontaneous transmissions 
in reaction to changes, etc. are sent to the bus in accordance with the transmission model. 
•  For some test cases, it is also necessary to be able to send messages on request. This is supported as 
well. 
•  Linkage to the network management: The “virtual networks” observed by the network management are 
known to the interaction layer. This affects whether a transmission should actually be sent or not. 
•  To provide a standard fault injection interface which is suitable to control the sending of messages from 
within CAPL. For more information about these functions refer to the CANoe Online Help. These 
functionalities can also be used comfortable in CANoe Test Modules. 
3.4  Network Management 
Network management is also available as a special modeling DLL. This component also configures itself based on 
information contained in the network database. 
The individual tasks of the components are: 
•  To control bus communications when waking up virtual networks and keeping them awake, insofar as the 
node‘s role is that of an activator. 
•  To observe bus communications in order to detect changes in the status of the virtual networks that control 
the node. 
•  Depending on the status of the virtual networks, the interaction layer is informed and its transmissions are 
suppressed completely. The virtual networks can be activated or deactivated manually in CAPL or on the 
panel. 
•  To provide a CAPL interface that makes it possible to control virtual networks or remain informed of virtual 
network status changes from within the application. 
 
10 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
4.0  Modeling Control Units (ECUs) in CAPL 
In principle, the following message types are available with GMLAN: 
•  Standard messages (with 11-bit message IDs) 
•  GM-extended messages (with 29-bit message IDs) 
Messages of both types can be sent as well as received: 
4.1  Signal Access 
To access to signal values (set and get signal value) there is a tight way available by using the $-operator: 
dword sigValue;  
$ECC::A2RAlrmTime = 10;           // set signal value 
sigValue = $ECC::A2RAlrmTime;     // get signal value 
4.2  Receiving Standard Messages 
Standard messages can be received and evaluated in the usual way by defining “on message” handlers: 
on message Dynamic_Normal_Force 

  long val; 
  val = this.DynNrmlFrcFrLfWhl;  // signal access 
  // Application code … 

4.3  Receiving GM-Extended Messages 
GM-extended messages can be received and evaluated by defining “on gmlanmessage” handlers: The message 
handler can then be programmed specifically for one or more SourceIDs: 
on gmlanmessage Chime_Status  

  long val; 
  if(gmLanGetSourceId(this) == AMP.SourceId) 
  { 
    val = this.ChmAct; 
    // Application code … 
  } 

4.4  Receiving Signals Directly 
Signals can be received directly in CANoe by defining an “on signal” handler in CAPL. This is supported for signals 
on standard messages but not currently for signals on GM-extended messages. 
 
11 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
 
4.5  Sending Standard Messages 
Standard messages are sent according to the following general principle: 
  message Dynamic_Normal_Force msg; 
  msg.DynNrmlFrcFrLfWhl = 1;  // example signal value 
  output(msg); 
 
4.6  Sending GM-Extended Messages 
Before a GM-extended message is sent, the SourceID must be specified; whereas the Prio is added automatically: 
gmlanmessage ChimeStatus msg; 
gmLanSetSourceId(msg, AMP.SourceId); 
output(msg) 
Hint: When working signal oriented (4.1), the message is sent by the Interaction layer; no need to care about 
SourceIDs. 
 
12 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
5.0  Test Feature Set 
5.1  Test Feature Set in CAPL 
A typical test sequence consists of 
•  Stimulation of signals or messages (SUT input vector) 
•  Allowance for a SUT settling time until the expected reaction is to occur, and 
•  Evaluation of signal states or message events (SUT output vector) in response to the stimulation. 
 
The allowed settling time can be shortened by specifying a concrete event in the test sequence, e.g. receipt of a 
message with a specific message ID. 
Test sequences can be structured into test cases, test groups and test modules. 
The CANoe test sequence and test structure apply equally to GMLAN, regardless of whether the test modules are 
formulated in CAPL, XML or .NET. There are, however, a number of particularities, which are explained in the 
following chapters.  
5.1.1  Configuring the Restbus Simulation 
The restbus simulation is used directly by the Test Feature Set. Based on the interaction layer configured there, it 
takes charge of sending messages and thus of signal stimulation. Consequently, the prerequisite for the 
stimulation of signal values is that the restbus simulation node is present in the simulation setup and is assigned to 
the database node, and that the “CANoe GM Interaction Layer” modeling DLL is assigned to the simulation node. 
Note: 
The restbus simulation will be correctly and fully configured if it is created using the “model 
generation wizard” that comes with the modeling package. Use of this generation method is 
therefore recommended. 
 
5.1.2  Signal Abstraction – Evaluation 
Note: 
For signals that are mapped onto GM extended messages the signal symbol has to be prefixed by 
the send node, e.g. checkSignalInRange(ECC::A2RAlrmTime, 10, 20). 
A signal value can be compared directly to a specified interval using the following functions: 
long checkSignalInRange(dbSignal aSignal,          
                        float aLowLimit,  
                        float aHighLimit); 
 
Combined signal value queries, immediate comparison with a specified interval and automatic recording of the 
actual and target values for the comparison results are also possible by means of special functions:  
 
13 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
long testValidateSignalInRange (char aTestStep[],  
                                dbSignal aSignal,  
                                float aLowLimit,  
                                float aHighLimit) 
long testValidateSignalOutsideRange (char aTestStep[],  
                                     dbSignal aSignal,  
                                     float aLowLimit,  
                                     float aHighLimit) 
Please refer to the CANoe Online Help for further details about these functions. 
5.1.3  Signal Abstraction – Stimulation 
Signal values can be stimulated with the $-operator (4.1). This requires (at least for the specified Tx node) a 
configured restbus simulation (5.1.1). 
$ECC::A2RAlrmTime = 10;  
If a signal that is already being sent by a real ECU is to be stimulated as part of a test sequence, then the real ECU 
should be stimulated, thereby indirectly causing the changed signal value to be sent. 
Using the signal stimulation within the Test Feature Set the stimulation is reported in the test report. 
5.1.4  Message Abstraction – Evaluation  
There are also wait functions available for testing message events, with which the test sequence pauses until the 
event condition is fulfilled.  Simulation node techniques (see 4.1 and 4.3) are available likewise. These wait 
functions can be used either symbolically by specifying a message symbol from the network file or numerically by 
specifying a message ID. 
For standard messages these are: 
long TestWaitForMessage(dbMessage aMsg, dword aTimeout) 
long TestWaitForMessage(long aMsgId, dword aTimeout) 
 
For GM-extended messages, only the numeric function for passing the message ID is available; alternative ways 
of using the wait function are described below: 
a) Symbolic setup via instantiation of a message buffer 
The “aMsgId” expected in the function is created by means of a series of calls. The example below is 
constructed for the send node “AMP” that transmits the message “Chime_Status”, with a maximum wait 
time of 2000ms: 
 
14 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
// Example signal evaluation on message level  
testcase a () 

  gmlanmessage Chime_Status msg;   
 
  if(testWaitForMessage(gmLanId(Chime_Status, AMP), 2000) == 1) 
  { 
    testGetWaitEventMsgData(msg); 
 
    if(msg.ChmAct == 1) 
      TestStepPass("A", "Message received, signal matches"); 
    else 
      TestStepFail("A", "Message received, signal does not match"); 
  } 
  else  
    TestStepFail("A", "Message missing"); 

 
Commonly, application level tests are done by using signal access and signal test functions. Message 
level checks are done mostly by utilizing the TSL checks (refer 5.3 for details).   
b) Numerical setup via modification of a message buffer 
If the name of the message or send node is not known in CAPL and the message ID is to be set up in a 
strictly numerical manner, the following steps are necessary: 
// initialise local variables 
gmlanmessage * msg1; 
 
// do something, e.g. stimulate the SUT 
 
// Set up and wait for response 
msg1.id = (0x10); 
gmLanSetSourceId(msg1, 0x81); 
gmLanSetPrio(msg1, 4); 
TestWaitForMessage(msg1.id, 2000); 
 
5.1.5  Message Abstraction – Stimulation  
GM messages are sent in the same way as in simulation nodes. Standard GM messages are handled as described 
in the CANoe Online Help. Only the GM-extended messages require special treatment: The “Prio” and “SourceID” 
parameters can be added to a CAN-ID in the following ways: 
Numerically, within the variable definition: 
testcase numericOutput() 

  gmlanmessage 0x10x msg1 = {SA =0x81, PRIO= 0x4}; 
  output(msg1); 

Specifying PRIO (for the message priority) is optional, as this is taken from the message definition. If it is not 
specified, the SA selector (for the SourceID) is taken to be 0. For this reason, it is absolutely necessary to add the 
SourceID by using, for example, the following process (see also 4.6): 
 
15 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
testcase symbolicOutputProgrammatic() 

  gmlanmessage Chime_Status msg2; 
  gmLanSetSourceId(msg2, AMP.SourceId); 
  output(msg2); 

5.1.6  Interaction Layer Fault Injection Functions 
There are also Fault Injection functions available which are suitable to control the sending of messages, e.g. to 
change the cycle time, to suppress messages completely or to change the DLC of messages. For more information 
about these functions refer to the CANoe Online Help. 
These fault injection functions can also be used for messages with extended IDs. Therefore the ID-based functions 
have to be used: 
id_DDM = gmLanId(Driver_Door_Status, DDM); 
TestDisableMsg(id_DDM); 
This example disables the sending of the message “Driver_Door_Status” of node “DDM”. 
5.2  Test Feature Set in XML 
GMLAN requires no new constructs with the Test Feature Set in XML test modules. The existing qualification of 
signals using send nodes can be used directly here and must be used for GM-extended messages and their 
signals. 
The table below shows the existing test functions and their GM support: 
Test function name 
Usage in test modules for messages with standard or GM-
extended IDs
 
Await Value Match 

CANstress Configuration 
3 Trigger/disturbance definition for standard IDs 
: Trigger/disturbance definition for GM-extended IDs 
CANstress State 

Diagnostics Service 

Diagnostics Service Check 

(replaced by Diagnostics Service) 
Initialize 
3 for signal abstraction 
3 for message abstraction 
Replay 

Request Response 

Set 
3 for signal abstraction 
3 for message abstraction 
State Change 

State Check 

Stimulate Ramp 

System Call 

Tester Confirmation 

Until End 

VT System Configuration 

Wait 

Window Capture 

Table 2: XML Test Functions 
 
 
16 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
Syntax example for GM-extended: 
<testcase title="my GM test case"> 
  <statechange wait="200ms"> 
    <in> 
      <cansignal id="stim_sig" node="sender"> 
       10 
      </cansignal> 
    </in> 
    <expected> 
      <cansignal id="expected_sig" node="sender"> 
        <eq>10</eq> 
      </cansignal> 
    </expected> 
  </statechange> 
</testcase> 
 
 
17 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
5.3  Test Service Library in CAPL and XML Test Modules 
The table below shows the existing check objects (“TSL checks”) and their usage for different message types: 
Check base name 
Usage in test modules 
Usage in test modules for messages with 
for messages with 
GM-extended IDs 
standard IDs 
 
 
CAPL  
XML 
CAPL 
XML 
Cycle Time (Abs) 
    For message 


3 (ID-based)  

Cycle Time (Rel) 
    For message 
3  

3 (ID-based) 

    For node 




DLC Monitoring 
    For single message 


3 (ID-based) 

    For all tx messages of node 




    For all rx messages of node 




Error Frame Check 




Fallback Observation 
-- 

-- 

Message Distance 


3 (ID-based) 

Unknown Message Received 




Signal Value Constancy 




Node Active 
    For message list 
-- 

-- 

    For single node 




    For all nodes 

-- 

-- 
Node Inactive 
 
 
    For message list 
-- 

-- 

    For single node 




    For all nodes 

-- 

-- 
Absence of Defined Message 


3 (ID-based) 

Occurrence of a Message 
    For single message 


3 (ID-based) 

    For node 

-- 

-- 
Request Response Check 
-- 

-- 

Value Invariant 
-- 

-- 

Signal Value 




Timeout Check 




Table 3: Test Service Library Checks 
 
Symbols 
Meaning 

Fully supported 
-- 
Generally not available (specific feature of 
XML test modules or CAPL test modules) 

Not supported for GM-extended messages 
 
 
 
18 
Application Note AN-IND-8-003 
 


 
 
GM Support in CANoe 7.2 
 
 
 
 
 
5.4  Test Automation Editor 
The Test Automation Editor 1.1 supports fully the GMLAN networks and the editing of XML test modules.  
It provides a setting to fill in always the send node of an added symbol. 
 
For further information about the separate Vector product Test Automation 

Document Outline


7 - AN-ISC-2-1052_CANbedded_and_Operating_Systems

CANbedded and Operating Systems

8 - AN-ISC-2-1052_CANbedded_and_Operating_Systems_ind

Page 1
Page 2
Page 3
Page 4
Page 5

9 - AN-ISC-2-1052_CANbedded_and_Operating_Systemss


 
CANbedded and Operating Systems 
Version 1.0 
2007-01-18  
Application Note  AN-ISC-2-1052 
 
 
 
Author(s) Hartmut 
Hörner, Patrick Markl 
Restrictions Restricted 
Membership 
Abstract 
The Vector CANbedded software components have some requirements for the run-time 
environment. These requirements are described in this application note.  
 
 
Table of Contents 
 
1.0 
Overview ..........................................................................................................................................................1 
2.0 
General Requirements.....................................................................................................................................1 
3.0 
Interrupt Handling ............................................................................................................................................2 
3.1 
Interrupt Service Routines (ISRs) .................................................................................................................2 
3.2 
Access to interrupt control registers..............................................................................................................2 
4.0 
Data consistency..............................................................................................................................................3 
5.0 
Memory protection and virtual memory management .....................................................................................3 
6.0 
Privilege modes ...............................................................................................................................................4 
7.0 
Operating systems with stringent driver models..............................................................................................4 
8.0 
Startup Time ....................................................................................................................................................5 
9.0 
Contacts...........................................................................................................................................................5 
 
 
 
1.0 Overview 
The Vector CANbedded components have some requirements for the run-time environment. Some of these might 
impact the usage of the operating system elements as well as the real-time design. 
Two run-time environments are explicitly supported by CANbedded: 
•  A system without operating system 
•  An OSEK Operating System (version 2.1r1 onwards) such as Vector osCAN 
 
In the following chapters the requirements are listed and for some cases where no explicitly support exists 
workarounds are described. 
2.0 General Requirements 
Higher layer CANbedded components require an initialization function and one or more cyclic functions. 
CANbedded hardware drivers have an initialization function, ISRs in interrupt driven mode and cyclic functions in 
polling mode. The initialization function must be called before the cyclic function is called for the first time and 
before the first ISR occurs. 
The CANbedded stack requires a shared address space with the application since some functionalities such as 
signal and flag access are implemented by macros. 
There are no requirements for dynamic memory management. All not constant global variables are explicitly 
initialized in the initialization functions. There are no requirements for memory initialization in the start-up code 
unless constant data is located in RAM. 
 1  
Copyright © 2007 - Vector Informatik GmbH 
Contact Information:   www.vector-informatik.com   or ++49-711-80 670-0 


 
 
CANbedded and Operating Systems 
 
 
 
 
 
Since the CANbedded components have to interface directly with the communication hardware adequate access 
privileges are required. 
3.0 Interrupt Handling 
3.1  Interrupt Service Routines (ISRs) 
If the CAN Driver is used in an interrupt driven mode one or more ISRs must be installed. 
Two categories of ISRs are supported: 
•  ISR implemented with the related compiler pragma or qualifier. This is used in a system without operating 
system and for OSEK-OS ISRs of category 1. 
•  OSEK-OS ISR category 2. 
 
If an operating system other than OSEK is used the following workaround is possible:  
If OSEK-OS and OSEK-OS category 2 ISR support are selected in the generation tool the ISR has the following C 
syntax: 
 
ISR(CanInterrupt) 

  … 

 
Supply a header file osek.h with the following macro, to make the ISR available in other modules as a void-void 
function. 
 
#define ISR(x) void x(void) 
 
Example for an operating system which provides a service OSRegisterISR to register an ISR: 
 
OSRegisterISR(CanInterrupt, 10);     /* second parameter is interrupt vector number */ 
 
If the prototype of the ISR required by the OS is not of the kind void x(void) an intermediate function must be used 
to circumvent type conflicts. 
3.2  Access to interrupt control registers 
To achieve its own data consistency and to export such services to the application the CANbedded components 
require access to the interrupt control registers of the communication controller and to interrupt control registers of 
the interrupt controller or the CPU which allow to disable interrupts globally or up to a certain level. 
If it is not desirable or possible that the CANbedded components access the global interrupt directly this 
functionality can be replaced by other mechanisms (“interrupt control by application”, supported in CAN driver RI 
version 1.4 onwards).  
If a resource locking mechanism of the operating system is used it must support nested critical sections.  
 
2 
Application Note  AN-ISC-2-1052 
 


 
 
CANbedded and Operating Systems 
 
 
 
 
 
4.0 Data consistency 
For efficiency reasons some services of the CANbedded components are implemented as macros with  
unprotected critical sections. If these macros are used in multiple full-preemptive tasks or in multiple ISRs data 
consistency problems can be caused. One of the following solutions is possible: 
•  Use these services only in non-preemptable tasks 
•  Use these services only in one cooperative task group (OSEK: internal resource concept) 
•  Supply critical section in the application code 
 
Some CANbedded components have specific requirements concerning processing priorities and reentrancy. These 
requirements are described in the technical reference of the individual component. 
 
5.0  Memory protection and virtual memory management 
This chapter is only applicable if the processor and the run-time environment support such mechanisms. 
Since some CANbedded services are implemented as macros which access to global variables the application part 
which uses the CANbedded services and the complete CANbedded stack must reside in one address space.  
In addition all CANbedded tasks and ISRs must be able to access the peripheral address space of the 
communication hardware. 
The following figure shows a possible configuration with three different applications with an own address space. 
Two applications perform application tasks (drawn in green), one application is responsible for the communication 
(drawn in red). 
Application 1
Application 2
Communication application
CANbedded stack
Communication hardware
 
Figure 1 Different applications with own address space 
 
To move data between the applications operating system services are required which have the capability to tunnel 
the address barrier (drawn with blue arrows).. 
 
3 
Application Note  AN-ISC-2-1052 
 


 
 
CANbedded and Operating Systems 
 
 
 
 
 
6.0 Privilege modes  
This chapter is only applicable if the processor and the run-time environment support such mechanisms. 
In some architectures different privilege modes such as user and supervisor mode are defined. If a task or ISR is 
running in user mode the access to peripheral hardware and global resources such as interrupt control registers 
may be restricted.  
It must be possible to assign all tasks and ISRs which provide or use CANbedded services a sufficient privilege 
level to allow for: 
•  Access to communication hardware 
•  Access to communication related interrupt control 
•  Access to global interrupt control registers including the capability to execute instructions related to global 
interrupt control registers unless interrupt control by application is used (s. chapter 3.2). 
 
If such a privilege level is not possible for tasks but only for ISRs a cyclic timer ISR can be used to perform all 
required CANbedded cyclic processing. Note that such an ISR must have a lower interrupt level than the ISRs of 
the CANbedded drivers. 
7.0  Operating systems with stringent driver models 
This chapter is only applicable if the run-time environment supports such mechanisms. 
In some operating systems hardware access is only allowed for specific hardware drivers which have to follow a 
predefined implementation model. When a hardware driver is called in such a system the required privileges are 
assigned. To allow the usage of CANbedded a wrapper layer between application and CANbedded is required to 
implement the required driver interface. 
Such a design is illustrated in the figure below, the driver interface is drawn with blue arrows: 
Application 1
Application 2
Wrapper layer
CANbedded stack
 
Figure 2 With Wrapper Layer 
 
4 
Application Note  AN-ISC-2-1052 
 


 
 
CANbedded and Operating Systems 
 
 
 
 
 
8.0 Startup Time 
Some Operating systems (especially more sophisticated and larger ones) are running out of RAM, while the 
binaries are stored in non-volatile memories like Flash. This requires that the startup code transfers the OS image 
into RAM after power on reset. Depending on the size of the OS image this can take up to several hundreds of 
milliseconds. As a consequence the initialization of the CANbedded stack occurs after the kernel is loaded 
completely. Often this long startup times do not match the OEMs’ startup requirements. There are two possibilities 
to solve this issue. Either the OEM accepts the longer startup time or the operating system supports a mechanism 
that allows initialization of the CANbedded stack before the kernel is loaded completely. 
If the operating system supports some kind of a runtime environment before the kernel is loaded it could be also 
relevant to have a possibility to hand over the information received during the startup phase via CAN to the fully 
loaded kernel environment. 
9.0 Contacts 
 
 
 
 
Vector Informatik GmbH 
Vector CANtech, Inc. 
VecScan AB 
Ingersheimer Straße 24 
39500 Orchard Hill Pl., Ste 550 
Lindholmspiren 5 
70499 Stuttgart 
Novi, MI  48375 
402 78 Göteborg  
Germany 
USA 
Sweden 
Tel.: +49 711-80670-0 
Tel:  +1-248-449-9290 
Tel:  +46 (0)31 764 76 00 
Fax: +49 711-80670-111 
Fax: +1-248-449-9704 
Fax: +46 (0)31 764 76 19  
Email: info@vector-informatik.de 
Email: info@vector-cantech.com 
Email: info@vecscan.com 
 
Vector France SAS 
Vector Japan Co. Ltd. 
 
168 Boulevard Camélinat 
Seafort Square Center Bld. 18F 
92240 Malakoff  
2-3-12, Higashi-shinagawa, 
France 
Shinagawa-ku 
Tel:  +33 (0)1 42 31 40 00 
J-140-0002 Tokyo 
Fax: +33 (0)1 42 31 40 09 
Tel.: +81 3 5769 6970    
Email: information@vector-france.fr 
Fax: +81 3 5769 6975 
 
Email: info@vector-japan.co.jp 
 
 
 
5 
Application Note  AN-ISC-2-1052 
 

10 - AN-ISC-8-1056_CANbedded_Program_Stack_Usage

CANbedded Program-Stack usage

11 - AN-ISC-8-1056_CANbedded_Program_Stack_Usage_ind

Page 1
Page 2
Page 3
Page 4
Page 5
Page 6

12 - AN-ISC-8-1056_CANbedded_Program_Stack_Usages


 
CANbedded Program-Stack usage 
Version 1.0 
2007/01/08  
Application Note  AN-ISC-8-1056 
 
 
 
Author(s) Andreas 
Raisch 
Restrictions Customer 
confidential 
- subject to prior approval by PSC 
Abstract 
This application note provides basic information on the (program-) stack consumption of 
Vector's CANbedded communication components. 
 
 
Table of Contents 
 
1.0 
Overview ..........................................................................................................................................................1 
1.1 
Definition “The Stack”....................................................................................................................................1 
1.2 
Embedded System Stack Handling...............................................................................................................2 
1.3 
Stack-Usage Approach in CANbedded.........................................................................................................3 
1.3.1 
Example ......................................................................................................................................................3 
1.3.2 
Configuration Aspects.................................................................................................................................5 
1.4 
Calculating and Measuring Stack Need........................................................................................................5 
2.0 
Summary..........................................................................................................................................................5 
3.0 
Contacts...........................................................................................................................................................6 
 
 
 
1.0 Overview 
This application note provides basic information on the (program-) stack consumption of Vector’s CANbedded 
communication components. 
1.1  Definition “The Stack” 
In computer science, a call stack is a special stack, which stores information about the active subroutines of a 
computer program. (The active subroutines are those, which have been called but have not yet completed 
execution by returning.) This kind of stack is also known as a program stack, execution stack, control stack, 
function stack or run-time stack and is often abbreviated to just "the stack". 
 
The actual details of the stack in a programming language depend upon the compiler, operating system, and the 
available instruction set. 
 
As noted above, the primary purpose of the stack is: 
•  Storing the return address – When a subroutine is called, the location of the instruction to return to 
needs to be saved somewhere.  
 
A stack may serve additional functions, depending on the language, operating system and machine environment. 
Among them can be: 
•  Local data storage – A subroutine frequently needs memory space for storing the values of local 
variables, the variables that are known only within the active subroutine and do not retain values after it 
returns.  
 1  
Copyright © 2007 - Vector Informatik GmbH 
Contact Information:   www.vector-informatik.com   or ++49-711-80 670-0 



 
 
CANbedded Program-Stack usage 
 
 
 
 
 
•  Parameter passing – Subroutines often require that values for parameters must be supplied to them by 
the code which calls them and it is not uncommon that space for these parameters may be laid out in the 
stack. Generally if there are only a few small parameters, processor registers will be used to pass the 
values. The stack works well as a place for these parameters, especially since each call to a subroutine, 
which will have differing values for parameters, will be given separate space on the stack for those values. 
•  Other return state – Besides the return address, in some environments there may be other machine or 
software states that need to be restored when a subroutine returns. This might include things like 
processor registers, privilege level, exception handling information, arithmetic modes and so on. If needed, 
this may be stored on the stack just as the return address is. 
 
The typical stack is used for the return address, locals, and parameters (known as a call frame). In some 
environments there may be more or fewer functions assigned to the stack.  
A stack is composed of stack frames (sometimes called activation records). Each stack frame corresponds to a call 
to a subroutine, which has not yet terminated with a return. For example, if a subroutine named DrawLine is 
currently running, having just been called by a subroutine DrawSquare, the top part of the stack might be laid out 
like this: 
 
The stack frame at the top of the stack is for the currently executing routine. In the most common approach the 
stack frame includes space for the local variables of the routine, the return address back to the routine's caller, and 
the parameter values passed into the routine. The memory locations within a frame are often accessed via a 
register called the stack pointer, which also serves to indicate the current top of the stack. Alternatively, memory 
within the frame may be accessed via a separate register, often termed the frame pointer, which typically points to 
some fixed point in the frame structure, such as the location for the return address. 
Stack frames are not all of the same size. Different subroutines have differing numbers of parameters, so that part 
of the stack frame will be different for different subroutines, although usually fixed across all activations of a 
particular subroutine. Similarly, the amount of space needed for local variables will be different for different 
subroutines.  
[Source: Wikipedia] 
 
1.2  Embedded System Stack Handling 
The bandwidth of embedded system architectures and also the used µC (and compilers) results in a huge variety 
of stack handling approaches. 
The simplest approach is often valid, when no operating system (OS) is used. In such a case the stack is simply a 
 
2 
Application Note  AN-ISC-8-1056 
 


 
 
CANbedded Program-Stack usage 
 
 
 
 
 
reserved RAM area used by the whole system. 
If an OSEK/OS or AUTOSAR OS is used, the stack handling depends on the available features in the OS and the 
underlying µC. Each OS task has usually its own stack but can share this stack if some preconditions are kept with 
other tasks. Providing one or more own stacks for interrupts can reduce the stack need of the OS tasks, too.  
The stack need of an embedded system depends also on the specific handling for interrupts: 
•  Storing of CPU registers on the stack or simply switching to a different stack bank 
•  Supporting/using nested interrupts; i.e. interrupts can cause multiple store actions to the stack 
•  Configuring own stack(s) for interrupts or using the stack of the currently running OS task (or other 
interrupt) 
Please note that for most implementations the stack pointer starts at a high address and grows to lower addresses. 
1.3  Stack-Usage Approach in CANbedded 
The CANbedded architecture is optimized for so-called deeply embedded systems with limited RAM and runtime in 
real-time systems. As a result of this, the architecture is gained to be a good compromise between  
•  ROM usage (multiple implementation of same behavior vs. in-lining or calling functions) 
•  RAM usage (static parameters vs. local parameters on the stack; calling a function vs. implementing 
something short twice, …) 
•  Runtime consumption (calling a function needs more time than local handling) 
 
A CANbedded function shall therefore  
•  have only few arguments (none, 1 or 2, very very rarely more than 2 parameters) 
•  be implemented in a way that local data stored on the stack is minimized 
•  call no other functions unless it is necessary due to layered architecture 
 
Most CANbedded API functions are implemented in a way that only flags are set which are evaluated on a cyclic 
function to prevent too deep function call trees (and with this an increased stack need). 
An additional task of the CANbedded communication components is the separation of the interrupt driven 
hardware handling and the task-level view of the application. To be able to react on communication events 
correctly, parts of the handler implementation are executed on interrupt level and parts are executed on task level. 
Which stack and how much stacks are used for the task and the interrupt context depends on the underlying 
system (see chapter 1.2 for details). 
1.3.1 Example 
A typical example for such a CANbedded implementation is a transport protocol, where the reaction on incoming 
events has to be fast whereas the timeout and state handling can be slower. The implementation will therefore be 
split in a function called within the CAN RX interrupt for fast actions and a cyclic called function for the slower ones. 
The same is true for the next upper layer, the diagnostic layer. See Figure 2 for details how the diagnostic layer 
handles the separation of RX event notification in CAN ISR context and further handling on task context. 
As a result, the call tree of the RX event handling in ISR context stops latest on diagnostic layer level. All further 
handling (including application calls) is processed a few milliseconds later from task level with only very few 
function calls on the stack. 
 
3 
Application Note  AN-ISC-8-1056 
 






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































 
 
CANbedded Program-Stack usage 
 
 
 
 
 
osCAN
Application
Diagnostics
Layer
Universal
Measure-
Interaction 
Network
ment
Layer
Management
And 
Communication
Calibration
Control
Transport Protocol
Protocol
Layer
CAN Driver
CAN Controller
Transce
Transc iver
CAN Bus
 
Figure 1 Example CANbedded Stack with CAN Driver, TP and Diagnostic Layer as the largest call-tree 
 
Data 
Da
Eve
Ev nt 
ready 
Cyclic 
han
ha dler
flag
hand
ha
l
nd er
CAN 
CAN
Transp
Trans ort
Diagnostics
osti                          
                    
Application
Driver
Protocol
Protoc
Laye
Lay r
Further handling
RX o
RX f TP frame
am
Optional call to application
unknown to std. SW
Copy RX data
 dat
Check RX
data ready
Further handling
RX o
RX f last TP frame
am
Optional call to application
unknown to std. SW
Copy RX data
 dat
Indicate RX data ready
Check RX
data ready
PreHandler
Further handling
unknown to std. SW
MainHandler
Further handling
unknown to std. SW
ISR/Event context
Task context
 
Figure 2 Example call-tree for diagnostic data reception 
 
 
4 
Application Note  AN-ISC-8-1056 
 


 
 
CANbedded Program-Stack usage 
 
 
 
 
 
1.3.2 Configuration 
Aspects 
The configurations of the CANbedded components have a large impact on the stack needs. There is a customer 
specific, static setup of CANbedded components which interact together to fulfill the OEM requirements. I.e. the 
CAN driver always informs e.g. the transport layer if a specific CAN frame is received and the transport layer 
informs the diagnostic layer if the full message is received. This call sequence is preconfigured by Vector, 
nevertheless, the software supports multiple points (callbacks) where customer specific hooks can be included. 
This customer hooks have additional influence to the stack needs. 
Another very important configuration parameter is the decision if the RX/TX handling shall be processed in 
interrupt or on task context. If it is processed on task context, the stack need can be calculated easier than when 
the handling is performed with interrupts. 
In an ECU with one CAN bus, an interaction layer (IL), a network management (NM), a transport layer (TP) and a 
diagnostic component, the RX path of incoming diagnostic CAN messages has usually the largest call tree form 
communication point of view and therefore the highest stack need. 
1.4  Calculating and Measuring Stack Need 
Exactly calculating the stack needs is a difficult and error-prone task. Therefore the stack size is often estimated 
based on the environmental conditions described in chapter 1.2 and a safety value of 10% to 20%, sometimes 
100%, is added to the result. 
If an operating system is used, this system usually provides means to measure stack usage and test stack 
consistency. OSEK/OS and AUTOSAR OS for instance provides such means to check the stack with each OS 
action and also to initialize the stack with patterns so the worst case usage for a given scenario can be found. 
When using such a method, it is important to analyze upfront the worst case call trees and make sure they have 
happened during test execution, too. This implies also “special” scenarios like “ECU in diagnostics”, “ECU with high 
I/O interrupt load”, occurrence of OSEK category 1 and 2 interrupts at the same time, … 
2.0 Summary 
As a result of all this effects, no detailed figure for the concrete stack usage of the CANbedded communication 
components can be given upfront of the real usage in an ECU project. 
Vector offers different levels of support to customers, starting from telephone hotline for the more simple questions, 
integrating the CANbedded communication components and other software up to analyzing your ECU setup as a 
separate project work. 
 
Note:  
Please be aware that due to all the points mentioned in this application note Vector can not finally 
list the stack needs of the CANbedded communication components in your project. The concrete 
layout and dimension of the stack(s) in an ECU project is the task of the system integrator.  
 
 
5 
Application Note  AN-ISC-8-1056 
 


 
 
CANbedded Program-Stack usage 
 
 
 
 
 
3.0 Contacts 
 
 
 
 
Vector Informatik GmbH 
Vector CANtech, Inc. 
VecScan AB 
Ingersheimer Straße 24 
39500 Orchard Hill Pl., Ste 550 
Lindholmspiren 5 
70499 Stuttgart 
Novi, MI  48375 
402 78 Göteborg  
Germany 
USA 
Sweden 
Tel.: +49 711-80670-0 
Tel:  +1-248-449-9290 
Tel:  +46 (0)31 764 76 00 
Fax: +49 711-80670-111 
Fax: +1-248-449-9704 
Fax: +46 (0)31 764 76 19  
Email: info@vector-informatik.de 
Email: info@vector-cantech.com 
Email: info@vecscan.com 
 
Vector France SAS 
Vector Japan Co. Ltd. 
 
168 Boulevard Camélinat 
Seafort Square Center Bld. 18F 
92240 Malakoff  
2-3-12, Higashi-shinagawa, 
France 
Shinagawa-ku 
Tel:  +33 (0)1 42 31 40 00 
J-140-0002 Tokyo 
Fax: +33 (0)1 42 31 40 09 
Tel.: +81 3 5769 6970    
Email: information@vector-france.fr 
Fax: +81 3 5769 6975 
 
Email: info@vector-japan.co.jp 
 
 
 
6 
Application Note  AN-ISC-8-1056 
 

13 - AN-ISC-8-1074_Possible_Loss_Of_Wakeup_Message

Possible Loss Of Wakeup Message

14 - AN-ISC-8-1074_Possible_Loss_Of_Wakeup_Message_ind

Page 1
Page 2
Page 3
Page 4
Page 5

15 - AN-ISC-8-1074_Possible_Loss_Of_Wakeup_Messages


 
Possible Loss Of Wakeup Message 
Version 1.0 
2008-02-26 
Application Note  AN-ISC-8-1074 
 
 
 
Author(s) Ralf 
Fritz 
Restrictions 
Customer confidential - GM only 
Abstract 
This application note describes the possibility of loosing a wake-up request in a GMLAN 
Single Wire environment and the possibility to minimize the possibility of occurrence. For 
GM customer only.  
 
 
 
Table of Contents 
 
1.0 
Overview ..........................................................................................................................................................1 
2.0 
Initialization Of CAN controller.........................................................................................................................2 
2.1 
During Startup ...............................................................................................................................................2 
2.2 
Switching Baud Rate .....................................................................................................................................2 
2.3 
Bus-Off Event ................................................................................................................................................2 
2.4 
Before Sleep Mode........................................................................................................................................2 
3.0 
Switching Transceiver to Sleep mode .............................................................................................................3 
3.1 
Check For Messages ....................................................................................................................................3 
3.2 
Use Transceiver Wake Pin............................................................................................................................4 
4.0 
Switching CAN cell into sleep mode ................................................................................................................4 
5.0 
Polling versus Interrupt ....................................................................................................................................5 
6.0 
Additional Resources .......................................................................................................................................5 
7.0 
Contacts...........................................................................................................................................................5 
 
 
 
1.0 Overview 
GMLAN uses special messages, so called High Voltage Wake-Up Messages (HVWU), to wake-up sleeping 
modules on the Single Wire CAN bus. Under certain conditions it is possible that these messages are discarded 
and do not cause a wake-up of the ECU like expected. This document describes these possible situations and 
methods of reducing the time period where a HVWU message can be lost. 
 
Note: 
This document applies to the Single-Wire CAN bus only, because of its special physical 
implementation. The wake-up behavior on a non Single-Wire CAN bus will differ since every 
receive message will cause a CAN cell wake-up if the CAN cell supports sleep wake-up. 
 
Note: 
The occurrence of this behavior depends on the hardware platform, the compiler, hardware layout 
and many more parameters. Because of this, this application note cannot specify specific time 
durations. 
 
Note: 
Any code samples are only examples of implementation proposals. Because these 
functions are meant for demonstration purposes only, Vector’s liability shall be expressly 
excluded in cases of ordinary negligence to the extent admissible by law or statute.
 
 1  
Copyright © 2008 - Vector CANtech, Inc. 
Contact Information:   www.vector-informatik.com   or ++49-711-80 670-0 


 
 
Possible Loss Of Wakeup Message 
 
 
 
 
 
2.0  Initialization Of CAN controller 
The GMLAN handler will initialize the CAN controller at different times during runtime. The CAN controller is 
initialized in the following situations: 
•  During startup of the handler 
•  Switching baud-rate during flash programming 
•  After a Bus-Off event 
•  Before the handler tries to enter the sleep mode 
•  In case the High Voltage Wake-Up message cannot be sent onto CAN bus 
 
If the CAN cell is initialized, all currently received and not handled receive-messages will be discarded. This means 
that also pending HVWU messages will be discarded and can cause the module not to switch back to 
Communication Enable or Communication Active state as expected. 
The chapters below include a more detailed description of these situations. 
2.1 During 
Startup 
Vectors GMLAN handler can be configured to initialize the CAN controller during the call of IlInitPowerOn(). 
During this time it is not likely to lose any HVWU message, because this function is only called if the system 
performs a cold start. Please see [1] and [2] for further information when this function needs to be called by the 
application. 
After the call of IlInitPowerOn(), the handler will enter at least the Communication Enable state for 8 seconds, 
this means bus activity can be detected and a lost HVWU frame will not cause the module not to participate in the 
CAN communication. 
2.2 Switching 
Baud 
Rate 
To be able to switch the current baud rate to a higher or lower one, the CAN controller needs to be re-initialized 
with the different baud rate settings. During this period, the handler is in the Normal Communication Halted state. 
This means that the module is already awake during this time and will stay awake for at least 4 more seconds. This 
means that if a HVWU frame is lost at this point in time, the handler will still be able to participate in an ongoing 
CAN communication. 
2.3 Bus-Off 
Event 
To start the CAN cell bus-off recovery sequence and to remove any pending transmit request from the CAN 
controller, the GMLAN handler is calling two CAN Driver interface functions. These functions are 
CanResetBusOffStart() and CanResetBusOffEnd(). One of these functions is usually mapped to a function 
which will re-initialize the CAN cell. In such situations, the handler shall ignore any receive messages, which also 
includes HVWU messages. 
Note: 
The implementation of the functions CanResetBusOffStart() and CanResetBusOffEnd() 
are depending on the hardware. Please check the related hardware manual [3] for more 
information. 
2.4  Before Sleep Mode  
Vectors GMLAN handler will call CanResetBusSleep() before the CAN controller is put into sleep mode to 
remove any pending transmit request from the CAN hardware. 
 
2 
Application Note  AN-ISC-8-1074 
 


 
 
Possible Loss Of Wakeup Message 
 
 
 
 
 
Note: 
The implementation of the function CanResetBusSleep() is depending on the hardware. Please 
check the related hardware manual [3] for more information. 
This function is usually mapped to a function which will initialize the CAN controller. The call of this function 
happens when the remainder of the Communication Enable timer reaches a value of 100 ms + 2 times the task 
cycle of the network management task (IlNwmTask()) and the application accepts the sleep request 
(ApplNwmSleepConfirmation returns NmSleepOk). 
Note: 
100 ms is the default provided by the generation tool. This value can be calibrated later to a 
different value. Please check your usage. 
If now the delay between the related I-VNMF to the discarded HVWU message is longer then the time set-up, the 
transceivers will be switched into sleep mode before the I-VNMF is sent to the CAN bus. This will prevent the CAN 
controller from receiving the message and the system will stay in sleep mode. This behavior cannot be changed by 
a software or hardware change. 
3.0  Switching Transceiver to Sleep mode 
On a Single Wire bus it is quite normal, that a single ECU will enter the CAN sleep mode and other modules 
continue to communicate on the same physical CAN bus. To be able to do this, the transceivers of these modules 
are switched into sleep mode before the CAN cell is put into sleep mode. This will prevent any normal message 
communication from being passed to the controller and allows it to enter the CAN sleep mode. Vectors GMLAN 
handler does not check, if there is an ongoing CAN message reception while it requests the application to switch 
the transceiver into sleep mode by calling the function ApplTrcvrSleepMode(). If a normal receive message is 
interrupted, this causes no functional issue, since the module already decided that normal message reception must 
be ignored. 
If during this time a HVWU message is received, the message is most likely lost. This is because only parts of the 
physical CAN message are received by the CAN controller. The transceiver will act like a filter after it is put into 
sleep mode and will not pass all bits of the message to the CAN controller (Please check your transceiver manual 
for the exact behavior of your transceiver). Because the message is not received by the CAN cell, the system will 
not switch back into the Communication Enable or Active state as expected. 
Depending on the used hardware there are maybe some possibilities to minimize the window in which this issue 
can happen. Below two current know methods. 
3.1  Check For Messages 
The goal of this implementation is to minimize the possibility that the HVWU message is cut off by switching the 
transceiver into sleep mode. This requires the CAN hardware to be able to provide the information that there is 
currently ongoing message reception. Vectors GMLAN handler does not provide this information! 
Note: 
Not all hardware platforms provide the needed hardware feature for this implementation. Please 
check your device manual for further information. 
The idea is to check for CAN bus-idle before the transceiver is switched into sleep mode. This would reduce the 
window of losing a HVWU message from the message length of this message to the time it takes to switch the 
transceiver and CAN into sleep mode after an idle CAN bus was detected. 
The flow chart below shows a possible implementation strategy. 
 
3 
Application Note  AN-ISC-8-1074 
 


 
 
Possible Loss Of Wakeup Message 
 
 
 
 
 
Start
No
Bus Idle? 
Yes
Put TRV  
To sleep 
End
 
 
 
Note: 
Waiting for bus idle can take a longer period of time. Please make sure that the loop has a timeout 
criteria which will allow the software to continue in case there will be no bus-idle detected after a 
certain time! 
The code which implements this flow chart needs to be placed into the application callback function 
ApplTrcvrSleepMode() of the Single Wire CAN. This function is called by Vectors GMLAN handler to switch 
the transceiver into sleep mode. After this call, the handler will try and put the CAN cell into sleep mode. 
3.2  Use Transceiver Wake Pin 
If the hardware allows, it is preferable to use the wake-up notification pin of the transceiver. For most of the 
transceivers they provide a dedicated hardware output, which is set high, if the transceiver detects a wakeup frame 
on the CAN bus. If the controller detects that this pin was set, the software should call the GMLAN handler API 
function NmCanWakeUp() to notify the GMLAN handler about this event. 
Note: 
Not all hardware provides the needed feature for this implementation. Please check your device / 
transceiver manual for further information. 
 
4.0  Switching CAN cell into sleep mode 
After the transceiver is put into sleep mode the CAN cell will be put into sleep mode as well by the GMLAN 
handler. Depending on the hardware and the related software implementation of the GMLAN handler there is a 
chance that a pending HVWU message will be lost. 
This can happen if the reception of a HVWU message is finished during or delayed until the time when the GMLAN 
handler switches the transceiver and the CAN cell into sleep mode (The GMLAN handler will disable interrupts 
while it is putting the CAN bus into sleep mode). In such a situation the handler will call the CAN Driver API 
function CanSleep() while a not handled receive message is pending in the CAN cell. Depending on the used 
CAN cell and the implementation of the handler function CanSleep(), this message reception is discarded or 
 
4 
Application Note  AN-ISC-8-1074 
 


 
 
Possible Loss Of Wakeup Message 
 
 
 
 
 
suppressed and will not lead to a wake-up. Please check the related CAN Driver manual [3] for more information 
about the behavior of CanSleep(). 
5.0  Polling versus Interrupt 
The GMLAN handler allows receiving message either on interrupt or polling basis. It is more likely, that a HVWU 
message will be lost, if the handler is configured to receive this message in polling mode. This is because usually a 
receive notification interrupt can happen right after the reception of the physical message and is not delayed until 
the next call of the receive polling task. Interrupt handling of the HVWU frame does not guarantee that the 
message will be received and processed all the time, since the GMLAN handler and the application potentially 
disable the CAN interrupts during certain periods of times for example to guarantee data consistency which will 
also cause a delay of the receive message handling. 
 
6.0 Additional Resources 
[1] GMLAN Technical Reference documentation. 
[2] IL Technical Reference documentation. 
[3] CAN Driver Technical Reference documentation of the used hardware platform. 
 
7.0 Contacts 
 
 
 
 
Vector Informatik GmbH 
Vector CANtech, Inc. 
VecScan AB 
Ingersheimer Straße 24 
39500 Orchard Hill Pl., Ste 550 
Lindholmspiren 5 
70499 Stuttgart 
Novi, MI  48375 
402 78 Göteborg  
Germany 
USA 
Sweden 
Tel.: +49 711-80670-0 
Tel:  +1-248-449-9290 
Tel:  +46 (0)31 764 76 00 
Fax: +49 711-80670-111 
Fax: +1-248-449-9704 
Fax: +46 (0)31 764 76 19  
Email: info@vector-informatik.de 
Email: info@vector-cantech.com 
Email: info@vecscan.com 
 
Vector France SAS 
Vector Japan Co. Ltd. 
Vector Korea IT Inc. 
168 Boulevard Camélinat 
Seafort Square Center Bld. 18F 
Daerung Post Tower III, 508 
92240 Malakoff  
2-3-12, Higashi-shinagawa, 
Guro-gu, Guro-dong, 182-4 
France 
Shinagawa-ku 
Seoul, 152-790 
Tel:  +33 (0)1 42 31 40 00 
J-140-0002 Tokyo 
Republic of Korea 
Fax: +33 (0)1 42 31 40 09 
Tel.: +81 3 5769 6970    
Tel.: +82-2-2028-0600 
Email: information@vector-france.fr 
Fax: +81 3 5769 6975 
Fax:   +82-2-2028-0604 
 
Email: info@vector-japan.co.jp 
Email: info@vector-korea.com 
 
 
 
5 
Application Note  AN-ISC-8-1074 
 

16 - CANdelaStudio_Gm_contact

Microsoft Word - CANdelaStudio_GM_contact.doc

17 - CANdelaStudio_Gm_contact_ind

Page 1

18 - CANdelaStudio_Gm_contacts

 
 
 
 
Vector Informatik GmbH 
Ingersheimer Str. 24 
D-70499 Stuttgart 
www.vector.com 
 
Vector Informatik GmbH - Ingersheimer Str. 24 – D-70499 Stuttgart 
 
  
 
 
 
 
 
 
CANdelaStudio Option General Motors (GM) 
 
Um neue Dokumente mit CANdelaStudio erzeugen zu können, wird eine Dokumentvorlage 
benötigt. Eine Dokumentvorlage enthält die formale Beschreibung des verwendeten 
Diagnoseprotokolls und ist daher herstellerspezifisch. Die Weiterentwicklung und 
Pflege der Dokumentvorlagen liegt in der Verantwortung des Fahrzeugherstellers. Aus 
diesem Grund werden Dokumentvorlagen nicht von Vector Informatik bereitgestellt, 
sondern vom jeweiligen Fahrzeughersteller. 
To create new documents with CANdelaStudio, a document template is needed. A document 
template contains the formal specification of the used diagnostic protocol, thus it is 
manufacturer specific. The development and maintenance of the document templates is in 
charge of the car manufacturer. On this account the document templates are not 
provided by Vector Informatik, but by the respective car manufacturer. 
 
Die Vorlagen für die Option General Motors (GM) sind erhältlich bei: 
 
The templates for the option General Motors (GM) are available from: 
 
 
General Motors Corporation  
Mr. Michael Sowa  
Warren Technical Center Campus 
30003 Van Dyke P.O. Box 9060  
Warren, MI  48090-9060 
Phone:  +1 586 492 5501  
Email:  michael.a.sowa@gm.com 
 
 
Bei Rückfragen wenden Sie sich bitte an: 
 
For any questions please contact: 
 
support@vector.com 
Phone: +49 (0)711/80670-200 
Phone: +49 (0)711/80670-0 
Landesbank BW 2 224 585 (BLZ 600 501 01) 
Managing Directors:  
Fax: +49 (0)711/80670-111 
Deutsche Bank Stuttgart 1 614 080 (BLZ 600 700 70) 
Dr. Thomas Beck, Eberhard Hinderer, 
www.vector.com 
Handelsregister Stuttgart HRB 17317 
Martin Litschel, Dr. Helmut Schelling 
 
 

19 - DeliveryDescription_CBD1400346

Delivery Description CBD1400346

Delivery Description CBD1400346

Delivery Information

Build Information

Version Information

Delivery Information

Customer Information

Package Restriction:Nexteer Automotive Corporation Package: GMLAN 3.1 - CANbedded License for GM; MultiChannel Micro: R7F701311 Compiler: GHS 2015.1.7

This delivery contains software modules that might have different license restrictions. Please note that the usage of this delivery is restricted to the most constraining license included. Please contact Vector or check your order confirmation whenever you need further information concerning the license conditions.

License Number:CBD1400346
License Expiry Date:License does not expire
OEM:Gm
SLP:GMLAN 3.1
Controller:Rh850
CAN Cell:Rscan
Compiler:GreenHills
Ordered Derivative:R7F701311
Customer Contacts:Lucas Wendling Lucas.Wendling@nexteer.com
Lonnie Newton lonnie.newton@nexteer.com

Contact address for Vector for all topics concerning this license. This includes questions and issue reports. Please inform Vector if this contact changes.

Vector Contact:GMSupport  GMSupport@us.vector.com

Contact address at Vector for all questions concerning this delivery.

Non-Disclosure:A non-disclosure agreement related to this license exists.

Delivery Information

Delivery ID:01.01.35.01.40.03.46.01.00.00

This is the unique identification number of this delivery. Please always have this number ready when contacting Vector customer support.

SIP Version:01.01.35
Delivery Number:01
Release Type:Serial production release (complete functionality, fully tested , full process, incl. serial production release)
Delivery Type:Initial delivery (based on explicit purchase order)
Delivery Reason:5015512
Vector Order Confirmation Number:5015512
Tested Derivative:R7F701311

Version Information

Component Version Information

ProjectComponentVersion
CBD_Gm_SLP9Preconfig1.00.01
Common_VdefImplementation3.54.00
Cp_XcpOnCanImplementation1.07.03
Diag_CanDesc__coreBaseGenTool_Geny_CANdesc6.18.00
Diag_CanDesc__coreBaseImplementation6.20.00
Diag_CanDescGgdaExt_GmGenTool_Geny1.07.00
Diag_CanDescGgdaExt_GmImplementation2.07.00
Diag_DescDataModelImplementation1.28.00
Diag_Geny_coreBaseGenTool_Geny6.25.00
DrvCan__baseExt_GmGenTool_Geny1.00.02
DrvCan__baseHllGenTool_Geny3.07.00
DrvCan__baseRi14GenTool_Geny2.09.01
DrvCan__baseRi15HllGenTool_Geny1.02.00
DrvCan_Rh850RscanHllImplementation3.15.00
DrvCan_Sh2RscanHllGenTool_Geny1.11.00
GenTool_CanDbLibGenTool_Geny9.03.01
GenTool_GenyFrameworkGenXmlGenTool_Geny1.15.00
GenTool_GenyGraphicsLibCanGenTool_Geny1.03.00
GenTool_GenyGuiChannelCfgGenTool_Geny1.05.01
GenTool_GenyHtmlConfigDocumentorImplementation1.00.01
GenTool_GenyObjectHierarchyCanGenTool_Geny1.27.00
GenTool_GenyObjectModelGenTool_Geny2.12.00
GenTool_GenyPluginConfigDocumentorGenTool_Geny2.02.03
GenTool_XA2lParserImplementation1.60.04
GenTool_XChecksumcrcGenTool_Geny1.00.00
Hw__baseCpuCanGenTool_Geny2.30.00
Hw_Rh850CpuGenTool_Geny1.10.00
Hw_Sh2RscanCpuCanGenTool_Geny2.12.00
Il_VectorGenTool_Geny1.18.05
Il_Vector_GmGenTool_Geny1.01.02
Il_Vector_GmImplementation1.02.00
Nm_Gmlan_GmGenTool_Geny1.02.02
Nm_Gmlan_GmImplementation4.04.03
Tp_Iso15765GenTool_Geny2.34.00
Tp_Iso15765Implementation3.08.03
VStdLib__baseGenTool_Geny1.02.00
VStdLib_Rh850Implementation1.04.00

Build Information

Build Environment - Options & Versions

Compiler
Version:This Green Hills compiler uses the Edison Design Group C/C++ Front End, version 3.10.1 (Oct 21 2015 22:58:45) Copyright 1988-2007 Edison Design Group, Inc. C-RH850 2015.1.7 RELEASE VERSION: Copyright (C) 1983-2015 Green Hills Software. All Rights Reserved.
RequestedCustomerOptions:--short_enum -shorten_loads -shorten_moves -dual_debug -G -sda=all -prepare_dispose -inline_prologue -delete -ignore_callt_state_in_interrupts -nofloatio -large_sda --no_commons -no_callt -reserve_r2 -cpu=rh850g3m -fhard -Ogeneral
VectorBuildEnvironmentOptions:-DBRS_DERIVATIVE_701311 -DBRS_OSC_CLK=16 -DBRS_TIMEBASE_CLOCK=160 -DBRS_DERIVATIVE_GROUP_P1M -DBRS_OS_USECASE_BRS -DBRS_EVA_BOARD_ -DBRS_PLATFORM_RH850 -DBRS_COMP_GHS -list=lst/.lst -object_dir=obj -stderr=err\.err -c
Linker
Version:This Green Hills compiler uses the Edison Design Group C/C++ Front End, version 3.10.1 (Oct 21 2015 22:58:45) Copyright 1988-2007 Edison Design Group, Inc. C-RH850 2015.1.7 RELEASE VERSION: Copyright (C) 1983-2015 Green Hills Software. All Rights Reserved.
RequestedCustomerOptions:--short_enum -dual_debug -G -sda=all -prepare_dispose -inline_prologue -ignore_callt_state_in_interrupts -nofloatio -large_sda --no_commons -no_callt -reserve_r2 -cpu=rh850g3m -fhard
VectorBuildEnvironmentOptions:-o .elf -map=.map -cpu=rh850g3m --preprocess_linker_directive -e __usr_init TestSuit.ld

20 - DeliveryTestReport_CBD1400346

Delivery Test Report CBD1400346
Delivery Test Report CBD1400346

The content of this delivery and the tested configuration is described in DeliveryDescription_CBD1400346.html

Delivery Information

License Information

License Information:Nexteer Automotive Corporation Package: GMLAN 3.1 - CANbedded License for GM; MultiChannel Micro: R7F701311 Compiler: GHS 2015.1.7
License Number:CBD1400346
OEM:Gm
SLP:GMLAN 3.1
Controller:Rh850
CanCell:Rscan
Compiler:GreenHills

Delivery Information

Delivery Number:01
SIP Version:01.01.35
Delivery ID:01.01.35.01.40.03.46.01.00.00
Release Type:Serial production release (complete functionality, fully tested , full process, incl. serial production release)
Delivery Type:Initial delivery (based on explicit purchase order)
Delivery Reason:5015512

Test Verdict

Test VerdictPassed
Test Report Date2016-05-06

Test Activities

According to Vector’s embedded software development and delivery process, the test activities are assigned to the development phases of the software. The most important development phases for a delivery like this are the Component Test and the Delivery Test.

Component Tests

Each component listed in the section "Detailed Version Information" within the delivery description has been tested during the component development phase before component release independently of this specific delivery. The test activities on component level include:

  • Code inspection and inspection of all work products, e.g. technical references
  • Static and dynamic tests according to the component-specific test specification and test plan
  • MISRA-C:2004 analysis and justification of deviations
  • Code coverage analysis (target: high code coverage of dynamic tests, additional inspection of uncovered code areas)

Delivery Tests

Testing the ordered program ("SLP") on the real hardware with the target compiler and the requested configuration is performed for each delivery ("SIP") in order to detect any delivery specific issues. The test activities on delivery level include:

  • Compile and link test on the real hardware with customer-specific compiler-, assembler- and linker-options (as specified in the questionnaire)
  • Dynamic tests according to the program related delivery test suite
  • Dynamic tests according to the ordered configuration or use-case (depending on the questionnaire or SLP defaults)
  • Optional: manual tests to cover special use-cases

If there are no delivery specific tests documented below this is a redelivery without test relevant changes. The delivery tests from the former delivery are still valid.

The results of the delivery specific tests are documented on a summary level within this report. The result of the component specific test is not documented here as it is a prerequisite that the component has passed its release test before being delivered to customers. Vector does not distribute all the detailed test results to you. If you are interested in a review of the detailed delivery test results and those of the component specific tests, please contact Vector for more information.

Delivery Tests Results

Use Case Standard

Diag: Basic Tests
Passed
Diag: Sleep related Test
Passed
Diag: Partial Offline
Passed
Diag: Reinitialization
Passed
Diag: Periodic Messages
Passed
Diag: Periodic Messages
Passed
Diag: Timing
Passed
Diag: DynDef Messages
Passed
Diag: TP-Error
Passed
Bus Load
Test with heavy bus load
Passed
Remote Frames
Test Remote Frames
Passed
Cancel Transmit
Test Cancel Transmit
Passed
Lock CAN interrupts
Test functionality of CanCanInterruptDisable and CanCanInterruptRestore.
Passed
General tests
These tests validate generic aspects of the GGDA
Passed
Modes required for flash programming
These tests check basic diagnostic modes
Passed
Modes required for fault memory
These tests checks the fault memory diagnostic modes
Passed
GmCal Tests
Tests GmCal: set different configurations, reset, check if messages are send according to configuration
Passed
Application
Verify that optional application APIs work as expected.
Passed
Multiple Identity Module
Verify that the ECU switches message sets properly when configured as a multiple identity module.
Passed
Bus Off
Verify that the ECU enters and exits busoff at the appropriate times, the ECU does not transmit during busoff, and that all related APIs work as expected.
Passed
State
Verify that the ECU enters and exits special diagnostic modes properly and that all related APIs work as expected.
Passed
Bus Off
Verify that the ECU enters and exits busoff at the appropriate times, the ECU does not transmit during busoff, and that all related APIs work as expected.
Passed
Sleep Wakeup
Verify that the ECU enters and exits sleep mode at the appropriate times and that all related APIs work as expected.
Passed
State
Verify that the ECU enters and exits special diagnostic modes properly and that all related APIs work as expected.
Passed
VN Activation
Verify that the ECU activates and deactivates VNs at the appropriate times, the appropriate messages are sent and received, and that all related APIs work as expected.
Passed
TP Transmission Tests
Test TP data transmission and TP data reception with variable data length
Passed
VStdMemCopy Tests
VStdMemCopy Tests
Passed
VStdMemSet Tests
VStdMemSet Tests
Passed
VStdMemClr Tests
VStdMemClr Tests
Passed
Download/Upload Data
Test Upload from RAM and ROM and Download to RAM
Passed
Individual Polling_Tx
Test Individual Polling
Passed
Remote Frames
Test Remote Frames
Passed
Acceptance Filter
Test Acceptance Filter
Passed
Extended Status
Test Extended Status
Passed
Cancel Transmit
Test Cancel Transmit
Passed
Application Messages
Test Rx / Tx ApplMsg, RDS macros, Pretransmit / Precopy
Passed
Individual Polling_Rx
Test Individual Polling
Passed

21 - GM_000A_GMLAN3.1MchRH850_Impl Peer Review Checklists


Overview

Summary Sheet
Synergy Project


Sheet 1: Summary Sheet
























Rev 1.28-Jun-15

Peer Review Summary Sheet


























Synergy Project Name:


kzshz2: Intended Use: Identify which component is being reviewed. This should be the Module Short Name from Synergy Rationale: Required for traceability. It will help to ensure this form is not attaced to the the wrong change request. GM_000A_GMLAN3.1MchRH850_Impl
Revision / Baseline:


kzshz2: Intended Use: Identify which Synergy revision of this component is being reviewed Rationale: Required for traceability. It will help to ensure this form is not attaced to the the wrong change request. CBD1400346_D01_Rh850_0

























Change Owner:


kzshz2: Intended Use: Identify the developer who made the change(s) Rationale: A change request may have more than one resolver, this will help identify who made what change. Change owner identification may be required by indusrty standards. Lucas Wendling
Work CR ID:


EA4#9536





























kzshz2: Intended Use: Intended to identify at a high level to the reviewers which areas of the component have been changed. Rationale: This will be good information to know when ensuring appropriate reviews have been completed. Modified File Types:















































































































































































kzshz2: Intended Use: Identify who where the reviewers, what they reviewed, and if the reviewed changes have been approved to release the code for testing. Comments here should be at a highlevel, the specific comments should be present on the specific review form sheet. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. ADD DR Level Move reviewer and approval to individual checklist form Review Checklist Summary:






















































Reviewed:































N/AMDD


N/ASource Code


N/APolySpace









































N/AIntegration Manual


N/ADavinci Files








































































Comments:

3rd Party BSW component. Only reviewed 3rd party files for correctness to delivery and any Nexteer created






source files and documentation



















































































General Guidelines:
- The reviews shall be performed over the portions of the component that were modified as a result of the Change Request.
- New components should include FDD Owner and Integrator as apart of the Group Review Board (Source Code, Integration Manual, and Davinci Files)
- Enter any rework required into the comment field and select No. When the rework is complete, review again using this same review sheet and select Yes. Add date and additional comment stating that the rework is completed.
- To review a component with multiple source code files use the "Add Source" button to create a Source code tab for each source file.
- .h file should be reviewed with the source file as part of the source file.





















Sheet 2: Synergy Project

Peer Review Meeting Log (Component Synergy Project Review)



















































Quality Check Items:




































Rationale is required for all answers of No










New baseline version name from Summary Sheet follows








Yes
Comments:

Follows convention created for
naming convention











Vector SIP components
























Project contains necessary subprojects








Yes
Comments:










































Project contains the correct version of subprojects








Yes
Comments:










































Design subproject is correct version








N/A
Comments:











































General Notes / Comments:



























































LN: Intended Use: Identify who were the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. KMC: Group Review Level removed in Rev 4.0 since the design review is not checked in until approved, so it would always be DR4. Review Board:


























Change Owner:

Lucas Wendling


Review Date :

02/03/17
































Lead Peer Reviewer:


Rijvi


Approved by Reviewer(s):



Yes































Other Reviewer(s):









































































22 - GMLAN3.1MchRH850 Integration Manual

Integration Manual

For

GMLAN3.1MchRH850

VERSION: 1

DATE: 02/01/17

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.DescriptionAuthorVersionDate
1Initial versionLucas Wendling1.002/01/17

Table of Contents

1 Abbrevations And Acronyms 4

2 References 5

3 Dependencies 6

3.1 SWCs 6

3.2 Global Functions(Non RTE) to be provided to Integration Project 6

4 Configuration REQUIREMeNTS 7

4.1 Build Time Config 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 7

4.5 Manual Configuration Changes 7

5 Integration DATAFLOW REQUIREMENTS 8

5.1 Required Global Data Inputs 8

5.2 Required Global Data Outputs 8

5.3 Specific Include Path present 8

6 Runnable Scheduling 9

7 Memory Map REQUIREMENTS 10

7.1 Mapping 10

7.2 Usage 10

7.3 Non RTE NvM Blocks 10

7.4 RTE NvM Blocks 10

8 Compiler Settings 11

8.1 Preprocessor MACRO 11

8.2 Optimization Settings 11

9 Appendix 12

Abbrevations And Acronyms

AbbreviationDescription

References

This section lists the title & version of all the documents that are referred for development of this document

Sr. No.TitleVersion

Dependencies

SWCs

ModuleRequired Feature
VectorBswSuprtIntegration of this version of GMLAN3.1MchRH850 requires using the 01.04.00_03.08.00 versions of files in the VectorBswSuprt component. This includes ensuring the overall project include path points to: “VectorBswSuprt\include\01.04.00_03.08.00” and the project green hills .gpj file associates the following green hills .gpj subproject file: “VStdLib_01.04.00_03.08.00.gpj”

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

Per the CAN Driver documentation:

"If an exclusive write access to the CAN related EI level interrupt control registers (ICn) is
not possible or if the driver must not access registers outside the CAN address space the
switch C_ENABLE_OSEK_CAN_INTCTRL has to be defined via the user configuration file.

In this case the driver does not access the registers of the interrupt controller at all and the
application has to ensure proper initialization, disabling and restoring of the CAN interrupt
sources.
The initialization of all necessary ICn has to be performed additionally by the application
before the call of CanInitPowerOn()if this switch is defined. All used sources (see
remarks in table 10-1) have to be enabled after initialization whereas unused sources have
to be disabled.

In context of the interrupt disable/restore mechanism the driver implements application
call-backs that are used whenever the functions CanCanInterruptDisable() or
CanCanInterruptRestore() are invoked (see section 9.4 for API definitions). The
function OsCanCanInterruptDisable() should save the current mask status (MK bits)
of all used CAN interrupt sources that are linked to the given logical channel and then set
these bits to 1 in order to disable the sources. OsCanCanInterruptRestore() has to
restore the previously saved mask bits for the given logical channel. These actions may
differ based on the actual software configuration, but all CAN interrupts on the
corresponding channel have to be locked after the first call (nested calls can occur) of
OsCanCanInterruptDisable() and be available not until the last nested call of
OsCanCanInterruptRestore(). Keep in mind that the right physical channel has to be
chosen based on the given logical controller (to get the right ICn) and that the receive
FIFO and global status interrupt are used by all controllers."

It is assumed that integration of the CAN driver is done in a user-mode application that has no direct access to the hardware interrupt registers, and therefore the above “C_ENABLE_OSEK_CAN_INTCTRL” needs to be defined in a user configuration file. A user configuration file is added in the “/tools/” folder of this component (CanDrv.cfg), and this can be included in the Geny Can Driver User configuration file selection to enable this interrupt feature mentioned above. When this is done, the following callouts need to be defined in the integration project:

OsCanCanInterruptDisable

OsCanCanInterruptRestore

These functions need to be implemented to be able to be nested calls, as well as are required to disable all CAN related interrupts. As an example, the OS API “SuspendOSInterrupts” and “ResumeOSInterrupts” can be called from these functions so long as the CAN interrupts are configured to be Category 2 ISRs in the OS (these OS APIs allow nested calls). This may not, however, always be the most efficient implementation as it disables all OS interrupts, not just the CAN related OS interrupts.

Configuration REQUIREMeNTS

Third party documentation can be referenced as needed.

Build Time Config

ModulesNotes

Configuration Files to be provided by Integration Project

N/A

Da Vinci Parameter Configuration Changes

ParameterNotesSWC

DaVinci Interrupt Configuration Changes

ISR NameNotes

Manual Configuration Changes

ConstantNotesSWC

Integration DATAFLOW REQUIREMENTS

Required Global Data Inputs

Required Global Data Outputs

Specific Include Path present

Yes

Runnable Scheduling

Third party documentation can be referenced as needed.

InitScheduling RequirementsTrigger
RunnableScheduling RequirementsTrigger

.

Memory Map REQUIREMENTS

Mapping

Memory SectionContentsNotes

* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.

Usage

FeatureRAMROM

NvM Blocks

Compiler Settings

Preprocessor MACRO

Optimization Settings

Appendix

Updates from Original Delivery

The delivery from Vector for this SIP contained an incorrect “Gateway.pcu” file found in the “/tools/Generators/Components/” directory. Attached is an email from Vector explaining the issue. Also, attached are the original SIP file as well as the updated one from Vector that needs to be used in this SIP.

23 - IssueReport_CBD1400346

ElectricPowerSteering_RH850_GM_G2KCA_website/content/en/docs/GM_000A_GMLAN3.1MchRH850_Impl/doc/IssueReport_CBD1400346

25 - IssueReport_CBD1400346s


Issue Report
License Number
Customer
CBD1400346
Nexteer Automotive Corporation
Package: GMLAN 3.1 - CANbedded License for GM; 
MultiChannel
Micro: R7F701311
Compiler: GHS 2015.1.7
Maintenance Expiry Date
2014-08-01
SIP Delivery Date
SIP Version
2016-04-29
01.01.35
SLP
Delivery Number
GMLAN 3.1
D01
Report Creation Date
2016-05-06
Contact
In case of questions or the need for an update of the basic software delivery, please contact 
GMSupport@us.vector.com or your Vector contact person.
Table of Contents
1.

Introduction
1.1 Resolving Issues
1.2 Issue Classification
2.
New Issues
2.1 Runtime Issues without Workaround: 0
2.2 Runtime Issues with Workaround: 6
2.3 Apparent Issues: 8
2.4 Not Released Functionality: 0
2.5 Compiler Warnings: 24
3.
New Issues for Information: 0
4.
Report Legend
5.
Quality Management Contact
1


Issue Report
1. Introduction
1.1 Resolving Issues
Reported issues are not necessarily fixed automatically by the next update delivery. If some of the 
reported issues shall be fixed, please contact Vector to establish an agreement about issues that 
shall be fixed in upcoming deliveries. Please note that Vector may fix additional issues without 
explicit request.
1.2 Issue Classification
This Issue Report provides issues that have been detected since the last report. The issues have 
been classified to facilitate the assessment of their impact:
The chapter 'New Issues' lists issues that have been detected since the last report and which could 
not be excluded based on the use-case defined in the questionnaire. The issues are classified as 
follows:

Runtime Issues without Workaround: Runtime issues without a workaround require an 
update of the basic software delivery in case the issue affects the ECU overall functionality. 
The effect of an issue to the ECU functionality has to be analyzed by the customer as the basic 
software usage and its configuration is not known by Vector. The risk of change has also to be 
taken into account.

Runtime Issues with Workaround: It is not recommended to update a delivery due to a 
runtime issue with a documented workaround. The effect of an issue to the ECU functionality 
has to be analyzed by the customer as the basic software usage and its configuration is not 
known by Vector. The risk of change has also to be taken into account.

Apparent Issues: Apparent issues are detected immediately when using the basic software. 
If an issue does not show up while working with the basic software the ECU project is not 
affected by the issue. Apparent issues may or may not have workarounds.

Not Released Functionality: Not released functionalities are modules and features that have 
not yet passed a complete development cycle (they are e.g. not or only partly tested). For 
serial production projects the integrator has to ensure that all BETA features are disabled as 
indicated. If a ESCAN affects a complete BSW module, the module must not be used for serial 
production.

Compiler Warnings: As a service we report the known compiler warnings. The occurrence of 
a compiler warning may depend on the used configuration and compiler settings.
The chapter 'New Issues for Information' lists issues that are not relevant for the use case that 
has been documented in the questionnaire provided to Vector. The issues may, however, be 
relevant for other use cases. Additionally, issues that have been accepted or are tolerated by the 
OEM (as defined in the questionnaire) are reported here.
2


Issue Report
2. New Issues
2.1 Runtime Issues without Workaround
The lists contain issues that have been detected since the last report and which could not be 
excluded based on the use-cases defined in the questionnaire (see chapter ‘New Issues for 
Information’).
2.2 Runtime Issues with Workaround
It is not recommended to update a delivery due to a runtime issue with a documented 
workaround. The effect of an issue to the ECU functionality has to be analyzed by the customer as 
the basic software usage and its configuration is not known by Vector. Thereby the risk of change 
has also to be taken into account. 
Index
ESCAN00027894
Memory is overwritten when initializing the CANBedded Stack
Nm_Gmlan_Gm@Implementation
ESCAN00045854
An incorrect timeout is issued for Flow Control and Consecutive Frame timing 
supervision.
Tp_Iso15765@GenTool_Geny
ESCAN00068912
Positive response to service $A5 03 not suppressed
Diag_CanDesc__coreBase@Implementation
ESCAN00073999
Signal handler names have wrong names after deletion of some signals of a 
DID
Diag_CanDesc__coreBase@GenTool_Geny_CANdesc
ESCAN00078197
Missing first response for service 0xA9 0x81 request
Diag_CanDesc__coreBase@Implementation
ESCAN00081145
Validity Bits for Oem GM (Consistency Checks)
GenTool_GenyObjectHierarchyCan@GenTool_Geny
3


Issue Report
ESCAN00027894
Memory is overwritten when initializing the 
CANBedded Stack

Component@Subcomponent:
Nm_Gmlan_Gm@Implementation
First affected version:
3.30.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Memory is overwritten when initializing the CANBedded Stack.
When does this happen:
-------------------------------------------------------------------
The issue occurs always and immediately if CclInitPowerOn or IlInitPowerOn is called with the 
configuration mentioned below.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration, where the number of Nm Channels differs from the number of Can Channels.
Hint: The generated define in kCanNumberOfChannels in can_cfg.h differs from 
kNmNumberOfChannels generated to nm_cfg.h
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Do not call IlInitPowerOn in the application. Instead, call IlInit for each channel which uses the 
Interaction Layer.
Note for GM ECUs: If the Interaction Layer is not used on the first channel in GENy (channel index 
0), the application must additionally call CanInitPowerOn before IlInit.
Example:
The ECU has three CAN channels, where the Interaction Layer is only used on the first two.
IlInit(0); /* Initialize the IL on CAN channel 0 */
IlInit(1); /* Initialize the IL on CAN channel 1 */
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
4


Issue Report
ESCAN00045854
An incorrect timeout is issued for Flow Control and 
Consecutive Frame timing supervision.

Component@Subcomponent:
Tp_Iso15765@GenTool_Geny
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
An incorrect timeout is issued for Flow Control (TX) and Consecutive Frame (RX) timing 
supervision in case of large timeouts.
When does this happen:
-------------------------------------------------------------------
During runtime at transmission and/or reception of multi frames.
In which configuration does this happen:
-------------------------------------------------------------------
This can only appear if channel specific timing is activated (#if defined 
TP_CHANNEL_SPECIFIC_TIMING)
AND 
the configured timeout values are greater than 255 "ticks".
Please note that the number of "ticks" is calculated by dividing the configured timeout value by 
the configured periodic cycle time of the TP.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Use smaller timeouts or increase the call-cycle of the TP task functions.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
5


Issue Report
ESCAN00068912
Positive response to service $A5 03 not suppressed
Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
6.12.01
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The positive response to service $A5 03 is not suppressed. 
AND possibly
The following compiler warning occurs:
 static void DescOemEnableProgrammingMode(DescMsgContext *pMsgContext)
 ^
"desc.c", Warning[Pe177]: 
 function "DescOemEnableProgrammingMode" was declared but never referenced
When does this happen:
-------------------------------------------------------------------
At runtime/compile time.
In which configuration does this happen:
-------------------------------------------------------------------
Configurations created in an older delivery affected by ESCAN00061312:
"Not possible to support negative responses while suppressing positive response for service $A5 
03"
AND
The 'Reload all description files' button on the 'Diag_CanDesc_Kwp' page in GENy has NOT been 
pressed at least once since moving from the older delivery.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Press the 'Reload all description files' button on the 'Diag_CanDesc_Kwp' page in GENy and then 
save the configuration. This process only needs to be done once.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
6


Issue Report
ESCAN00073999
Signal handler names have wrong names after 
deletion of some signals of a DID

Component@Subcomponent:
Diag_CanDesc__coreBase@GenTool_Geny_CANdesc
First affected version:
6.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
After reloading a modified CDD file, where signals of a DID were deleted, the signal handlers of 
the DID have the names of the deleted signals.
When does this happen:
-------------------------------------------------------------------
After deleting some signals within a signal list of a DID in CANdela Studio and reloading the 
modified CDD file
within GENy.
In which configuration does this happen:
-------------------------------------------------------------------
Signal handlers are used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Empty the field "CANdela document name" and click "Reload all description files". The 
configuration is now empty and no old names are stored. Afterwards import the CDD file again.
OR
For the affected signals change the Signal Handler Type to "Direct Access" and back to "Signal 
Handler" again
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
7


Issue Report
ESCAN00078197
Missing first response for service 0xA9 0x81 request
Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
6.06.00
Fixed in versions:
6.21.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
For a service 0xA9 0x81 request the first response with the first DTC is not sent on the bus.
When does this happen:
-------------------------------------------------------------------
Always during run-time in the following scenario:
- A scheduled DPID is currently read out (could take multiple task calls)
- During the reading the service 0xA9 0x81 is requested
In which configuration does this happen:
-------------------------------------------------------------------
Service 0xAA is configured
AND
Service 0xA9 0x81 is configured
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Create a user config file with the following content and add it in GENy to the component CANdesc:
#ifdef DESC_UUDTNET_DISABLE_MULTI_CLIENT
# undef DESC_UUDTNET_DISABLE_MULTI_CLIENT
# define DESC_UUDTNET_ENABLE_MULTI_CLIENT
#endif
Afterwards generate CANdesc again.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
8


Issue Report
ESCAN00081145
Validity Bits for Oem GM (Consistency Checks)
Component@Subcomponent:
GenTool_GenyObjectHierarchyCan@GenTool_Geny
First affected version:
1.09.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
GENy in combination with the Il_Vector_Gm does not generate.
When does this happen:
-------------------------------------------------------------------
Always and immediately if the configuration has been created with an inconsistent dbc file.
In which configuration does this happen:
-------------------------------------------------------------------
Any configuration with validity bits, where
a validity bit is part of a rx message
AND
a signal using a validity bit is mapped to the current ECU
AND
the validity bit itself is NOT mapped to the current ECU.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Change your dbc file and map the validity bit signal to the ECU. Update the configuration in GENy 
or create a new the configuration with the updated dbc file.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
9


Issue Report
2.3 Apparent Issues
Apparent issues are detected immediately when using the basic software. If an issue does not 
show up while working with the basic software the ECU project is not affected by the issue. 
Apparent issues may or may not have workarounds. 
Index
ESCAN00049589
Compile error: direct signal access feature in CANdesc does not consider far 
memory pointers
Diag_CanDesc__coreBase@Implementation
ESCAN00055957
appdesc.c missing line feed (LF) after carraige return (CR) on some lines
Diag_CanDesc__coreBase@Implementation
ESCAN00069876
Incorrect Description for Calibration Attribute nmMaxApplShutDownDenyCnt
CBD_TechRef_GmlanCalibration@Doc_TechRef
ESCAN00070445
The P2 timings can be changed in the tool GUI but the new values have no 
effect on CANdesc code generation
Diag_CanDesc__coreBase@GenTool_Geny_CANdesc
ESCAN00071069
The description of service 0x12 is out-dated
Diag_CanDesc_Oem@Doc_TechRef_Kwp_Gm
ESCAN00076919
"unknown exception occurred" occurs during DBC update
Il_Vector@GenTool_Geny
ESCAN00079945
Os cat2 interrupts for Autosar OS are not supported in CANbedded 
configurations
DrvCan__HllIdxCrx@Doc_TechRef
ESCAN00083461
Description missing, that Block Size and STmin always reset when a 
connection is terminated
Tp_Iso15765@Doc_TechRef
10


Issue Report
ESCAN00049589
Compile error: direct signal access feature in 
CANdesc does not consider far memory pointers

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
1.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compile error for mismatching pointer type assignment.
When does this happen:
-------------------------------------------------------------------
At compile time.
In which configuration does this happen:
-------------------------------------------------------------------
- CANdesc
AND
- Direct signal access to RAM/ROM objects is used.
AND
- FAR memory
Some services such as the UDS ones 0x22/0x2A and 0x2E, can be processed on signal level. If 
they are processed on signal level it is possible to choose "Direct Access" as Signal 
Handler Type. In this case, CANdesc reads or writes the value of signal direct of/to a variable. 
(The name of the variable is configured in the cdd file or GENy.) If this variable
is located in FAR memory a Compiler/Linker warning or error will occur. 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Avoid direct signal access to such objects and implement the main-handler within the application 
code. (Choose "Signal Handler" for the Signal Handler Type and copy the
data that is located in the FAR memory in the application callback for this signal.)
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
11


Issue Report
ESCAN00055957
appdesc.c missing line feed (LF) after carraige 
return (CR) on some lines

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.07.26
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The appdesc.c file is missing the line feed (LF) character at the end of certain lines. It should 
follow the carraige return (CR) character. This will cause compilers and debuggers to display the 
incorrect line of source code. Additionally, some IDEs will complain that the line feed character is 
missing.
When does this happen:
-------------------------------------------------------------------
At generation time.
In which configuration does this happen:
-------------------------------------------------------------------
All configurations.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
12


Issue Report
ESCAN00069876
Incorrect Description for Calibration Attribute 
nmMaxApplShutDownDenyCnt

Component@Subcomponent:
CBD_TechRef_GmlanCalibration@Doc_TechRef
First affected version:
2.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The description in chapter 6.7 for calibration attribute nmMaxApplShutDownDenyCnt suggests 
that this attribute can be modified in the GENy GUI, but the selection doesn't exist. The 
documentation will be updated to remove this suggestion.
nmMaxApplShutDownDenyCnt can be modified in the generated handler calibrations file gmlcal.c.
When does this happen:
-------------------------------------------------------------------
Always
In which configuration does this happen:
-------------------------------------------------------------------
All
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
13


Issue Report
ESCAN00070445
The P2 timings can be changed in the tool GUI but 
the new values have no effect on CANdesc code 
generation

Component@Subcomponent:
Diag_CanDesc__coreBase@GenTool_Geny_CANdesc
First affected version:
6.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The user is able to modify the default P2 timings in the GENtool GUI, but the new values are not 
used during the CANdesc code generation. As a result the default P2 timings are only applicable.
When does this happen:
-------------------------------------------------------------------
At CANdesc configuration resp. code generation time.
In which configuration does this happen:
-------------------------------------------------------------------
Any KWP2000 configuration that shall use P2 timings other than the default ones.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The P2/P2* timings are set automatically according to the GM specification to the values of 75 ms/
5000 ms. Usually, there should be no need to change the P2/P2* timings in GENy to a different 
value.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
14


Issue Report
ESCAN00071069
The description of service 0x12 is out-dated
Component@Subcomponent:
Diag_CanDesc_Oem@Doc_TechRef_Kwp_Gm
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The description of service 0x12 doesn't consider the changes made with CANdesc 6.
Only one application callback on SID level is generated instead of two, for each sub-function.
When does this happen:
-------------------------------------------------------------------
Always.
In which configuration does this happen:
-------------------------------------------------------------------
Any.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
6.2 Service ReadFailureRecordData ($12)
CANdesc generates only one function callback (main-handler) for all service $12 requests and 
does not offer any special support for this service. Therefore all dispatching and validation steps 
(e.g. dispatching on sub-function level, check the request length or validate the PID parameter if 
applicable), as well as the assembly of the response message (including the sub-function byte) 
have to be performed by the application.
6.2.1 Service ReadFailureRecordIdentifiers ($12 $01)
Depending on the report type requested (PID or DPID) the application must place one of the 
following values into the first data byte of the response message:
 0x00 - for report by PID
 0x01 - for report by DPID
 
 Note
The ECU can support either reports by PID or DPID, but not both.
 
6.2.2 Service ReadFailureRecordParameters ($12 $02)
CANdesc does not automatically include the PID parameter in the response message for service 
$12 $02. The application must perform this task.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
15


Issue Report
ESCAN00076919
"unknown exception occurred" occurs during DBC 
update

Component@Subcomponent:
Il_Vector@GenTool_Geny
First affected version:
1.05.02
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following error message is displayed:
“[Error] an unknown exception occurred when updating VObjectConsumer: <unnamed>”
Additionally, it is not possible to reload the GENy configuration after saving and closing it. Upon 
reloading, the following error message is displayed:
"[Error] Unknown exception during ECU load"
When does this happen:
-------------------------------------------------------------------
When performing the 'Upgrade Database' action in GENy (the "X->Z" button on the toolbar).
In which configuration does this happen:
-------------------------------------------------------------------
When an Rx message in the original DBC file is changed to a Tx message in the new DBC file
Note: This can happen when one identity of a multiple identity module receives its own message 
from another identity
AND
This message is configured to use a common buffer in GENy
(both conditions must be true for the issue to occur)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Perform the following steps in GENy:
1. On the Tx or Rx Messages page, for the affected message, click in the "Common Buffer" field 
and delete all the text in this box
2. On the Tx or Rx Messages page, change the affected message buffer type from "Common 
Buffer" to "Own Buffer"
3. Perform the DBC update as usual
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
16


Issue Report
ESCAN00079945
Os cat2 interrupts for Autosar OS are not supported 
in CANbedded configurations

Component@Subcomponent:
DrvCan__HllIdxCrx@Doc_TechRef
First affected version:
3.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
It is not possible to select OS cat 2 interrupts for the CAN driver in GENy.
When does this happen:
-------------------------------------------------------------------
This happens during configuration in GENy.
In which configuration does this happen:
-------------------------------------------------------------------
in CANbedded configurations where OS Type is set to "Autosar" and the CAN interrupt has to be 
set to OS cat 2.
 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The OS Type "OSEK" can be used instead. The application has to provide the file "osek.h" which 
has to include "os.h".
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
17


Issue Report
ESCAN00083461
Description missing, that Block Size and STmin 
always reset when a connection is terminated

Component@Subcomponent:
Tp_Iso15765@Doc_TechRef
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When using the APIs TpRxSetBS and TpRxSetSTmin, the values are not persisted after the end of 
a connection. This means that after the connection is terminated, also the APIs TpRxGetBS and 
TpRxGetSTmin don't return the value which have been set before.
The APIs need to be called again before the next connection (e.g. from the context of 
ApplTpGetBuffer).
Although this behavior is intended, it is not described in the TechRef.
When does this happen:
-------------------------------------------------------------------
Whenever using the APIs to dynamically change the flow control parameter 
In which configuration does this happen:
-------------------------------------------------------------------
TP_USE_EXTENDED_API_BS == kTpOn
or
TP_USE_EXTENDED_API_STMIN == kTpOn
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
If FC parameters shall be persisted after a connection is terminated, the application must call 
TpSetBS / TpRxSetSTmin at the beginning of each connection, ideally from the context of the 
ApplTpGetBuffer call-out.
If the value of the parameters read back by TpGetBS / TpGetSTmin shall be the same as set 
before by the according APIs, even if the connection is terminated, it must be persisted in the 
application.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
2.4 Not Released Functionality
Not released functionalities are modules and features that have not yet passed a complete 
development cycle (they are e.g. not or only partly tested). For serial production projects the 
integrator has to ensure that all BETA features are disabled as indicated. If a ESCAN affects a 
complete BSW module, the module must not be used for serial production.
No issue to be reported.
18


Issue Report
2.5 Compiler Warnings 
As a service we also provide the known compiler warnings. The occurrence of a compiler warning 
may depend on the used basic software configuration and compiler settings.
Index
ESCAN00027183
Compiler warning: condition is always true
Diag_CanDesc__coreBase@Implementation
ESCAN00027751
Compiler warning for cast to smaller type for "failedByteMask"
Diag_CanDesc__coreBase@Implementation
ESCAN00029697
Compiler warning for useless assignment on API DescPmClientCheckPid
Diag_CanDesc__coreBase@Implementation
ESCAN00031035
Compiler Warning: variable "timer" in "DescRdpiDeletePid" is possibly 
uninitialized
Diag_CanDesc__coreBase@Implementation
ESCAN00047283
IL flags are declared without the "volatile" keyword.
Il_Vector@Implementation
ESCAN00058378
Compiler warning: narrowing or signed-to-unsigned type conversion found
Diag_CanDescGgdaExt_Gm@Implementation
ESCAN00059701
Compiler warning: condition is always true" in the IlTxTimerTask, 
IlTxStateTask and IlTxRepetitionsAreActive
Il_Vector@Implementation
ESCAN00079828
Compiler warning: CANdesc Variable "reason" Set But Never Used
Diag_CanDesc__coreBase@Implementation
ESCAN00081827
Compiler warning: Truncating assignment in DescUsdtNetIsoTpCopyToCan
Diag_CanDesc__coreBase@Implementation
ESCAN00081836
Compiler warning: Truncating assignment in DescConfirmation
Diag_CanDesc__coreBase@Implementation
ESCAN00081850
Compiler warning: Truncating assignment in DescICNGetResponseData
Diag_CanDesc__coreBase@Implementation
ESCAN00081852
Compiler warning: Truncating assignment in 
DescUudtNetCANTxReserveResource
Diag_CanDesc__coreBase@Implementation
ESCAN00081853
Compiler warning: Truncating assignment in DescPidDispatcher
Diag_CanDesc__coreBase@Implementation
ESCAN00081861
Compiler warning: Truncating assignment in DescContextStateTask
Diag_CanDesc__coreBase@Implementation
ESCAN00081862
Compiler warning: Truncating assignment in DescUpdateScheduler
Diag_CanDesc__coreBase@Implementation
ESCAN00081863
Compiler warning: Truncating assignment
Diag_CanDesc__coreBase@Implementation
ESCAN00081864
Compiler warning: Truncating assignment in DescGetDynDpidHandle
Diag_CanDesc__coreBase@Implementation
ESCAN00081869
Compiler warning: Truncating assignment in 
DescDefDynDpidAppendPidDefinition
Diag_CanDesc__coreBase@Implementation
ESCAN00083566
Compiler warning: variable g_descSchedulerTimer set but never used
Diag_CanDesc__coreBase@Implementation
ESCAN00083588
Compiler warning: variable g_descRdpiStateCtrl is set but never used
Diag_CanDesc__coreBase@Implementation
ESCAN00085287
Canbedded only: Compiler warning: Variable 'canPendingTemp' was set but 
never used
DrvCan_Sh2RscanLl@Implementation
ESCAN00086295
Compiler warning: Infinite loop possibility
Diag_CanDesc__coreBase@Implementation
19


Issue Report
Index
ESCAN00088724
Compiler warning: dummy function has no prototype
Tp_Iso15765@GenTool_Geny
ESCAN00089512
Compiler warning: braces around scalar initializer [enabled by default]
Diag_CanDesc__coreBase@Implementation
20


Issue Report
ESCAN00027183
Compiler warning: condition is always true
Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler produces the warning "variable ondition is always true" when compiling desc.c. 
When does this happen:
-------------------------------------------------------------------
At compile time
In which configuration does this happen:
-------------------------------------------------------------------
Tasking compiler is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
This does not affect the behavior of the compiled code, and can be safely ignored.
21


Issue Report
ESCAN00027751
Compiler warning for cast to smaller type for 
"failedByteMask"

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
3.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warning message for the assignment:
*failedByteMask = (vuint8)(0x02 << *failedByteMask);
But there is no real danger of losing information by casting down to a smaller type since the code 
generator does not allow more than 7 (seven) sub-service bytes in the request message. So 
skipping the SID (bit 0) does not lead to losing the MSB and the value of the failedByteMask 
cannot be greater than six.
When does this happen:
-------------------------------------------------------------------
At compile time.
In which configuration does this happen:
-------------------------------------------------------------------
-CANdesc/CANdescBasic
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore the warning
Resolution:
-------------------------------------------------------------------
This ESCAN will not be resolved, since the fix might require more resources on the ECU. The code 
generator assures that there will be no overflow on the shift operation.
22


Issue Report
ESCAN00029697
Compiler warning for useless assignment on API 
DescPmClientCheckPid

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
4.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler generates a warning message for useless assignment (a = a;) .
When does this happen:
-------------------------------------------------------------------
At compile time.
In which configuration does this happen:
-------------------------------------------------------------------
- CANdesc
_AND_
- Service 0x22 is supported with multiple DIDs in single request.
_AND_
- Service 0x2C is not supported.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore this warning since it is only because of an useless assignment.
Resolution:
-------------------------------------------------------------------
The described issue will not be corrected, since the solution will require more ROM resources.
23


Issue Report
ESCAN00031035
Compiler Warning: variable "timer" in 
"DescRdpiDeletePid" is possibly uninitialized

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler produces the warning "variable 'timer' is possibly uninitialized" when compiling 
desc.c. 
When does this happen:
-------------------------------------------------------------------
At compile time
In which configuration does this happen:
-------------------------------------------------------------------
If service 0xAA supported and at least one periodic transmission mode is supported (i.e. not only 
"send one response" is supported).
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
This warning is incorrect and can be safely ignored.
24


Issue Report
ESCAN00047283
IL flags are declared without the "volatile" keyword.
Component@Subcomponent:
Il_Vector@Implementation
First affected version:
3.10.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
IL flags (Indication, FirstValue, Confirmation, Timeout) are declared without the "volatile" 
keyword. Read and Write access to IL flags has no effect due to a Read-Modify-Write problematic.
e.g.
FlagA and FlagB are in the same byte and set on interrupt level
this sequence is executed on task level:
disable int; 
clear FlagA; /*1*/
enable int;
... /*3*/
disable int;
clear FlagB; /*2*/
enable int;
The compiler might optimize this sequence and the flag read and write ALWAYS fails:
read the byte at 1), modify the local copy and write the byte at 2)
if the byte is written on interrupt level at 3), the data is lost.
When does this happen:
-------------------------------------------------------------------
At runtime (This Problem has been found by a review and has never been detected in a ECU)
In which configuration does this happen:
-------------------------------------------------------------------
- This issue highly depends on the used compiler and compiler options.
- Preemptive IL flag access is used (e.g. interrupt system)
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Review the optimization configuration of your compiler.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
25


Issue Report
ESCAN00058378
Compiler warning: narrowing or signed-to-unsigned 
type conversion found

Component@Subcomponent:
Diag_CanDescGgdaExt_Gm@Implementation
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The following compiler warning occurs:
warning (dcc:1643): narrowing or signed-to-unsigned type conversion found: unsigned int to 
unsigned short
This warning occurs for the following code in GgdaRdiRxTask:
 /* send the DTC number and the FTB */
 vuint16 DTCNr = ((vuint16) ggdaContexts[context].uudtPrimBuffer[1] << 8)
 | (vuint16) ggdaContexts[context].uudtPrimBuffer[2];
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Configurations which use service $A9.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The warning can be safely ignored.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
26


Issue Report
ESCAN00059701
Compiler warning: condition is always true" in the 
IlTxTimerTask, IlTxStateTask and 
IlTxRepetitionsAreActive

Component@Subcomponent:
Il_Vector@Implementation
First affected version:
2.42.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for "condition is always true" in the IlTxTimerTask, IlTxStateTask and 
IlTxRepetitionsAreActive API. This may happen depending on the configuration.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
IlTxTimerTask, IlTxStateTask: Any configuration with exactly one tx message.
IlTxRepetitionsAreActive: Any configuration with exactly one tx message and the API is 
configured. (IL_ENABLE_SYS_TX_REPETITIONS_ARE_ACTIVE_FCT must be defined)
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed due to the rare configuration. The code uses a while loop with a 
counter and can probably replaced by a for loop, but other compilers or codeanalysers may warn 
about a useless loop. The code exists for about 15 Years and will not be changed.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
27


Issue Report
ESCAN00079828
Compiler warning: CANdesc Variable "reason" Set 
But Never Used

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
6.16.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
A compiler warning is issued for "desc.c, line ____:warning #550: variable "reason" was set but 
never used". This is found in function DescDefDynDpidAppendPidDefinition.
When does this happen:
-------------------------------------------------------------------
Always during compilation of the code in case the configuration is as described below.
In which configuration does this happen:
-------------------------------------------------------------------
Service 0x2C is configured
 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
28


Issue Report
ESCAN00081827
Compiler warning: Truncating assignment in 
DescUsdtNetIsoTpCopyToCan

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.07.24
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function 
DescUsdtNetIsoTpCopyToCan:
...
vuint8_least i = infoStruct->Length;
...
No issues will result from this warning, because the value passed from the ISO TP will never 
exceed 255.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
The data type vuint8_least is mapped to vuint8 (unsigned char) (which is mostly done for 8Bit 
Controller)
AND
ISO TP from Vector is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
29


Issue Report
ESCAN00081836
Compiler warning: Truncating assignment in 
DescConfirmation

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
3.01.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function DescConfirmation in the 
usage of the conditional operator:
...
result = (status != kTpSuccess) ? kDescUsdtNetworkAbort:kDescUsdtNetworkOk;
...
No issues will result from this warning, because the two possible values used in the conditional 
operator have the same type as the variable they are assigned to.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
ISO TP from Vector is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
30


Issue Report
ESCAN00081850
Compiler warning: Truncating assignment in 
DescICNGetResponseData

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
3.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function DescICNGetResponseData 
in the usage of the conditional operator:
...
 copyLen = ((((vuint16)
(g_descUsdtNetInfoPoolDescICN[DICN_CHANNEL_PARAM_VALUE].dataLength - 
g_descIcnState[DICN_CHANNEL_PARAM_VALUE].rdIdx)) / kDescICNTempBufferLen) != 0)?
 kDescICNTempBufferLen:
 (g_descUsdtNetInfoPoolDescICN[DICN_CHANNEL_PARAM_VALUE].dataLength % 
kDescICNTempBufferLen);
...
No issues will result from this warning, because the two possible values which can be assigned are 
always smaller than 8 byte. 
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
ISO TP from Vector is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
31


Issue Report
ESCAN00081852
Compiler warning: Truncating assignment in 
DescUudtNetCANTxReserveResource

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
6.16.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function 
DescUudtNetCANTxReserveResource for the following assignment:
...
 g_descUudtNetResMgrCtxt.size = 
DESC_CHNL_INFO_MSG_BASE_IDX_NXT(CHANNEL_ITER_VALUE) - 
g_descUudtNetResMgrCtxt.baseIdx;
...
No issues will result from this warning, because the two operands for the subtraction are always 
smaller than 255 and the first operand always greater or equal than the second operand. 
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
Service 0x2A is configured
AND
UUDT messages for the periodic responses are configured
AND
UUDT messages on more than one channel are configured
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
32


Issue Report
ESCAN00081853
Compiler warning: Truncating assignment in 
DescPidDispatcher

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function DescPidDispatcher for the 
following assignment:
...
 iter = g_descMsgContext[DESC_CONTEXT_PARAM_VALUE].reqDataLen;
...
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
data type vuint8_least is mapped to vuint8 (unsigned char)(mostly done for 8 bit controller)
AND
Service 0x22 is used
AND
Multiple PIDs are allowed to be requested in one request
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
33


Issue Report
ESCAN00081861
Compiler warning: Truncating assignment in 
DescContextStateTask

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
4.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function DescContextStateTask for 
the following assignment:
...
g_descInterruptContextCtrl[DESC_CONTEXT_PARAM_VALUE].infoPoolPtr->resType = 
(g_descNegResCode[DESC_CONTEXT_PARAM_VALUE] == kDescNrcNone)?
kDescUsdtResponsePositive:kDescUsdtResponseNegative;
...
No issues will result from this warning, because the two possible values used in the conditional 
operator have the same type as the variable they are assigned to.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code.
In which configuration does this happen:
-------------------------------------------------------------------
In all configurations
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
34


Issue Report
ESCAN00081862
Compiler warning: Truncating assignment in 
DescUpdateScheduler

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
4.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function DescUpdateScheduler for 
the following assignment:
...
i = pMsgContext->reqDataLen;
...
No issue will result from this warning because the reqDataLen parameter is checked against the 
constant kDescNumOfPeriodicPids and this constant will be limited by the CANdesc generator to 
255.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
data type vuint8_least is mapped to vuint8 (unsigned char)(mostly done for 8 bit controller)
AND
Service 0xAA is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
35


Issue Report
ESCAN00081863
Compiler warning: Truncating assignment
Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
4.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in...
1) ... the function DescReadDpidStop for the assignment
 ...
 i = pMsgContext->reqDataLen;
 ...
2) ... the function DescReadDpidOnce for the assignment
 ...
 i = pMsgContext->reqDataLen;
 ...
An issue would only arise for warnings 1) and 2) if one request contains more than 255 DPIDs. 
However, the range of allowed DPID values is smaller than 240 elements. Therefore, to request 
more than 255 DPIDs implies that one DPIDs is requested multiple times in the same request, 
which is not a use case at all.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
data type vuint8_least is mapped to vuint8 (unsigned char)(mostly done for 8 bit controller)
AND
Service 0xAA is used
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
36


Issue Report
ESCAN00081864
Compiler warning: Truncating assignment in 
DescGetDynDpidHandle

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
4.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function DescGetDynDpidHandle 
for the following statement:
...
 return (g_descDynDpid2GlobalDpidHandle[iter] != globalDpidHandle)?
 kDescNumDynDefinedDpids:iter;
...
No issue will arise from that warning because the value range of DPIDs is by definition smaller 
than 255 .
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
Dynamic DPIDs are supported
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
37


Issue Report
ESCAN00081869
Compiler warning: Truncating assignment in 
DescDefDynDpidAppendPidDefinition

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
4.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler warning "Truncating assignment" is issued in the function 
DescDefDynDpidAppendPidDefinition for the following statement:
...
g_descDynDpidTempInfoTable.resDataLength += DescPmGetPidResponseLen(srcPidHandle);
...
No issue will arise from that warning because the amount of response data will never exceed 255.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below.
In which configuration does this happen:
-------------------------------------------------------------------
Dynamic DPIDs are supported
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
38


Issue Report
ESCAN00083566
Compiler warning: variable g_descSchedulerTimer 
set but never used

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.00.02
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns that the variable g_descSchedulerTimer is set but never used.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Service 0xAA is configured only with the sub-function 0x01 to read a DPID once.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
39


Issue Report
ESCAN00083588
Compiler warning: variable g_descRdpiStateCtrl is 
set but never used

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.04.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns that the variable g_descRdpiStateCtrl is set but never used.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
Service 0xAA is configured only with the sub-function 0x01 to read a DPID once.
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
No workaround available.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
40


Issue Report
ESCAN00085287
Canbedded only: Compiler warning: Variable 
'canPendingTemp' was set but never used

Component@Subcomponent:
DrvCan_Sh2RscanLl@Implementation
First affected version:
3.01.00
Fixed in versions:
4.01.00, 3.13.04
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
The compiler issues a warning like following: Variable 'canPendingTemp' was set but never used.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
C_ENABLE_CANCEL_IN_HW is defined
and
C_ENABLE_TX_OBSERVE is NOT defined
and
C_ENABLE_CAN_TX_CONF_FCT is NOT defined
and
C_ENABLE_RETRANSMIT is NOT used in the project
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
The compiler warning does not indicate any unsuspected behavior and can be ignored.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
41


Issue Report
ESCAN00086295
Compiler warning: Infinite loop possibility
Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
5.07.24
Fixed in versions:
6.21.00
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warning due to the possibility of infinite loop when the following code is executed
while(i--)
 {
 infoStruct->pDestination[i] = infoStruct->pSource[i];
 }
There is no possibility of going through an infinite loop in this situation. Ultimately i reaches zero. 
If i is zero in the first place, while loop will not be executed.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
all Configurations
Hint:
-------------------------------------------------------------------
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Resolution:
-------------------------------------------------------------------
42


Issue Report
ESCAN00088724
Compiler warning: dummy function has no 
prototype

Component@Subcomponent:
Tp_Iso15765@GenTool_Geny
First affected version:
2.00.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
Compiler warns for a function definition without prototype in tp_par.c
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
TP Class = Static Normal Multip TP
AND
at least one connection group does not use the same callbacks as the other connection groups
(this also happens automatically if there are unidirectional connection groups)
 
Hint:
-------------------------------------------------------------------
The compiler warning is known and has been analyzed thoroughly for its impact on the code. 
Nevertheless it will not be fixed because there is a workaround
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
1) Provide the missing prototypes with a user config file
2) If possible, disable the coding rule checks of the compiler
For Metrowerks, there is separate "Require Function Prototypes" setting to enable / disable the 
check
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products. 
43


Issue Report
ESCAN00089512
Compiler warning: braces around scalar initializer 
[enabled by default]

Component@Subcomponent:
Diag_CanDesc__coreBase@Implementation
First affected version:
3.02.00
Fixed in versions:
Problem Description:
What happens (symptoms):
-------------------------------------------------------------------
When the size of the array g_desc19UsedExtDatRecIds is reduced to only one element as follows:
V_MEMROM0 static V_MEMROM1 vuint8 V_MEMROM2 g_desc19UsedExtDatRecIds[1] = 
{
{ 0x01 }
};
the compiler error: 1510:3: warning: braces around scalar initializer [enabled by default] is 
issued.
When does this happen:
-------------------------------------------------------------------
The warning is issued by the compiler during compilation of the code in case the configuration is 
as described below. 
In which configuration does this happen:
-------------------------------------------------------------------
When only one element exists in the array g_desc19UsedExtDatRecIds. 
 
Resolution Description:
Workaround:
-------------------------------------------------------------------
Ignore the warning.
Resolution:
-------------------------------------------------------------------
The described issue is corrected by modification of all affected work-products.
 
44


Issue Report
3. New Issues for Information
Issues which should not have an effect on the usage of the license as the issues are relevant for 
use cases other than those defined in the questionnaire. The list contains issues that have been 
detected since the last report.
Issues listed in this section are not relevant for the use case that has been documented in the 
questionnaire provided to Vector. However, the issues may be relevant for other use cases.  Also 
issues that have been accepted or are tolerated by the OEM (as defined in the questionnaire) are 
reported here. 
No issue to be reported.
45



Issue Report
4. Report Legend
46


Issue Report
5. Quality Management Contact
Quality Management 
Productline Embedded Software (PES)  
 
Vector Informatik GmbH  
Ingersheimer Str. 24  
D-70499 Stuttgart  
 
Phone: +49 711 80670-3700
Fax: +49 711 80670-399  
eMail: QualityPES@vector.com
47

Document Outline


26 - TechnicalReference_CANdesc

ElectricPowerSteering_RH850_GM_G2KCA_website/content/en/docs/GM_000A_GMLAN3.1MchRH850_Impl/doc/TechnicalReference_CANdesc

28 - TechnicalReference_CANdesc_KWP_GM

CANdesc

30 - TechnicalReference_CANdesc_KWP_GMs

Technical Reference CANdesc 
 
 
 
 
 
 
 
 
 
 
 
CANdesc 
Technical Reference 
 
GM / Opel specifics 
Version 3.2.0 
 
 
 
 
 
 
 
 
 
 
Authors 
Mishel  Shishmanyan;  Christoph  Rätz;  Oliver  Garnatz; 
Matthias  Heil;  Katrin  Thurow;  Vitalij  Krieger;  Patrick 
Rieder 
Status 
Released 
 
 
 
 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
1 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Document Information 
History 
Author 
Date 
Version 
Remarks 
Mishel Shishmanyan 
2002-05-07 
0.9.0 
Creation 
Christoph Rätz 
2002-07-31 
0.9.4 
Reworked and released 
Mishel Shishmanyan 
2002-12-12 
1.0.0 
Added requirements for 
ProgrammingMode (Sid $A5) 
and DeviceControl(Sid $AE) 
Released 
Mishel Shishmanyan 
2003-04-09 
1.1.0 
Added default CANdelaStudio 
attribute settings for 
GM/OPEL ECUs 
Oliver Garnatz 
2003-12-19 
2.0.0 
Adapted to CANdesc 2.xx.xx 
New Word template used. 
Oliver Garnatz 
2004-05-14 
2.1.0 
Replaced AppDesc with 
ApplDesc 
Changed support level of 
‘Security access’ 
Oliver Garnatz, Mishel 
2004-07-15 
2.2.0 
Added description of 
Shishmanyan 
CANdesc OBD support 
Mishel Shishmanyan 
2006-05-02 
2.3.0 
Added: 

Service 
DynamicallyDefineMe
ssage ($2C) 


Service 
DefinePIDByAddress 
($2D) 


The PacketHandler 
(another type of 
service processor) 

Modified: 

Cosmetics 

All APIs described in 
detailed table form 
Removed: 

None 
Jason Wolbers 
2006-08-03 
2.4.0 
Improved wording 
Mishel Shishmanyan 
2006-10-22 
2.5.0 
Added: 
- 5.1 “ECU Address 
configuration”
 
Mishel Shishmanyan 
2006-11-03 
2.6.0 
Modified: 
 - 6.1.2 “Multi address ECU 
(dynamic addressing)” 
Mishel Shishmanyan 
2007-12-14 
2.7.0 
Modified: 
2014, Vector Informatik GmbH 
Version: 3.2.0 
2 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
- 7.3 “Service attributes” 
- 6.6 ”Service 
DisableNormalCommunicatio
n ($28)”
 
 
Removed: 
 - 6.1.2 “Multi address ECU 
(dynamic addressing)” – only 
target addresses 0xFE and 
0xFD (for gateways only) are 
accepted by CANdesc. 
Mishel Shishmanyan 
2010-12-21 
2.8.0 
Modified: 
- 5.1 ECU Address 
configuration 
Added: 
- 6.5 Service SecurityAccess 
($27) 

Matthias Heil 
2011-04-20 
3.0.0 
Modified: 
 - Update to new formatting 
 - 6.11 Service 
ProgrammingMode ($A5) 
Added: 
 - 4.3 Update from earlier 
versions 
 - 7.4 State group for the 
Programming Sequence 

Katrin Thurow 
2011-12-16 
3.1.0 
Modified: 
- 5.6.3 High speed 
programming mode state 

Vitalij Krieger, Patrick Rieder 
2014-05-15 
3.2.0 
Added: 
- 5.5.1 Sending the 
unsolicited response from a 
different channel on a 
dynamic TP 
- 6.6.1 Activate a $28 post-
handler for the application 
 
Modified: 
- 6.2 Service 
ReadFailureRecordData 
($12) 

 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
3 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
 
Caution 
We have configured the programs in accordance with your specifications in the 
questionnaire. Whereas the programs do support other configurations than the one 
 
specified in your questionnaire, Vector´s release of the programs delivered to your 
company is expressly restricted to the configuration you have specified in the 
questionnaire. 
 
 
 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
4 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Contents 
1 
Related documents ..................................................................................................... 10 
2 
Overview ..................................................................................................................... 11 
3 
CANdesc support by diagnostic service .................................................................. 12 
4 
Important application requirements .......................................................................... 16 
4.1 

Initialization ...................................................................................................... 16 
4.2 
DeviceControl ($AE) service requirement ........................................................ 17 
4.3 
Update from earlier versions ............................................................................ 17 
5 
GM/Opel specific functionality ................................................................................... 18 
5.1 

ECU Address configuration .............................................................................. 18 
5.1.1 

Gateway ECUs ................................................................................ 18 
5.1.2 
Virtual network management ............................................................ 18 
5.1.3 
Diagnostic activity notification .......................................................... 18 
5.2 
Request validation ........................................................................................... 19 
5.3 
Timeout events ................................................................................................ 21 
5.3.1 

Tester present timeout ...................................................................... 21 
5.4 
Using the extended negative response ............................................................ 21 
5.4.1 

Sending an extended negative response during service processing  21 
5.4.2 
Sending an unsolicited extended negative response ........................ 22 
5.5 
Sending an unsolicited single frame response ................................................. 23 
5.5.1 
Sending the unsolicited response from a different channel on a 
dynamic TP ...................................................................................... 24 

5.6 
GM/Opel CANdesc state machine access ....................................................... 24 
5.6.1 
Normal communication state ............................................................ 25 
5.6.2 
Programming mode state ................................................................. 25 
5.6.3 
High speed programming mode state .............................................. 26 
5.7 
The PacketHandler (another type of service processor) ................................... 26 
5.7.1 
PacketHandler API ........................................................................... 27 
6 
GM/Opel service implementations ............................................................................ 30 
6.1 

Service InitiateDiagnosticOperation ($10) ........................................................ 30 
6.1.1 

Service DisableAllDTCs ($10 $02) ................................................... 30 
6.1.2 
Service EnableDTCsDuringDeviceControl ($10 $03) ....................... 30 
6.2 
Service ReadFailureRecordData ($12) ............................................................ 31 
6.2.1 

Service ReadFailureRecordIdentifiers ($12 $01) .............................. 31 
6.2.2 
Service ReadFailureRecordParameters ($12 $02) ........................... 32 
2014, Vector Informatik GmbH 
Version: 3.2.0 
5 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
6.3 
Service ReturnToNormalMode ($20) ................................................................ 32 
6.4 
Service ReadDataByParameterIdentifier ($22) ................................................ 33 
6.4.1 

Reading a dynamically defined PID (Parameter Identifier) ............... 33 
6.5 
Service SecurityAccess ($27) .......................................................................... 33 
6.6 
Service DisableNormalCommunication ($28) ................................................... 34 
6.6.1 
Activate a $28 post-handler for the application ................................. 35 
6.7 
Service DynamicallyDefineMessage ($2C) ...................................................... 35 
6.8 
Operations on dynamically definable DPIDs .................................................... 36 
6.8.1 

Defining a dynamically definable DPID ............................................ 36 
6.8.2 
Reading a dynamically definable DPID ............................................ 37 
6.9 
Service DefinePIDByAddress ($2D) ................................................................. 40 
6.10 
Operations on dynamically definable PIDs ....................................................... 41 
6.10.1 

Defining a dynamically definable PID ............................................... 41 
6.10.2 
Reading a dynamically definable PID ............................................... 42 
6.11 
Service ProgrammingMode ($A5) .................................................................... 48 
6.11.1 

Allowing programming mode ($A5 $01/$02) .................................... 48 
6.11.2 
Entering programming mode ($A5 $03) ........................................... 49 
6.11.2.1 

FBL start on EnterProgrammingMode ($A5 $03) ........... 49 
6.11.2.2 
FBL start on RequestDownload ($34) ............................ 50 
6.11.2.3 
Concluding programming mode ..................................... 50 
6.11.3 
Considerations when upgrading ....................................................... 51 
6.12 
Service ReadDiagnosticInformation ($A9) ....................................................... 51 
6.12.1 
ReadStatusOfDTCByNumber ($A9 $80) .......................................... 52 
6.12.2 
ReadStatusOfDTCByStatusMask ($A9 $81) .................................... 55 
6.12.3 
SendOnChangeDTCCount ($A9 $82) .............................................. 60 
6.13 
Service ReadDataByPacketIdentifier ($AA) ..................................................... 64 
6.13.1 
Handling undefined use cases ......................................................... 65 
6.13.1.1 

Service $AA handling for undefined dynamically 
definable DPIDs ............................................................. 65 

6.13.1.2 
Service $AA handling for undefined referenced 
dynamically defined PIDs ............................................... 65 

6.13.1.3 
Service $AA handling for unaccessible referenced PIDs 65 
6.14 
Service DeviceControl ($AE) ........................................................................... 65 
6.15 
Service TesterPresent ($3E) ............................................................................ 66 
7 
CANdelaStudio default attribute settings ................................................................. 67 
7.1 

Diagnostic class attributes ............................................................................... 67 
7.2 
Diagnostic instance attributes .......................................................................... 68 
7.3 
Service attributes ............................................................................................. 69 
7.4 
State group for the Programming Sequence .................................................... 72 
8 
OBD support ............................................................................................................... 73 
2014, Vector Informatik GmbH 
Version: 3.2.0 
6 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
8.1 
CAN identifiers ................................................................................................. 73 
8.2 
Restrictions ...................................................................................................... 73 
8.3 
CANdelaStudio default attribute settings for OBD services .............................. 74 
8.3.1 

Diagnostic classes ........................................................................... 74 
8.4 
CANgen configuration ...................................................................................... 74 
8.4.1 

DBC attribute settings for the OBD request message ....................... 74 
8.4.2 
CANgen version < 4.15.00 ............................................................... 74 
8.4.3 
CANgen version ≥ 4.15.00 ............................................................... 74 
8.4.4 
GENy configuration .......................................................................... 74 
8.5 
CANdesc configuration (without a Powertrain CANdela template) ................... 75 
9 
Debug assertion codes .............................................................................................. 76 
10  Contact ........................................................................................................................ 77 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
7 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Illustrations 
Figure 1-1 
Manuals and References for CANdesc ..................................................... 10 
Figure 5-1 
Request message logical format ............................................................... 20 
Figure 5-2 
Example code for transmitting an unsolicited response ............................ 23 
Figure 5-3 
Asynchronous PacketHandler for current CANdesc versions .................... 28 
Figure 5-4 
Asynchronous PacketHandler with delayed processing of the first data 
packet ....................................................................................................... 29 

Figure 5-5 
Asynchronous PacketHandler with dummy response, due to an 
application error while obtaining response data ........................................ 29 

Figure 6-1 
Dynamically defined DPID service relations .............................................. 36 
Figure 6-2 
Dynamically definable DPID is not defined ............................................... 37 
Figure 6-3 
Single referenced PID cannot provide any data ........................................ 38 
Figure 6-4 
Reading the dynamically defined DPID succeeds ..................................... 39 
Figure 6-5 
Dynamically definable PID, referenced by the DPID, is not defined .......... 40 
Figure 6-6 
Dynamically defined PID service relations ................................................ 41 
Figure 6-7 
Definition of dynamically definable PID with valid parameter .................... 41 
Figure 6-8 
Defining of a dynamically definable PID failed due to security violation..... 42 
Figure 6-9 
The dynamically definable PID is not defined............................................ 43 
Figure 6-10 
Application error when reading the memory block .................................... 44 
Figure 6-11 
Reading of dynamically defined PID succeeds ......................................... 45 
Figure 6-12 
Programming mode flowchart ................................................................... 48 
Figure 6-13 
Request $A9 $80 where the requested fault type combination was found  52 
Figure 6-14 
Request $A9 $80 where the requested fault type combination was not 
found ........................................................................................................ 53 

Figure 6-15 
Request $A9 $81 where the application found two DTCs with the 
requested status mask .............................................................................. 56 

Figure 6-16 
Request $A9 $81 where the application cannot find any DTCs with the 
requested status mask .............................................................................. 57 

Figure 6-17 
Request $A9 $82 with activation of the background DTC count monitor ... 60 
Figure 6-18 
Request $A9 $82 with explicit deactivation of the background DTC count 
monitor. ..................................................................................................... 61 

Figure 6-19 
Request $A9 $82 with deactivation of the background DTC count 
monitor by timeout. ................................................................................... 62 

Figure 6-20 
PostHandler for “DeviceControl” ($AE) ..................................................... 66 
Figure 7-1 
CANdelaStudio views ............................................................................... 67 
Figure 7-2 
Diagnostic Class level attributes ............................................................... 68 
Figure 7-3 
Diagnostic Instance level attributes ........................................................... 69 
Figure 7-4 
Service related attributes .......................................................................... 70 
 
Tables 
Table 4-1  
DescInitPowerOn ...................................................................................... 16 
Table 4-2  
DescInit .................................................................................................... 17 
Table 5-1  
ApplDescOnDiagActive ............................................................................ 19 
Table 5-2  
ApplDescOnDiagInactive .......................................................................... 19 
Table 5-3  
DescSetExtNegResponse ........................................................................ 22 
Table 5-4  
DescTransmitSingleFrame........................................................................ 24 
Table 5-5  
DescGetCommState ................................................................................. 25 
Table 5-6  
DescGetProgMode ................................................................................... 26 
Table 5-7  
DescGetHiSpeedMode ............................................................................. 26 
Table 5-8  
PacketHandler .......................................................................................... 27 
Table 5-9  
DescDataPacketProcessingDone ............................................................. 28 
2014, Vector Informatik GmbH 
Version: 3.2.0 
8 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Table 6-1  
ApplDescOnDisableAllDtc ........................................................................ 30 
Table 6-2  
ApplDescOnEnableDtcChangeDuringDevCntrl ......................................... 31 
Table 6-3  
ApplDescOnReturnToNormalMode ........................................................... 32 
Table 6-4  
ApplDescOnDisableNormalComm ............................................................ 34 
Table 6-5  
ApplDescOnEnableNormalComm ............................................................. 35 
Table 6-6 
ApplDescPostDisableNormalCommunication ........................................... 35 
Table 6-7  
ApplDescCheckDynPidMemoryArea ........................................................ 46 
Table 6-8  
ApplDescReadDynPidMemContent .......................................................... 47 
Table 6-9  
DescReadDynPidMemContentDone ......................................................... 47 
Table 6-10  
ApplDescOnEnterProgMode ..................................................................... 49 
Table 6-11  
ApplDescForceEcuReset .......................................................................... 50 
Table 6-12  
Service $A9 parallel execution matrix ....................................................... 51 
Table 6-13  
ApplDescGetDtcStatusByNumber ............................................................ 54 
Table 6-14  
DescRdiDtcStatusByNumberFound .......................................................... 54 
Table 6-15  
DescRdiDtcStatusByNumberNotFound .................................................... 55 
Table 6-16  
ApplDescGetDtcStatusByMask ................................................................ 58 
Table 6-17  
DescRdiDtcStatusByMaskFound .............................................................. 59 
Table 6-18  
DescRdiDtcStatusByMaskNotFound ........................................................ 59 
Table 6-19  
ApplDescEnableOnChangeDtcCount ....................................................... 63 
Table 6-20  
ApplDescDisableOnChangeDtcCount ...................................................... 63 
Table 6-21  
DescRdiOnDtcCountChanged .................................................................. 64 
Table 6-22  
DescRdiDeactivateOnChangeDtcCount ................................................... 64 
Table 6-23  
DescActivateS1Timer ............................................................................... 66 
Table 7-1  
Default ‘Diagnostic Class’ attribute settings .............................................. 68 
Table 7-2  
Default ‘Diagnostic instance’ attribute settings .......................................... 69 
Table 7-3  
Default ‘Service’ attribute settings ............................................................. 71 
Table 7-4  
Programming Sequence state group ........................................................ 72 
Table 8-1  
Diagnostic class specific attributes ........................................................... 74 
Table 9-1  
Debug assertion codes ............................................................................. 76 
 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
9 / 77 
based on template version 5.1.0 




Technical Reference CANdesc 
1  Related documents 
  Technical Reference CANdesc  
  User Manual CANdesc 
 
User Manual
Technical
Technical
Reference
Reference
General
OEM
You are here
 
Figure 1-1  Manuals and References for CANdesc 
All GM/Opel specific CANdesc topics are described within this technical reference. Topics 
which  are  common  to  all  OEMs  (e.g.  features,  concepts)  are  located  in  the  general 
technical reference document “TechnicalReference_CANdesc”.  
For faster integration, please refer to the user manual document “UserManual_CANdesc”. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
10 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
2  Overview 
The  GM/Opel  version  of  CANdesc  uses  an  internal  implementation  to  handle  many 
diagnostic  tasks.  Many  of  these  tasks  are  realized  through  generated  code  (constants, 
state count, etc.) which gives more flexibility to the application in case of specification or 
variant changes. On the other hand, there are “built-in” diagnostic service implementations 
which  can  free  the  application  from  some  very  complex  tasks  (e.g. 
ReadDiagnosticInformation  (SID  $A9),  ReadDataByPacketIdentifier  (SID  $AA),  etc.)  and 
hide all of the underlying functionality under a simple signal interface for the application. In 
addition, CANdesc also handles certain GM/Opel specific management functionality (e.g. 
virtual networks) in order to fully comply with GM/Opel diagnostic specifications. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
11 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
3  CANdesc support by diagnostic service 
CANdesc  provides  three  possible  levels  of  support  independently  for  each  diagnostic 
service – complete, assisted, or basic. The level of support varies according to CANdesc 
capability  and  user  selection  in  CANdelaStudio.  All  three  levels  of  support  provide 
complete  communication  handling  (including  all  transport  protocol  processing  and  error 
handling), diagnostic session and timer management, and basic error checking.  
Communication handling not only includes testing support of service, but also consistency 
of  service,  sub-function  and/or  identifier  combination.  A  validity  check  of  the  addressing 
method and data length is performed. Parallel requests are managed (SID $3E, $AA, and 
$A9)  when  allowed.  As  error  handling  is  a  significant  part  of  any  ECU  software,  all  low 
level  errors  are  handled  internally  by  CANdesc.  Finally,  CANdesc  assists  with  the 
connection  to  GMLAN  (e.g.  supervision  and  management  of  the  VN  timer,  message 
transmission mode, bus speed switching, etc.). 
Complete 
Complete support means that CANdesc is capable of handling the diagnostic transaction 
without  requesting  support  from  the  ECU  application.  The  ECU  developer  need  not 
provide  any  code  to  help  implement  the  diagnostic  feature;  CANdesc  handles  all 
processing.  In  the  case  where  diagnostic  messages  contain  real-time  data,  or  “signals”, 
CANdesc can map that data to global variables in the ECU application and read/write the 
values  directly  to/from  RAM  without  calling  any  ECU  application  callbacks;  the  ECU 
developer  does  not  have  to  concern  himself  with  the  protocol  level  implementation.  If  a 
service  modifies  a  diagnostic  state  group,  CANdesc  notifies  the  application  using  a 
callback function. 
Assisted 
Assisted support means that CANdesc is capable of fully parsing request messages and 
building  response  messages,  but  it  does  not  contain  the  logic  necessary  to  execute  the 
request  or  determine  data  values.  The  ECU  developer  must  provide  callbacks  for 
CANdesc to fill these logic gaps,  which  typically come in the form of calculating a signal 
value, controlling an I/O port, or perhaps executing an ECU-specific feature such as a self-
test or EEPROM access routine. 
Basic 
Basic support means that CANdesc is only capable of identifying that the ECU application 
must process the request. The ECU application may have to provide logic to validate the 
request message and build the response byte-by-byte. This level of support is only used 
where code generation is not practical or supported. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
12 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
RequestCurrentDiagnosticData ($01) – Assisted 
The  application  must  implement  only  the  handling  of  this  service  (no  request  length 
validation).  
RequestFreezeFrameData ($02) – Assisted 
The  application  must  implement  only  the  handling  of  this  service  (no  request  length 
validation). 
RequestEmissionRelatedDTC ($03) – Assisted 
The  application  must  implement  only  the  handling  of  this  service  (no  request  length 
validation). 
ClearDiagnosticInformation ($04) – Assisted 
The application must provide a function that clears fault memory.  
RequestTestResultsForNonContinouslyMonitoredSystems ($06) – Assisted 
The  application  must  implement  only  the  handling  of  this  service  (no  request  length 
validation). 
RequestTestResultsForContinouslyMonitoredSystems ($07) – Assisted 
The  application  must  implement  only  the  handling  of  this  service  (no  request  length 
validation). 
RequestControlOfOnBoardSystemTestOrComponent ($08) – Assisted 
The  application  must  implement  only  the  handling  of  this  service  (no  request  length 
validation when the request data length is a constant value). 
RequestVehicleInformation ($09) – Assisted 
The  application  must  implement  only  the  handling  of  this  service  (no  request  length 
validation). 
InitiateDiagnosticOperation ($10) – Assisted 
The  application  must  provide  a  function  that  implements  the  logic  to  enable/disable  the 
settings of DTCs. 
ReadFailureRecordData ($12) – Basic 
The  application  must  provide  a  function  that  implements  the  request  parsing  (validation) 
and the logic to report the failure record data. 
ReadDataByIdentifier ($1A) – Complete 
CANdesc  completely  implements  this  service  for  DIDs  whose  data  maps  to  global 
variables.  Assisted  support  is  provided  for  DIDs  whose  data  does  not  map  to  global 
variables. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
13 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
ReturnToNormalMode ($20) – Complete 
The application must provide an implementation for the event-based callbacks triggered by 
this service. 
ReadDataByParameterIdentifier ($22) – Complete 
CANdesc  completely  implements  this  service  for  PIDs  whose  data  maps  to  global 
variables.  Assisted  support  is  provided  for  PIDs  whose  data  does  not  map  to  global 
variables. In any case, multiple PID handling (in a single request) is handled internally by 
CANdesc. 
ReadMemoryByAddress ($23) – Basic 
The application must provide a function to determine if the requested address is valid and 
a function to return the data stored at the requested address. 
SecurityAccess ($27) – Basic 
The application must provide functions, which implement the security access mechanism. 
By  utilizing  a  diagnostic  state  group,  CANdesc  can  track  the  current  security  level  and 
assist the application in determining if a request is allowed at the given time. 
DisableNormalCommunication ($28) – Complete 
CANdesc completely implements this service. 
DynamicallyDefineMessage ($2C) – Complete 
CANdesc completely implements this service. 
DefinePIDByAddress ($2D) – Complete 
CANdesc completely implements this service. 
RequestDownload ($34) – Basic 
The application must implement this service. 
TransferData ($36) – Basic 
The application must implement this service. 
WriteDataByIdentifier ($3B) – Complete 
CANdesc  completely  implements  this  service  for  DIDs  whose  data  maps  to  global 
variables.  Assisted  support  is  provided  for  DIDs  whose  data  does  not  map  to  global 
variables. 
TesterPresent ($3E) – Complete 
CANdesc completely implements this service. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
14 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
ReportProgrammedState ($A2) – Complete 
CANdesc  completely  implements  this  service  if  the  programmed  state  maps  to  a  global 
variable. Assisted support is provided if the programmed state does not map to a global 
variable. 
ProgrammingMode ($A5) – Assisted  
The application must only provide functions that implement programming mode requests. 
CANdesc performs state checking internally. 
ReadDiagnosticInformation ($A9) – Assisted 
The application must provide functions that read fault memory and construct the response 
messages byte-by-byte. The application must provide functions to retrieve the number of 
fault  codes  and  to  step  through  the  list  of  fault  codes  matching  the  requested  mask. 
Moreover,  it  has  to  detect  a  change  in  the  number  of  DTCs.  CANdesc  handles  the 
scheduler internally. 
ReadDataByPacketIdentifier ($AA) – Complete 
CANdesc  completely  implements  this  service  for  DPIDs  whose  data  maps  to  global 
variables.  Assisted  support  is  provided  for  DPIDs  whose  data  does  not  map  to  global 
variables. The scheduler is handled internally by CANdesc. 
DeviceControl ($AE) – Assisted 
The  application  must  provide  device-specific  functions  that  implement  the  control 
algorithms. 
 
 
Caution 
Diagnostic services other than those listed above are not supported by CANdesc in any 
  way and must be implemented entirely by the ECU developer as a workaround. 
 
 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
15 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
4  Important application requirements 
4.1 
Initialization 
In  order  to  initialize  the  GM/Opel  CANdesc  component,  the  application  must  call  the 
following function: 
Prototype 
void DescInitPowerOn (DescInitParam initParameter) 
Parameter 
initParameter 
Initialization parameter 
(recommended: ‘kDescPowerOnInitParam’) 
Return code 


Functional Description 
Power-on initialization of the CANdesc component.  
The application must call this function once after power-on, before all other CANdesc functions. 
 
The GM/Opel version of CANdesc has no special behavior for initialization; therefore, the initialization 
function can be called with any parameter value. Even so, it is recommended that the ECU developer use 
‘kDescPowerOnInitParam’ for the parameter value. 
Particularities and Limitations 
  DescInitPowerOn (initParameter) must be called after TpInitPowerOn() (please refer to the transport 
protocol documentation) or any reserved diagnostic connection will be lost. 
  DescInitPowerOn (initParameter) calls DescInit() internally for further initializations 
Call context 
  Background-loop level with global interrupts disabled  
Table 4-1   DescInitPowerOn 
 
Prototype 
void DescInit (DescInitParam initParameter) 
2014, Vector Informatik GmbH 
Version: 3.2.0 
16 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 
initParameter 
Initialization parameter 
(recommended: ‘kDescPowerOnInitParam’) 
Return code 


Functional Description 
Re-initializes the CANdesc component. 
The application can call this function to re-initialize CANdesc (e.g. after wakeup). All internal states will be 
set to their default values. 
 
The GM/Opel version of CANdesc has no special behavior for initialization; therefore, the initialization 
function can be called with any parameter value. Even so, it is recommended that the ECU developer use 
‘kDescPowerOnInitParam’ for the parameter value. 
Particularities and Limitations 
  The application has already initialized CANdesc once by calling DescInitPowerOn() 
Call context 
  Background-loop level with global interrupts disabled 
Table 4-2   DescInit 
4.2 
DeviceControl ($AE) service requirement 
The GM/Opel diagnostic specification requires that device control activity shall be limited 
by tester present timeout.  
Please refer to the section Service DeviceControl ($AE) for more details. 
4.3 
Update from earlier versions 
The  behavior  of  the  CANdesc  embedded  module  has  not  changed  fundamentally  in 
CANdesc  version  6.x,  but  the  configuration  is  much  more  independent  from  the  CDD 
settings. Many options that were previously only configurable as attributes in the CDD file 
are now available for configuration in the GENy configuration tool. 
As part of this change, the naming scheme for service callbacks is now more independent 
from the CDD contents and more adherent to the GMW3110 specification. This will require 
modification of existing application code to fit the new naming scheme. 
In addition, the implementation of mode $A5 was changed to use the standard CANdesc 
state  management  feature.  You  can  now  easily  have  service  execution  depend  on  the 
reprogramming sequence, e.g. prevent a service from executing while programming mode 
is  active.  Please  also  refer  to  chapter  6.11  -  Service  ProgrammingMode  ($A5)  for  more 
information. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
17 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
5  GM/Opel specific functionality  
5.1 
ECU Address configuration 
GM/Opel  use  extended  addressing  for  the  functional  request  message.  By  default, 
CANdesc  will  accept  any  request  with  target  address  0xFE.  There  are  some  other  use 
cases that are  considered to be supported with the help of  user configuration files (refer 
the “TechnicalReference_CANdesc.pdf” for configuration details). 
5.1.1 
Gateway ECUs 
According to the GMW3110 v1.6, gateways shall be accessible also via the special target 
address  0xFD.  To  enable  the  reception  on  this  address,  please  insert  into  your  user 
configuration file for CANdesc the following definition: 
#define DESC_ENABLE_GW_ECU_ADDR  
5.1.2 
Virtual network management 
A  GMLAN/IVLAN  specific  implementation  is  built  into  CANdesc,  which  completely 
integrates  CANdesc  into  a  GM/Opel  project.  CANdesc  manages  all  aspects  of  the 
diagnostics VN, including activation of the VN in the GMLAN handler and then deactivation 
of the VN after diagnostic inactivity (e.g. missing tester) as described in GMW-3110.  
When the first diagnostic request is received, CANdesc will activate the diagnostics VN to 
provide communication capability with the tester. The VN is then automatically deactivated 
under the following conditions: 
  8 seconds after the diagnostic request “ReturnToNormalMode” ($20) is received 
  8 seconds after the tester present timeout 
  8 seconds after the last response is sent, or in the case of requests that do not send a 
response, 8 seconds after the request is completely processed 
5.1.3 
Diagnostic activity notification 
CANdesc notifies the application via a callback function when a diagnostic session begins 
(the first  diagnostic request) and when it ends (the deactivation conditions listed above). 
These callbacks are listed below. 
 
Prototype 
void ApplDescOnDiagActive (void) 
2014, Vector Informatik GmbH 
Version: 3.2.0 
18 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 


Return code 


Functional Description 
When the first diagnostic request (after ECU power-on or wakeup) is received, regardless of the addressing 
method, CANdesc calls this function to notify the application that ECU diagnostics are now active (so that 
the application can begin diagnostic specific tasks, for instance). 
Particularities and Limitations 
  None 
Call context 
  Interrupt context, if the CAN-driver is configured to handle receive messages in interrupt mode  
  Background-loop level task context, if the CAN-driver is configured to handle receive messages in 
polling mode 
Table 5-1   ApplDescOnDiagActive 
Prototype 
void ApplDescOnDiagInactive (void) 
Parameter 


Return code 


Functional Description 
Once the conditions for deactivating the diagnostics VN are met (i.e. the diagnostics VN timer reaches 
zero), CANdesc calls this function to notify the application that ECU diagnostics are no longer active (so 
that the application can end diagnostic specific tasks to lower CPU utilization, for instance). 
Particularities and Limitations 
  None 
Call context 
  Background-loop level task context of DescTimerTask()
Table 5-2   ApplDescOnDiagInactive 
5.2 
Request validation 
The  GM/Opel  version  of  CANdesc  is  capable  of  performing  the  following  request 
validations: 
  Is the designed diagnostic buffer big enough to hold the whole request? If the request is 
physically addressed, the GM/Opel CANdesc implementation will accept it even if the 
length is greater than the defined buffer and let the “request length validation” routine 
handle the situation. If the request is functionally addressed and the length is greater 
2014, Vector Informatik GmbH 
Version: 3.2.0 
19 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
than the defined buffer, it will be ignored (regardless of whether it would normally send a 
response).  
  Is the requested SID supported? If the SID is not relevant for the ECU, CANdesc will 
automatically send a negative response with error code “ServiceNotSupported” ($11). 
Further processing will be aborted. 
  Is the request addressing method for the SID correct? Two cases are possible: 
  The requested SID normally provides a response (as defined in CANdelaStudio). In 
this case, CANdesc will send a negative response with error code 
“ConditionsNotCorrect” ($22). Further processing will be aborted. 
  The requested SID normally does not provide a response (as defined in 
CANdelaStudio). In this case, the request will be ignored. 
  Does the request meet the minimum required length (to be distinguishable from other 
instances)? Each request is formatted as shown in the figure below: 
 
 
Figure 5-1  Request message logical format 
  In order to process the request further, the service instance must be found (which 
provides more detailed information about the request than the SID alone); therefore, 
the request must be at least n + 1 bytes in length, where n is service dependent. 
  If the length is less than the minimum allowed (as defined in CANdelaStudio), 
CANdesc will send a negative response with error code 
“SubfunctionNotSupportedInvalidFormat” ($12). Further processing will be aborted. 
  Is the requested service instance supported by the ECU? If not, CANdesc will send a 
negative response with error code “SubfunctionNotSupportedInvalidFormat” ($12). 
Further processing will be aborted. 
  Is the total request length correct? Two cases are possible: 
  The request length is dynamic. In this case, no automated check can be performed, 
and the task will be left to the application. 
  The request length is fixed. In this case, CANdesc will check if the current request 
length matches the expected length (as defined in CANdelaStudio). If not, a 
negative response with error code “SubfunctionNotSupportedInvalidFormat” ($12) 
will be sent. Further processing will be aborted. 
  Does the requested service instance have a defined pre-handler function (please refer 
to the user manual CANdesc document “UserManual_CANdesc” for more details about 
2014, Vector Informatik GmbH 
Version: 3.2.0 
20 / 77 
based on template version 5.1.0 



Technical Reference CANdesc 
pre-handlers)? If so, it will be called. This allows the application to extend the built-in 
validation with additional custom checks. 
 
 
 
Note 
If the request passes all of the above validation checks, the main-handler is called 
  (please refer to the user manual CANdesc for more details about main-handlers) for 
further processing. 
 
 
5.3 
Timeout events 
5.3.1 
Tester present timeout 
Once  the  tester  present  timer  has  been  activated,  the  tester  must  send  the  diagnostic 
service “Tester Present” ($3E) periodically in order to keep the timer running. 
In  case  of  a  timeout,  the  diagnostic  state  will  be  initialized  exactly  the  same  as  Service 
ReturnToNormalMode ($20)
 
 
 
 
Note 
CANdesc will automatically send an unsolicited positive response for the 
  “ReturnToNormalMode” ($20) diagnostic service (see section 5.5 Sending an 
unsolicited single frame response)
 
 
 
5.4 
Using the extended negative response 
The  GM/Opel  version  of  CANdesc  supports  the  extended  negative  response  format  to 
specify service faults more precisely. This response has the following format: 
$7F $AE $E3 $xx $yy (DeviceControlLimitsExceeded) 
where  $xx  and  $yy  are  the  extended  failure  codes  (as  defined  in  an  ECU  specific 
diagnostic specification). 
There are two possible ways to send an extended negative response: 
5.4.1 
Sending an extended negative response during service processing 
If  the  application  is  currently  processing  a  request  which  requires  an  extended  negative 
response,  the  standard  function  DescSetNegResponse(errorCode)  (please  refer  to  the 
general  technical  reference  document  “TechnicalReference_CANdesc”  for  more  details) 
cannot be used. Instead, the following function is defined: 
2014, Vector Informatik GmbH 
Version: 3.2.0 
21 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Prototype 
Single Context 
void DescSetExtNegResponse (DescNegResCode errorCode,  
                            DescExtNegResCode  extErrorCode) 
Multi Context 
void DescSetExtNegResponse (vuint8 iContext,  
                            DescNegResCode errorCode,  
                            DescExtNegResCode  extErrorCode) 
Parameter 
iContext 
Reference to the corresponding request context 
errorCode 
One of the error code constants defined by CANdesc (located in the 
generated desc.h file) with the following naming convention: 
kDescNrc<error name>
Normally, only error code 0xE3 is used. 
extErrorCode 
A two byte value which is ECU/use-case dependent 
Return code 


Functional Description 
In the pre-handler or main-handler callback, the application can call this function to send an extended 
negative response. 
Normally, this extended negative response is only useful for service $AE, but the function may be used for 
any currently active service (prior to calling DescProcessingDone()). 
Particularities and Limitations 
  The application must already have initialized CANdesc by calling DescInitPowerOn() 
  The define DESC_ENABLE_EXT_NEG_RES_CODE_HANDLING must exist in the generated code 
  Once an error code has been set it cannot be overwritten or reset.  
  This function does not finish the processing of the request. The application must confirm that the 
request processing is completely finished by calling DescProcessingDone()
Call context 
  Within a service pre-handler callback and within or after a service main-handler callback 
Table 5-3   DescSetExtNegResponse 
5.4.2 
Sending an unsolicited extended negative response 
If the application is not currently processing a request but an extended negative response 
must be sent, the function above cannot be used. Instead, a generic API for transmitting 
an  unsolicited  response  can  be  used.  In  this  case,  the  application  must  compose  the 
response message on its own. The following is an example  using the format  description 
from the beginning of section 6.4: 
2014, Vector Informatik GmbH 
Version: 3.2.0 
22 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 5-2  Example code for transmitting an unsolicited response 
5.5 
Sending an unsolicited single frame response 
If  service  “DeviceControl”  ($AE)  has  been  activated  and  the  application  detects  that 
conditions  have  changed  detrimentally  (e.g.  they  are  “out  of  limits”)  since  service 
activation, GM/Opel requires that an unsolicited extended negative response shall be sent 
by  the  ECU.  To  accomplish  this,  the  following  API  is  provided  which  allows  the  ECU 
developer  to  send  any  single  frame  message  using  the  physically  addressed  diagnostic 
response  CAN  ID.  This API  is  not  just  a  simple  “re-transmitter”,  calling  the  TP  with  the 
application  data,  but  it  also  synchronizes  the  request  with  the  current  CANdesc 
reception/transmission state machine: 
  If CANdesc is currently receiving a request, the unsolicited response will be delayed 
until the reception finishes (either with success or failure). 
  If CANdesc is currently transmitting a response, the unsolicited response will be delay 
until the transmission finishes (either with success or failure). 
See Table 5-4  DescTransmitSingleFrame for the API description. 
Prototype 
void DescTransmitSingleFrame(DescMsg resData, vuint8 resLen) 
Parameter 
resData 
Pointer to the application data 
2014, Vector Informatik GmbH 
Version: 3.2.0 
23 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
resLen 
The length of the data (in bytes) to be sent 
Return code 


Functional Description 
This function is called by CANdesc to send the unsolicited positive response on a tester present timeout or 
by the application to send an unsolicited extended negative response. 
Particularities and Limitations 
  The application must already have initialized CANdesc by calling DescInitPowerOn(). 
  The data pointed to by resData is not cached (copied to another buffer) by CANdesc, so the ECU 
developer should be careful not to use automatic variable references (non-static function local 
variables). 
  The length of the data may not exceed the transport layer single frame length (seven bytes in the case 
of normal addressing and six bytes in the case of extended addressing). 
Call context 
  Background-loop level task context 
Table 5-4   DescTransmitSingleFrame 
5.5.1 
Sending the unsolicited response from a different channel on a dynamic TP 
In case of a static TP (Transport Protocol) CANdesc sends the unsolicited response on the 
logical CAN channel CANdesc is configured to run. However, in case of a dynamic TP with 
multiple channels configured it’s necessary to define the logical CAN channel on which the 
unsolicited  response  should  be  sent.  By  default,  CANdesc  will  send  the  unsolicited 
response on the lowest logical CAN channel. Still it’s possible that CANdesc doesn’t run 
on  the  lowest  logical  CAN  channel.  If  that  is  the  case,  it’s  necessary  to  configure  the 
channel on which the unsolicited response should be sent. You can configure the channel 
with a user configuration file in GENy with the following content: 
 
#define kDescOemSpontanResComChannel  <channel> 
Please replace <channel> with the number of the channel the unsolicited response should 
be sent on. The value must be in the range [0..(Number of logical channels – 1)]. 
5.6 
GM/Opel CANdesc state machine access 
The  states  relevant  to  the  programming  sequence  are  modeled  as  a  normal  CANdesc 
state group. This also enables all the usual state group related callbacks and functions for 
transition  notification,  access  to  the  current  state,  and  a  function  to  modify  the  current 
state. For naming convention and an API description, please refer to the general CANdesc 
technical reference. 
The  state  group  and  its  states’  names  have  been  fixed  to  provide  a  consistent  API 
independent from the configuration. Normally the names would depend on the settings in 
the CDD file. Please refer to Table 7-4  Programming  Sequence  state  group  for  the  exact 
names. 
For compatibility reasons CANdesc still provides the API described in this chapter although 
they be replaced by the state machine API. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
24 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
5.6.1 
Normal communication state 
 
Prototype 
vuint8 DescGetCommState (void) 
Parameter 


Return code 
kDescCommDisabled 
Normal message transmission is deactivated 
kDescCommEnabled 
Normal message transmission is activated 
Functional Description 
The application can call this function at any time to obtain the current transmission state. 
Particularities and Limitations 
  The application must already have initialized CANdesc by calling DescInitPowerOn()
  The same information can be retrieved using DescGetStateProgrammingMode ()
  State information updates after any post-handler of mode $28. 
Call context 
  Any 
Table 5-5   DescGetCommState 
5.6.2 
Programming mode state 
 
Prototype 
vuint8 DescGetProgMode (void) 
Parameter 


Return code 
kDescProgModeIdle 
No enter programming mode request up to now 
kDescProgModeAccepted  Enter programming mode accepted (but not active yet) 
kDescProgModeActive 
Enter programming mode sequence complete 
Functional Description 
The application can call this function at any time to read the “enter programming mode” sequence state. 
Particularities and Limitations 
  The application must already have initialized CANdesc by calling DescInitPowerOn()
  The same information can be retrieved using DescGetStateProgrammingMode (). 
  State information updates after any post-handler of mode $A5. 
Call context 
  Any 
2014, Vector Informatik GmbH 
Version: 3.2.0 
25 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Table 5-6   DescGetProgMode 
5.6.3 
High speed programming mode state 
 
Prototype 
Single channel 
vuint8 DescGetHiSpeedMode (void) 
Multiple channel 
vuint8 DescGetHiSpeedMode (vuint8 commChannel) 
Parameter 
commChannel 
Communication channel on which CANdesc is running 
Return code 
kDescHiSpeedModeIdle 
No enter programming mode request up to now. 
kDescHiSpeedModeAccepted  Enter high speed programming mode accepted (but not active yet) 
kDescHiSpeedModeActive 
Enter high speed programming mode sequence complete 
Functional Description 
This function can be called by the application at any time to see if the programming mode requires a switch 
to high speed mode.  
If the define DESC_ENABLE_FLASHABLE_ECU exists in the generated code, then the application should 
call this function within the callback ApplDescOnEnterProgMode to decide whether to switch into high 
speed mode. 
Particularities and Limitations 
  The result is only valid for the channel on which CANdesc is running. 
  The application has already initialized CANdesc once by calling DescInitPowerOn(). 
  The define DESC_ENABLE_REQ_HISPEED_PROG must exist in the generated code (if the ECU must 
support service $A5 $02). 
  Idle and Accepted can be retrieved using DescGetStateProgrammingMode () 
  Active can be queried using IlNwmGetState() 
  State information updates after any post-handler of mode $A5. 
 
Call context 
  Any 
Table 5-7   DescGetHiSpeedMode 
 
5.7 
The PacketHandler (another type of service processor) 
A main-handler is the typical callback function for request processing (please refer to the 
general  technical  reference  document  “TechnicalReference_CANdesc”  for  more  details). 
For  the  GM/Opel  version  of  CANdesc,  a  different  type  of  service  processor  for  Service 
ReadDataByPacketIdentifier ($AA)
 
is necessary – the PacketHandler. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
26 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
A PacketHandler is a very simple callback that has only one task – to query the application 
data and place it into the correct position of the response data buffer. The application may 
not use the negative response API with a PackedHandler. The API works asynchrounously, 
to allow moving time-consuming operations to different task contexts. 

5.7.1 
PacketHandler API 
Prototype 
void ApplDescReadPack<Instance-Qualifier> (DescMsg pMsg) 
Parameter 
pMsg 
A pointer to a buffer where the application must copy its data 
Return code 


Functional Description 
CANdesc calls this function to query the application for the response data related to <Instance-Qualifier>. 
The application can provide the data within this function, or it can exit the function and provide it later on 
the task level. When the data is ready, the application must call DescDataPacketProcessingDone()
Once the application calls DescDataPacketProcessingDone(), the PacketHandler assembles the data to 
be sent with the response (the response length is predefined in CANdelaStudio by the DPID data structure 
definition). 
Particularities and Limitations 
  The application may not call DescProcessingDone()
Call context 
  Background-loop level context of DescStateTask(). 
Table 5-8   PacketHandler 
 
Prototype 
void DescDataPacketProcessingDone (DescDataPacketProcessStatus status) 
Parameter 
status 
Valid values: 
  kDescDataPacketOk – if the application copied the data 
successfully 
  kDescDataPacketFailedSendDummy – if the application 
encountered an error while obtaining the requested data. CANdesc 
will transmit the UUDT response, but it will contain only the 
message padding pattern and no actual data. 
  kDescDataPacketFailedDoNotSend - if the application 
encountered an error while obtaining the requested data. No UUDT 
response will be sent. 
Return code 


2014, Vector Informatik GmbH 
Version: 3.2.0 
27 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
The application must call this function when it has finished the ApplDescReadPack<Instance-Qualifier> 
(DescMsg pMsg)
 request. 
This function allows the ECU developer to have a very slow PacketHandler (e.g. read data from another 
CPU). 
The CANdesc scheduler can process only one DPID at a time, so once the data has been copied to the 
pMsg buffer the application should call this function immediately to avoid long scheduler delays (time jitter 
from the configured scheduler rates). 
Particularities and Limitations 
  CANdesc must have previously called a PacketHandler callback ApplDescReadPack<Instance-
Qualifier> (DescMsg pMsg)
Call context 
  Background-loop level context of DescStateTask(). 
Table 5-9   DescDataPacketProcessingDone 
 
sd PacketHandler for CANdesc 4.xx
Tester
CANdesc
Application
[USDT] $AA $01 [DPID]
ApplDescReadPack<Instance-Qualifier> (pMessage)
[UUDT] [DPID] [pMsg]
[status == kDescDataPacketOk ]: DescDataPacketProcessingDone (status )
 
Figure 5-3  Asynchronous PacketHandler for current CANdesc versions 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
28 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
sd PacketHandler for CANdesc 4.xx ($78)
Tester
CANdesc
Application
[USDT] $AA $01 [DPID]
ApplDescReadPack<Instance-Qualifier> (pMessage)
[ResponsePending time = P2]: [USDT] $7F $AA $78
[status == kDescDataPacketOk ]: DescDataPacketProcessingDone (status )
[UUDT] [DPID] [pMsg]
 
Figure 5-4  Asynchronous PacketHandler with delayed processing of the first data packet  
 
sd PacketHandler for CANdesc 4.xx (Dummy)
Tester
CANdesc
Application
[USDT] $AA $01 [DPID]
ApplDescReadPack<Instance-Qualifier> (pMessage)
[status==kDescDataPacketFailedSendDummy]: DescDataPacketProcessingDone (status )
[UUDT] [DPID] 00 00 00 00 00 00 00
 
Figure 5-5  Asynchronous PacketHandler with dummy response, due to an application error while obtaining response data  
2014, Vector Informatik GmbH 
Version: 3.2.0 
29 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
6  GM/Opel service implementations 
6.1 
Service InitiateDiagnosticOperation ($10) 
CANdesc implements a special handling of the following sub-functions of this service: 
  “DisableAllDtcs” (sub-function $02) 
  “EnableDtcsDuringDeviceControl” (sub-function $03) 
WakeUpLinks  (sub-function  $04)  can  be  implemented  using  standard  main-  and  post-
handlers. 
 
 
 
Note 
The actual implementation of these services is still left to the application, controlled by 
  the callbacks mentioned below. CANdesc only manages the internal states and 
performs service validation. 
 
 
6.1.1 
Service DisableAllDTCs ($10 $02) 
 
Prototype 
void ApplDescOnDisableAllDtc (void) 
Parameter 


Return code 


Functional Description 
Once the service $10 $02 execution has completed with success, CANdesc calls this function to notify the 
application about the new state of the diagnostics module. 
Particularities and Limitations 
  In this callback the application must implement the actual disabling of DTCs. 
  Also refer to ApplDescOnReturnToNormalMode in order to re-enable DTCs. 
Call context 
  Background-loop level task context of DescStateTask() 
Table 6-1   ApplDescOnDisableAllDtc 
6.1.2 
Service EnableDTCsDuringDeviceControl ($10 $03) 
 
Prototype 
void ApplDescOnEnableDtcsChangeDuringDevCntrl (void) 
2014, Vector Informatik GmbH 
Version: 3.2.0 
30 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
Parameter 


Return code 


Functional Description 
Once the service $10 $03 execution has completed with success, CANdesc calls this function to notify the 
application about the new state of the diagnostics module. 
Particularities and Limitations 
  In this callback, the application must enable DTCs during device control. 
  Also refer to ApplDescOnReturnToNormalMode. 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-2   ApplDescOnEnableDtcChangeDuringDevCntrl 
 
 
 
Note 
CANdesc activates the tester present timer for both service instances above. 
 
 
 
6.2 
Service ReadFailureRecordData ($12) 
CANdesc generates only one function callback (main-handler) for all service $12 requests 
and  does  not  offer  any  special  support  for  this  service.  Therefore  all  dispatching  and 
validation  steps  (e.g.  dispatching  on  sub-function  level,  check  the  request  length  or 
validate  the  PID  parameter  if  applicable),  as  well  as  the  assembly  of  the  response 
message (including the sub-function byte) have to be performed by the application. 
 
6.2.1 
Service ReadFailureRecordIdentifiers ($12 $01) 
Depending on the report type requested (PID or DPID) the application must place one of 
the following values into the first data byte of the response message: 
  0x00 - for report by PID 
  0x01 - for report by DPID 
2014, Vector Informatik GmbH 
Version: 3.2.0 
31 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
 
Note 
The ECU can support either reports by PID or DPID, but not both. 
 
 
 
6.2.2 
Service ReadFailureRecordParameters ($12 $02) 
CANdesc does not automatically include the PID parameter in the response message for 
service $12 $02. The application must perform this task. 
6.3 
Service ReturnToNormalMode ($20) 
CANdesc  completely  handles  this  service  and  performs  the  following  actions  after  a 
positive  response  has  been  sent  (or  after  finishing  service  execution  when  the  request 
does not require a response): 
  The tester present timer will be deactivated. 
  If communication was disabled, it will be re-enabled. CANdesc will notify the application 
via the callback function ApplDescOnEnableNormalComm. 
  The network management timer will be started by a new request (timeout: 8 seconds). 
  If the service SendOnChangeDTCCount ($A9 $82) was active, CANdesc will notify the 
application to deactivate it by calling the function ApplDescDisableOnChangeDtcCount. 
  The scheduling mechanism for the Service ReadDataByPacketIdentifier ($AA) will be 
deactivated, and the scheduler lists will be cleared. 
CANdesc also notifies the application of the return to normal mode event via the function 
call ApplDescOnReturnToNormalMode: 
Prototype 
void ApplDescOnReturnToNormalMode (void) 
Parameter 


Return code 


Functional Description 
CANdesc calls this function on completion of service $20 processing (after the response has been sent, if 
applicable) or a tester present timeout. 
Particularities and Limitations 
  None 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-3   ApplDescOnReturnToNormalMode 
2014, Vector Informatik GmbH 
Version: 3.2.0 
32 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
6.4 
Service ReadDataByParameterIdentifier ($22) 
The  description  for  this  service  is  located  in  the  general  technical  reference  document 
“TechnicalReference_CANdesc”. Detailed below are only the deviations and behavior not 
defined in the general technical reference. 
6.4.1 
Reading a dynamically defined PID (Parameter Identifier) 
Some PIDs are statically defined in CANdelaStudio (i.e. their data structure is predefined 
at  compile time); however,  others can only be defined at  runtime using a special service 
request (see  
Service  DefinePIDByAddress  
($2D).  
These  dynamically  definable  PIDs  have  no  data 
definitions at power-on, so if the tester tries to read them the result is undefined (according 
to GMW-3110 version 1.6). In this situation, CANdesc sends a positive response with no 
actual data (only the response service ID ($62) and the PID number from the request).  
Please refer to the sequence in The dynamically definable PID is not defined. 
6.5 
Service SecurityAccess ($27) 
In  general,  the  application  shall  implement  this  service  by  itself,  but  CANdesc  already 
handles  some of  the  tasks  regarding  this  implementation.  In  the following,  you  will  learn 
about what already has been done for you by CANdesc and about the remained parts to 
be implemented by your application. 
CANdesc tasks: 
  Service format verification. 
This step includes: request length and supported sub-service checks. 
  Sub-service execution preconditions specified in the CDD file. 
  SecurityAccess state change 
according to the CDD file on positive response for “send-key” service(s). 
Application tasks: 
  Additional preconditions checks (pre-handling). 
  Seed-key sequence verification. 
  Timeout monitoring for next seed retry. 
  MEC and vulnerability flag implementation (if applicable). 
  Seed generation. 
  Key computation and verification upon requested key. 
  In case of valid keys, starting of the TesterPresent timer in CANdesc (see API 
DescActivateS1Timer). The best place to do that would be the post-handler of a “send-
key” service. Just verify if the service has been responded positively, and the response 
was sent successfully. For details about service post-handling, please refer the OEM 
independent CANdesc TechnicalReference file located in the delivered software 
package. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
33 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
6.6 
Service DisableNormalCommunication ($28) 
The  GM/Opel  version  of  CANdesc  takes  the  following  actions  prior  sending  the  positive 
response: 
  Requests GMLAN/IVLAN to disable normal communication 
  If the disable normal communication request succeeds: 
  Sets the new communication status (kDescCommDisabled
  Activates the tester present timer 
  Notifies the application via the function call ApplDescOnDisableNormalComm. 
  Positive response will be sent 
  If the disable normal communication request fails: 
  A negative response with NRC $22 (ConditionsNotCorrect) will be sent 
Prototype 
void ApplDescOnDisableNormalComm (void) 
Parameter 


Return code 


Functional Description 
CANdesc calls this function once normal message transmission has been disabled by a service $28 
request and the resulting positive response has been sent. 
Particularities and Limitations 
  None 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-4   ApplDescOnDisableNormalComm 
Prototype 
void ApplDescOnEnableNormalComm (void) 
Parameter 


Return code 


Functional Description 
Once normal message transmission has been restored, CANdesc calls this function to notify the 
application. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
34 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
  None 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-5   ApplDescOnEnableNormalComm 
6.6.1 
Activate a $28 post-handler for the application 
Since  version  6.17.00  of  CANdesc  the  post-handler  of  service  $28  is  implemented 
internally.  If  required  or  for  compatibility  reasons,  an  application  post-handler  can  be 
activated  additionally.  You  can  activate  this  post-handler  with  a  user  configuration  file  in 
GENy with the following content: 
#define DESC_ENABLE_SID_28_APPL_POST_HANDLER 
 
Prototype 
Single Context 
void ApplDescPostDisableNormalCommunication ( vuint8 status ) 
Multi Context 
void ApplDescPostDisableNormalCommunication ( vuint8 iContext, vuint8 status ) 
Parameter 
iContext 
Current request handle (reserved for future use) 
status  
For a detailed description please refer to the post-handler description in the 
document “TechnicalReference_CANdesc” 
Return code 


Functional Description 
For a detailed description please refer to the post-handler description in the document 
“TechnicalReference_CANdesc” 
Particularities and Limitations 
  Only available if activated via user configuration file 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-6 
ApplDescPostDisableNormalCommunication 
6.7 
Service DynamicallyDefineMessage ($2C) 
The  GM  diagnostic  specification  (GMW-3110  version  1.6)  allows  some  DPIDs  to  be 
defined  at  runtime  by  the  tester,  rather  than  at  compile  time.  Using  this  technique,  the 
tester can map one or more PIDs (statically or dynamically defined) to a DPID and then 
read them back via Service ReadDataByPacketIdentifier ($AA). 
2014, Vector Informatik GmbH 
Version: 3.2.0 
35 / 77 
based on template version 5.1.0 













Technical Reference CANdesc 
CANdesc completely implements this service; no application implementation is required. 
The  diagram  below  depicts  the  relationship  between  statically  and  dynamically  defined 
DPIDs and PIDs and the services that can access them. 
 
Read 
PID pool 
Service ID $22 
(static and 
Find 
dynamic) 
 
Service ID $2C 
 
Refer 
Define 
Dynamically 
Read 
definable 
 
DPID pool 
 
Service ID $AA
Read
 
 
Static defined 
DPID pool 
 
Figure 6-1  Dynamically defined DPID service relations 
6.8 
Operations on dynamically definable DPIDs 
Dynamically  definable  DPIDs  can  be  defined  and  read.  The  following  sections  illustrate 
these operations with sequence charts involving the tester, CANdesc, and application. 
6.8.1 
Defining a dynamically definable DPID 
If the requested parameters are valid (both PIDs referenced and DPID to be defined are 
valid, request has the correct length, etc.), CANdesc overwrites the current DPID definition 
with the new list of PIDs. 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
36 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
 
Caution 
If the tester request contains multiple instances of the same PID, the resulting DPID 
  definition will contain multiple instances as well. CANdesc does not verify that all of the 
requested PIDs are unique.  
 
 
 
6.8.2 
Reading a dynamically definable DPID 
When a read operation is performed on a dynamically definable DPID, four scenarios are 
possible: 
  The DPID is not defined 
  The DPID is defined, but the data is not accessible at the moment 
  The DPID is defined, and the data is accessible 
  The DPID is defined, but one of the contained PIDs is dynamically definable and it has 
not been defined 
 
If  the  DPID  is  not  defined,  the  CANdesc  scheduler  will  send  UUDT  messages  with  no 
actual data content (only zeros): 
sd Read DynDPID (not defined)
Tester
CANdesc
Application
[USDT] $AA [rate = fast] [DPID]
[UUDT] $DPID $00 $00 $00 $00 $00 $00 $00
[UUDT] $DPID $00 $00 $00 $00 $00 $00 $00
 
Figure 6-2  Dynamically definable DPID is not defined 
The next example assumes that the dynamically definable DPID has already been defined 
and references a single PID. In addition, the reading of this PID is not possible at the time 
of  data  access  (e.g.  the  data  is  corrupted),  and  therefore  the  application  would  like  to 
2014, Vector Informatik GmbH 
Version: 3.2.0 
37 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
reject  the  PID  processing.  In  this  situation,  the  UUDT  response  message  would  once 
again contain no actual data (only zeros): 
 
 
 
Caution 
In the case where multiple PIDs are contained in the DPID, and some of them cannot 
  be processed with success, these PIDs will be skipped in the UUDT response.  
 
 
 
sd Read DynDPID (PID failed)
Tester
CANdesc[MAIN]
CANdesc[DYN_DPID]
Application
[USDT] $AA [rate = fast] [DPID]
DescProcessDynDPID(DPID)
Send virtual request($22 [PID])
ApplDescReadDataByIdentifier_PID
DescSetNegResponse(kDescNrcConditionsNotCorrect)
DescProcessingDone
Send Response($7F $22 $22)
[UUDT] $DPID $00 $00 $00 $00 $00 $00 $00
 
Figure 6-3  Single referenced PID cannot provide any data 
2014, Vector Informatik GmbH 
Version: 3.2.0 
38 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
If the PID is accessible at the time of the request, the UUDT message will contain its data: 
sd Read DynDPID (PID ok)
Tester
CANdesc[MAIN]
CANdesc[DYN_DPID]
Application
[USDT] $AA [rate = fast] [DPID]
DescProcessDynDPID(DPID)
Send virtual request($22 [PID])
ApplDescReadDataByIdentifier_PID
Copy data
DescProcessingDone
Send Response($62 [PID] [Data])
[UUDT] $DPID [Data]
 
Figure 6-4  Reading the dynamically defined DPID succeeds 
2014, Vector Informatik GmbH 
Version: 3.2.0 
39 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
Since  dynamically  defined  DPIDs  can  also  contain  dynamically  definable  PIDs,  any 
dynamically  definable  PIDs  within  the  requested  DPID  must  be  defined,  or  the  resulting 
UUDT response will not contain any actual data (only zeros): 
sd Read DynDPID (DynPID not defined)
Tester
CANdesc[MAIN]
CANdesc[DYN_DPID]
Application
[USDT] $AA [rate = fast] [DPID]
DescProcessDynDPID(DPID)
Send virtual request($22 [PID])
Send Response($62 [PID])
[UUDT] $DPID $00 $00 $00 $00 $00 $00 $00
 
Figure 6-5  Dynamically definable PID, referenced by the DPID, is not defined 
 
 
 
Caution 
When a read operation is performed on a DPID which contains a dynamically definable 
  PID that is not defined but also other defined PIDs, the resulting UUDT response will 
not contain the data for this PID.  
 
 
 
6.9 
Service DefinePIDByAddress ($2D) 
The GM diagnostic specification (GMW-3110 version 1.6) allows some PIDs to be defined 
at runtime by the tester, rather than at compile time. Using this technique, the tester can 
map  a  certain  memory  area  to  a  PID  and  then  read  it  back  via  Service 
ReadDataByParameterIdentifier  ($22)
  
or  pack  the  PID  into  a  DPID  (Service 
DynamicallyDefineMessage 

($2C)) 
for 
future 
read 
operations 
via 
Service 
ReadDataByPacketIdentifier ($AA). 
CANdesc  completely  implements  this  service.  The  application  must  only  implement  the 
memory area validation and access functionality.  
The  diagram  below  depicts  the  relationship  between  statically  and  dynamically  defined 
PIDs and the services that can access them. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
40 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
 
Read
Service ID $22
PID pool
Read
Dynamically
definable PID 
Service ID $2D
Define
pool
 
Figure 6-6  Dynamically defined PID service relations 
6.10  Operations on dynamically definable PIDs 
Dynamically  definable  PIDs  can  be  defined  and  read.  The  following  sections  illustrate 
these operations with sequence charts involving the tester, CANdesc, and application. 
6.10.1  Defining a dynamically definable PID 
If the requested memory area parameters are valid and do not refer to a secured location, 
the following diagram applies: 
sd Definition of memory block (ok)
Tester
CANdesc
Application
$2D [PID] [memAddress] [memSize]
ApplDescCheckDynPidMemoryArea(memAddress, memSize)
memBlockOk
Update definition of PID
$6D [PID]
 
Figure 6-7  Definition of dynamically definable PID with valid parameter 
2014, Vector Informatik GmbH 
Version: 3.2.0 
41 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
 
If  the  application  detects  a  problem  with  the  requested  memory  area  (e.g.  bad  location 
reference, security protection, etc.), the sequence below will take place: 
sd Definition of memory block (failed)
Tester
CANdesc
Application
$2D [PID] [memAddress] [memSize]
ApplDescCheckDynPidMemoryArea(memAddress, memSize)
memBlockInvSecurity
Convert UseCase->NRC
$7F $2D [NRC = $31]
 
Figure 6-8  Defining of a dynamically definable PID failed due to security violation 
 
6.10.2  Reading a dynamically definable PID 
When a read operation is performed on a dynamically definable PID, three scenarios are 
possible: 
  The PID is not defined 
  The PID is defined, but the data is not accessible at the moment 
  The PID is defined, and the data is accessible 
 
If the PID is not defined, CANdesc returns a positive response with no actual data bytes: 
2014, Vector Informatik GmbH 
Version: 3.2.0 
42 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
sd Read DynPID (not defined)
Tester
CANdesc
Application
$22 [PID]
$62 [PID]
 
Figure 6-9  The dynamically definable PID is not defined 
2014, Vector Informatik GmbH 
Version: 3.2.0 
43 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
If 
the 
application 
has 
already 
accepted 
the 
PID 
read 
request 
(in 
ApplDescCheckDynPidMemoryAreabut it cannot complete the read operation, a negative 
response can still be sent back to the tester: 
sd Read DynPID (failed)
Tester
CANdesc
Application
$22 [PID]
ApplDescReadDynPidMemContent(memAddress, memSize)
[ResponsePending time = P2]: $7F $22 $78
DescReadDynPidMemContentDone(memBlockInvCondition)
$7F $22 $22
 
Figure 6-10  Application error when reading the memory block 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
44 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
In  the  ideal  case,  the  application  writes  the  data  into  the  supplied  data  buffer  (see 
ApplDescCheckDynPidMemoryArea) and acknowledges the end of writing with success: 
sd Read DynPID (ok)
Tester
CANdesc
Application
$22 [PID]
ApplDescReadDynPidMemContent(memAddress, memSize)
[ResponsePending time = P2]: $7F $22 $78
DescReadDynPidMemContentDone(memBlockOk)
$62 [PID] [Data]
 
Figure 6-11  Reading of dynamically defined PID succeeds 
 
Prototype 
Single Context 
DescDynPidMemAccessResult ApplDescCheckDynPidMemoryArea ( 
const DescDynPidMemBlockInfo* const memArea) 
Multi Context 
DescDynPidMemAccessResult ApplDescCheckDynPidMemoryArea ( 
vuint8 iContext, 
const DescDynPidMemBlockInfo* const memArea) 
Parameter 
iContext 
Current request handle (reserved for future use) 
memArea 
A pointer to the memory area definition which must be validated by the 
 
application 
Address[] 
The requested start address (can be a 2, 3 or 4 byte array) 
size 
The requested memory block size 
Return code 
memBlockOk 
The requested area is valid (no memory protection violation, range ok, etc.) 
memBlockInvAddress 
The requested memory address is invalid (wrong memory access) 
memBlockInvSize 
The requested memory size is invalid (e.g. out of range) 
2014, Vector Informatik GmbH 
Version: 3.2.0 
45 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
memBlockInvSecurity  The requested memory address and size are valid, but the area is protected 
by security 
memBlockInvCondition  The access conditions are not correct 
Functional Description 
CANdesc calls this function when the tester requests a valid $2D service (according to the specification). 
The application must validate the memory area parameters. 
When the application exits the function, CANdesc generates the appropriate NRC based on the application 
return value. 
Particularities and Limitations 
  Only available if the ECU supports service $2D. 
  This function runs synchronously, so the application should exit the function as quickly as possible. 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-7   ApplDescCheckDynPidMemoryArea 
 
Prototype 
Single Context 
void ApplDescReadDynPidMemContent (DescMsg pMsg, 
const DescDynPidMemBlockInfo* const memArea) 
Multi Context 
void ApplDescReadDynPidMemContent (vuint8 iContext, 
DescMsg pMsg, 
const DescDynPidMemBlockInfo* const memArea) 
Parameter 
iContext 
Current request handle (reserved for future use) 
pMsg 
A pointer to a buffer where the application must write the requested memory 
contents 
memArea 
A pointer to the memory area definition which the application can use for data 
 
acquisition: 
Address[] 
The requested start address (can be a 2, 3 or 4 byte array) 
size 
The requested memory block size 
Return code 


Functional Description 
Once defined, a dynamically definable PID can be read by the tester using service $22. Dynamically 
defined PIDs have special main-handlers which are implemented internally by CANdesc. These main-
handlers call this function to retrieve the data at the requested memory address.  
CANdesc does not use a direct memory access implementation for this service since certain ranges may 
be located in slow (external) memory chips that require extended periods of time to access. As a result, this 
data acquisition function is designed to be asynchronous. 
Once the requested data bytes have been written into the buffer pointed to by pMsg, the application must 
call DescReadDynPidMemContentDone to acknowledge that the operation is complete. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
46 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
  Only available if the ECU supports service $2D. 
  This function runs asynchronously, so once the application exits this function it can take as much time 
as necessary to complete the requested operation 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-8   ApplDescReadDynPidMemContent 
 
Prototype 
Single Context 
void DescReadDynPidMemContentDone (DescDynPidMemAccessResult result) 
Multi Context 
void DescReadDynPidMemContentDone (vuint8 iContext,  
DescDynPidMemAccessResult result) 
Parameter 
iContext 
The request handle previously passed as a parameter to the application in the 
callback ApplDescReadDynPidMemContent. 
result 
The result of the operation: 
  memBlockOk: The requested area is valid (no memory protection 
violation, range ok, etc.) 
  memBlockInvAddress: The requested memory address is not 
valid (bad memory access) 
  memBlockInvSize: The requested memory size is invalid (e.g. 
out of range) 
  memBlockInvSecurity: The requested memory address and 
size are valid, but the area is protected by security 
  memBlockInvCondition: The access conditions are not correct 
Return code 


Functional Description 
Once the data requested by ApplDescReadDynPidMemContent has been written into the buffer pointed to 
by pMsg, the application must call this function to acknowledge that the operation is complete. 
Particularities and Limitations 
  Only available if the ECU supports service $2D. 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-9   DescReadDynPidMemContentDone 
2014, Vector Informatik GmbH 
Version: 3.2.0 
47 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
 
6.11  Service ProgrammingMode ($A5) 
This service is implemented completely using the CANdesc state management.  
The programming sequence follows the state graph shown below: 
 
stm PreProgramming Sequence
Normal
DescInitPowerOn()
+  kDescStateProgrammingModeNormal
ECUPowerOn
Successfully processed SID $28
CommHalted
+  kDescStateProgrammingModeCommHalted
Request $A5 $02
Request $A5 $01
[ApplDescPreRequestProgrammingMode_HiSpeed]
[ApplDescPreRequestProgrammingMode]
Requested
Request $A5 $02 [ApplDescPreRequestProgrammingMode]
Requested_HiSpeed
+  kDescStateProgrammingModeRequested
+  kDescStateProgrammingModeRequested_HiSpeed
Request $A5 $01 [ApplDescPreRequestProgrammingMode_HiSpeed]
Request $A5 $03
Request $A5 $03
Activ e
+  kDescStateProgrammingModeActive
 
Figure 6-12  Programming mode flowchart 
To  further  restrict  service  execution  based  on  the  current  state  in  the  programming 
sequence, please refer to - CANdelaStudio default attribute settings regarding the setup 
of the corresponding state group in CANdela studio. 
6.11.1  Allowing programming mode ($A5 $01/$02) 
Prior  to  activating  programming  mode,  the  tester  must  ask  the  ECU  for  permission. The 
application may accept or deny this request using a standard prehandler for the respective 
level. CANdesc will activate these prehanders per default. 
Prehandler  names  can  be  changed  in  the  CDD  file  or  the  configuration  tool,  for  your 
reference the default names are: 
  $A5 $01: ApplDescPreRequestProgrammingMode 
  Compatibility note: This completely replaces the dedicated callback 
ApplDescMayEnterProgMode 
2014, Vector Informatik GmbH 
Version: 3.2.0 
48 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
  $A5 $02: ApplDescPreRequestProgrammingMode_HiSpeed 
  Compatibility note: This completely replaces the dedicated callback 
ApplDescMayEnterHiSpeedProgMode 
Please also refer to the general CANdesc technical reference for further information about 
prehandler implementation. 
6.11.2  Entering programming mode ($A5 $03) 
Once the entire programming mode sequence is complete, the application usually makes 
the jump to the bootloader (FBL) in one of two ways. Both strategies are discussed in the 
following sections. 
6.11.2.1  FBL start on EnterProgrammingMode ($A5 $03) 
If the application  jumps  to  the  FBL  on  this  service,  the  ECU  developer  must  enable  the 
“Flashable  ECU”  option  in  the  generation  tool.  CANdesc  will  notify  the  application  to 
perform the FBL jump by calling the function ApplDescOnEnterProgModeThe application 
can  use  the  function  DescGetHiSpeedMode  to  determine  if  a  high  speed  mode  switch 
must be performed manually. 
 
 
 
Note 
If the application jumps to the FBL on this service, it must manage the bus speed 
  switching manually. 
 
 
 
Prototype 
void ApplDescOnEnterProgMode (void) 
Parameter 


Return code 


Functional Description 
CANdesc will call this function so the application can perform the FBL jump. 
Particularities and Limitations 
  To enable this notification, the ECU developer must enable the “Flashable ECU” option in the 
generation tool (the define DESC_ENABLE_FLASHABLE_ECU exists in the generated code). 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-10   ApplDescOnEnterProgMode 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
49 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
6.11.2.2  FBL start on RequestDownload ($34) 
If the application jumps to the FBL on this service, the ECU developer must  disable the 
option “Flashable ECU” in the generation tool. CANdesc will automatically handle the high 
speed switching (if necessary) to comply with the tester expectations. The application must 
only  implement  the  service  main-handler  and  perform  the  jump  to  the  FBL.  In  order  to 
verify  that  the  programming  mode  sequence  was  completed  successfully,  the  ECU 
developer can call the function DescGetProgMode() in the main-handler. 
 
 
 
Note 
The ECU developer must disable the option “Flashable ECU” in the generation tool 
  when no FBL is present in the ECU. 
 
 
 
6.11.2.3  Concluding programming mode 
Once  the  flashing  activity  has  concluded  (through  a  service  $20  tester  request  or  tester 
present timeout), the GM/Opel diagnostic specification states that the ECU shall perform a 
software reset. Two scenarios are possible: 
>  If the ECU was actually re-flashed, the FBL should perform the reset.  
>  If the ECU was not actually re-flashed (the tester was re-flashing another ECU or the 
ECU is not flashable), CANdesc notifies the application to perform an ECU reset via the 
function call ApplDescForceEcuReset. 
 
Prototype 
void ApplDescForceEcuReset (void) 
Parameter 


Return code 


Functional Description 
CANdesc calls this function to notify the application that it shall perform an ECU reset. 
It is not required that the application perform the reset within this function call since it may need to prepare 
first (by saving RAM variables into EEPROM, for instance). 
Particularities and Limitations 
  None 
Call context 
  Background-loop level task context of DescStateTask(). 
Table 6-11   ApplDescForceEcuReset 
2014, Vector Informatik GmbH 
Version: 3.2.0 
50 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
 
6.11.3  Considerations when upgrading 
The callback functions used by CANdesc have changed in version 6.x. The following APIs 
are no longer used and need to be replaced by service prehandlers: 
  ApplDescMayEnterProgMode 
  ApplDescMayEnterHiSpeedProgMode 
6.12  Service ReadDiagnosticInformation ($A9) 
This  service  supplies  the  tester  with  information  about  various  DTC  statuses  (e.g.  on 
change count of the DTCs, a list of all DTCs matching a given status mask, etc.). 
Since the DTC storage and management is application specific, the implementation of the 
diagnostic  service  “ReadDiagnosticInformation”  (RDI)  ($A9)  generalizes  this  functionality, 
reducing the application task to a few callback implementations. 
 
The  ECU  developer  should  keep  the  following  important  properties  in  mind  when 
designing the application: 
1.  When an $A9 sub-function has been requested, CANdesc cannot process another 
request until after the first UUDT response message has been sent. 
2.  While  processing  and  sending  the  list  of  matching  DTCs  for  an  $A9  $81  request, 
CANdesc can process another request except $A9 $80. 
3.  CANdesc can process the requests $A9 $80 and $A9 $81 in parallel with $A9 $82. 
4.  Application callbacks are handled asynchronously. 
 
Here is a parallel service execution matrix: 
         Active 
$A9 $80 
$A9 $81 
$A9 $82 
Other requests 
 
(except scheduled 
$AA ) 

Requested 
$A9 $80 
Not possible 
Not possible 
Possible after 
Not possible 
the first UUDT is 
sent 
$A9 $81 
Not possible 
Not possible 
Possible after 
Not possible 
the first UUDT is 
sent 
$A9 $82 
Not possible 
Possible after 
Possible after 
Not possible 
the first UUDT is  the first UUDT is 
sent 
sent 
Other requests  Not possible 
Possible after 
Possible after 
Not possible 
the first UUDT is  the first UUDT is 
sent 
sent 
Table 6-12   Service $A9 parallel execution matrix 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
51 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
 
Note 
The RCR-RP responses in the sequence diagrams below are shown for better timing 
  request-response relation understanding; however, if the application is fast enough 
there will be no RCR-RP response sent. 
 
 
 
6.12.1  ReadStatusOfDTCByNumber ($A9 $80) 
CANdesc processes this service as shown below. 
 
If  the  application  finds  the  requested  DTC  number  with  the  given  failure  type  byte,  the 
following sequence will be executed: 
sd ReadStatusOfDTCByNumber (good)
Tester
CANdesc
Application
[USDT] $A9 $80 [DTC] [FailureTypeByte]
ApplDescGetDtcStatusByNumber(DTC, FailureTypeByte)
[ResponsePending time = P2]: [USDT] $7F $A9 $78
[ResponsePending time = P3Max]: [USDT] $7F $A9 $78
DescRdiDtcStatusByNumberFound(StatusByte)
[UUDT] $80 [DTC][FailureTypeByte][StatusByte]
 
Figure 6-13  Request $A9 $80 where the requested fault type combination was found 
2014, Vector Informatik GmbH 
Version: 3.2.0 
52 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
If  the  requested  fault  type  combination  is  not  supported  by  the  ECU,  the  following 
sequence will be executed: 
sd ReadStatusOfDTCByNumber (failed)
Tester
CANdesc
Application
[USDT] $A9 $80 [DTC] [FailureTypeByte]
ApplDescGetDtcStatusByNumber(DTC, FailureTypeByte)
[ResponsePending time = P2]: [USDT] $7F $A9 $78
[ResponsePending time = P3Max]: [USDT] $7F $A9 $78
DescRdiDtcStatusByNumberNotFound
[USDT] $7F $A9 $31
 
Figure 6-14  Request $A9 $80 where the requested fault type combination was not found 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
53 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Here are the detailed descriptions of the APIs used in the above diagrams: 
 
Prototype 
void ApplDescGetDtcStatusByNumber (vuint16 dtcNum, vuint8 failureTypeByte) 
Parameter 
dtcNum 
The requested DTC number 
failureTypeByte 
The requested failure-type byte 
Return code 


Functional Description 
CANdesc calls this function to query the application for the request combination of DTC number and 
failure-type byte. When the application finds this combination, it must acknowledge this by calling the 
function DescRdiDtcStatusByNumberFoundIf the application cannot find a matching entry, it must 
acknowledge this by calling the function DescRdiDtcStatusByNumberNotFound. 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $80 
  The application can call DescRdiDtcStatusByNumberFound or DescRdiDtcStatusByNumberNotFound 
within this function, or it can exit this function and call one of them later on the application task level. 
Call context 
  Background-loop level task context (same as DescStateTask()). 
Table 6-13   ApplDescGetDtcStatusByNumber 
Prototype 
void DescRdiDtcStatusByNumberFound (vuint8 statusByte) 
Parameter 
statusByte 
The current status of the DTC which was passed as a parameter in the 
callback ApplDescGetDtcStatusByNumber 
Return code 


Functional Description 
The application can call this function to acknowledge the successful search result of the DTC number and 
failure-type byte combination which were passed as parameters in the callback 
ApplDescGetDtcStatusByNumber. 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $80 
  CANdesc must have previously called ApplDescGetDtcStatusByNumber 
Call context 
  Background-loop level task context 
Table 6-14   DescRdiDtcStatusByNumberFound 
2014, Vector Informatik GmbH 
Version: 3.2.0 
54 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
Prototype 
void DescRdiDtcStatusByNumberNotFound (void) 
Parameter 


Return code 


Functional Description 
The application can call this function to acknowledge the unsuccessful search result of the DTC number 
and failure-type byte combination which were passed as parameters in the callback 
ApplDescGetDtcStatusByNumber 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $80 
  CANdesc must have previously called ApplDescGetDtcStatusByNumber 
Call context 
  Background-loop level task context 
Table 6-15   DescRdiDtcStatusByNumberNotFound 
6.12.2  ReadStatusOfDTCByStatusMask ($A9 $81) 
This service transmits a list of DTCs and their properties back to the tester. CANdesc uses 
an iteration-based process to request each element of the list from the application. 
 
 
 
Note 
The iterator parameter discussed below is only provided to help the application keep 
  track of where it should begin/continue searching the list. The value of this parameter 
has no meaning to CANdesc. 
 
 
 
CANdesc processes this service as shown below. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
55 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
If  the  application  finds  DTCs  that  match  the  given  status  mask  byte,  the  following 
sequence will be executed: 
sd ReadStatusOfDTCByStatusMask (At Least one DTC found)
Tester
CANdesc
Application
[USDT] $A9 $81 [DTC] [StatusMask]
ApplDescGetDtcStatusByMask(iter = 0, StatusMask)
[ResponsePending time = P2]:
[USDT] $7F $A9 $78
[ResponsePending time = P3Max]:
[USDT] $7F $A9 $78
DescRdiDtcStatusByMaskFound(iter = X, DTC0, FailureTypeByte0, StatusByte0)
[UUDT] $81 [DTC0][FailureTypeByte0][StatusByte0]
ApplDescGetDtcStatusByMask(iter = X, StatusMask)
DescRdiDtcStatusByMaskFound(iter = Y, DTC1, FailureTypeByte1, StatusByte1)
[UUDT] $81 [DTC1][FailureTypeByte1][StatusByte1]
ApplDescGetDtcStatusByMask(iter =Y, StatusMask)
DescRdiDtcStatusByMaskNotFound(StatusAvailabilityMask)
[UUDT] $81 $00 $00 $00 [StatusAvailabilityMask]
 
Figure 6-15  Request $A9 $81 where the application found two DTCs with the requested status mask 
 
 
 
Notes 
1. If the application cannot send the second and the following DTCs matching the 
 
requested mask within P2ecu time, CANdesc will not send further RCR-RP 
messages back to the tester. 
2. Although CANdesc can process another request after the first UUDT response has 
been sent, if that next request is either $A9 $80 or $A9 $81 the request will be 
rejected with negative response “ConditionsNotCorrect” ($22). 
3. CANdesc can process $A9 $80 or $A9 $81 requests again once the “End of DTC 
report” message has been sent.. 
 
 
 
If the application cannot find any DTCs matching the requested status mask, CANdesc will 
only send the final UUDT response as shown below: 
2014, Vector Informatik GmbH 
Version: 3.2.0 
56 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
sd ReadStatusOfDTCByStatusMask (No DTC found)
Tester
CANdesc
Application
[USDT] $A9 $81 [DTC] [StatusMask]
ApplDescGetDtcStatusByMask(iter = 0, StatusMask)
[ResponsePending time = P2]: [USDT] $7F $A9 $78
[ResponsePending time = P3Max]: [USDT] $7F $A9 $78
DescRdiDtcStatusByMaskNotFound(StatusAvailabilityMask)
[UUDT] $81 $00 $00 $00 [StatusAvailabilityMask]
 
Figure 6-16  Request $A9 $81 where the application cannot find any DTCs with the requested status mask 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
57 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Here are the detailed descriptions of the APIs used in the above diagrams: 
 
Prototype 
void ApplDescGetDtcStatusByMask (vuint16 iterPos, vuint8 statusMask) 
Parameter 
iterPos 
An iterator for the search start position (abstract) 
statusMask 
The status mask that the DTC shall match (OR-ed) 
Return code 


Functional Description 
CANdesc calls this function to query the application for the first/next DTC number that has at least one bit 
in its status byte matching the parameter statusMask. When the application finds this combination, it must 
acknowledge this by calling the function DescRdiDtcStatusByMaskFoundIf the application cannot find any 
(more) matching DTCs, it must acknowledge this by calling the function 
DescRdiDtcStatusByMaskNotFound. 
The application can use the iterator parameter as a marker to continue the search from a certain position 
instead of implementing a counter or state machine. 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $81 
  The application can call DescRdiDtcStatusByMaskFound or DescRdiDtcStatusByMaskNotFound within 
this function, or it can exit this function and call one of them later on the application task level. 
Call context 
  Background-loop level task context (same as DescStateTask()). 
Table 6-16   ApplDescGetDtcStatusByMask 
 
Prototype 
void DescRdiDtcStatusByMaskFound (DescRdiDtcRecord *pDtcReport) 
2014, Vector Informatik GmbH 
Version: 3.2.0 
58 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 
vuint16 nextIterPos 
The position of the current matching DTC 
vuint16 dtcNum 
The DTC number which matches the given mask 
vuint8 failureTypeByte  The failure type byte of the DTC 
vuint8 statusByte 
The actual status byte value of the DTC 
Return code 


Functional Description 
The application can call this function to acknowledge the successful search result of the statusMask which 
was passed as a parameter in the callback ApplDescGetDtcStatusByMask
The parameter pDtcReport is a pointer to a DTC property structure. Since CANdesc will immediately copy 
the contents of this structure, the ECU developer can use an automatic variable to save RAM. 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $81. 
  CANdesc must have previously called ApplDescGetDtcStatusByMask 
Call context 
  Background-loop level task contex 
Table 6-17   DescRdiDtcStatusByMaskFound 
 
Prototype 
void DescRdiDtcStatusByMaskNotFound (vuint8 dtcSam) 
Parameter 
dtcSam 
Represents the status availability mask of the fault memory manager (i.e. 
which bits of the status mask are relevant for the ECU). 
Return code 


Functional Description 
The application can call this function to acknowledge that there were no (more) DTCs found that match the 
statusMask which was passed as a parameter in the callback ApplDescGetDtcStatusByMask 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $81. 
  CANdesc has previously called ApplDescGetDtcStatusByMask. 
Call context 
  Background-loop level task context 
Table 6-18   DescRdiDtcStatusByMaskNotFound 
2014, Vector Informatik GmbH 
Version: 3.2.0 
59 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
6.12.3  SendOnChangeDTCCount ($A9 $82) 
This  service  manages  the  background  application  monitor  which  detects  DTC  count 
changes.  In  an  effort  to  more  efficiently  manage  this  functionality,  CANdesc  notifies  the 
application via function callbacks to activate/deactivate the monitor.  
CANdesc processes this service as shown below. 
If the tester sends a request for this service with a non-zero status mask, the DTC count 
monitor shall be activated: 
sd Send on change DTC count request  (Enable)
Tester
CANdesc
Application
[StatusMask != 0]: [USDT] $A9 $82 [StatusMask]
ApplDescEnableOnChangeDtcCount
[ResponsePending time = P2]: [USDT] $7F $A9 $78
[ResponsePending time = P3Max]: [USDT] $7F $A9 $78
DescRdiOnDtcCountChanged(NewCount0)
[UUDT] $82 [NewCount0]
DescRdiOnDtcCountChanged(NewCount1)
[UUDT] $82 [NewCount1]
 
Figure 6-17  Request $A9 $82 with activation of the background DTC count monitor 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
60 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
If the tester sends a request for this service with a status  mask of zero,  the background 
monitoring shall be deactivated: 
sd Send on change DTC count request  (Disable)
Tester
CANdesc
Application
[StatusMask == 0]: [USDT] $A9 $82 [StatusMask]
ApplDescDisableOnChangeDtcCount
[UUDT] $82 $00 $00
 
Figure 6-18  Request $A9 $82 with explicit deactivation of the background DTC count monitor. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
61 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
Since  this  service  is  monitored  for  tester  present  timeouts,  when  no  more  $3E  requests 
are received the DTC count monitor shall be deactivated: 
sd Send on change DTC count request  (Timeout)
Tester
CANdesc
Application
[StatusMask != 0]: [USDT] $A9 $82 [StatusMask]
ApplDescEnableOnChangeDtcCount
[ResponsePending time = P2]: [USDT] $7F $A9 $78
[ResponsePending time = P3Max]: [USDT] $7F $A9 $78
DescRdiOnDtcCountChanged(NewCount0)
[UUDT] $82 [NewCount0]
DescRdiOnDtcCountChanged(NewCount1)
[UUDT] $82 [NewCount1]
TesterPresent Timeout
ApplDescDisableOnChangeDtcCount
 
Figure 6-19  Request $A9 $82 with deactivation of the background DTC count monitor by timeout. 
 
 
 
Note 
In  addition  to  tester  present  timeout,  CANdesc  will  react  in  the  same  way  on  the 
  following events: 
  The tester sends Service ReturnToNormalMode ($20) request 
  The application calls the function DescRdiDeactivateOnChangeDtcCount. 
 
 
 
CANdesc can process this request in parallel to an $A9 $81 request  after the first UUDT 
response has been sent. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
62 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Here are the detailed descriptions of the APIs used in the above diagrams: 
Prototype 
void ApplDescEnableOnChangeDtcCount (vuint8 statusMask) 
Parameter 
statusMask 
The status mask which the application shall apply as a filter for the DTC count 
monitor (i.e. which DTCs shall be monitored) 
Return code 


Functional Description 
CANdesc calls this function to tell the application that it shall activate DTC count monitoring. From this point 
on, the application shall send the DTC count on change by calling the function 
DescRdiOnDtcCountChanged. 
CANdesc does not store the requested statusMask; it must be stored by the application 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $82. 
Call context 
  Background-loop level task context (same as DescStateTask()). 
Table 6-19   ApplDescEnableOnChangeDtcCount 
 
Prototype 
void ApplDescDisableOnChangeDtcCount (void) 
Parameter 


Return code 


Functional Description 
CANdesc calls this function to notify the application that it shall deactivate DTC count monitoring. From this 
point on, the application shall not send the DTC count on change 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $82. 
Call context 
  Background-loop level task context (same as DescStateTask()). 
Table 6-20   ApplDescDisableOnChangeDtcCount 
 
Prototype 
void DescRdiOnDtcCountChanged (vuint16 newCount) 
2014, Vector Informatik GmbH 
Version: 3.2.0 
63 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 
newCount 
The new count of DTCs that match the mask that was passed as a parameter 
by the function ApplDescEnableOnChangeDtcCount
Return code 


Functional Description 
The application can call this function to notify CANdesc that the DTC count has changed. CANdesc will 
send a UUDT response back to the tester. 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $82. 
  CANdesc must have previously called the function ApplDescEnableOnChangeDtcCount. 
Call context 
  Background-loop level task context 
Table 6-21   DescRdiOnDtcCountChanged 
 
Prototype 
void DescRdiDeactivateOnChangeDtcCount (void) 
Parameter 


Return code 


Functional Description 
The application can call this function to notify CANdesc that it has stopped DTC count monitoring. 
CANdesc will call the function ApplDescDisableOnChangeDtcCount to acknowledge this event. 
Particularities and Limitations 
  Only available if the ECU supports $A9 sub-function $82. 
  CANdesc must have previously called the function ApplDescEnableOnChangeDtcCount. 
Call context 
  Background-loop level task context. 
Table 6-22   DescRdiDeactivateOnChangeDtcCount 
6.13  Service ReadDataByPacketIdentifier ($AA) 
This  service  allows  the  tester  to  read  a  DPID  (data  packet  identifier)  either  once  or 
periodically  with  three  possible  speeds  (slow,  medium,  or  fast).  CANdesc  completely 
handles this service. Only the PacketHandlers may be implemented by the application as 
described in section 5.7 The PacketHandler (another type of service processor). 
2014, Vector Informatik GmbH 
Version: 3.2.0 
64 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
6.13.1  Handling undefined use cases 
There are some use cases which are not covered or completely described in the GM/Opel 
diagnostic  specification.  The  following  sections  describe  these  cases  along  with  the 
resulting CANdesc behaviour.  
6.13.1.1  Service $AA handling for undefined dynamically definable DPIDs 
According  to  GMW-3110  version  1.6,  if  the  tester  requests  an  undefined  dynamically 
definable DPID with service $AA the result is undefined. In this situation, CANdesc sends 
a UUDT response with no actual data (byte zero is the DPID number and the remaining 
bytes are padded). 
6.13.1.2  Service $AA handling for undefined referenced dynamically defined PIDs 
As mentioned in  section  6.4.1  Reading a dynamically defined PID (Parameter Identifier), 
the undefined PID contained by the DPID will contain no data. In this situation, CANdesc 
sends  a  UUDT  response  with  no  actual  data  (byte  zero  is  the  DPID  number  and  the 
remaining bytes are padded). 
6.13.1.3  Service $AA handling for unaccessible referenced PIDs 
A  dynamically  defined  DPID  references  one  or  more  PIDs.  If  any  of  those  PIDs  are  not 
accessible  to  the  application  for  any  reason  (e.g.  security  access,  current  ECU  state, 
memory  access  error,  etc.) at  the  time the scheduler  needs  the data,  CANdesc  sends a 
UUDT  response  with  no  actual  data  (byte  zero  is  the  DPID  number  and  the  remaining 
bytes are padded). 
6.14  Service DeviceControl ($AE) 
The  application  must  completely  implement  this  service.  In  addition,  the  GM/Opel 
diagnostic  specification  requires  that  the  tester  present  timeout  monitoring  shall  be 
activated once a DeviceControl service has been executed. Since CANdesc manages the 
tester  present  timer,  the  application  must  call  the  function  DescActivateS1Timer  to  fulfill 
this requirement. The proper location for this is the PostHandler for every CPID (Control 
Packet  Identifier)  except  0x00  (reserved  for  “terminate  device  control”).  To  facilitate  this, 
the  ECU  developer  should  select  ‘User’  as  the  PostHandler  attribute  for  these  CPIDs  in 
CANdela  Studio.  These  PostHandlers  must  then  evaluate  the  status  parameter  (see 
TechnicalReference_CANdesc) and if the result is ok (i.e. CANdesc has successfully sent 
the positive response) the application must call the function DescActivateS1Timer. 
 
 
 
Note 
To reduce ROM usage and improve run-time, the ECU developer can use the 
  “PostHanlderOverrideName” attribute in CANdelaStudio to define a single PostHandler 
used by all CPIDs. 
Please refer to sectio7.3 Service attributes for more details. 
 
 
 
Here is an example how the ECU developer could implement the PostHandler: 
2014, Vector Informatik GmbH 
Version: 3.2.0 
65 / 77 
based on template version 5.1.0 



Technical Reference CANdesc 
 
Figure 6-20 PostHandler for “DeviceControl” ($AE) 
 
Prototype 
void DescActivateS1Timer (void) 
Parameter 


Return code 


Functional Description 
The application can call this function to enable tester present timeout monitoring. This function is 
normally only used in the “DeviceControl” ($AE) service PostHandler. 
 
This function will not restart the tester present timer!  Only the tester can reset the timer, by sending the 
“TesterPresent” ($3E) service. 
Particularities and Limitations 
  None 
Call context 
  Background-loop level task context (same as DescStateTask()). 
Table 6-23   DescActivateS1Timer 
 
6.15  Service TesterPresent ($3E) 
CANdesc  implements  this  service  by  reloading  the  tester  present  timer  with  the  original 
timeout value. 
 
 
Caution 
This service does not activate tester present timeout monitoring!  
 
 
 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
66 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
7  CANdelaStudio default attribute settings 
In order to use the features of CANdesc described in this document, the ECU developer 
must set the CANdelaStudio attributes appropriately for the corresponding services and/or 
their instances as described below. 
The ECU developer configures CANdelaStudio attributes on three levels: 
  Diagnostic Class (like “Ecu identification”, “Security access”, etc.) 
  Diagnostic Instance (like “(DID $90) Vehicle Identification Number”, 
“RequestProgrammingModeHighSpeed”, etc.) 
  Service (like “Read” or “Write” on Diagnostic Instance “(DID $90) Vehicle Identification 
Number”). 
The picture below illustrates these three levels in CANdelaStudio: 
 
Figure 7-1 CANdelaStudio views 
Legend:  
  RED:  
 Diagnostic Class 
  BLUE:  
 Diagnostic Instance 
  YELLOW:    Service 
7.1 
Diagnostic class attributes 
CANdesc is designed to handle certain events on a diagnostic class basis; therefore, the 
ECU  developer  must  configure  the  attributes  on  the  diagnostic  class  level.  The  relevant 
services and their attribute configurations are listed below. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
67 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 7-2 Diagnostic Class level attributes 
Diagnostic Class name 
MainHandler  PreHandler 
PacketHandler  PostHandler 
Support (for  Support (for  Support 
Support (for 
all Protocol 
all Protocol 
all Protocol 
Service) 
Services) 
Services) 
Failure Record Data – 
USER 
None 
None 
None 
Parameters 
Dynamic Data Packets 
None 
None 
All 
None 
Data Packet 
OEM 
None 
All 
OEM 
Programming mode 
OEM 
None 
None 
OEM 
Table 7-1   Default ‘Diagnostic Class’ attribute settings 
 
7.2 
Diagnostic instance attributes 
CANdesc is designed to handle certain events on a diagnostic instance basis; therefore, 
the  ECU  developer  must  configure  the  attributes  on  the  diagnostic  instance  level.  The 
relevant services and their attribute configurations are listed below. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
68 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 7-3 Diagnostic Instance level attributes 
 
Diagnostic Class name where Diagnostic 
PacketHandler Option 
Instances shall be configured 
 
Default 
Optional 
Data Packet 
USER 
Generated 
Table 7-2   Default ‘Diagnostic instance’ attribute settings 
7.3 
Service attributes 
CANdesc is designed to handle certain events on a diagnostic service basis; therefore, the 
ECU developer must configure the attributes on the diagnostic service level. The relevant 
services and their attribute configurations are listed below. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
69 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 7-4  Service related attributes 
2014, Vector Informatik GmbH 
Version: 3.2.0 
70 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Notes
Service (and 
MainHandler  PreHandler  PreHandler 
PostHandler  PostHandler 
sub-service) ID  Support (for  Support  
OverrideName 
Support 
OverrideName 
that shall be 
Service) 
configured 
$10 $02 
Generated 
None 
 
OEM 
 
(User) 
$10 $03 
Generated 
None 
 
OEM 
 
(User) 
$20 
OEM 
None 
 
OEM 
 
$28 
OEM 1) 
None 
 
None 
 
$3E 
Generated 
 
 
OEM 
 
(User)  
$A9 $80 
OEM 
OEM 
 
None 
 
$A9 $81 
OEM 
OEM 
 
None 
 
$A9 $82 
OEM 
None 
 
OEM 
 
$AE $00 
User 
None 
 
None 
 
$AE $01-$FF 
User 
None 
 
User 
One function for all 
sub-services (see 
Service 
DeviceControl 
($AE)
)
 
Table 7-3   Default ‘Service’ attribute settings 
>  All cells defined as “None” can optionally be replaced only by “User” attributes when 
desired. 
>  Some data access services (e.g. $22, $1A, $3B and $AA) use “Generated” 
MainHandler (for $AA PacketHandler) support. This eliminates the need for the 
application to correctly order the data in the response message (it must only return the 
data; CANdesc will assemble the response in the correct order) 
 
 
 
Caution 
1) It is not possible to implement the MainHandler for service $28 in your application 
  since CANdesc (since version 5.05.04) uses this service callback. To evaluate the 
service execution conditions, you can use the PreHandler to perform those checks and 
to reject the service if needed. 
 
 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
71 / 77 
based on template version 5.1.0 


Technical Reference CANdesc 
7.4 
State group for the Programming Sequence 
The  CANdesc  implementation  for  the  programming  mode  sequence  relies  on  a  state 
machine that can be defined as CANdela Studio state group.  
State Group 
State Qualifier 
Blocked  Transitions 
Qualifier 
Services  
ProgrammingMode  Normal 
$A5 $xx  $28 -> CommHalted 
CommHalted 
$A5 $03  $A5 $01 -> Requested 
$A5 $02 -> Requested_HiSpeed 
$20 -> Normal 
Requested 
None 
$A5 $02 -> Requested_HiSpeed 
$A5 $03 -> Active 
$20 -> Normal 
Requested_HiSpeed  None 
$A5 $01 -> Requested 
$A5 $03 -> Active 
$20 -> Normal 
Active  
$A5 $xx  $20 -> Normal 
Table 7-4   Programming Sequence state group 
CANdesc will generate these states and transitions even if they do not  exist in  the CDD 
file. Otherwise, CANdesc will reuse  what  is already present, and add/remove all missing 
states and/or transitions. 
This  means  you  cannot  change  the  programming  sequence  by  means  of  changing  the 
state configuration, but you can put the correct sequence in the CDD file (using the exact 
qualifiers from the table above). This opens up the possibility to block further services from 
executing in any of these states.  
E.g.  if  you  want  to  block  all  $AE  services  from  executing  while  programming  mode  is 
‘Active’, you can model this in CANdela Studio, and CANdesc will do the rest for you. 
 
 
 
Note 
Since the StateGroup ‘ProgrammingMode’ follows the usual state group 
  implementation, all functionality regarding state groups is available for use. Especially 
the callback ApplDescOnTransitionProgrammingMode will notify your application of any 
state change. 
 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
72 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
8  OBD support 
What is special about OBD support?  GM/Opel uses extended addressing for functionally 
addressed enhanced diagnostic services; however, functionally addressed OBD requests 
must  use  normal  addressing.  Due  to  this,  CANdesc  uses  two  separate  reception  paths. 
Additionally,  the  message  definition  of  some  OBD  services  does  not  match  the  generic 
service  instance  generator  used  by  CANdesc  so  they  can  only  be  supported  on  the 
protocol service level.  
8.1 
CAN identifiers 
Enhanced diagnostic services 
GM specifies enhanced diagnostic service requirements in GMW-3110. 
CAN ID 0x101 - 11-bit extended addressing USDT 
This ID is only used for functionally addressed enhanced diagnostic requests. Functionally 
addressed OBD requests must use CAN ID 0x7DF. 
OBD services 
GM uses the OBD service requirements described in ISO15031-5. 
CAN ID 0x7DF - 11-bit normal addressing USDT 
This  ID  is  only  used  for  functionally  addressed  OBD  requests.  Functionally  addressed 
enhanced diagnostic requests must use CAN ID 0x101. 
CAN ID 0x7E0-0x7EF - 11-bit normal addressing USDT 
These  IDs  are  used  for  physically  addressed  OBD  requests  to  individual  ECUs  that 
support OBD services. ECUs using these IDs for OBD services may also elect to use the 
same IDs for physically addressed enhanced diagnostic services; however, ECUs that do 
not support OBD services may not use these IDs for enhanced diagnostic services. 
8.2 
Restrictions 
SID $01, $02, $06, $08 and $09 must be handled at the diagnostic class level when the 
‘may be combined’ property is enabled in CANdelaStudio. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
73 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
8.3 
CANdelaStudio default attribute settings for OBD services 
8.3.1 
Diagnostic classes 
Powertrain diagnostic and freeze frame data (EOBD) – SID $01 / $02 
Emission related trouble codes – SID $03 / $07 / $04 
Test results for non-continuously monitored systems (EOBD) – SID $06 
Control of on-board system, test, or component (EOBD) – SID $08 
Vehicle information (EOBD) – SID $09 
 
Service 
PreHandler  MainHandler  PostHandler  PacketHandler 
ID 
Support 
Support 
Support 
Support 
(On Protocol 
level) 
$01 
None 
User 
None 
None 
$02 
None 
User 
None 
None 
$06 
None 
User 
None 
None 
$08 
None 
User 
None 
None 
$09  
None 
User 
None 
None 
Table 8-1   Diagnostic class specific attributes 
8.4 
CANgen configuration 
8.4.1 
DBC attribute settings for the OBD request message  
A  message  cannot  be  supported  by  both  the  Interaction  Layer  and  CANdesc.  For  this 
reason, diagnostic messages must have the attribute “GenMsgNoIalSupport” set to “yes” 
(or, depending on the DBC version, the attribute “GenMsgILSupport” set to “no”). The DBC 
author is responsible for setting this attribute. 
8.4.2 
CANgen version < 4.15.00 
In older CANgen versions, no automatic configuration of OBD support is performed so the 
ECU developer must configure it manually: 
For  the  functional  OBD  request  message  (CAN  ID  0x7DF),  a  precopy  function  with  the 
name DescOBDReqInd must be configured (in CANgen on the “Receive Messages” tab). 
8.4.3 
CANgen version ≥ 4.15.00 
Since  CANgen  version  4.15.00,  the  DBC  author  can  set  the  attribute  ‘DiagState’  for  the 
functional  OBD  request  message  (CAN  ID  0x7DF)  to  ‘Yes’.  In  this  case,  CANgen  will 
automatically configure the precopy function. 
8.4.4 
GENy configuration 
The DBC author can set the attribute ‘DiagState’ for the functional OBD request message 
(CAN ID 0x7DF) to ‘Yes’. Then, CANdesc configures the precopy function automatically. 
2014, Vector Informatik GmbH 
Version: 3.2.0 
74 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
8.5 
CANdesc configuration (without a Powertrain CANdela template) 
If the ECU developer is not using a Powertrain template (no OBD services are available in 
CANdelaStudio) but the ECU must still support OBD services, a workaround is necessary 
to  activate  the  OBD  reception  path  in  CANdesc.  This  workaround  requires  the  ECU 
developer  to  make  changes  to  the  file  “CANdelaGenAPI.ini”,  which  is  located  in  the 
CANgen executable folder. 
To override the look up result, modify: 
[GeneratorController] 
OverrideAnyObdServiceDetection = [0 - don't (default), 1 - 
activate OBD support] 
The OBD services  themselves will be handled by the application using the ‘user-service’ 
feature, which shall be enabled by the same INI file: 
[Misc] 
UseGenericUserServiceHandler = [0 - don't (default), 1 - 
activated] 
Optionally, the following entry can be used for post-handler support: 
UseGenericUserServicePostHandler = [0 - don't (default), 1 - 
activated] 
2014, Vector Informatik GmbH 
Version: 3.2.0 
75 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
9   Debug assertion codes 
The GM/Opel specific implementation has optional debug code for certain situations where 
the  ECU  could  “hang”  or  incorrect  behavior  could  occur.  Depending  on  the  debug  level 
chosen in the generation tool, the following cases may be checked: 
Assertion name 
ID(HEX)  Description 
kDescAssertInvalidA9Mode 
91 
The  module  has  set  the  $A9  sub-
service  iterator  incorrectly,  which 
will cause wrong buffer assignment 
when  there  is  parallel  processing 
of sub-service  $82 with one of  the 
$80 and $81 sub-functions. 
kDescAssertUudtBufferAlreadyUnlocked 
A0 
CANdesc  received  confirmation 
that  a  UUDT  response  was 
successfully  transmitted  on  the 
bus, but the internal state machine 
indicates that no transmission was 
in progress. 
kDescAssertWrongUudtTransmitterHandle 
A1 
CANdesc  received  confirmation 
that  a  UUDT  response  was 
successfully  transmitted  on  the 
bus,  but  the  transmit  handle  does 
not  match  the  one  that  CANdesc 
actually tried to send. 
kDescAssertUudtBufferStillLocked 
A2 
CANdesc  attempted  a  second 
UUDT  transmission  before  the 
previous 
one 
was 
actually 
transmitted on the bus. 
kDescAssertIllegalPostProgModeId 
A3 
CANdesc  began  the  internal  post 
processing  for  a  programming 
mode  request,  but  the  requested 
programming  mode  sub-function 
was invalid.  
Table 9-1   Debug assertion codes 
 
2014, Vector Informatik GmbH 
Version: 3.2.0 
76 / 77 
based on template version 5.1.0 

Technical Reference CANdesc 
10  Contact 
Visit our website for more information on 
 
>  News 
>  Products 
>  Demo software 
>  Support 
>  Training data 
>  Addresses 
 
www.vector.com 
2014, Vector Informatik GmbH 
Version: 3.2.0 
77 / 77 
based on template version 5.1.0 

Document Outline


31 - TechnicalReference_CANdescs

Technical Reference CANdesc 
 
 
 
 
 
 
 
 
 
 
 
CANdesc 
Technical Reference 
 
  
Version 3.09.00 
 
 
 
 
 
 
 
 
 
 
Authors 
Oliver Garnatz, Mishel Shishmanyan, Stefan Hübner, 
Matthias Heil, Katrin Thurow, Patrick Rieder, Amr 
Elazhary 
Status 
Released 
 
 
 
 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
1 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
1  History 
Author 
Date 
Version 
Remarks 
Oliver Garnatz 
2003-11-12 
2.00.00 
Splitting into separate documents and 
general revision 
Oliver Garnatz 
2004-01-13  2.00.01 
Added chapter ‘Application interface flow’ 
Updated format template 
Mishel Shishmanyan  2004-03-09  2.01.00 
New application callback convention (from 
CANdesc 2.09.00) 
Mishel Shishmanyan  2004-03-29  2.02.00 
New APIs: 
DescGetActivityState (from CANdesc 
2.10.00) 
DescSchedulerTask() (from CANdesc 
2.09.00) 
Mishel Shishmanyan  2004-04-26  2.03.00 
Added more information and limitations 
about the ring-buffer mechanism (12.6.9 
“Ring Buffer Mechanism”)
 
New feature: 
Support for generic user service (from 
CANdesc 2.11.00) 
Force CANdesc to send RCR-RP 
response 
(from CANdesc 2.11.00) 
Stefan Hübner 
2004-07-16  2.03.01 
Editorial revision 
Oliver Garnatz 
2004-08-12  2.04.00 
Added chapter 4.2 ReadDataByIdentifier 
(SID $22) within the Single- and the Multiple 
PID mode is described 
Oliver Garnatz 
2004-10-08  2.05.00 
ESCAN0000982: Description of MainHandler 
structure is not readable 
ROE transmission unit is described in detail  
Stefan Hübner 
2004-10-15  2.06.00 
Some additional information are provided  
Oliver Garnatz 
Peter Herrmann 
2005-06-22  2.07.00 
Added: Service $2C description. 
Klaus Emmert 
Added: Warning Text added 
Mishel Shishmanyan  2005-08.03  2.08.00 
API added:  
Oliver Garnatz 
DescStateTask, 
DescTimerTask,  
DescMayCallStateTaskAgain. 
ApplDescFatalError 
API modified:  
DescTask,  
ApplDescCheckSessionTransition,  
DescGetActivityState,  
DescGetStateSession. 
API removed:  
2015, Vector Informatik GmbH 
Version: 3.09.00 
2 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
DescSchedulerTask 
Modified description for 
ReadDataByIdentifier with long data and 
negative response in main-handler. 
Oliver Garnatz 
2006-03-02  2.09.00 
Added: ...prevent the ECU going to sleep 
while diagnostic is active 
Mishel Shishmanyan  2006-03-24  2.10.00 
Added: document overview 
Mishel Shishmanyan  2006-04-27  2.11.00 
Modified:  
-12.6.13 DynamicallyDefineDataIdentifier  
($2C) (UDS) functions 
-12.6.13.1 DescMayCallStateTaskAgain() 
 
Mishel Shishmanyan  2007-02-22  2.12.00 
Added:  
 - 12.6.9.3 “DescRingBufferCancel()” 
 
Matthias Heil 
2008-01-03  2.13.00 
Added: 
Caution    concerning    user    main  
handler on protocol level l 
Matthias Heil 
2008-02-29  2.14.00 
Added: 
Handling of read/write memory by address: 
 - 9.5 “Read/Write Memory by Address” 
- 12.6.8.2 
“DescStartMemByAddrRepeatedCall()”
 
- 12.6.14 ”Memory Access Callbacks”
 
Mishel Shishmanyan  2008-06-06  2.15.00 
Removed: 
Chapter “ResponseOnEvent Transmission 
Unit” 
Added: 
 
- 12.6.13.3 “Non-volatile memory support
 
Mishel Shishmanyan  2008-11-09 
2.16.00 
Modified: 
- 12.6.9 and 12.6.9.1: Added limitation for 
UDS and SPRMIB with the ring buffer usage. 
- 13.6 …work with the ring-buffer mechanism 
Added: 
- 12.6.15 Flash Boot Loader Support 
- 13.8 …send a positive response without 
request after FBL flash job 
 
Mishel Shishmanyan  2009-05-18  2.17.00 
Modified: 
12.6.6.1ApplDescCheckSessionTransition() 
Added: 
12.6.6.3DescIsSuppressPosResBitSet () 

Mishel Shishmanyan  2009-08-11 
2.18.00 
Modified: 
Minor editorial changes 
5.2 Configure Handlers using  
CANdela attributes – added new  
data object attributes  

2015, Vector Informatik GmbH 
Version: 3.09.00 
3 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Added: 
13.9 …enforce CANdesc to use ANSI C 
instead of hardware optimized bit type 
5.1 Configure DBC attributes for diagnostics 
 
Mishel Shishmanyan  2009-09-17  3.00.00 
Added: 
6 CANdesc Configuration in GENy 
8 Multi Identity  
12.6.2 Multi Variant Configuration Functions 
Mishel Shishmanyan  2010-01-26  3.01.00 
Added: 
7 CANdescBasic Configuration in GENy 

Mishel Shishmanyan  2010-12-21  3.02.00 
Modified: 
12.6.14.1 
ApplDescReadMemoryByAddress() 
12.6.14.2 
ApplDescWriteMemoryByAddress() 
12.6.9.2 DescRingBufferWrite() 
Katrin Thurow 
2011-08-25 
3.03.00 
Added: 
8.1 
Single Identity Mode 
8.3 Multi Identity Mode 
13.10 …configure Extended Addressing 
13.11 
…use Multiple Addressing 
12.6.6.7 DescGetSessionIdOfSessionState 
Modified: 
8  
Multi Identity Support 
13.8 …send a positive response without 
request after FBL flash job 

Katrin Thurow 
2011-09-19 
3.04.00 
Added: 
13.12
…use “Dynamic Normal Addressing 
Multi TP” with multiple tester 
Modified: 
13.11 
…use Multiple Addressing 
Katrin Thurow 
2011-11-27 
3.05.00 
Added:  
12.6.17 
“Spontaneous Response” 
transmission 
Modified: 
6.2.1 
Global CANdesc Settings 
Patrick Rieder 
2013-01-23  3.06.00 
Added: 
10 
Generic Processing Notifications 
12.6.18 Generic Processing Notifications 
 
Modified: 
6.2.1 
Global CANdesc Settings 
12.6.4 Service callback functions 
12.6.9 Ring Buffer Mechanism 
Small fixes 
2015, Vector Informatik GmbH 
Version: 3.09.00 
4 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Patrick Rieder 
2013-05-27  3.07.00 
Added: 
11
 Busy Repeat Responder Support 
Modified: 
13.12 
…use “Dynamic Normal Addressing 
Multi TP” with multiple tester 

Patrick Rieder 
2014-07-19  3.08.00 
Added: 
5.2 
Configure the default session state in the 
CDD 
Modified: 
12.6.5 
Unknown (User) Service Handling 

Consistent naming of the Unknown 
Service Handling 
12.6.17.1 
DescSendApplSpontaneousResponse () 


Correct API name 

Added missing pre-condition 

Correct spelling and formatting 
issues 
Patrick Rieder 
2014-11-27 
3.08.01 
Added:  
5.3 Configuration of Mode 0x06 in the CDD 
file  
9.1 ReadDTCInformation (SID $19)  
Modified:  
Table 6-1  

Setting “Faultmemory Iteration 
Limiter” is dependent on OEM 
Amr Elazhary 
2015-07-31  3.09.00 
Added: 
9.1 
Clear Diagnostic Information (SID $14) 
(UDS2012) 
 
Modified: 
12.6.6.1 
ApplDescCheckSessionTransition() 

Added new signature, full message 
context, to the callback. 
 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
5 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Contents 
1 
History ........................................................................................................................... 2 
2 
Introduction................................................................................................................. 12 
3 
Documents this one refers to… ................................................................................. 13 
4 
Architecture Overview ................................................................................................ 14 
4.1 

CANdesc – Internal processing ........................................................................ 14 
4.1.1 

Diagnostic protocol .......................................................................... 14 
4.1.2 
How does this flow actually work? .................................................... 15 
4.2 
Application interface flow ................................................................................. 17 
4.2.1 

Session- and CommunicationControl ............................................... 17 
5 
Advanced Configuration ............................................................................................ 19 
5.1 

Configure DBC attributes for diagnostics ......................................................... 19 
5.2 
Configure the default session state in the CDD ................................................ 19 
5.3 
Configuration of Mode 0x06 in the CDD file ..................................................... 20 
6 
CANdesc Configuration in GENy ............................................................................... 21 
6.1 

Step One – Importing an ECU Diagnostic Description ..................................... 21 
6.2 
Step Two – ECU Diagnostic Configuration in GENy ......................................... 22 
6.2.1 
Global CANdesc Settings ................................................................. 23 
6.2.1.1 
Generic Processing Notifications (UDS2012) ................. 28 
6.2.2 
Service Specific Settings .................................................................. 29 
6.2.2.1 

Generic Service Settings ............................................... 29 
6.2.2.2 
Predefined (implemented) Services in CANdesc ............ 30 
6.2.2.3 
Signal Access Enabled Services .................................... 32 
6.2.3 
Timing Settings ................................................................................ 35 
6.2.4 
Security Access Settings (UDS2006) ............................................... 36 
6.2.5 
Security Access Settings (UDS2012) ............................................... 38 
6.2.6 
Scheduler Settings ........................................................................... 39 
7 
CANdescBasic Configuration in GENy ..................................................................... 42 
7.1 

Global CANdescBasic Settings ........................................................................ 42 
7.2 
Service Specific Settings .................................................................................. 42 
7.3 
Timing Settings ................................................................................................ 43 
7.4 
Diagnostic State Configuration ......................................................................... 43 
8 
Multi Identity Support ................................................................................................. 47 
8.1 

Single Identity Mode ........................................................................................ 47 
2015, Vector Informatik GmbH 
Version: 3.09.00 
6 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
8.1.1.1 
Configuration in CANdela............................................... 47 
8.1.1.2 
Configuration in GENy ................................................... 47 
8.2 
VSG Mode ....................................................................................................... 47 
8.2.1 
Implementation Limitations............................................................... 48 
8.2.2 
Configuration in CANdela ................................................................. 49 
8.2.3 
Configuration in CANdela ................................................................. 50 
8.2.4 
Configuration in GENy ..................................................................... 51 
8.3 
Multi Identity Mode ........................................................................................... 51 
9 
Diagnostic Service Implementation Specifics .......................................................... 52 
9.1 

Clear Diagnostic Information (SID $14) (UDS2012) ......................................... 52 
9.1.1 

Tasks performed by CANdesc .......................................................... 52 
9.1.2 
Task to be performed by the Application ........................................... 52 
9.2 
ReadDTCInformation (SID $19) ....................................................................... 52 
9.2.1 

Limitations of the service .................................................................. 52 
9.3 
ReadDataByIdentifier (SID $22) ....................................................................... 52 
9.3.1 
Limitations of the service .................................................................. 54 
9.3.2 
Single PID mode .............................................................................. 55 
9.3.2.1 

Sending a positive response using linear buffer 
access ........................................................................... 55 

9.3.2.2 
Sending a positive response using ring buffer access .... 56 
9.3.2.3 
Sending a negative response ......................................... 57 
9.3.3 
Multiple PID mode ............................................................................ 57 
9.3.3.1 
Pure linear buffer configuration ...................................... 58 
9.3.3.1.1 

Sending a positive response ...................... 58 
9.3.3.1.2 
Sending a negative response ..................... 59 
9.3.3.2 
Ring buffer active configuration ...................................... 59 
9.3.3.2.1 
Sending a positive response ...................... 61 
9.3.3.2.2 
Sending a negative response ..................... 62 
9.3.3.2.3 
PostHandler execution rule ........................ 63 
9.4 
DynamicallyDefineDataIdentifier (SID $2C) (UDS) ........................................... 63 
9.4.1 
Feature set ....................................................................................... 64 
9.4.2 
API Functions................................................................................... 64 
9.4.3 
Sequence Charts ............................................................................. 65 
9.5 
Read/Write Memory by Address (SID $23/$3D) (UDS) .................................... 67 
9.5.1 
Tasks performed by CANdesc .......................................................... 68 
9.5.2 
Task to be performed by the Application ........................................... 68 
9.5.3 
Repeated service calls ..................................................................... 68 
10  Generic Processing Notifications .............................................................................. 69 
10.1 
Using dynamically defined data Identifier ......................................................... 70 
2015, Vector Informatik GmbH 
Version: 3.09.00 
7 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
11  Busy Repeat Responder Support (UDS2006 and UDS2012) .................................... 71 
11.1 
Configuration in GENy ..................................................................................... 72 
12  CANdesc API ............................................................................................................... 73 
12.1 
API Categories ................................................................................................. 73 
12.1.1 

Single Context .................................................................................. 73 
12.1.2 
Multiple Context (only CANdesc)...................................................... 73 
12.2 
Data Types ....................................................................................................... 73 
12.3 
Global Variables ............................................................................................... 73 
12.4 
Constants ........................................................................................................ 73 
12.4.1 

Component Version.......................................................................... 73 
12.5 
Macros ............................................................................................................. 74 
12.5.1 

Data exchange ................................................................................. 74 
12.5.1.1 

Splitting 16 bit data ........................................................ 74 
12.5.1.2 
Splitting 32 bit data ........................................................ 74 
12.5.1.3 
Assembling 16 bit data ................................................... 74 
12.5.1.4 
Assembling 32 bit data ................................................... 75 
12.6 
Functions ......................................................................................................... 75 
12.6.1 

Administrative Functions .................................................................. 75 
12.6.1.1 

DescInitPowerOn()......................................................... 75 
12.6.1.2 
DescInit() ....................................................................... 76 
12.6.1.3 
DescTask() ..................................................................... 76 
12.6.1.4 
DescStateTask() ............................................................ 77 
12.6.1.5 
DescTimerTask() ............................................................ 78 
12.6.1.6 
DescGetActivityState() ................................................... 79 
12.6.2 
Multi Variant Configuration Functions ............................................... 80 
12.6.2.1 

DescInitConfigVariant() .................................................. 80 
12.6.2.2 
DescGetConfigVariant() ................................................. 81 
12.6.3 
Service Functions ............................................................................ 82 
12.6.3.1 

DescSetNegResponse() ................................................ 82 
12.6.3.2 
DescProcessingDone() .................................................. 83 
12.6.4 
Service callback functions ................................................................ 84 
12.6.4.1 
Service PreHandler ........................................................ 86 
12.6.4.2 
Service MainHandler ...................................................... 87 
12.6.4.3 
Service PostHandler ...................................................... 89 
12.6.5 
Unknown (User) Service Handling ................................................... 89 
12.6.5.1 
How it works .................................................................. 90 
12.6.5.2 
ApplDescCheckUserService() ........................................ 90 
12.6.5.3 
DescGetServiceId()........................................................ 91 
12.6.5.4 
Unknown (User) Service MainHandler ........................... 92 
12.6.5.5 
Unknown (User) Service PostHandler ............................ 93 
2015, Vector Informatik GmbH 
Version: 3.09.00 
8 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.6 
Session Handling ............................................................................. 93 
12.6.6.1 

ApplDescCheckSessionTransition() ............................... 93 
12.6.6.2 
DescSessionTransitionChecked() .................................. 95 
12.6.6.3 
DescIsSuppressPosResBitSet () .................................... 95 
12.6.6.4 
ApplDescOnTransitionSession() .................................... 96 
12.6.6.5 
DescSetStateSession() .................................................. 97 
12.6.6.6 
DescGetStateSession() ................................................. 98 
12.6.6.7 
DescGetSessionIdOfSessionState ................................. 99 
12.6.7 
CommunicationControl Handling ...................................................... 99 
12.6.7.1 
ApplDescCheckCommCtrl() ......................................... 100 
12.6.7.2 
DescCommCtrlChecked() ............................................ 100 
12.6.8 
Periodic call of ‘Service MainHandler’ ............................................ 101 
12.6.8.1 

DescStartRepeatedServiceCall() ................................. 101 
12.6.8.2 
DescStartMemByAddrRepeatedCall() .......................... 103 
12.6.9 
Ring Buffer Mechanism .................................................................. 103 
12.6.9.1 
DescRingBufferStart() .................................................. 104 
12.6.9.2 
DescRingBufferWrite() ................................................. 105 
12.6.9.3 
DescRingBufferCancel() .............................................. 106 
12.6.9.4 
DescRingBufferGetFreeSpace() .................................. 107 
12.6.9.5 
DescRingBufferGetProgress()...................................... 108 
12.6.10  Signal Interface of CANdesc .......................................................... 108 
12.6.10.1  ApplDesc<Signal-Handler>() ....................................... 109 
12.6.10.2  Configuration of direct signal access ............................ 109 

12.6.11  State Handling (CANdesc only) ...................................................... 110 
12.6.11.1  DescGetState<StateGroup>() ...................................... 110 
12.6.11.2  DescSetState<StateGroup>() ....................................... 111 
12.6.11.3  ApplDescOnTransition«StateGroup»() ......................... 112 
12.6.12  Force “Response Correctly Received - Response Pending” 
transmission ................................................................................... 113 
12.6.12.1  DescForceRcrRpResponse() ....................................... 113 
12.6.12.2  ApplDescRcrRpConfirmation() ..................................... 114 
12.6.13  DynamicallyDefineDataIdentifier  ($2C) (UDS) functions ................ 114 
12.6.13.1  DescMayCallStateTaskAgain() ..................................... 115 
12.6.13.2  ApplDescCheckDynDidMemoryArea() ......................... 116 
12.6.13.3  Non-volatile memory support ....................................... 117 
12.6.13.3.1  DescDynDefineDidPowerUp() .................. 119 
12.6.13.3.2  DescDynIdMemContentRestored () ......... 120 
12.6.13.3.3  DescDynDefineDidPowerDown () ............ 121 
12.6.13.3.4  ApplDescStoreDynIdMemContent () ........ 122 
12.6.13.3.5  ApplDescRestoreDynIdMemContent () .... 123 
12.6.14  Memory Access Callbacks ............................................................. 123 
2015, Vector Informatik GmbH 
Version: 3.09.00 
9 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.14.1  ApplDescReadMemoryByAddress() ............................. 123 
12.6.14.2  ApplDescWriteMemoryByAddress() ............................. 125 
12.6.15  Flash Boot Loader Support ............................................................ 125 
12.6.15.1  DescSendPosRespFBL() ............................................. 126 
12.6.15.2  ApplDescInitPosResFblBusInfo() ................................. 127 
12.6.16  Debug Interface / Assertion ............................................................ 127 
12.6.16.1  ApplDescFatalError() ................................................... 127 
12.6.17  “Spontaneous Response” transmission .......................................... 131 
12.6.17.1  DescSendApplSpontaneousResponse () ..................... 131 
12.6.17.2  ApplDescSpontaneousResponseConfirmation() .......... 133 
12.6.18  Generic Processing Notifications.................................................... 134 
12.6.18.1  ApplDescManufacturerIndication ................................. 134 
12.6.18.2  ApplDescManufacturerConfirmation ............................ 135 
12.6.18.3  ApplDescSupplierIndication ......................................... 136 
12.6.18.4  ApplDescSupplierConfirmation .................................... 137 
13  How To… ................................................................................................................... 139 
13.1 
…implement a protocol service MainHandler ................................................. 139 
13.2 
…implement a service MainHandler............................................................... 142 
13.3 
…implement a Signal Handler........................................................................ 143 
13.4 
…implement a Packet Handler ....................................................................... 144 
13.5 
…implement a state transition function .......................................................... 144 
13.6 
…work with the ring-buffer mechanism .......................................................... 146 
13.6.1 

with asynchronous write ................................................................. 146 
13.6.2 
with synchronous write ................................................................... 148 
13.7 
…prevent the ECU going to sleep while diagnostic is active .......................... 149 
13.8 
…send a positive response without request after FBL flash job ..................... 150 
13.9 
…enforce CANdesc to use ANSI C instead of hardware optimized bit type .... 150 
13.10  …configure Extended Addressing .................................................................. 151 
13.11  …use Multiple Addressing .............................................................................. 151 
13.12  …use “Dynamic Normal Addressing Multi TP” with multiple tester ................. 153 
14  Related documents ................................................................................................... 156 
15  Glossary .................................................................................................................... 157 
16  Contact ...................................................................................................................... 158 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
10 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Illustrations 
Figure 3-1: Manuals and References for CANdesc .............................................................. 13 
Figure 4-1: General request flow .......................................................................................... 14 
Figure 4-2: DESC run diagram ............................................................................................. 15 
Figure 4-3: Request message mapping ............................................................................... 16 
Figure 4-4: Request processing stages ................................................................................ 17 
Figure 5-1 Default session state configuration in the CDD ................................................... 19 
Figure 6-1 CANdesc GENy startup screen ........................................................................... 21 
Figure 6-2 Example of GENy global CANdesc settings ........................................................ 23 
Figure 6-3 Activated feature “Generic Processing Notifications” ........................................... 28 
Figure 6-4 GENy diagnostic service overview ...................................................................... 29 
Figure 6-5 GENy generic sub-service setup ......................................................................... 30 
Figure 6-6 GENy predefined sub-service setup .................................................................... 31 
Figure 6-7 GENy signal API enabled sub-service setup ....................................................... 32 
Figure 6-8 GENy signal view of a sub-service ...................................................................... 33 
Figure 6-9 GENy signal handler types .................................................................................. 33 
Figure 6-10 GENy direct access signal handler settings ...................................................... 34 
Figure 6-11 GENy CANdesc timing parameters ................................................................... 36 
Figure 6-12 GENy CANdesc security access parameters .................................................... 37 
Figure 6-13 Security settings in GENy ................................................................................. 38 
Figure 6-14 GENy CANdesc scheduler parameters ............................................................. 40 
Figure 7-1 CANdescBasic add a user session ..................................................................... 43 
Figure 7-2 CANdescBasic change user session name, id or completely delete user 
session ..................................................................................................... 44 
Figure 7-3 CANdescBasic session configuration at service overview ................................... 45 
Figure 7-4 CANdescBasic session configuration at service Id level ..................................... 45 
Figure 7-5 CANdescBasic session configuration at sub-service level................................... 46 
Figure 8-1 CANdesc multi identity mode .............................................................................. 48 
Figure 8-2 Defining VSGs in CANdelaStudio ....................................................................... 50 
Figure 8-3 Setting a VSG for service in CANdelaStudio ....................................................... 51 
Figure 9-1: Linearly written positive response on single PID request.................................... 55 
Figure 9-2: “On the fly” response data writing. ..................................................................... 56 
Figure 9-3: Negative response on single PID ....................................................................... 57 
Figure 9-4: Linearly written positive response on multiple PIDs (global ring buffer option is 
off) ............................................................................................................ 58 
Figure 9-5: Negative response on multiple PIDs (global ring buffer option is off) .................. 59 
Figure 9-6: Linearly written response data on multiple PIDs (global ring buffer option is on) 62 
Figure 9-7: Negative response on multiple PIDs (global ring buffer option is on) .................. 62 
Figure 9-8: Post-Handler execution sequence. .................................................................... 63 
Figure 9-9: Defining a DDID. ................................................................................................ 66 
Figure 9-10: Reading a DDID. .............................................................................................. 67 
Figure 10-1 Call order of Manufacturer- and Supplier-Notficiation ........................................ 69 
Figure 10-2 Read out a DDID with generic processing notifications ..................................... 70 
Figure 11-1 Illustration of the feature BusyRepeatResponder .............................................. 71 
Figure 11-2 Example of the “Number of Rx(Tx) Channels” settings ...................................... 72 
Figure 12-1 DynDID definition restore and tester interaction .............................................. 118 
Figure 12-2 Store DynDID definitions ................................................................................. 119 
Figure 13-1 GENy TP configuration ................................................................................... 151 
Figure 13-2 GENy TP callbacks ......................................................................................... 152 
Figure 13-3 GENy TP callbacks (physical addressing) ....................................................... 153 
Figure 13-4 GENy TP callbacks (functional addressing) .................................................... 154 

2015, Vector Informatik GmbH 
Version: 3.09.00 
11 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
2  Introduction 
This document has not the job to describe the diagnostic itself. The focus of this document 
is the technical aspects of the CANdesc component. 
 
Please note 
We have configured the programs in accordance with your specifications in the 
 
questionnaire. Whereas the programs do support other configurations than the one 
specified in your questionnaire, Vector’s release of the programs delivered to your 
company is expressly restricted to the configuration you have specified in the 
questionnaire. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
12 / 158 
based on template version 5.1.0 




Technical Reference CANdesc 
3  Documents this one refers to… 
>  User Manuals CANdesc and CANdescBasic (one for both) 
>  Docu OEM 
 
User Manual
Technical
Technical
Reference
Reference
General
OEM
You are here
 
Figure 3-1: Manuals and References for CANdesc 
All  common  topics  with  CANdesc  and  CANdescBasic  are  described  within  this  technical 
reference very detailed.  
Read all about OEM-specific differences in the TechnicalReference_OEM. 
For faster integration, please refer to the product’s corresponding user manual CANdesc 
or CANdescBasic. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
13 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
4  Architecture Overview 
This  chapter  should  describe  the  internal  structure  and  behavior  of  the  CANdesc 
component.  
 
4.1 
CANdesc – Internal processing 
4.1.1 
Diagnostic protocol 
The  communication  described  in  the  diagnostic  protocol  consists  of  a  ping-pong 
communication  between  a  tester  (client)  and  an  ECU  (server).  The  tester  requests  a 
service  in  the  ECU  by  transmitting  a  request  to  him.  The  ECU  should  response  with  a 
positive response, if the result of this service is valid or the action is prepared to be done. 
Is  the  result  negative  or  the  action  could  not  be  executed,  the  ECU  should  respond 
negative.  
The  validity  checks  have  typically  the  same  pattern  for  all  services  (as  shown  in  Figure 
4-1: General request flow). These components which are included in this flow, build up the 
main base of the CANdesc component. 
 
Application
Prehandler optional
Mainhandler
Posthandler optional
{
{
{
....
}
}
DescProcessingDone( );
}
Diagnostics - CANdesc
Check Svc
Check SvcInst
Check Session
Check Format
ACK
t
positive Response
Request
negative Response
Tester
 
Figure 4-1: General request flow 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
14 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
4.1.2 
How does this flow actually work? 
The picture below shows a simply structured description of the module functionality. 
Request reception
Dispatching the request
Idle mode/Awaiting request
Processing the request
Finishing processing of the 
request
 
Figure 4-2: DESC run diagram 
Let’s assume that the component is currently in the Awaiting request state. In this state 
it  waits  for  the  next  diagnostic  request  and  if  it  is  needed  –  it  provides  also  timing 
monitoring.  
Once  a  diagnostic  request  transmission  was  initiated  from  the  transport  layer,  the 
component  enters  in  the  state  Request  reception.  If  the  reception  is  finished,  further 
physical requests will be blocked until the response is sent. Depending on the used OEM a 
functional request in the ISO 14230 standard will be handled parallel1 to physical request. 
The  ISO  14229-1  standard  is  more  restricted  to  the  parallel  handling.  Except  the  Tester 
Present Service no other service could be handled parallel. 
After  the  reception  of  the  request  is  completed  the  request  processing  will  be  prepared. 
The component is in the  Dispatching  request  state. The processing of  the request  is 
done at a task level within the next call of the DescTask() function. 
First  the  SID  is  checked  whether  supported  or  not.  If  not  a  negative  response 
‘ServiceNotSupported’ (NRC $11) will be sent. 
Next step is to check if the supported SID is permitted in the current Session (Diagnostic 
Mode).  If  not,  the  negative  response  ‘ServiceNotSupportedInTheCurrentSession’  (NRC 
$7F) is sent automatically by the CANdesc component. 
 
                                            
1 Not all services could be handled parallel. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
15 / 158 
based on template version 5.1.0 





























Technical Reference CANdesc 
  
 
  
1Byte    n Bytes (n=0..N) 
 
m
 
 
  Bytes (m = 0..M) 
 
  
  
SID 
 
  
SID _EXT  
Application data   
  
  
  
Service instance qualificatio n
   
“Request head
“   
  
 
Figure 4-3: Request message mapping 
 
After  that  the  CANdesc  component  validates,  if  the  sub-service  (service  instance)  is 
supported  or  not.  This  is  implemented  with  a  powerful  binary  search.  If  the  service 
instance is not  supported, the request will be rejected with the corresponding error code 
‘SubFunctionNotSupported’  (NRC  $11,  for  service  which  have  sub-functions)  or 
‘InvalidFormat’ (NRC $13, for service with data identifiers). 
For each service  instance which  is supported by the current  configuration,  the CANdesc 
component  knows  the  exact  length  of  most  requests.  (Some  requests  use  variable  data 
length elements  thus a fixed length doesn’t exist.)  If the length is known and it  does not 
match, the dispatcher will reject this request (dependent to the manufacturer specification). 
If the complete request length is not known, the application has to do this job. 
If the service instance is found, the state checks (e.g. ‘Security Level’) will be performed. If 
all of them are passed then the component enters the state Processing the request in 
the  diagram  above.  This  state  consists  of  several  parts  that  are  represented  in  more 
detailed  structure  shown  below.  The  dotted  lines  reveal  the  optional  parts  for  the 
implementation. For example – the Pre-, Post- and SignalHandlers are optional and might 
not be implemented.  
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
16 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Request analyzed
PreHandler
MainHandler
Signal-Handler #0
Signal-Handler #1
Signal-Handler #k
PostHandler
 
 
Figure 4-4: Request processing stages 
After  the  response  is  composed  CANdesc  must  be  informed  about,  to  start  the 
transmission  of  the  final  response.  CANdesc  is  doing  the  handshake  with  the  Tester 
(automatic transmission of RCR-RP) while the state Processing the request is active. 
Within  the  end  of  the  transmission  the  state  “Finishing  processing  of  the  request”  is 
entered and the PostHandler (if configured) is called.  In this PostHandler the application 
has to do the closing (e.g. updating a state machine, prepare the ECU for a reset …). The 
session  state  for  example  (which  is  managed  by  CANdesc)  is  also  updated  in  a 
PostHandler.  
4.2 
Application interface flow 
4.2.1 
Session- and CommunicationControl  
The  services  SessionControl  and  CommunicationControl  are  typically  handled  by 
CANdesc. But the application still has the possibility to reject these service requests. You 
can find a detailed description in  chapter  12.6.6  Session Handling  and in  chapter  12.6.7 
CommunicationControl Handling 
also. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
17 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
IDLE
Receive a Request
Search
SID
SID $28
Supported Unsupported
SID $10
(SID $29)
SID $xx
SID $xx
ApplDesc<PreHandler>
ApplDesc<PreHandler>
ApplDesc<PreHandler>
callback
callback
callback
ApplDescCheckSessionTransition
ApplDescCheckCommCtrl
ApplDesc<MainHandler>
{
{
{
  ...
  ...
  ...
DescSessionTransitionChecked();
DescCommCtrlChecked();
  DescProcessingDone();
}
}
}
Transmit
Transmit positive
Transmit positive
Transmit positive
negative
response $50
response $68
response $xx
response
NRC $11
WAIT
WAIT
WAIT
TX acknowledge
TX acknowledge
TX acknowledge
$50
$68
$xx
ApplDescOnCommunicationEnabled
ApplDescOnSessionTransition
ApplDescOnCommunicationDisabled
ApplDesc<PostHandler>
>optional - not all OEMs<
IDLE
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
18 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
5  Advanced Configuration 
5.1 
Configure DBC attributes for diagnostics 
If the diagnostic messages shall be defined in the communication data-base file (DBC), 
and not received via CANdriver ranges (e.g. in case of normal fixed or extended 
addressing), the following attributes in the DBC file must exist and shall be set as shown 
below. 
 
Attribute Name 
Object  Value  Values 
Description 
Type 
Type  the default value is 
written in bold 
DiagRequest 
Message  Enum  No 
Specifies (Yes) that the message is a diagnostic 
Yes
physical USDT request message.
 
 
DiagResponse 
Message  Enum  No 
Specifies (Yes) that the message is a diagnostic 
Yes 
USDT response message. 
DiagState 
Message  Enum  No 
Specifies (Yes) that the message is a diagnostic 
Yes 
functional USDT request message. 
DiagUudtResponse  Message  Enum  false 
Specifies (true) that the message is a diagnostic 
true 
UUDT response message. 
Table 5-1: DBC file diagnostic message attributes 
5.2 
Configure the default session state in the CDD 
The configuration of the default session state in the CDD must comply with the following 
conditions: 
The qualifier must be set to „Default“ (the name can be different) 
It must be the first item in the list of states 
An example configuration is shown in Figure 5-1.  
 
Figure 5-1 Default session state configuration in the CDD 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
19 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
 
Caution 
An incorrectly specified default session state qualifier may result in a compile error. 
 
 
 
5.3 
Configuration of Mode 0x06 in the CDD file 
If available, CANdesc offers a basic support for the OBD services. For each OBD service 
CANdesc  will  provide  one  callout  on  SID  level  where  the  user  has  to  implement  the 
functionality  of  service  0x06.  However,  to  be  able  to  generate  CANdesc  properly,  OBD 
service  0x06  has  to  be  configured  properly  in  the  CDD.  How  to  configure  the  service 
properly  is  described  in  the  application  note  /AN-IDG-1-013/  available  in  the  download 
center on our homepage. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
20 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
6  CANdesc Configuration in GENy 
Since version 6.00.00, the CANdesc configuration concept has been improved by splitting 
the  concrete  ECU  parameterization  and  software  integration  from  the  diagnostic 
specification. 
The configuration of CANdesc in GENy consists of two important steps: 
Importing a diagnostic description file. Currently only CANdela (CDD) files are supported 
therefore in further only the term CDD file will be used. 
Setup all service options required by the application like: 
Configure the service handlers (pre-, main- and post-handlers) 
Setup the service specific settings, like maximum number of dynamically defined items per 
DynDID, size of scheduler for periodic data reading, etc. 
Setup timing parameters (e.g. periodic rates). 
The second step is optional, since after importing a CDD file all important settings will be 
already prepared for usage. If there are missing or invalid settings, GENy will notify you at 
generation time. 
 
6.1 
Step One – Importing an ECU Diagnostic Description 
After activating the CANdesc component in GENy, you will have the following view: 
 
Figure 6-1 CANdesc GENy startup screen 
At this time GENy does not have any CDD file and cannot generate CANdesc. You have to 
specify a CDD file, using the button on the option “CANdela document name”. 
 
After selecting the CDD file, the CANdesc component tree view will look like: 
2015, Vector Informatik GmbH 
Version: 3.09.00 
21 / 158 
based on template version 5.1.0 




Technical Reference CANdesc 
 
 
 
 
Info 
Please note, the diagnostic buffer size is now set to a non-zero value. At CDD import 
  time, GENy calculates a statistic over all services with simple, linear data structure and 
sets the buffer size to fit the longest request resp. response message. The message 
window will show you which service requires the suggested buffer size: 
 
Complex services like reading the fault memory information or 
upload/download/transferdata are excluded from this statistic, since the worst case 
response calculation is not possible. 
You can still set another value for the buffer size, even lower as the size suggested by 
GENy. At generation time, the code generator will check again the set buffer size and 
consider more options you have changed (like RingBuffer support) and notify you if the 
buffer size is too small. 
 
 
 
Now you can try to generate your diagnostic layer, using the default settings. 
 
6.2 
Step Two – ECU Diagnostic Configuration in GENy 
Once the CDD content is imported, there are several options that can and shall be set up 
for best match on your ECU integration needs. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
22 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
What You Can Configure in GENy 
The  goal  of  splitting  the  ECU  integration  configuration  from  the  ECU  diagnostic 
specification  is  to  provide  a  simplified  view  on  what  the  ECU  diagnostic  application 
developer  is  able  to  configure  without  danger  of  changing  the  diagnostic  specification 
provided by the OEM.  
If  a  CANdesc  parameter  is  not  available  in  the  source  diagnostic  description  (CDD  file), 
you will be able to edit it in GENy, even if it is relevant for the diagnostic specification. 
The chapters below will show you all configuration parameters of CANdesc that can be set 
up in GENy. 
What You Can Not Configure in GENy 
All  diagnostic  parameters  that  could  affect  the  ECU  behaviour  regarding  its  diagnostic 
specification, provided by the concrete OEM or would lead to  inconsistency between the 
tester expectations on the ECU behaviour are not editable in GENy. If a change is required 
on such a parameter, the diagnostic description source shall be modified, to guarantee that 
the OEM or/and the tester will take this change into account. 
 
6.2.1 
Global CANdesc Settings  
Under  the  generic  settings  you  will  find  the  options  that  affect  the  overall  module 
performance,  independently  of  the  diagnostic  services  that  shall  be  supported.  In  the 
picture and the table below follows the description of the settings for CANdesc. 
 
Figure 6-2 Example of GENy global CANdesc settings 
2015, Vector Informatik GmbH 
Version: 3.09.00 
23 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Attribute Name 
Availability 
Value Type  Values 
Description 
The default 
value is written 
in bold 
Cycle Time [ms] 
Always available. 
Integer 
10 
The DescTask (resp. 
1..255 
DescTimerTask) function must be 
called EXACTLY in the time period 
specified here. 
This is important since the time 
constant will be converted into a 
number of function calls and if this 
setting doesn't match the real call 
cycle, the component internal 
timeout monitors will not function 
properly. 
Generate CANdesc  Always available. 
Button 
 
This feature is only available after 
you have generated the whole 
CANbedded package. 
NOTE: If you run into problems, 
generate the whole package again! 
Number of ‘Busy-
OEM dependent 
Integer 

The value is the maximum count of 
RepeatRequest’ 
availability. 
0..255 
parallel handled diagnostic 
responded 
requests. Only the first diagnostic 
Requests 
request will be processed, all other 
(additional) request, which will be 
received while the first one is in 
process, will be also received, but 
only responded with NRC $21 
('BUSY - repeat request'). If there 
are more requests onto the bus 
than this number, only the first N 
will be responded - all other will be 
just ignored. 
Flashable ECU 
OEM dependent 
Boolean 
False 
Depending on the car 
availability. 
True 
manufacturer this option has 
different effects. Please, see the 
OEM specific technical reference 
document for more information. 
Ring Buffer Support  Always available. 
Boolean 
False 
In case your ECU shall send a 
True 
very long positive response for 
some services (usually when 
reading fault memory) you can 
reserve enough RAM for the 
diagnostic buffer to handle the 
longest possible response length, 
or you can use the built-in ring-
buffer mechanism which allows 
usage of smaller buffer. The linear 
buffer usage saves ROM and run-
time but needs more RAM, the 
ring-buffer saves RAM (you may 
send 4095 Byte response with a 
20Byte buffer) but requires more 
ROM and causes run-time 
overhead when used. NOTE: This 
2015, Vector Informatik GmbH 
Version: 3.09.00 
24 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Attribute Name 
Availability 
Value Type  Values 
Description 
The default 
value is written 
in bold 
option just unlocks the built-in 
support, but the selection usage of 
the feature is done at run-time by 
your application (for each service 
independently).  
Forced RCR
In some cases (e.g. prior jump into 
-RP 
OEM dependent 
Boolean 
False 
Response
the FBL (FlashBootLoader), ECU 
 
availability. 
True 
busy so no task function can be 
called for long period of time) it is 
necessary to prevent the tester 
from ECU response timeout. 
Enabling this feature you will be 
able to send a RCR-RP 
(ResponseCorrectlyReceived-
ResponsePending) response any 
time during an active service 
processing (main-handler called 
but no DescProcessingDone has 
been called yet). 
Repeated Service 
Always available. 
Enum 
Deactivated  In some cases (usually for slow 
Call Type 
Always 
services like reading from 
Individual 
EEPROM) it is useful to let the 
component to poll your application 
(service main-handler) until the 
service execution is completed. 
Otherwise you have to leave the 
service's main-handler function 
and trigger an own additional 
polling task and finalize the service 
from there. Using the built-in 
polling mechanism you will save 
ROM and run-time. Also it prevents 
from confusing code structures. 
Always: Each main-handler will be 
called as long as the application 
didn’t call DescProcessingDone(). 
Individual: Each main-handler will 
decide by itself if it will be called 
once or as long as the application 
didn’t call DescProcessingDone(). 
Production Mode 
OEM dependent 
Boolean 
False 
Enabling the production mode will 
availability. 
True 
set all options in the possible 
safest (uncritical) value. 
Some car manufacturers don't 
allow all of the features in 
production, so they will be turned 
off. 
Spontaneous 
Available if Service  Boolean
This setting enables the possibility 
 
False 
Response
to send diagnostic responses 
 
0x86 is part of the 
True 
diagnostic 
without a preceding request. 
configuration.
This feature is needed for Service 
 
0x86 with Transmission Type I. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
25 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Attribute Name 
Availability 
Value Type  Values 
Description 
The default 
value is written 
in bold 
The spontaneous response can be 
triggered via the API 
DescSendApplSpontaneousRespo
nse. 
Supplier Notification  Available if 
Boolean 
False 
If this option is enabled, CANdesc 
Support 
CANdesc 
True 
notifies the application on incoming 
according to ISO 
service requests and outgoing 
14229-1 2012 is 
responses. CANdesc only notifies 
used. 
the application if the requested 
service is supported in the active 
session and security state. For 
more details see 10 Generic 
Processing Notifications
 

Manufacturer 
Available if 
Boolean 
False 
If this option is enabled, CANdesc 
Notification Support  CANdesc 
True 
notifies the application on incoming 
according to ISO 
service requests and outgoing 
14229-1 2012 is 
responses. CANdesc notifies the 
used. 
application right before the 
processing of the request starts 
and after a response has been 
sent. For more details see 10 
Generic Processing Notifications
 

Unknown Services 
OEM dependent 
Boolean 
False 
In some cases if the diagnostic 
Acceptance 
availability. 
True 
database doesn't contain all 
necessary service Ids, or you need 
a (some) test identifier(s), you can 
enable this option which will 
redirect all received requests with 
unknown service Ids to your 
application for additional 
acknowledgment and processing. 
Unknown Services 
OEM dependent 
Boolean 
False 
If the option 'Unknown Services 
Post Handler Calls 
availability. 
True 
Acceptance' is enabled, you may 
use this feature to be notified each 
time an unknown service 
processing has been 
accomplished. This post handler 
usage is the same as the one of 
the normal services post handlers. 
Application Interface  Always available. 
Boolean 
False 
The SW component provides built-
Assertions 
True 
in debug support (assertion) to 
ease up the integration and test 
into the project. 
In general, the usage of assertions 
is recommended during the 
integration and pre-test phases. It 
is not recommended to enable the 
assertions in production code due 
to increased runtime and ROM 
needs. The assertion checks the 
correctness of the assigned 
2015, Vector Informatik GmbH 
Version: 3.09.00 
26 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Attribute Name 
Availability 
Value Type  Values 
Description 
The default 
value is written 
in bold 
condition and calls an error-
handler in case this fails. The error 
handler is called with an error and 
line number. You can find 
information about the defined error 
numbers in the Desc.h file. 
Internal Assertions 
Always available. 
Boolean 
False 
The SW component provides built-
True 
in debug support (assertion) to 
ease up the integration and test 
into the project. 
In general, the usage of assertions 
is recommended during the 
integration and pre-test phases. It 
is not recommended to enable the 
assertions in production code due 
to increased runtime and ROM 
needs. The assertion checks the 
correctness of the assigned 
condition and calls an error-
handler in case this fails. The error 
handler is called with an error and 
line number. You can find 
information about the defined error 
numbers in the Desc.h file. 
List of DANIS 
Always available. 
String List 
 
Add an arbitrary list of DANIS 
drivers 
drivers for custom bus access. 
 
Each entry here will result in a user 
driver, which can be used to 
connect CANdesc to arbitrary 
transport layers. 
 
Example:  
Adding a driver name “MostTp” will 
force CANdesc to generate 
templates for a driver with this 
name. You will have only to 
implement the functions of the 
driver skeleton. 
UUDT Message 
Available only if 
Integer 
100 
This is the maximum time after 
Confirmation 
UUDT message 
1..65535 
which a UUDT (Unacknowledged 
Timeout [ms] 
transmission is 
Unsegmented Data Transfer) 
supported. 
message will be deleted from the 
CAN drive request queue and (if 
possible) will be replaced by the 
next queued message. 
Faultmemory 
OEM dependent 
Integer 

Limit the iteration depth for fault 
Iteration Limiter 
availability. 
0..255 
memory read services. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
27 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
Attribute Name 
Availability 
Value Type  Values 
Description 
The default 
value is written 
in bold 
Some fault memory ($19) services 
can consume much runtime when 
performed en bloc. To reduce the 
run time of the CANdesc task, use 
this option to limit the iteration 
depth of the fault memory access 
function so your controller can 
handle the workload. 
ATTENTION: Depending on your 
Tp timeout settings, to lower the 
number of iterations can result in 
an aborted transmission due to 
buffer underrun. 
 
A value of 0 (zero) will disable any 
limitation. 
Variant Mode 
OEM dependent 
Enum 
None 
Note: This setting is independent 
Selection 
availability. 
Multi Identity  from communication identities! 
Mode 
None: The diagnostics support one 
VSG Mode 
configuration only. 
Multi Identity Mode: The 
diagnostics support different 
diagnostic variants. One variant is 
active a time. 
VSG Mode: Diagnostic Entities 
(SubServices, DTCs...) are 
grouped into VSGs. Several VSGs 
can be active at a time. 
Table 6-1 
GENy global CANdesc settings 
6.2.1.1 
Generic Processing Notifications (UDS2012) 
On activation of the feature “Generic Processing Notifications”, GENy shows the names of 
the additional callbacks that will be generated. The names of the callbacks are fixed and 
cannot be modified (see Figure 6-3). For a detailed description of the feature see chapter 
10 Generic Processing Notifications. 
 
Figure 6-3 Activated feature “Generic Processing Notifications” 
2015, Vector Informatik GmbH 
Version: 3.09.00 
28 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
6.2.2 
Service Specific Settings 
Once the CDD file is imported you can have an overview of the supported services of your 
ECU: 
 
Figure 6-4 GENy diagnostic service overview 
 
On this level you can also configure all services that will be supported on service Id level 
only. 
 
6.2.2.1 
Generic Service Settings 
Using  the  CANdesc  component  tree  view  you  can explore  the detailed  settings for  each 
service and its sub-services (if available). 
A generic sub-service setup looks like the picture below: 
2015, Vector Informatik GmbH 
Version: 3.09.00 
29 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 6-5 GENy generic sub-service setup 
Almost all services have a very simple configuration view. You can see the main-handler is 
always available and a preview of the call-back name is shown.  
You can only add a pre- and / or a post-handler to such a service, if required. 
 
6.2.2.2 
Predefined (implemented) Services in CANdesc 
There are configurations (OEM dependent) where several services are fully implemented 
by  CANdesc.  Such  service  can  be,  StartDiagnsoticSession,  SecurityAccess, 
DynamicallyDefinedDataIdentifier, ReadDataByPeriodicIdentifier, etc. 
Those services that will not be handled by the application are marked in GENy as shown 
on the picture: 
2015, Vector Informatik GmbH 
Version: 3.09.00 
30 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 6-6 GENy predefined sub-service setup 
As you can see, the main-handler is grayed and marked as “implemented by CANdesc”. 
The  same  can apply  (depends  on  the  service)  also  to  the  pre-  and  post-handlers  of  the 
service.  
In the example on the Figure 6-6 GENy predefined sub-service setup you see that the pre-
handler is still free for usage. This means you can still implement a pre-handler to check 
additional conditions prior CANdesc will be able to process the service. For other service it 
could be also the post-handler free for implementation. 
 
There are several services that make some exceptions to the predefined implementation 
rule: 
 
Service 0x2A: 
PreHandler configuration is possible: If a pre-handler is required, it must be enabled on all 
sub-functions 
of 
the 
concrete 
DID. 
The 
pre-handler 
name 
will 
be 
“ApplDescPreReadPeriodicDid<DID instance name>”. 
PreHandler  on  “stop  all”  is  not  used  by  CANdesc  and  will  not  be  considered  during  the 
code generation even if it is enabled. 
Main-Handler are set to “implemented by CANdesc” since the data reading call-back will 
be the corresponding 0x22 DID service call. This means that if the corresponding service 
0x22 DID has been set to use the “Signal API”, the periodic reading service will use it too. 
Post-Handlers are not supported at all. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
31 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Service 0x2C: 
PreHandler configuration is possible: If a pre-handler is required, it must be enabled on all 
sub-functions 
of 
the 
concrete 
DID. 
The 
pre-handler 
name 
will 
be 
“ApplDescPreDynDefineDid<DID instance name>”. 
PreHandler on  “clear all”  is  not  used by  CANdesc  and  will  not  be  considered  during  the 
code generation even if it is enabled. 
Main-Handler  are  set  to  “implemented  by  CANdesc”  since  the  DID  definition  is  always 
done by CANdesc.  
Post-Handler are not supported at all. 
6.2.2.3 
Signal Access Enabled Services 
Some services such as the UDS ones 0x22/0x2A and 0x2E, can be processed on  signal 
level. This means CANdesc will analyze the request/response data structure and generate 
the  service  main-handler,  leaving  to  the  application  only  the  task  to  provide  the  signal 
values for the response, resp. to write the requested signal values to the ECU memory. 
The setting view of such a service is shown below: 
 
Figure 6-7 GENy signal API enabled sub-service setup 
2015, Vector Informatik GmbH 
Version: 3.09.00 
32 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
Note: For the read dynamically defined DID service, there is no signal access since they 
are always implemented by CANdesc internally. 
 
If  the  “Signal API” option  is  not  enabled  this  service  is  to  be  implemented  like  any  other 
diagnostic service. The data object specific settings, described below,  will have no effect 
on the code generation. 
If the “Signal API” option is enabled, CANdesc will generate per default a call-back function 
for  any  data  object  (signal)  the  service  contains. You  can  specify  more  options  on  each 
signal,  to  achieve  the  maximum  advantage  of  CANdesc  –  fully  implemented  diagnostic 
service. 
 
Figure 6-8 GENy signal view of a sub-service 
You can have three types of signal handling: 
 
Figure 6-9 GENy signal handler types 
2015, Vector Informatik GmbH 
Version: 3.09.00 
33 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
 
FAQ 
Constant is only possible if the CDD file has contained constant value for the selected data 
  object. You can not specify in GENy a constant value for a signal handler. 
 
 
 
In case of selected “Direct Access” signal handling, the following options will be enabled: 
 
Figure 6-10 GENy direct access signal handler settings 
 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
Signal Handler Type  Only for signal API  Enum 
SignalHandler  Select the type of signal handler 
enabled services. 
Constant 
 
DirectAccess 
Constant: The data value is 
constant. The data value can be 
used directly. This is used only 
when the corresponding 
subservice uses a signal API main 
handler. 
 
Signal Handler: Use a callback 
function to get/set the data value. 
This function is used only when the 
corresponding subservice uses a 
signal API main handler. 
 
Direct Access: Directly use a 
variable to access the data object. 
Also, a signal API main handler 
has to be used for this setting to 
have any effect. 
SignalHandler 
Only for signal API  String 
<DataObjectQ
This value is used as base for the 
Function Base 
enabled services 
ualifier>+<Dia
signal access function - depending 
Name 
and a signal 
gInstanceQual on how the value is used, the 
access through a 
ifier> 
name entered here is prefixed with 
2015, Vector Informatik GmbH 
Version: 3.09.00 
34 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
SignalHandler is 
different prefixes, e.g 
selected 
ApplDescRead / ApplDescWrite. 
 
You can override the default name, 
by specifying an own signal base. 
The Prefix (e.g. ApplDesc can not 
be overridden). 
Signal Variable 
Only for signal API  String 
<DataObjectQ
The name of the signal variable. 
Name 
enabled services 
ualifier> 
Example: 
and if 
DirectAccess 
c_dataTemp 
signal handling is 
g_applData.bit0 
selected 
Signal Variable 
Only for signal API  Enum 
Ram 
To create the proper extern 
Prototype 
enabled services 
None 
declaration to access the signal 
and if 
Const 
variable, the proper access 
DirectAccess 
User 
modifiers have to be specified. 
signal handling is 
 
selected 
None: No prototype is generated at 
all. "DescType.h" where the user 
has to define the real typedefs (for 
structure access for example). 
 
Ram: The variable is located in 
RAM. 
 
Const: The variable is located in 
ROM. 
 
User: Set a user defined prototype. 
Signal Variable User  Only for signal API  String 
Empty 
Set the prototype of the signal 
Prototype 
enabled services 
variable. 
and if 
Example: 
DirectAccess 
signal handling is 
boolean 
selected 
EcuTempType 
and if the Signal 
Variable Prototype 
is set to User 
 
6.2.3 
Timing Settings 
GENy imports all possible timings that the diagnostic description source provides. Those 
parameters  that  are  available  in  the  CDD  file  are  considered  as  a  part  of  the  ECU 
specification  and  are  not  modifiable  in  GENy.  If  a  modification  of  those  parameters  is 
required,  please  change  their  values  in  the  diagnostic  description  file  and  re-import  it  in 
GENy. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
35 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
All  other  parameters  can  be  set  up  manually,  but  the  default  value  already  matches  the 
OEM specification. 
 
Figure 6-11 GENy CANdesc timing parameters 
6.2.4 
Security Access Settings (UDS2006) 
If the security access service is implemented by CANdesc (see the service handler on the 
service 0x27 instances), you can set here the level specific attributes, like attempts to start 
the delay time, delay time on power on, etc. 
 
 
Caution 
It  is OEM  specific  property  whether  the security access  parameters  will  be  evaluated 
  security  level  specific  or  not.  In  case  the  security  access  service  specification  of  the 
concrete OEM requires only global configuration of these options, the code generator 
will calculate the maximum value over all levels for each parameter and this value will 
be used by the service implementation in CANdesc.  
Example: Level 1 has “Attempt Counter” = 1, and Level 2 has for the same parameter = 
3. CANdesc will use then for “Attempt Counter” = 3 for all security levels. 
 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
36 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 6-12 GENy CANdesc security access parameters 
 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
Attempt Counter 
Only if the 
Integer 

Specifies the maximum number of 
SecurityAccess 
1..255 
failed attempts to unlock the ECU. 
state group is 
If this number is reached, a delay 
available 
for the next security access try will 
be inserted. 
If a non-zero value is entered, the 
delay time must be set to a non-
zero value too. 
 
Note: This parameter has only 
effect only if the SecurityAccess 
service is handled by CANdesc. 
Initial Delay [ms] 
Only if the 
Integer 

Specifies the delay time after the 
SecurityAccess 
1..65535 
maximum retry attempt count has 
state group is 
been reached. 
available 
 
If a non-zero value is entered, the 
2015, Vector Informatik GmbH 
Version: 3.09.00 
37 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
attempt count must be set to a 
non-zero value too. 
 
Note: This parameter has only 
effect only if the SecurityAccess 
service is handled by CANdesc. 
PowerOn Delay [ms]  Only if the 
Integer 

Specifies the delay time at power 
SecurityAccess 
1..65535 
on. 
state group is 
 
available 
If a non-zero value is entered, the 
delay time must be set to a non-
zero value too. 
 
Note: This parameter has only 
effect only if the SecurityAccess 
service is handled by CANdesc. 
 
6.2.5 
Security Access Settings (UDS2012) 
Due to the new features in CANdesc UDS2012, the configuration of the security levels in 
GENy has changed. 
 
Figure 6-13 Security settings in GENy 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
Level Specific Failed  Only if the 
Boolean  False 
Switch to select whether a global 
Access Attempt 
SecurityAccess 
True 
false attempt counter and delay 
Supervision 
state group is 
timer for all security levels shall be 
available 
used (false) or if each level has its 
own false attempt counter and 
delay timer (true). 
Use Static Seed 
Only if the 
Boolean  False 
For each level can be selected if a 
SecurityAccess 
True 
static seed is used (true) or not 
state group is 
(false). Static seed means that 
2015, Vector Informatik GmbH 
Version: 3.09.00 
38 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
available 
CANdesc stores the seed and re-
uses the seed in a positive 
response to a seed request for that 
level, until the level is unlocked. 
Failed Attempt 
Only if the 
Integer 
Value 
The number of failed security 
Counter to Delay 
SecurityAccess 
imported from  unlock attempts allowed before a 
state group is 
the Cdd file. 
delay is imposed between 
available 
0..65535 
attempts. 
Failed Attempt 
Only if the 
Integer 
Value 
The delay time in ms which is 
Delay [ms] 
SecurityAccess 
imported from  imposed if the Failed Attempt 
state group is 
the Cdd file. 
Counter limit has been reached. 
available 
0..65535 
Further security access attempts 
are discarded, until the delay has 
expired. 
PowerOn Delay [ms]  Only if the 
Integer 
Value 
The delay time in ms which is 
SecurityAccess 
imported from  imposed when the ECU is 
state group is 
the Cdd file. 
powered on. Requests to unlock 
available 
0..65535 
the security level are declined until 
the delay has expired. 
 
6.2.6 
Scheduler Settings 
If  the  ECU  shall  support  the  periodic  data  reading  service,  the  following  settings  are 
relevant and shall be setup to match the ECU performance and RAM resource availability. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
39 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 6-14 GENy CANdesc scheduler parameters 
 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
Maximum Count of 
Only if the periodic  Integer 

The maximum number of items 
Scheduled Items 
data reading 
1..255 
that are sent periodically. 
service is available 
You can only request at most this 
in the ECU 
number of periodic DIDs, 
configuration. 
independently per scheduling rate. 
 
Example: 
2015, Vector Informatik GmbH 
Version: 3.09.00 
40 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Attribute Name 
Availability 
Value 
Values 
Description 
Type 
The default value is 
written in bold 
If set up 5 items for scheduling, 
CANdesc will be able to schedule 
at most 5 items at fast, 5 items at 
slow and 5 items at medium rate. 
 
Note: If the scheduler size exceeds 
the total number of available 
periodic DIDs, CANdesc will 
automatically reduce the size to 
the lowest value. 
Fast/Medium/Slow 
Only if the periodic  Integer 
OEM 
Specifies the timings of each 
Scheduling Rate 
data reading 
dependent 
scheduling rate that the ECU 
[ms] 
service is available 
1..65535 
supports. 
in the ECU 
configuration. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
41 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
7  CANdescBasic Configuration in GENy 
As  already  stated  in  6  CANdesc  Configuration  in  GENy  since  version  6.00.00,  the 
CANdesc  configuration  in  GENy  has  been  changed.  Both  CANdesc  and  CANdescBasic 
variants  share  the  same  GUI  and  settings  representation  in  GENy.  Due  to  the  reduced 
feature  set  in  CANdescBasic,  its  GENy  GUI  provides  you  correspondingly  a  reduced 
configuration option set, covering all of the CANdescBasic requirements.  
7.1 
Global CANdescBasic Settings 
CANdescBasic shares the same global settings as the CANdesc variant  (please  refer to 
chapte6.2.1 Global CANdesc Settings). 
 
 
Info 
CANdescBasic does not support any of the multi identity modes! 
 
 
 
7.2 
Service Specific Settings 
In CANdescBasic, you don’t have any more an external diagnostic specification document 
that  shall  be  imported  (like  a  CDD  file).  In  your  software  delivery,  there  is  already  a 
prepared diagnostic configuration template that fulfills the concrete OEM and its diagnostic 
protocol requirements.  
 
 
 
Info 
In CANdescBasic versions, prior 6.00.00, it was possible to import information, out of a 
  CDD file, whether a service Id is supported or not-supported and any new sessions. In 
CANdesc 6.00.00 and newer this feature is temporarily disabled, but you still can 
manually configure these changes. 
 
 
Since CANdescBasic provides only a Sid view over the diagnostic services, its service specific configuration is performed 
primarily within the service overview grid in GENy (please refer to chapter 0  
Service Specific Settings 
 
CANdescBasic  also  provides  a  built  in  support  for  some  of  the  diagnostic  services  like 
CANdesc,  but  its scope is reduced (due to lack  of  enough service definition information) 
only  to  the  most  important  for  diagnostic  communication  services  (e.g. 
DiagnosticSessionControl, TesterPresent, etc.). You will recognize these services in GENy 
as described in chapte6.2.2.2 Predefined (implemented) Services in CANdesc. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
42 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
7.3 
Timing Settings 
The configuration aspect of the CANdescBasic timings settings is the same as described 
in 6.2.3 Timing Settingswith the difference, that here there is no CDD file but a predefined 
template. 
 
7.4 
Diagnostic State Configuration 
CANdescBasic has a built in support only for the diagnostic session states. All other states 
like SecurityAccess and ECU specific service  execution conditions shall be implemented 
by the application. 
The supplied CANdescBasic template already includes all mandatory session, specified by 
the  concrete  OEM.  If  some  additional  sessions  needed,  you  can  add  them  in  GENy  as 
shown below: 
 
Figure 7-1 CANdescBasic add a user session 
 
 
Info 
For any session added by you (user sessions), GENy automatically creates all session 
  transitions, required by the concrete diagnostic protocol (e.g. UDS, KWP2000). 
Examples: 
        Service 0x10:  
                 <AllExistingSessions>-><NewSsession>,  
                 <NewSession>-><NewSession> 
        Service 0x20: 
                  <NewSession>-><DefaultSession> 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
43 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
 
 
 
 
 
Caution 
The allowed session Ids are protocol dependent. For example: on UDS you can not 
  specify user sessions with Ids greater than 0x7F. On KWP2000 any value is acceptable 
for session Id. 
 
The session Id must be a unique value among all sessions, supported by your ECU. 
 
 
 
For the user defined session, you can any time change their name, session or completely 
remove them: 
 
Figure 7-2 CANdescBasic change user session name, id or completely delete user session 
Once a user session has been added, you can configure for each service whether it shall 
be supported or not in the new session. You can do this configuration either on the service 
overview grid,  or if there  are  some service  that  have sub-services, for each sub-service. 
The pictures below show each of the service level configuration views. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
44 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
 
Figure 7-3 CANdescBasic session configuration at service overview  
 
Figure 7-4 CANdescBasic session configuration at service Id level 
2015, Vector Informatik GmbH 
Version: 3.09.00 
45 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 7-5 CANdescBasic session configuration at sub-service level 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
46 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
8  Multi Identity Support 
CANdesc allows you to use multiple diagnostic configuration sets – a use case where the 
ECU  always  communicates  over  the  same  connection,  but  shall  implement  different 
functionality depending on some hardware (jumper) setting. 
All supported configuration sets are described in the following chapters. 
 
 
 
Info 
Please note:  
  The multi identity feature of CANdesc is: 
firstly supported in CANdesc 6.00.00; 
not supported at all in the CANdescBasic variant. 
 
 
8.1 
Single Identity Mode 
CANdesc  has  a  static  configuration  set  –  once  all  services  and  communication 
connections are  configured,  and  the  program  code  is flashed  into  the  ECU  there  are  no 
more configuration changes possible. 
8.1.1.1 
Configuration in CANdela  
You  need  just  to  prepare  the  corresponding  CDD  variant  for  your  ECU  configuration  in 
CANdelaStudio. 
8.1.1.2 
Configuration in GENy 
Import  the  CDD  file  and  the  corresponding  variant  in  GENy  (please  refer  to  chapter  6.2 
Step Two – ECU Diagnostic Configuration in GENy
 for details). 
 
8.2 
VSG Mode 
The VSG mode is a special multi identity mode, which has the following characteristics: 
>  Allows to support multiple diagnostic configuration variants – each variant reflects a 
VSG from the imported CDD file, and additionally there is a base variant that contains 
all services that does not belong to any VSG. 
>  One or several configuration variants can be simultaneously activated during the ECU 
initialization. The base variant is always active. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
47 / 158 
based on template version 5.1.0 







Technical Reference CANdesc 
CANdesc 
APPL 
 
 
   
CANdesc 
CANdesc 
DIAG CFG 
 
TP 

 
Figure 8-1 CANdesc multi identity mode 
CANdesc  will  be  initialized  with  the  base  variant  at  ECU  start  up  sequence.  If  required, 
additional  variant(s)  can  be  activated  by  the  application  (please  refer  to  chapter  12.6.2 
Multi Variant Configuration Functions
 
for more information about the variant initialization). 
 
8.2.1 
Implementation Limitations 
In  order  to  generate  the  correct  NRC  for  a  requested  service  Id  (e.g.  0x7F 
(ServiceNotSupprtedInActiveSession),  CANdesc  considers  all  of  its  sub-services 
diagnostic  session  specific  execution  precondition  and  calculates  a  diagnostic  session 
filter for the SID. In case of a multi-identity such a calculation shall be made for all of the 
diagnostic configuration variants, which will cost a lot of ROM resources. 
 
In  order  to  keep  CANdesc  ROM  resources  as  low  as  possible  the  service  Id  specific 
session  filtering  is  created  considering  the  superset  of  all  sub-services  it  contains, 
independently of their configuration affiliation. Depending on the active configuration set in 
the ECU, this limitation can lead to the following effect:  
A requested service will be responded with the NRC 0x12 (SubfunctionNotSupported) or 
0x31(requestOutOfRange),  depending  on  if  it  has  a  sub-function  or  not,  instead  of  the 
NRC 0x7F. Such a configuration could be for example: 
Service 0x22 (ReadDataByIdentifier) supports only two DIDs: 
0xF100 - supported only in the default diagnostic sessions and available only in variant 1; 
0xF101 – supported only in a non-default session and available only in variant 2. 
CANdesc  will  summarize  in  this  case,  that  service  0x22  is  allowed  in  any  diagnostic 
session since there is at least one DID supported in at least one of each session. 
Now  let’s  assume  the  ECU  is  powered  up  with  active  variant  2.  If  the  client  sends  a 
request  0x22 0xF100 while in  the default diagnostic session,  CANdesc will respond with 
2015, Vector Informatik GmbH 
Version: 3.09.00 
48 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
the  NRC  0x31  (DID  not  supported),  instead  of  the  0x7F  (none  of  the  DIDs  in  the  active 
configuration is executable in the default session -> the service Id itself is not executable in 
the session -> NRC 0x7F would be expected). 
 
8.2.2 
Configuration in CANdela  
>  If multiple diagnostic configuration sets shall be selectable in CANdesc, you will need 
a CDD with several VSGs where each describes a diagnostic configuration set. 
 
 
Caution 
CANdesc supports the multiple diagnostic configurations only on service/sub-service 
  availability level. Therefore the following limitations must be considered while creating 
the separate CDD files resp. CANdela variants for CANdesc: 
>  A service can be completely deactivated within a VSG; 
>  A sub-service (e.g. DID, sub-function, etc.) can be completely deactivated within a 
VSG; 
>  If a service exist in multiple VSGs, then it must have exactly the same properties 
>  Execution pre-conditions (e.g. diagnostic session, security access, etc.) 
>  Support of SPRMIB 
>  Addressing mode (physical/function) 
>  Response behavior (response on physical/function request) 
>  If a sub-service exist in multiple VSGs, then it must have exactly the same 
properties 
>  Execution pre-conditions (e.g. diagnostic session, security access, etc.), resp. 
trigger of state transitions. 
>  Addressing mode (physical/function) 
>  Response behavior (response on physical/function request) 
>  Protocol information semantic (sub-function, identifier, etc.) 
>  Request resp. response content must be identical – same data structure, data 
types, and constant value (if any available) 
>  Service 0x31 (RoutineControlByIdentifier) specifics 
>  The multi-identity varying is allowed only on RID level. If a RID is supported in 
multiple variants, then the sub-functions supported by this RID must be the same 
(i.e. it is not allowed to have one variant with only “start” sub-function and one with 
“start and stop” for the one and same RID). 
>  Service 0x2F (IoControlByIdentifier) specifics 
>  The multi-identity varying is allowed only on DID level. If a DID is supported in 
multiple variants, then the control options supported by this DID must be the same 
(i.e. it is not allowed to have one variant with only “ShortTermAdjustment” and one 
with “ShortTerm-Adjustment and ReturnControlToEcu” for the one and same DID). 
>   
>  If at least one of the above requirements is not fulfilled, the variant that violates the 
rule will not be imported. 
 
 
>   
2015, Vector Informatik GmbH 
Version: 3.09.00 
49 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
8.2.3 
Configuration in CANdela 
Please follow the steps below on how to configure VSG in CANdelaStudio. 
1.   
2.  Defining all available VSGs for the concrete ECU. 
3.  In CANdelaStudio, select the Vehichle System Groups view and add all necessary 
VSGs into the VSG pool. 
 
Figure 8-2 Defining VSGs in CANdelaStudio 
The  name  of  the  created  VSG  will  be  used  later  by  CANdesc  for  the  diagnostic 
configuration  constants  that  the  CANdesc  application  shall  use  during  the  configuration 
activation phase (please refer to chapte12.6.2 Multi Variant Configuration Functions). 
 
Once  all  of  the  required  VSGs  are  created,  you  can  start  with  the  service  to  VSG 
assignment. 
 
4.  Service to VSG assignment 
5.  Using CANdelaStudio you can assign any diagnostic instance to none, one or multiple 
VSGs. Those services that do belong to a diagnostic instance without a VSG 
assignment will be considered as services of the base variant (services that are always 
available). 
2015, Vector Informatik GmbH 
Version: 3.09.00 
50 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
6. 
 
Figure 8-3 Setting a VSG for service in CANdelaStudio 
8.2.4 
Configuration in GENy 
In order to put GENy into VSG mode, you have to select  it on the CANdesc component 
root.  Please  refer  to  the  chapter  6.2.1  Global  CANdesc  Settings  for  details  about  the 
variant selection option.  
Now import the CDD file, containing the VSGs in GENy as described in chapte6.1 Step 
One – Importing an ECU Diagnostic Description
That is all. 
 
8.3 
Multi Identity Mode 
 
Multi Identy Mode is not supported by CANdesc. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
51 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
9  Diagnostic Service Implementation Specifics 
9.1 
Clear Diagnostic Information (SID $14) (UDS2012) 
 
 
Caution 
This section does not apply to all ECU configurations. It is only applied in special cases 
  where clear diagnostic information is supported! 
 
 
The sevice ClearDiagnosticInformation is used by the client to clear diagnostic information 
in a memory of one or multiple server(s). 
 
9.1.1 
Tasks performed by CANdesc 
To a certain degree CANdesc validates the request. The validation of service-level states 
(session,  security  and  user  states)  is  performed  by  CANdesc  before  CANdesc  calls  the 
application callback. 
 
9.1.2 
Task to be performed by the Application 
The application has to verify the length of the request and also has to check if the passed-
on groupOfDTC parameter is valid. 
 
9.2 
ReadDTCInformation (SID $19) 
9.2.1 
Limitations of the service 
When  CANdesc  is  used  with  an  AR3  DEM  from  Vector,  some  sub-functions  of  service 
0x19 are implemented internally. The DEM generates lists of the available Snapshot and 
ExtendedData records which are used by CANdesc for iteration.  In case the services are 
internally  implemented,  the  maximum  amount  of  Snapshot  records  and  Extended  Data 
records supported by CANdesc is limited to 240 records each. 
9.3 
ReadDataByIdentifier (SID $22) 
This service has the purpose to read some predefined data records (PID). Each PID has a 
concrete data structure which is designed by CANdelaStudio.  
As the standard case the request contains a single PID. This results in a single response 
containing the data structure of the record. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
52 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Single PID
Sing
 mode 
le PID
(
 mode  well kno
kn w case
 ca

se exampl
ex
e for P
e f
ID 
or P
$1
ID 
2
$1 34
Tester‘s reque
Te
st:
ster‘s reque
$22 $12 $34
ECU‘s response:
ECU‘s respon
$62 $12 $34 Data bl
Da
ock
 
 
The UDS allows to request multiple PIDs in a single request. This results is also a single 
response including the data structure of each requested PID. 
 
Multip
Mul
le
tip  PID mod
 PI
e exa
D mod
mple for
e exa
 
mple for PIDs
PID : $1234, 
$1
$ABCD
$A
Tester‘s reque
Te
st:
ster‘s reque
$22 $12 $34 $AB
$A $CD
ECU‘s response:
ECU‘s respon
$62 $12 $34 Data bl
Da
ock $AB
$A $CD
Data bl
Da
ock
 
 
CANdesc will hide this multiple PID processing from the application. To do that some minor 
limitations in the interface has to be made (see chapter 9.3.2 Single PID mode). To show 
the  differences,  we  discuss  first  the  standard  case.  In  the  standard  case  there  is  no 
multiple  PID  processing  possible.  The  second  chapter  (9.3.3  Multiple  PID  mode)  is 
showing the multiple PID processing.  
Which mode is used depends on the configuration (typically the OEM). 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
53 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
9.3.1 
Limitations of the service 
Session management 
This  service  contains  no  sub-function  identifier  which  means  the  global  state  group 
“session”  may  not  be  selected  as  a  “relevant  group”  for  any  instance  of  this  service.  If 
there is a need for a PID to be rejected under a certain session, all PIDs must follow this 
rule and be specified to be rejected for this session. As a result the whole SID $22 will be 
rejected for this session. This behavior is harmonized with the UDS protocol specification, 
which allows service identifiers to be rejected in a session but no parameter identifiers. 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
54 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
9.3.2 
Single PID mode 
The  Single  PID  mode  is  configured  automatically,  if  the  number  of  PIDs  that  can  be 
requested at the same time, is limited to one PID. If more than one PID is requested, the 
request will be rejected with ‘RequestOutOfRange’ (NRC $31).  
If the multiple PID mode of CANdesc is deactivated, the service $22 will be executed and 
processed like any other diagnostic service without any additional specifics or limitations. 
9.3.2.1 
Sending a positive response using linear buffer access 
Tester
CANdesc
Application
Check all states if the 
SId[$22],Pid[$xxxx]
"read PID" service can 
StateGroupsCheck for Pid
be executed.
If available execute the pre-handler and 
ApplDescPreReadDataById_xxxx
check if the application rejected the service.
ApplDescReadDataById_xxxx
Execute the main-handler 
Write data (pMsgContext->resData)
to fill the response data.
Set total response data length 
(pMsgContext->resDataLen = N)
DescProcessingDone()
RSid[$62], PID[$xxxx], Data[N]
The positive response transmission will be 
initiated after the DescProcessingDone 
gets called.
 
Figure 9-1: Linearly written positive response on single PID request 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
55 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
9.3.2.2 
Sending a positive response using ring buffer access 
Tester
CANdesc
Application
Check all states if the 
SId[$22],Pid[$xxxx]
"read PID" service may 
StateGroupsCheck for Pid
be executed.
If available execute the pre-handler and check if 
ApplDescPreReadDataById_xxxx
the application rejected the service.
Execute the main-handler 
ApplDescReadDataById_xxxx
to fill the response data.
Set total response data length 
(pMsgContext->resDataLen = N)
DescRingBufferStart()
Write data (DescRingBufferWrite())
FF (RSid[$62], PID[$xxxx], Data[3])
The positive response transmission will be initiated after 
the DescRingBufferStart gets called and there are at 
least 7 bytes ready to be transmitted (i.e. 3 data bytes).
Write data (DescRingBufferWrite())
CF(Data[N-3])
 
Figure 9-2: “On the fly” response data writing. 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
56 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
9.3.2.3 
Sending a negative response 
Due to the fact that the negative response handling has changed in the multiple PID mode, 
we  recommend  to  do  the  same  handling  in  the  Single  PID  mode,  too.  Please  refer  the 
chapter 9.3.3.2 “Ring buffer active configuration” for the recommended negative response 
handling. 
Tester
CANdesc
Application
Check all states if the 
SId[$22],Pid[$xxxx]
"read PID" service can 
StateGroupsCheck for Pid
be executed.
If available execute the pre-handler and 
check if the application rejected the service.
ApplDescPreReadDataById_xxxx
Execute the main-handler 
ApplDescReadDataById_xxxx
to fill the response data.
DescSetNegresponse(errorCode)
The main-handler still can 
register any errors.
DescProcessingDone()
RSid[$7F], Sid[$22], ErrorCode[errorCode]
The negative response transmission will be 
initiated after the DescProcessingDone 
gets called.
 
Figure 9-3: Negative response on single PID 
9.3.3 
Multiple PID mode 
The  Multiple  PID  mode  is  configured  automatically  if  the  number  of  PIDs,  that  can  be 
requested at the same time, is greater than one. If more than this predetermined number 
of PIDs is requested, the request will be rejected with ‘RequestOutOfRange’ (NRC $31).  
In  this  configuration  some  minor  limitations  must  be  taken  into  account  while  using  the 
CANdesc interfaces.  
For the service “ReadDataByIdentifier” the ring-buffer feature can be used. Depending on 
the usage of this feature, there are two main use cases for the multiple PID mode.: 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
57 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
9.3.3.1 
Pure linear buffer configuration 
The ring-buffer feature is deactivated in general. 
If the system doesn’t use any ring buffer access for filling the response, the PID pipeline is 
still  quite  simple  and  therefore  with  less  limitations  to  the  CANdesc  API  usage  and 
application performance. 
9.3.3.1.1 
Sending a positive response 
Tester
CANdesc
Application
SId[$22],Pid0[$xxxx],Pid1[$yyyy]
Before the requested PIDs will be processed, check 
StateGroupsCheck for PID0[$xxxx]
all PIDs':
1. States (may be executed)
2. Pre-handlers.
ApplDescPreReadDataById_xxxx
StateGroupsCheck for PID1[$yyyy]
ApplDescPreReadDataById_yyyy
ApplDescReadDataById_xxxx
Execute the first PID's 
main-handler to fill the response 
data.
Write data (pMsgContext->resData)
Set total response data length 
(pMsgContext->resDataLen = N)
Once the service execution of 
the current PID has been 
accomplished...
DescProcessingDone()
...execute the next 
queued one.
ApplDescReadDataById_yyyy
Write data (pMsgContext->resData)
Set total response data length 
(pMsgContext->resDataLen = M)
DescProcessingDone()
FF (RSid[$62], PID0[$xxxx], Data[3])
CF[i](Data[N-3],PID1[$yyyy]Data[M)
The positive response transmission will be 
initiated after all PIDs have called 
DescProcessingDone and all the data ...
 
Figure 9-4: Linearly written positive response on multiple PIDs (global ring buffer option is off) 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
58 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
9.3.3.1.2 
Sending a negative response 
This example  depicts the case where  from two requested PIDs the first  one may not  be 
accessible and rejects the service execution. 
Tester
CANdesc
Application
Before requested PIDs will be processed check all 
SId[$22],Pid0[$xxxx],Pid1[$yyyy]
PIDs':
StateGroupsCheck for PID0[$xxxx]
1. States (may be executed)
2. Pre-handlers.
ApplDescPreReadDataById_xxxx
StateGroupsCheck for PID1[$yyyy]
ApplDescPreReadDataById_yyyy
ApplDescReadDataById_xxxx
Execute the first PID's 
main-handler to fill the response 
data.
DescSetNegResponse(errorCode)
Once the service execution of 
the current PID has been 
accomplished...
DescProcessingDone()
Skip further processing 
of the list
RSid[$7F], Sid[$22], ErrorCode[errorCode]
The second PID's 
Main-handler will not be 
executed.
...stops the further 
processing a...
 
Figure 9-5: Negative response on multiple PIDs (global ring buffer option is off) 
9.3.3.2 
Ring buffer active configuration 
Attention: The Ring-Buffer in ‘Multiple PID‘ services can be first-time used since CANdesc 
version 2.13.00 
Different concepts for the buffer handling were discussed while development. Two 
solutions with different pros and cons are discussed here: 
 
Multiple buffer 
Normally  each  service  handler  (MainHandler  routine)  has  the  whole  diagnostic  buffer 
available (apart from the protocol header bytes hidden by CANdesc). Based on this logic 
the service $22 using PID pipelining has the same tasks as the normal service processor: 
executing  a  PID  handler  and  provide  him  the  whole  diagnostic  buffer  for  response  data. 
This will hide the whole process and makes the application’s life easier (no exceptions for 
the implementation). To realize this concept means to provide a separate diagnostic buffer 
for each PID which size is the same as the main one (configured by GENtool). This is a 
fast and quite simple solution but requires too much RAM to be reserved for only the case 
that  sometimes  the  testers  would  like  to  use  the  maximum  capacity  of  the  ECU    (i.e. 
requests as many PIDs as possible for this ECU in a single request).  
Pros: less ROM usage 
2015, Vector Informatik GmbH 
Version: 3.09.00 
59 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Cons: very high RAM usage 
 
virtual multiple buffer 
This concept  is more generically designed and will not  have additional ROM overhead if 
the pipeline size  will be increased. An intelligent  buffer concept  gives the application the 
whole size of the buffer for each MainHandler call.  
Once the whole data for the current PID has been written, the data supplement will stop 
(because the next PID handler will not be called). The transmission in the transport layer is 
started  and  some  time  later  it  runs  into  buffer  under-run. This  ‘signal’  is  used  to  call  the 
next PID MainHandler. This MainHandler has to provide his data very quick. Otherwise the 
response transmission will stop (due to a continuously buffer under-run).  
Pros:  less RAM usage (practically independent of the maximum list size).  
Cons: moderate ROM overhead / the response data must be composed very quickly. 
The virtual multiple buffer concept is the implemented solution. The application can choose 
for each PID separately to write the data linearly or by using the ring buffer. 
performance requirements  
The application has performance requirements: 
If linear access has been chosen, the whole response data of each MainHandler must be 
filled within the lower duration of the P2 time and the TP confirmation timeout. Normally the 
P2 time is shorter than the transport layers confirmation timeout so just take into account 
that each Main-Handler must be able to fill its response data within a time far shorter than 
the P2 time. 
If  ring  buffer  access  has  been  chosen,  the  application  has  to  call    the 
“DescRingBufferWrite” fast enough to keep TP from confirmation timeout. 
Negative response on PID 
The  negative  response  handling  is  changed  in  the  multiple  PID  mode!  This  affects  all 
protocol-services  with  a  activated  ‘May  be  combined’  property.  The  UDS  specification 
encloses  only  the  SIDs:  $22  and  $2A.  For  all  other  services  the  negative  response 
handling is not changed! 
If  the  application has  to  reject  a  request  (e.g.  ignition  key  check)  it  has  to do  that  in  the 
PreHandler.  The  application  is  not  allowed  to  call  “DescSetNegResponse()”  to  send  a 
negative response in any MainHandler.  
This limitation is based on the concept to check all reject conditions in PreHandlers before 
starting the transmission. This is necessary because after CANdesc has executed the first 
MainHandler (which starts the positive response transmission) there will be no chance to 
send a negative response.  
The  usage  of  the  concept:  CANdesc  starts  to  call  all  PreHandlers  of  this  multiple  PID 
request.  If  no  negative  response  is  set,  CANdesc  will  start  to  call  the  corresponding 
MainHandlers. Within the first call of DescProcessingDone() the transmission is initiated.  
Note (for version 3.02.00 of CANdesc and above): 
2015, Vector Informatik GmbH 
Version: 3.09.00 
60 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
In case the application sets an error code during the main-handler execution in non-debug 
(released) version of the component, depending on the situation will lead to: 
For service $22: 
First DID of the list main-handler: sending a negative response to service $22; 
Second or any of the succeeding DIDs in the list: transmission interruption. 
For service $2A: 
Ignoring the scheduled response. 
 
9.3.3.2.1 
Sending a positive response 
Tester
CANdesc
Application
SId[$22],Pid0[$xxxx],Pid1[$yyyy]
Before requested PIDs will be processed check all 
StateGroupsCheck for PID0[$xxxx]
PIDs':
1. States (may be executed)
ApplDescPreReadDataById_xxxx
2. Pre-handlers.
StateGroupsCheck for PID1[$yyyy]
ApplDescPreReadDataById_yyyy
ApplDescReadDataById_xxxx
Execute the first PID's 
main-handler to fill the response 
data.
Write data (pMsgContext->resData)
Set total response data length 
(pMsgContext->resDataLen = N)
DescProcessingDone()
FF (RSid[$62], PID0[$xxxx], Data[3])
With the first called 
DescProcessingDone() starts 
the response transmission.
CF[i](Data[N-3])
Once the whole data of  the current PID has 
been sent the next PID main-handler will be 
ApplDescReadDataById_yyyy
called to supply the response data.
Write data (pMsgContext->resData)
CF[j](Data[N-k],PID1[$yyyy]Data[m])
Set total response data length 
(pMsgContext->resDataLen = M)
DescProcessingDone()
CF[l](Data[M-m])
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
61 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Figure 9-6: Linearly written response data on multiple PIDs (global ring buffer option is on) 
 
9.3.3.2.2 
Sending a negative response 
Tester
CANdesc
Application
SId[$22],Pid0[$xxxx],Pid1[$yyyy]
Before requested PIDs will be processed check all 
StateGroupsCheck for PID0[$xxxx]
PIDs':
1. States (may be executed)
2. Pre-handlers.
ApplDescPreReadDataById_xxxx
StateGroupsCheck for PID1[$yyyy]
ApplDescPreReadDataById_yyyy
DescSetNegResponse(errorCode)
If error has been set - no 
main-hadnler processing will 
follow.
RSid[$7F], Sid[$22], ErrorCode[errorCode]
Send immediately 
negative response.
 
Figure 9-7: Negative response on multiple PIDs (global ring buffer option is on) 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
62 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
9.3.3.2.3 
PostHandler execution rule 
All  PostHandlers  are  executed  after  the  finished  response  transmission  (like  a  normal 
PostHandler). 
Independent  of  the  ring-buffer  option  setting  (enabled  or  disabled),  the  execution  of  the 
service  $22  PostHandler(s)  has  the  following  rule  which  has  to  be  taken  into  account: 
calling the Post-Handler of a specific PID means: either the PreHandler of this PID 
has been previously called or its MainHandler. 
The following sequence chart depicts this: 
Tester
CANdesc
Application
SId[$22],Pid0[$xxxx],Pid1[$yyyy],
Before requested PIDs will be processted check all 
Pid2[$zzzz]
StateGroupsCheck for PID0[$xxxx]
PIDs':
1. States (may be executed)
2. Pre-handlers.
ApplDescPreReadDataById_xxxx
PID0, PID1and PID2 have all 
post-handlers configured.
StateGroupsCheck for PID1[$yyyy]
PID1 has no pre-handler 
cofigured.
StateGroupsCheck for PID2[$zzzz]
ApplDescPreReadDataById_zzzz
DescSetNegResponse(errorCode)
If error has been set - no 
main-hadnler processing will 
follow.
RSid[$7F], Sid[$22], ErrorCode[errorCode]
Send immediately 
negative response.
ApplDescPostReadDataById_xxxx
PID1 has a post-handler but since 
the application doesn't know about 
its reception - no post-handler will 
ApplDescPostReadDataById_zzzz
be called.
 
Figure 9-8: Post-Handler execution sequence. 
 
 
9.4 
DynamicallyDefineDataIdentifier (SID $2C) (UDS) 
The DynamicallyDefineDataIdentifier service allows the client (tester) to dynamically define 
in a server (ECU) a data identifier that can be read via the ReadDataByIdentifier service at 
a later time. 
The intention of  this service  is to provide the client  with the ability to group one or more 
data  elements  into  a  data  superset  that  can  be  requested  en  masse  via  the 
2015, Vector Informatik GmbH 
Version: 3.09.00 
63 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
ReadDataByIdentifier  or  ReadDataByPeriodicIdentifier  service.  The  data  elements  to  be 
grouped together can either be referenced by: 
a source data identifier, a position and size or, 
a memory address and a memory length, or, 
a combination of the two methods listed above using multiple requests to define the single 
data element. The dynamically defined dataIdentifier will then contain a concatenation of 
the data parameter definitions. 
 
The  definition  of  the  dynamically  defined  data  identifier  can  either  be  done  via  a  single 
request  message  or  via  multiple  request  messages.  This  allows  for  the  definition  of  a 
single  data  element  referencing  source  identifier(s)  and  memory  addresses.  The  server 
has  to  concatenate  the  definitions  for  the  single  data  element.  A  redefinition  of  a 
dynamically defined data identifier can be achieved by clearing the current definition and 
start over with the new definition. 
At last the dynamically defined data identifier consists of a list of (non-dynamically) defined 
data identifiers and memory area ranges that can be used in any combination. 
For more information, see /ISO 14229-1/ 
 
9.4.1 
Feature set 
These are the supported subfunctions for service $2C (DynamicallyDefineDataIdentifier): 
Subfunction Name 
Hex Value 
defineByIdentifier 
01 
defineByMemoryAddress 
02 
clearDynamicallyDefinedDataIdentifier  03 
 
9.4.2 
API Functions 
The reception of a Service $2C request will either delete a DynamicDataIdentifier (DDID) 
or  PeriodicDataIdentifier  (PDID)  by  subfunction  $03  or  build  a  DDID/PDID  by  (several 
times) using subfunction $01 and/or $02. 
For  subfunction  $02  (defineByMemoryAddress)  there  is  a  new  application  callback 
function (see chapter 12.6.13 “DynamicallyDefineDataIdentifier  ($2C) (UDS) functions”). It 
allows the application to permit or deny the extension of the DDID/PDID by accessing the 
defined memory range. The callback function must check, if the requested memory area is 
readable  for  the  external Tester  and  if  the  current  security  state  of  the  ECU  permits  the 
extension  of  the  DDID/PDID.  See  chapter  12.6.13.2  for  the  full  set  of  checks  to  be 
executed. 
Please  note  that  later,  when  reading  the  DDID  by  using  service  $22 
(ReadDataByIdentifier),  further  (security)  checks  for  each  element  of  the  DDID’s  list  are 
executed  to  verify  that  e.g.  the  (then  active)  security  state  permits  the  reading  of  the 
memory area or DID. These checks (of  Service  $22 and $23) are done in  the traditional 
sequence of Pre-, Main- and PostHandler. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
64 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
The  reception  of  a  Service  $22  request  starts  a  new  context  in  CANdesc.  Typically  the 
requested data can not be asked from the application by using one single callback function 
but  must  be  constructed  sequentially  by  collecting  data  for  each  part  of  the  DDID’s 
definition list: 
A requested basic source data identifier (DID) is asked of the application by the respective 
callback  (as  for  Service  $22  request),  the  result  data  is  stripped  down  to  the  defined 
position and size 
A memory address is read by its defined function (typically the same as used for a Service 
$23 request) and the defined ‘size’ bytes are collected. 
As  recommended  from  /ISO  14229-1/  to  prevent  data  consistency  problems  a  recursive 
definition of DDIDs is NOT supported. 
The Service $22 response data is collected by splitting the service request into these basic 
tasks,  then  running  the  well  known  internal  functions  that  were  defined  for  them,  collect 
their  results  and build  up  the  Service  $22  response. Therefore,  each of  the above  tasks 
starts  a  new  context,  executes  the  defined  Pre-,  Main-  and  Post-Handler  where 
Application-Callbacks get data, delivers its result and finally ends its context. 
The recursive evaluation of DDIDs enforces the usage of MultiContext mode.  
We would like to point out that the described operating sequence above is completely run 
within  CANdesc  and  totally  transparent  for  the  application  except  for  the  additional API 
callback function. Using Service $2C or $2A switches CANdesc to MultiContext mode – if 
your application isn’t prepared to support MultiContext mode (by using the defined macros) 
you’ll get compiler errors about inconsistent argument lists. 
 
9.4.3 
Sequence Charts 
Service $2C – Define a DDID 
The  following  picture  exemplifies  the  sequence  of  defining  a  DDID  by  several  call  of 
Service DynamicallyDefineDataIdentifier ($2C). 
In  our  example  the  first  Service  $2C  request  defines  the  DDID  $F300  to  return  two 
independent 
memory 
areas. 
For 
both 
areas 
the 
callback 
function 
ApplDescCheckDynDidMemoryArea()  is  triggered  and  in  this  example  the  application 
permits both accesses. 
The consecutive Service $2C request extends the DDID $F300 by (some fragments of) the 
existing DID $F010. As the here executed PreHandler does not set a Negative Response 
Code,  CANdesc  considers  the  extension  of  the  DDID  valid  and  enlarges  the  DDID 
definition. 
A third Service $2C request tries to extend the DDID $F300 once more by another memory 
area. In our example the call fails, as the specified  memory area ($0000) is not valid for 
this  ECU. The  service  is  negative  responded  and  the  previous  DDID  specification  is  left 
untouched. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
65 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
sd Define a new  DDID v ia Serv ice $2C request
Tester
CANdesc
Application
Define DDID $F300 as
$2C 02 F300 12 ABCD04 FEDC05
4-byte memory block at 
address $ABCD and
5-byte block at $FEDC
check for
ApplDescCheckDynDidMemoryArea
Addr. $ABCD, 
memBlockOk
Size $04
check for
ApplDescCheckDynDidMemoryArea
Addr. $FEDC, 
Size $05
memBlockOk
PosResponse ($6C 02)
$2C 01 F300 F010 ...
Extend the DDID $F300
PreHandler for DID F010
by using
existing DID $F010
No Neg. RCode 
set --> success
PosResponse ($6C 01)
$2C 02 F300 12 000004
Further extention fails 
due invalid address 
value ($0000) in 
ApplDescCheckDynDidMemoryArea
request
check for Addr. 
memBlockInvAddress
$0000 fails!
NegResponse ($7F 2C 31)
 
Figure 9-9: Defining a DDID. 
 
Service $22 – Read a DDID 
The  above  defined  DDID  is  now  read  by  Service  ReadDataByIdentifier  ($22).  Within 
CANdesc  the  DDID  is  disassembled  into  its  elements:  One  (virtual)  request  for  the  first 
memory range, another request for the second memory range and finally a request for the 
predefined DID $F010. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
66 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
sd Read defined DDID v ia Serv ice $22 request
Tester
CANdesc
Application
Read DDID $F300 that
$22 F300
was defined as:
    Addr ABCD, Size 04
$23 12 ABCD04
 + Addr FEDC, Size 05
 + DID F010, Pos .., Size ..
execute virtual 
$23 request
PreHandler
MainHandler
PostHandler
$23 12 FEDC05
execute virtual 
$23 request
PreHandler
MainHandler
PostHandler
$22 F010
execute virtual 
$22 request ...
PreHandler
MainHandler
PostHandler
... and cut out the
required bytes 
from the result
concatenate 
the results
PosResponse ($62)
 
Figure 9-10: Reading a DDID. 
Between  CANdesc  and  the  application  the  sequence  looks  same  as  if  the  tester  would 
have  sent  3  requests:  (1)  ReadMemoryByAddress  ($23)  on  first  address  range,  (2) 
ReadMemoryByAddress  ($23)  on  second  address  range,  and  finally  (3) 
ReadDataByIdentifier ($22) on the DID $F010. Keep in mind: this is just a picture for the 
succession of events/API-calls - these requests are not real, the messages are never seen 
on the bus, the internal sequence is actually slightly different but for the application it looks 
the same! 
9.5 
Read/Write Memory by Address (SID $23/$3D) (UDS) 
 
Caution 
This chapter does not apply to all ECU configurations. Only in special cases the 
  memory access support will be available! 
2015, Vector Informatik GmbH 
Version: 3.09.00 
67 / 158 
based on template version 5.1.0 










Technical Reference CANdesc 
 
The  services  $23  (ReadMemoryByAddress)  and  $3D  (WriteMemoryByAddress)  are 
handled uniformly in CANdesc. 
Basically the memory by address requests look like this: 
$23 
FID 
address 
length 
$3D 
FID 
address 
length 
data 
 
The  application  need  not  concern  itself  with  the  details  how  the  address  and  length  are 
formatted.  If  a  valid  FID  is  recognized,  CANdesc  will  extract  the  address  and  length 
information from the request and call an appropriate application callback. 
See also: 
 ApplDescReadMemoryByAddress (12.6.14.1) 
 ApplDescWriteMemoryByAddress (12.6.14.2) 
9.5.1 
Tasks performed by CANdesc 
To a certain degree CANdesc validates the request. 
The basic format checks and service level state validation – this means e.g. security and 
session validation – are performed before calling the application callback. 
Service  level  state  validation  means  that  the  request  will  be  denied  if  all  diagnostic 
instances of service $23 or $3D are not allowed in the current state. 
In  case  of  WriteMemoryByAddress  the  application  has  linear  access  to  the  whole  data 
block to write. 
9.5.2 
Task to be performed by the Application 
CANdesc currently does not provide state validation on format identifier level or memory 
address / memory block level. 
This  means,  that for example  different  memory  addresses  shall  require  different  security 
levels, the application will have to verify that the ECU currently is in an appropriate state to 
access the requested memory area. 
9.5.3 
Repeated service calls 
The repeated service call feature is available for the memory access callbacks. 
Because  they  have  a  different  prototype  than  a  normal  main  handler,  the  usual  API 
‘DescStartRepeatedServiceCall (see  12.6.8.1)’ can not  be used with the memory  access 
callbacks. 
Instead,  a  new  API  call  ‘DescStartMemByAddrRepeatedCall  (see  12.6.8.2)’  has  been 
added. 
To abort the repeated service call, use the usual API. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
68 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
10  Generic Processing Notifications 
If CANdesc UDS2012 is used, the feature “Generic Processing Notifications” is provided. 
Upon activating this feature, CANdesc will notify the application when the processing of a 
request starts and ends. Thereby, the notification mechanism is two-staged. On each 
stage there are two application callbacks, one indication and one confirmation callback.  
On the first stage “Manufacturer Notification Support”, CANdesc will notify the application 
right before the processing of a fully received request starts, by calling the function 
ApplDescManufacturerIndication(). When the processing of the request has been finished, 
the response has been sent and all PostHandlers were called, CANdesc notifies the 
application again by calling the function ApplDescManufacturerConfirmation()
The application callbacks of the second stage “Supplier Notification Support” are named 
accordingly ApplDescSupplierIndication() and ApplDescSupplierConfirmation(). The 
indication callback is called by CANdesc after it has verified that the requested service is 
supported in the active session, security state and user states. The confirmation callback 
is also called after the response has been sent, and all PostHandlers were called, but right 
before the call to ApplDescManufacturerConfirmation(). Thus, the manufacturer and 
supplier callbacks are called in a nested way. Figure 3-1 illustrates the order of the 
notification callbacks related to the processing of a service request. 
Application
Prehandler
Manufacturer 
Mainhandler
Supplier 
Indication
Confirmation
Posthandler
Supplier 
Manufacturer 
Indication
Confirmation
CANdesc
Check SID
… Check Format
Check Session/Security
t
Request
positive Response

negative Response
Tester
 
Figure 10-1 Call order of Manufacturer- and Supplier-Notficiation 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
69 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
10.1  Using dynamically defined data Identifier 
The  Service  DynamicallyDefineDataIdentifier  allows  the  definition  of  data  identifiers  with 
other  data  identifiers  or  memory  areas.  These  DDIDs  can  be  read  via  service 
ReadDataByIdentifier. When reading a DDID, for each source element a virtual request is 
processed  by  CANdesc  to  get  the  information  for  this  source  element  from  the 
application(see  chapter  9.4).  Because  CANdesc  processes  the  virtual  requests  equal  to 
normal  requests,  the  notification  functions  will  not  only  be  called  for  the  $22  request 
containing  the  DDID,  but  also  for  each  virtual  request.  The  application  has  to  consider 
these additional calls, in case a DDID is requested.  
Figure 10-2 shows an example of reading a DDID with service $22. 
 sd Read defined DDID v ia Serv ice $22 request w ith Generic Processing Notifications
Tester
CANdesc
Application
Read DDID $F300 that
$22 F300()
was defined as:
    Addr ABCD, Size 04
Manufacturer Indication()
+ Addr FEDC, Size 05
Confirmation calls 
+ DID F010, Pos .., Size ..
Supplier Indication()
execute virtual 
for the request to 
$23 request
read the DDID
$23 12 ABCD04()
Manufacturer Indication()
Nested confirmation 
Supplier Indication()
calls for the virtual 
request
PreHandler()
MainHandler()
PostHandler()
Supplier Confirmation()
Manufacturer Confirmation()
...
Process further 
virtual requests
...
PosResponse ($62)
PostHandler()
Supplier Confirmation()
Manufacturer Confirmation()
 
Figure 10-2 Read out a DDID with generic processing notifications 
2015, Vector Informatik GmbH 
Version: 3.09.00 
70 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
11  Busy Repeat Responder Support (UDS2006 and UDS2012) 
Busy  Repeat  Responder  is  a  feature,  that  allowes  CANdesc  to  respond  to  incoming 
requests  during  the  processing  of  another  request.  Such  parallel  requests  are  properly 
received  and  in  the  next  task  cycle  of  CANdesc  responded  negatively  with  NRC 
BusyRepeatRequest (0x21).  
Figure 11-1 illustrates the functionality of the Busy Repeat Responder mechanism. During 
the  processing  of  Request  1,  Requests  2 and  3 from Tester 2  are  responded negatively 
with  NRC  BusyRepeatRequest.  After  the  processing  of  request  1  has  finished  and  a 
positive response has been sent, Request 4 from Tester 2 can be processed properly. 
 sd BusyRepeatResponder
Tester 1
Tester 2
CANdesc
Request 1()
CANdesc has received a 
request from Tester 1 and 
starts the processing
Request 2()
Neg Response Busy()
Parallel requests from 
another tester are responded 
Request 3()
negatively with NRC 
BusyRepeatRequest
Neg Response Busy()
Pos Response for Request 1()
After CANdesc has finished 
Request 4()
the processing of the request 
from Tester 1, Requests from 
Tester 2 can be processed 
Pos Response for Request 4()
again.
 
Figure 11-1 Illustration of the feature BusyRepeatResponder 
Preconditions that must be fulfilled when using the feature Busy Repeat Responder: 
>  The TP must be an ISO TP from Vector with TP Class “Dynamic Normal Addressing 
Multi TP” or “Dynamic Normal Fixed Addressing Multi TP” 
>  In the TP configuration the feature “Extended API – Overrun Reception” must be active 
>  In the TP configuration the number of Rx channels and Tx Channels must be > 1 
>  In case of Dynamic Normal Addressing Multi TP, a dispatcher needs to be 
implemented in the application (for a detailed description see chapte13.12) 
2015, Vector Informatik GmbH 
Version: 3.09.00 
71 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
>  Restrictions when using the feature Busy Repeat Responder: 
>  Only physical parallel requests are responded negatively. Functional parallel requests 
will NOT get a negative response. 
11.1  Configuration in GENy 
To  activate  the  feature  Busy  Repeat  Responder  use  the  setting  in  the  CANdesc 
component root (please refer to chapte6.2.1 Global CANdesc Settings). 
Furthermore,  the  feature  requires  additional  configuration  in  the  TP  component.  The 
feature “Extended API – Overrun Reception” must be enabled. This setting is available in 
the  group  “Advanced  Configuration”. To  be  able  to  receive  another  request  while  one  is 
under processing, the “Number of Rx Channels” and “Number of Tx Channels” must be at 
least two. The number of channels can be configured in the TP Connection Groups: 
 
Figure 11-2 Example of the “Number of Rx(Tx) Channels” settings 
In case of “Dynamic Normal Addressing Multi TP” a dispatcher needs to be implemented in 
the  application.  The  description  of  the  GENy  configuration  to  integrate  the  dispatcher  is 
described  in  chapter  13.12  …use  “Dynamic  Normal  Addressing  Multi  TP”  with  multiple 
tester.
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
72 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12  CANdesc API 
12.1  API Categories 
12.1.1  Single Context 
This API category is used if no parallel processing is necessary. This is typical for the ISO 
14229 specification. 
12.1.2  Multiple Context (only CANdesc) 
This  API  category  is  used  if  parallel  processing  is  necessary.  This  means  not  that 
CANdesc  can  work  with  multiple  instances,  but  only  one  functional  request  can  be 
processed parallel to a working physical request. 
12.2  Data Types 
The following standard data types are used in this document: 
vuint8 
Represents 8 bit unsigned integer value. 
vsint8 
Represents 8 bit signed integer value. 
vuint16 
Represents 16 bit unsigned integer value. 
vsint16 
Represents 16 bit signed integer value. 
vuint32 
Represents 32 bit unsigned integer value. 
vsint32 
Represents 32 bit signed integer value. 
Table 12-1: standard data types 
 
Additional data  types used  in  this  document  are  described  in  the corresponding function 
description. 
12.3  Global Variables 

12.4  Constants 
12.4.1  Component Version 
The  version  of  the  CANdesc  component  consist  of  3  parts  in  the  following  format: 
MM.SS.BB
Where: 
>  MM is the main version of the component, 
>  SS is the subversion of the component, 
>  BB is the bug-fix version of the component. 
To get the current CANdesc version, the application could use the following shared data: 
2015, Vector Informatik GmbH 
Version: 3.09.00 
73 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
 
Name 
Type 
Description 
g_descMainVersion 
BCD 
Contains the main version part. 
g_descSubVersion 
BCD 
Contains the subversion part. 
g_descBugFixVersion 
BCD 
Contains the bug-fix version part. 
Table 12-2: Version API data 
Note: The version of the module is the same as the version of the generator’s DLL file. 
12.5  Macros 
12.5.1  Data exchange 
The CANdesc provides a generic API for splitting a multi-byte (up to 4 bytes) variable to a 
byte sequence with platform transparent access to each byte, and assembling a multi-byte 
(up to 4 bytes) variable from a sequence of bytes. 
12.5.1.1  Splitting 16 bit data 
The  following  function  could  be  used  to  get  platform  independent  access  to  the 
corresponding bytes of 16 bit data variable: 
vuint8 DescGetHiByte(16BitData) 
 
vuint8 DescGetLoByte(16BitData) 
 
12.5.1.2  Splitting 32 bit data 
The  following  function  could  be  used  to  get  platform  independent  access  to  the 
corresponding  bytes of 32 bit data variable: 
vuint8 DescGetHiHiByte(32BitData) 
 
vuint8 DescGetHiLoByte(32BitData) 
 
vuint8 DescGetLoHiByte(32BitData) 
 
vuint8 DescGetLoLoByte(32BitData) 
 
12.5.1.3  Assembling 16 bit data 
The application can create the 16 bit signal from a byte stream using the following API: 
uint16  DescMake16Bit(hiByte, loByte) 
where the hiByte, loByte are the corresponding bytes for the returned 16 bit data. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
74 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.5.1.4  Assembling 32 bit data 
The application can create the 32 bit signal from a byte stream using the following API: 
uint32 DescMake32Bit(HiHiByte, HiLoByte, LoHiByte, LoLoByte) 
where the HiHiByte, HiLoByte, LoHiByte, LoLoByte are the corresponding bytes for the 
returned 32 bit dat 
12.6  Functions 
12.6.1  Administrative Functions 
12.6.1.1  DescInitPowerOn() 
DescInitPowerOn 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescInitPowerOn (DescInitParam initParameter) 
Multi Context 
void DescInitPowerOn (DescInitParam initParameter) 
Parameter 
initParameter 
Manufacturer specific type, please refer ‘CANdesc: OEM 
specifics’ document  
Return code 


Functional Description 
PowerOn Initialization of the CANdesc.  
This function has to be called once before all other functions of CANdesc after PowerOn. 
Pre-conditions 
Correctly initialized CAN-driver via CanInitPowerOn() and TransportLayer via 
TpInitPowerOn()
Call context 
Background-loop level with global disabled interrupts 
Particularities and Limitations 
>  DescInitPowerOn (initParameter) must be called after TpInitPowerOn() was called 
(please refer to the /TPMC/ documentation), otherwise the reserved diagnostic 
connection will be los 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
75 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.1.2  DescInit() 
DescInit 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescInit (DescInitParam initParameter) 
Multi Context 
void DescInit (DescInitParam initParameter) 
Parameter 
initParameter 
Manufacturer specific type, please refer ‘CANdesc Part IV: 
OEM specifics’ document  
Return code 


Functional Description 
Re-initialization of CANdesc.  
This function can be called to re-initialize CANdesc (e.g. after WakeUp). All internal states 
will be set to default, except the states in this initParameter (e.g. Session or 
CommunicationControl). 
Pre-conditions 
CANdesc was once initialized via DescInitPowerOn () 
Call context 
Background-loop level with global disabled 
 
12.6.1.3  DescTask() 
DescTask 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescTask (void) 
Multi Context 
void DescTask (void) 
2015, Vector Informatik GmbH 
Version: 3.09.00 
76 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 

-  
Return code 


Functional Description 
The function DescTask() has to be called periodically (cycle time TDescCallCycle) by the 
application. 
Within the context of this function the interaction with the application is performed. In 
addition the monitoring of the timings is done, therefore the accuracy of the timings 
depends on the call cycle and on the accuracy of the calls. 
Pre-conditions 

Call context 
Background-loop level or OSEK-OS Task. The task should have a lower or equal priority 
than all other interaction to the CANdesc component. 
Particularities and Limitations 
>  May not be called if the DescStateTask() and DescTimerTask() are called. 
>   
 
 
 
12.6.1.4  DescStateTask() 
DescStateTask 
Available since 4.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescStateTask (void) 
Multi Context 
void DescStateTask (void) 
Parameter 

-  
Return code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
77 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
Motivation: Using a single task function for timers and processing leads either to slow 
processing or to faster timers which costs runtime for the ECU. The timers need very 
stable cyclical call but the processing tasks may be done “as soon as possible” (i.e. using 
OSEK to be assigned to lower priority task). 
The function DescStateTask() has to be called periodically by the application. It is not a 
timer task – it has no specific time period. As smaller this tasks call period is, so faster will 
be the service processing.  
This task function will process received request and to control the transmission of the 
responses. Depending on the ECU requirements it is recommended to call this task as 
soon as possible to avoid delays of the response (e.g. dynamically defined DID, 
scheduled data, etc.), but take into account that within this task the corresponding 
MainHandler will be executed too.
 
Pre-conditions 

Call context 
Background-loop level or OSEK-OS Task. The Task should have a lower or equal priority 
than all other interaction to the CANdesc component. 
Particularities and Limitations 
>  May not be called if the DescTask() is used (reentrancy is forbidden). 
>   
 
 
 
12.6.1.5  DescTimerTask() 
DescTimerTask 
Available since 4.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescTimerTask (void) 
Multi Context 
void DescTimerTask (void) 
Parameter 

-  
Return code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
78 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
Motivation: Using a single task function for timers and processing leads either to slow 
processing or to faster timers which costs runtime for the ECU. The timers need very 
stable cyclical call but the processing tasks may be done “as soon as possible” (i.e. using 
OSEK to be assigned to lower priority task). 
The function DescTimerTask() has to be called periodically by the application in the 
configured task period. It can be called as slow as possible to free run time resources. 
 
Pre-conditions 

Call context 
Background-loop level or OSEK-OS Task. The Task should have a lower or equal priority 
than all other interaction to the CANdesc component. 
Particularities and Limitations 
>  May not be called if the DescTask() is used. This will lead to either reentrancy 
(consistency) problems or/and to timing issues. 
>   
 
12.6.1.6  DescGetActivityState() 
DescGetActivityState 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
DescContextActivity DescGetActivityState (void) 
Multi Context 
DescContextActivity DescGetActivityState (vuint8 iContext) 
Parameter 
iContext 
reference to the corresponding request context 
2015, Vector Informatik GmbH 
Version: 3.09.00 
79 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Return code 
1. kDescContextIdle 
There is currently no request processing (even when 
scheduler is active). 
2. kDescContextActiveRxBegin 
Currently request reception is active. 
Reception finished, request will be processed. 
3. kDescContextActiveRxEnd 
The request was received, is under processing now 
4. kDescContextActiveProcess 
DescProcessingDone called waiting for data before 
starting the transmission. 
5. kDescContextActiveProcessEnd  Ready for response transmission. 
Transmission of the response is currently active. 
6. kDescContextActiveTxReady 
Transmission/processing ended. Post-processing  will be 
7. kDescContextActiveTx 
performed. 
8. kDescContextActivePostProcess 
 
Functional Description 
Motivation: Sometimes the knowledge about the presence of a tester is necessary. A typical 
use-case is to avoid the ECU from going into sleep mode.  
A non-default session indicates that a tester is present. But how can this be done, if the ECU is 
in the default session? 
Due to that fact  the ECU application can call the function DescGetActivityState() any time to 
check if CANdesc has something to do or is in idle mode. This can be used e.g. to change the 
state of the ECU sleep mode.  
Note: The return value is bit coded and  any senseful combination of the above mentioned 
values is possible (e.g. kDescContextActiveRxBegin | kDescContextActivePostProcess). 
Please check always with bit test (and operation) and not using the value comparison.   
Pre-conditions 

Call context 

Particularities and Limitations 
>   
 
12.6.2  Multi Variant Configuration Functions 
12.6.2.1  DescInitConfigVariant() 
DescInitConfigVariant 
Available since 6.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context and Multi Context 
void DescInitConfigVariant (DescVariantMask varMask) 
2015, Vector Informatik GmbH 
Version: 3.09.00 
80 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 
varMask 
Contains the VSG(s) that shall be active additionally to the base 
variant 
Return code 


Functional Description 
After CANdesc has been initialized via one of the APIs  
DescInitPowerOn  
or  
DescInit; 
the base variant will be only active (please refer to chapter 8 Multi Identity  for more 
details). If additionally other variants shall be activated, this API shall be called with a 
parameter value that represents the variants (multiple variants can be OR-ed) that shall 
be activated. 
 
The variant values that shall be used for building the API parameter value are located in 
the desc.h file. The naming convention is as follows: 
kDescVariant<variant/VSG qualifier> 
 
Pre-conditions 
-Multi- variant (VSG) mode is activated for CANdesc. 
Call context 
-  
Particularities and Limitations 
>  Shall not interrupt the DescTask function. 
>  Best place to call this API is immediately after the CANdesc initialization API-call while 
the interrupts are still locked. 
 
12.6.2.2  DescGetConfigVariant() 
DescGetConfigVariant 
Available since 6.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context and Multi Context 
DescVariantMask DescGetConfigVariant (void) 
Parameter 

 
2015, Vector Informatik GmbH 
Version: 3.09.00 
81 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Return code 
Variant mask 
Represents the bit-mapped value of the currently active variants 
in the ECU. 
Functional Description 
This API returns the bit-mapped value of the currently active variants set in CANdesc.  
 
The variant values that shall be used for checking the API return value are located in the 
desc.h file. The naming convention is as follows: 
kDescVariant<variant/VSG qualifier> 
 
Pre-conditions 
-Multi- variant (VSG) mode is activated for CANdesc. 
Call context 
- This API can be called from any call-context.  
Particularities and Limitations 
>  
 
 
12.6.3  Service Functions 
12.6.3.1  DescSetNegResponse() 
DescSetNegResponse 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescSetNegResponse (DescNegResCode errorCode) 
Multi Context 
void DescSetNegResponse (vuint8 iContext, DescNegResCode errorCode) 
Parameter 
iContext 
reference to the corresponding request context 
errorCode 
the errorCode is the one of the provided error code constants 
of CANdesc in the desc.h file with the following naming 
convention: 
kDescNrc<error name>
Return code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
82 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
In the PreHandler or in the MainHandler function the application has the possibility of 
forcing negative response with a certain negative response code for the current request 
when it is necessary. 
Pre-conditions 

Call context 
Within a ‘Service PreHandler’ function and within or after a ‘Service MainHandler’ function 
Particularities and Limitations 
>  Once an error was set it can not be overwritten or reset.  
>  This function does not finish the processing of the request. It just sets a certain error 
and after that the application must confirm that the request processing was completely 
finished by calling DescProcessingDone(). 
 
12.6.3.2  DescProcessingDone() 
DescProcessingDone 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescProcessingDone (void) 
Multi Context 
void DescProcessingDone (vuint8 iContext) 
Parameter 
iContext 
reference to the corresponding request context 
Return  code 


Functional Description 
After completing the request execution the application must call the API function. 
By calling this function, depending on the previous actions of the application the CANdesc 
module will either send a response (positive/negative depending on the error state 
machine) or no response will be send if the application/CANdesc decides that there must 
be no response (please refer the Part III User Manual) 
Pre-conditions 

Call context 
Within or after a ‘Service MainHandler’ function 
2015, Vector Informatik GmbH 
Version: 3.09.00 
83 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
 
12.6.4  Service callback functions 
In CANdesc 6 the naming convention of the service callback function has changed due to 
standardization reasons. In Table 12-3, the new naming convention can be found. Earlier 
versions of CANdesc (< 6.0) used always Service-Qualifiers and Instance-Qualifiers from 
the  CDD  file.  Since  CANdesc  6,  for  Service-Qualifiers  always  standardized  names  are 
used,  whereas  for  Instance-Qualifiers  either  a  standardized  name  or  the  name  from  the 
CDD file is used. The names of the service callback functions are based on the following 
pattern: 
ApplDesc[Pre|Post]<ServiceQualifier><DiagInstanceQualifier> 
When migrating to CANdesc 6 the service callbacks have to be renamed according to the 
new naming convention. 
Service 
SubService 
Instance-Qualifier 
Service-Qualifier 
0x01 
Default 
0x10 
0x02 
Programming 
StartSession 
0x03 
Extended 
0x01 
Hard 
0x02 
KeyOffOn 
0x11 
0x03 
Soft 
EcuReset 
0x04 
EnableRapidShutDown 
0x05 
DisableRapidShutDown 
0x14 
None 
DiagInfo 
Clear 
0x01 
RNODTCBSM 
ReadDtc 
0x02 
RDTCBSM 
0x03 
RDTCSSI 
0x04 
RDTCSSBDTC 
0x05 
RDTCSSBRN 
0x06 
RDTCEDRBDN 
0x07 
RNODTCBSMR 
0x08 
RDTCBSMR 
0x19 
0x09 
RSIODTC 
0x0A 
RSUPDTC 
0x0B 
RFTFDTC 
0x0C 
RFCDTC 
0x0D 
RMRTFDTC 
0x0E 
RMRCDTC 
0x0F 
RMMDTCBSM 
0x10 
RMDEDRBDN 
0x11 
RNOMMDTCBSM 
2015, Vector Informatik GmbH 
Version: 3.09.00 
84 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Service 
SubService 
Instance-Qualifier 
Service-Qualifier 
0x12 
RNOOBDDTCBSM 
0x13 
ROBDDTCBSM 
0x14 
RDTCFDC 
0x15 
RDTCWPS 
0x16 
RDTCRDIDBDN 
0x41 
RWWHOBDNDTCBMR 
0x42 
RWWHOBDDTCBMR 
0x55 
RWWHOBDDTCWPS 
0x22 
Any 
Instance-Qualifier from CDD 
ReadDid 
0x23 
None 
MemoryByAddress 
Read 
0x24 
Any 
Instance-Qualifier from CDD 
ReadScalingDid 
Odd Id 
GetSeed 
0x27 
Instance-Qualifier from CDD 
Even Id 
SendKey 
0x00 
EnableRxEnableTx 
0x01 
EnableRxDisableTx 
0x28 
CommCtrl 
0x02 
DisableRxEnableTx 
0x03 
DisableRxDisableTx 
0x01 
ReadDidSlow 
0x02 
ReadDidMed 
0x2A 
Instance-Qualifier from CDD 
0x03 
ReadDidFast 
0x04 
ReadDidStop 
0x01 
DynDefineByDid 
0x2C 
0x02 
Instance-Qualifier from CDD 
DynDefineByAddr 
0x03 
DynDefineClear 
0x2E 
Any 
Instance-Qualifier from CDD 
WriteDid 
0x00 
IoCtrlRetCtrlToEcu 
0x01 
IoCtrlRstToDefault 
0x2F 
Instance-Qualifier from CDD 
0x02 
IoCtrlFrzCurrState 
0x03 
IoCtrlShortTermAdj 
0x01 
RtnCtrlStart 
0x31 
0x02 
Instance-Qualifier from CDD 
RtnCtrlStop 
0x03 
RtnCtrlReqRes 
0x34 
None 
  
RequestDownload 
0x35 
None 
  
RequestUpload 
0x36 
None 
  
TransferData 
0x37 
None 
  
RequestTransferExit 
0x3D 
None 
MemoryByAddress 
Write 
0x3E 
0x00 
TesterPresent 
Send 
0x84 
None 
  
SecuredDataTransmission 
2015, Vector Informatik GmbH 
Version: 3.09.00 
85 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Service 
SubService 
Instance-Qualifier 
Service-Qualifier 
0x01 
Enable 
0x85 
ControlDtcSetting 
0x02 
Disable 
0x00 
Stop 
0x01 
OnDtcStatChg 
0x02 
OnTmrInt 
0x03 
OnChgOfDid 
0x04 
ReportActEv 
0x05 
Start 
0x06 
Clear 
0x07 
OnCompOfVal 
0x86 
Roe 
0x40 
StStop 
0x41 
StOnDtcStatChg 
0x42 
StOnTmrInt 
0x43 
StOnChgOfDid 
0x44 
StReportActEv 
0x45 
StStart 
0x46 
StClear 
0x47 
StOnCompOfVal 
0x01 
VerifyFixedBaudrate 
0x87 
0x02 
VerifySpecificBaudrate 
LinkControl 
0x03 
TransitionBaudrate 
Table 12-3 Naming convention of service callback functions in CANdesc 6 
12.6.4.1  Service PreHandler 
ApplDescPre<Service-Qualifier + Instance-Qualifier>> 
Available since 2.00.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescPre<Service-Qualifier + Instance-Qualifier> (void) 
Multi Context 
void ApplDescPre<Service-Qualifier + Instance-Qualifier>  (vuint8 iContext) 
Parameter 
iContext 
the current request context location 
Return  code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
86 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
The PreHandler is executed before the Service MainHandler is called. In the PreHandler, 
the application can hook any (especially application-specific) state validations. One 
PreHandler implementation may be shared with different service instances (only 
CANdesc).  
To allow quite complex operations to take place, the application has access to the request 
data using the context data structure (if given).  
Pre-conditions 
Must be configured to ‘User’ in attribute ‘PreHandlerSupport’’ 
Call context 
From DescTask() 
Particularities and Limitations 
 
12.6.4.2  Service MainHandler 
ApplDesc<Service-Qualifier + Instance-Qualifier> 
Available since 2.00.00 
Is callback 
 
Prototype 
Single Context 
void ApplDesc<Service-Qualifier + Instance-Qualifier> (DescMsgContext* pMsgContext) 
Multi Context 
void ApplDesc<Service-Qualifier + Instance-Qualifier> (DescMsgContext* pMsgContext) 
Parameter 
pMsgContext 
typedef struct  

  DescMsg          reqData; 
  DescMsgLen       reqDataLen;  
  DescMsg          resData; 
  DescMsgLen       resDataLen;  
  DescMsgAddInfo   msgAddInfo; 
  vuint8           iContext; 
  t_descUsdtNetBus busInfo;  
} DescMsgContext; 
2015, Vector Informatik GmbH 
Version: 3.09.00 
87 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
DescMsgAddInfo    DescBitType reqType   :2; /* 0x01: Phys 0x02: Func */  
  DescBitType resOnReq  :2; /* 0x01: Phys 0x02: Func */  
  DescBitType suppPosRes:1; /* 0x00: No   0x01: Yes  */ 
Read access 
pMsgContext->reqData   
pointer to the first byte of the already extracted request data. 
pMsgContext->reqDataLen  
length of the extracted request data. 
pMsgContext->iContext  
the current request context location 
(used only as a handle - DO NOT MODIFY). 
pMsgContext->msgAddInfo.reqType  
the current request addressing method. Could be either 
‚kDescFuncReq’ or ‚kDescPhysReq’ (bitmapped). 
pMsgContext->msgAddInfo.suppPosRes  
if set, no positive response will be sent. (UDS only). 
pMsgContext->busInfo 
the current request communication information (i.e. driver type (CAN, 
MOST, FlexRay, etc.), addressing information, communication channel 
number, tester address (if applicable) etc. 
Write access 
pMsgContext->resData  
pointer to the first position where the response data can be written. 
pMsgContext->resDataLen  
length of the written data. 
pMsgContext->msgAddInfo.resOnReq  
can be used to disable the response transmission on the current 
request. If set to ‘0’ no response will be transmitted. Physical and 
function can be set separately (bitmapped).  
Return  code 


Functional Description 
The MainHandler processes the service request. 
Perform length validation for varying length information of request. 
Disassemble any data received with the request telegram and process it,. 
Assemble any data to be send with the response and update current response length. 
Confirm that the processing is finished. 
Pre-conditions 
Must be configured to ‘User’ in attribute ‘MainHandlerSupport’ 
Call context 
From DescTask() 
Particularities and Limitations 
>  If used as MainHandler for Protocol Services, the Protocol-Service-Qualifier is used 
instead 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
88 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.4.3  Service PostHandler 
ApplDescPost<Service-Qualifier + Instance-Qualifier> 
Available since 2.00.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescPost<Service-Qualifier + Instance-Qualifier> (vuint8 status) 
Multi Context 
void ApplDescPost<Service-Qualifier + Instance-Qualifier> (vuint8 iContext, 
vuint8 status) 
Parameter 
iContext 
the current request context location 
status (bit-coded) 
kDescPostHandlerStateOk  
The positive response was transmitted successfully 
kDescPostHandlerStateNegResSent  
It was a negative response 
kDescPostHandlerStateTxFailed   
A transmission error occurred 
Return  code 


Functional Description 
Any state transition may not be performed before the current service is finished 
completely (the last frame of the response is sent successfully).  
The PostHandler is executed after a confirmation of the message transmission is received 
and is designated for state adaptation – all other things are already done when the 
PostHandler is called. 
Pre-conditions 
Must be configured to ‘User’ in attribute ‘PostHandlerSupport’ 
Call context 
From DescTask() 
Particularities and Limitations 
>  If used as PostHandler for Protocol Services, the Protocol-Service-Qualifier is used 
instead 
>  You can override the given name extension (Service-Qualifier + Instance-Qualifier) by 
using the ‘PostHandlerOverrideName’. 
12.6.5  Unknown (User) Service Handling 
In some cases the ECU shall support a service which is not described in the common way 
for CANdesc (by means of CANdelaStudio/GENtool). With a little bit more effort inside the 
application than for the known services the ECU is still be able to support those unknown 
services. The effort  results from the fact  that  CANdesc knows nothing about  this service 
2015, Vector Informatik GmbH 
Version: 3.09.00 
89 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
(e.g.  session,  security  or  other  states  described  in  the  CDD  configuring  CANdesc, 
addressing methods allowed for those services, etc.) and therefore the application must do 
this  work  for  each  unknown  service  by  itself.  In  fact  for  CANdesc  there  is  only  one 
unknown service and it is up to the application to differentiate between multiple unknown 
service(s).  
Attention: This feature is available since version 2.11.00 of CANdesc(Basic). 
12.6.5.1  How it works 
If the feature  “Unknown Services Acceptance” is enabled in  the GENtool CANdesc uses 
following handling: 
if  a  service  was  not  recognized  by  its  SID,  before  the  automatic  negative  response 
transmission  will  be  sent,  the  application  will  be  called  (see  12.6.5.2 
ApplDescCheckUserService) 
to check this SID too. If it can not recognize it as a valid one 
the usual negative response will be sent. 
If the application has accepted the SID, then a special Unknown Service MainHandler will 
be called (see 12.6.5.4 Unknown (User) Service MainHandler). 
If in GENtool “Unknown Services Post Handler Calls” is set, after the request processing 
has  been  accomplished,  a  special  Unknown  service  PostHandler  will  be  called  (see 
12.6.5.5 Unknown (User) Service PostHandler). 
Note: 
Since CANdesc doesn’t distinguish among unknown services, a special API was designed 
to get the application the opportunity to dispatch among the SIDs (in MainHandler and in 
the PostHandler). 
The unknown services are processed on service id level which means the application shall 
dispatch and do the whole format check of these requests. The state management shall be 
performed bye application, too. 
 
12.6.5.2  ApplDescCheckUserService() 
ApplDescCheckUserService 
Available since 2.11.00 
Is callback 
 
Prototype 
Single Context 
vuint8 ApplDescCheckUserService (DescMsgItem sid) 
Multi Context 
vuint8 ApplDescCheckUserService (DescMsgItem sid) 
Parameter 
sid 
The service identifier which is currently under processing. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
90 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Return  code 
kDescOk 
Return this value if the service id is a “user defined” one. 
Return this value if the service id is unknown for the application 
kDescFailed 
too. 
Functional Description 
The currently received request contains a service Id unkown to CANdesc. Within this 
function the ECU application has to decide immediately if the SID is known or not. 
Depending on the return value, CANdesc will process this request further or will reject it 
by sending a negative response ‘ServiceNotSupported’. 
Pre-conditions 
The “Unknown Services Acceptance” option is enabled in the GENtool configuration. 
Call context 
From DescTask() (in KWP diagnostics also from RxInterrupt). 
Particularities and Limitations 
 
 
12.6.5.3  DescGetServiceId() 
DescGetServiceId 
Available since 2.11.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
DescMsgItem DescGetServiceId (void) 
Multi Context 
DescMsgItem DescGetServiceId (vuint8 iContext) 
Parameter 
iContext 
The current request context location 
Return  code 
DescMsgItem 
The service id which is currently under processing. 
Functional Description 
Reports the service id of the currently processed unknown-service request. 
Pre-conditions 
The “Unknown Services Acceptance” option is enabled in the GENtool configuration. 
Call context 
From DescTask() 
2015, Vector Informatik GmbH 
Version: 3.09.00 
91 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
>  This function may be called at any time within a diagnostic request life cycle starting at 
the call of the MainHandler and ending by the PostHandler (if configured) or (if none 
configured) by calling  DescProcessingDone 
 
12.6.5.4  Unknown (User) Service MainHandler 
ApplDescUserServiceHandler 
Available since 2.11.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescUserServiceHandler (DescMsgContext* pMsgContext) 
Multi Context 
void ApplDescUserServiceHandler (DescMsgContext* pMsgContext) 
Parameter 
pMsgContext 
Please refer to section 12.6.4.2 Service MainHandler for details about 
this parameter. 
Read Access 
pMsgContext->reqData  
pointer to the first byte after the service Id. 
The other members of the parameter are described in 12.6.4.2 Service 
MainHandler 

Write access 
pMsgContext->resData  
pointer to the first byte after the response SID, where the data (incl. sub-
parameters) will be written. 
The other members of the parameter are described in 12.6.4.2 Service 
MainHandler 

Return  code 


Functional Description 
This MainHandler is called for all unknown service requests at service id level, so the 
application has to do following: 
Perform service id dispatching (if more than one user defined service shall be used). 
Perform length validation for varying length information of request. 
Perform parameter (if any) validation. 
Disassemble any data received with the request telegram and process it. 
Assemble any data to be send with the response and update current response length 
Confirm that the processing is finished. 
Pre-conditions 
The “Unknown Services Acceptance” option was enabled in the GENtool configuration. 
Call context 
From DescTask() 
2015, Vector Informatik GmbH 
Version: 3.09.00 
92 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
>  Please refer the section 12.6.4.2 Service MainHandler. 
>  DescGetServiceId() may be called here to dispatch the SID of the currently processed 
unknown service (please refer to 12.6.5.3 DescGetServiceId) 
 
12.6.5.5  Unknown (User) Service PostHandler 
ApplDescPostUserServiceHandler 
Available since 2.11.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescPostUserServiceHandler (vuint8 status) 
Multi Context 
void ApplDescPostUserServiceHandler (vuint8 iContext, vuint8 status) 
Parameter 
iContext, status 
Please refer to section 12.6.4.3 Service PostHandler for 
information. 
Return  code 


Functional Description 
The functionality of the user service PostHandler is the same as the one of the normal 
service PostHandler. Please refer to 12.6.4.3 Service PostHandler for more details. 
Pre-conditions 
The “Unknown Services Post Handler Calls” option was enabled in the GENtool 
configuration. 
CANdesc version >= 2.11.00 
Call context 
From DescTask() 
Particularities and Limitations 
>  Please refer to section 12.6.4.3 Service PostHandler for information. 
>  DescGetServiceId() may be called here to dispatch the SID of the currently post-
processed user service (please refer to 12.6.5.3 DescGetServiceId) 
12.6.6  Session Handling 
12.6.6.1  ApplDescCheckSessionTransition() 
ApplDescCheckSessionTransition 
Available since 2.00.00 
Is callback 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
93 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Prototype 
Single Context 
void ApplDescCheckSessionTransition (DescStateGroup newState, DescStateGroup 
formerState) 
Multi Context 
void ApplDescCheckSessionTransition (vuint8 iContext, DescStateGroup newState, 
DescStateGroup formerState) 
Full message Context 
void ApplDescCheckSessionTransition (DescMsgContext* pMsgContext, DescStateGroup 
newState, DescStateGroup formerState) 
Parameter 
pMsgContext 
Pointer to the current message context (refer to 12.6.4.2) 
iContext 
the current request context location 
newState 
the CANdesc component has change to this session state 
formerState 
the CANdesc component has change from this session state 
Return  code 


Functional Description 
This hook function will be called, while session request is received (SID $10). If the 
application wants to discard this request, an error must be set (via 
DescSetNegResponse() ).  
The application always has to confirm this hook function via 
DescSessionTransitionChecked().  
Both above functions can be called also outside of the context of this function (e.g. 
application task waiting for results form an I/O port). CANdesc will send RCR-RP 
response as long as the application delays the confirmation for the session transition. 
 
In some cases the application has to know whether the SPRMIB in the request was set or 
not. Since this API call does not contain this information, a dedicated API in CANdesc 
provides it: DescIsSuppressPosResBitSet (). 
Pre-conditions 
At least one DiagnosticSessionControl service must be configured to ‘OEM’ in attribute 
‘MainHandlerSupport’ 
Call context 
From DescTask() 
2015, Vector Informatik GmbH 
Version: 3.09.00 
94 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
>  Call the API function DescSessionTransitionChecked() to end the service processing 
>   
 
12.6.6.2  DescSessionTransitionChecked() 
DescSessionTransitionChecked 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescSessionTransitionChecked (void) 
Multi Context 
void DescSessionTransitionChecked (vuint8 iContext) 
Parameter 
iContext 
the current request context location 
Return  code 


Functional Description 
After the application has finished the processing in the hook function 
ApplDescCheckSessionTransition() this function must be called.  
Pre-conditions 
At least one DiagnosticSessionControl service must be configured to ‘OEM’ in attribute 
‘MainHandlerSupport’ 
Call context 
Within or after a ‘ApplDescCheckSessionTransition() function 
Particularities and Limitations 
>  If this function will be called late, the CANdesc component sends automatically the 
RCR-RP responses 
 
12.6.6.3  DescIsSuppressPosResBitSet () 
DescIsSuppressPosResBitSet 
Available since 5.07.14 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
2015, Vector Informatik GmbH 
Version: 3.09.00 
95 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
DescBool DescIsSuppressPosResBitSet (void) 
Multi Context 
DescBool DescIsSuppressPosResBitSet (vuint8 iContext) 
Parameter 
iContext 
the current request context location 
Return  code 
kDescTrue 
The SPRMIB is set. 
The SPRMIB is NOT set. 
kDescFalse 
Functional Description 
This API can be always called while a diagnostic service processing is ongoing to get the 
information about the SPRMIB state. All main-handlers do contain this information already 
in the pMsgContext parameter so use it instead of this API.  
In some other cases the application does not have access to the pMsgContext, and there 
the API can be used. 
Pre-conditions 
Only for UDS configurations. 
May be called only while a diagnostic service processing is ongoing. Otherwise invalid 
data can be reported. 
Call context 
Any. 
Particularities and Limitations 
>   
 
 
12.6.6.4  ApplDescOnTransitionSession() 
ApplDescOnTransitionSession 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void ApplDescOnTransitionSession (DescStateGroup newState,  
                                  DescStateGroup formerState) 
Multi Context 
void ApplDescOnTransitionSession (DescStateGroup newState,  
                                  DescStateGroup formerState) 
2015, Vector Informatik GmbH 
Version: 3.09.00 
96 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 
newState 
the CANdesc component has change to this session state 
formerState 
the CANdesc component has change from this session state 
Return  code 


Functional Description 
After the positive response of a SessionControl request the session will transit to the 
requested session. This function informs the application that such a transition occurs. 
Pre-conditions 

Call context 
From DescTask()  
interrupts might be disabled  
Particularities and Limitations 
>  Only informational function 
 
12.6.6.5  DescSetStateSession() 
DescSetStateSession 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescSetStateSession (DescStateGroup newSession) 
Multi Context 
void DescSetStateSession (DescStateGroup newSession) 
Parameter 
newSession 
the CANdesc component will change to this session state 
Return  code 


Functional Description 
By this function the state of the SessionState-group can be changed by the ECU 
application. The transition notification function ‘ApplDescOnTransitionSession’ will be 
called to notify the application about the new session.  
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
97 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Pre-conditions 

Call context 

Particularities and Limitations 
>  Please refer to section 12.6.11.2 "DescSetState<StateGroup>()” for more details. 
 
12.6.6.6  DescGetStateSession() 
DescGetStateSession 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
currentSession DescGetStateSession (void) 
Multi Context 
currentSession DescGetStateSession (void) 
Parameter 

 
Return  code 
currentSession 
 
Functional Description 
This function returns the current session state. Since the states are bit-coded the 
evaluation expressions may be optimized for multiple use cases. 
Example: Code execution only when either default or extended session is active. 
lState = DescGetStateSession(); 
if ( (lState & (kDescStateSession<Default>) | kDescStateSession<Extended>)) != 0 ) 

 /*execute code*/ 

Pre-conditions  

Call context 

2015, Vector Informatik GmbH 
Version: 3.09.00 
98 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
>  Please refer to section 12.6.11.1 “DescGetState<StateGroup>()” for more details. 
 
 
 
 
 
 
12.6.6.7  DescGetSessionIdOfSessionState 
DescGetSessionIdOfSessionState  
Available since 3.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Any Context 
DescMsgItem DescGetSessionIdOfSessionState (DescStateGroup sessionState) 
Parameter 
sessionState 
- Must be one of the valid session states (i.e. the value of the 
API DescGetStateSession() ). 
Return code 
DescMsgItem 
- Is the corresponding session identifier value. 
Functional Description 
This function provides a conversion from a session state to its corresponding session 
identifier (e.g. calling this function with parameter kDescStateSessionDefault will return 
0x01). 
Pre-conditions 

Call context 

Particularities and Limitations 
>   
 
12.6.7  CommunicationControl Handling 
This  API  is  provided,  if  the  ECU  supports  the  serviceCommunicationControl  (UDS)  or 
service 0x28/0x29 Dis-/EnableNormalMessageTransmission (KWP).  
2015, Vector Informatik GmbH 
Version: 3.09.00 
99 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.7.1  ApplDescCheckCommCtrl() 
ApplDescCheckCommCtrl 
Available since 2.00.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescCheckCommCtrl (DescOemCommControlInfo* commControlInfo) 
Multi Context 
void ApplDescCheckCommCtrl (vuint8 iContext,  
                            DescOemCommControlInfo* commControlInfo) 
Parameter 
iContext 
The current request context location 
commControlInfo 
OEM dependent 
Return  code 


Functional Description 
The execution of this service is completely done within the CANdesc component. This 
hook function can be used to permit the application to reject the execution under some 
circumstance. If the application wants to discard this request, an error must be set (via 
DescSetNegResponse()). 
The application always has to confirm this hook function (via DescCommCtrlChecked()). 
Pre-conditions 
The CommunicationControl service must be activated and the attribute 
‘MainHandlerSupport’ has to be set to ‘OEM’ 
Call context 
From DescTask() 
Particularities and Limitations 
>  If the API function DescCommCtrlChecked() will be not called, the service processing 
will not end 
 
12.6.7.2  DescCommCtrlChecked() 
DescCommCtrlChecked 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
2015, Vector Informatik GmbH 
Version: 3.09.00 
100 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
void DescCommCtrlChecked (void) 
Multi Context 
void DescCommCtrlChecked (vuint8 iContext) 
Parameter 
iContext 
the current request context location 
Return  code 


Functional Description 
The CANdesc component calls a hook function to check for the execution permission of 
the CommunicationControl service. Within or after this hook function 
(ApplDescCheckCommCtrl()) the application can set an error 
(DescSetNegResponse()) to reject the request. This function is used to terminate the 
hook function ApplDescCheckCommCtrl(). 
Pre-conditions 
The CommunicationControl service must be activated and the attribute 
‘MainHandlerSupport’ has to be set to ‘OEM’ 
Call context 
Within or after ApplDescCheckCommCtrl() 
Particularities and Limitations 
>   
 
12.6.8  Periodic call of ‘Service MainHandler’ 
12.6.8.1  DescStartRepeatedServiceCall() 
DescStartRepeatedServiceCall 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescStartRepeatedServiceCall (DescMainHandler descMainHandler) 
Multi Context 
void DescStartRepeatedServiceCall (vuint8 iContext, DescMainHandler descMainHandler) 
Parameter 
descMainHandler 
Reference to a function. The function prototype must be based 
on a ‘Service MainHandler’. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
101 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
iContext 
The current request context location 
Return  code 


Functional Description 
The application can use this function to get a periodic call to the specified function (in the 
parameter) from the CANdesc component.  
It is possible to use the same ‘Service MainHandler’ function as it is called in. 
Pre-conditions 
 
Call context 
Within or after a ‘Service MainHandler’ function 
Particularities and Limitations 
>  CANdesc can do no validation, if this pointer is valid. 
>  Is the parameter NULL, the periodic calls will get stopped. 
>  The function is called in the same cycle time (context) as the DescTask() 
 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
102 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.8.2  DescStartMemByAddrRepeatedCall() 
DescStartMemByAddrRepeatedCall 
Available since 5.06.04 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescStartMemByAddrRepeatedCall () 
Multi Context 
void DescStartMemByAddrRepeatedCall (vuint8 iContext) 
Parameter 
iContext 
The current request context location 
Return  code 


Functional Description 
The application can use this function to get a periodic call to the current Read/Write 
memory by address handler. 
Pre-conditions 
 
Call context 
Within ApplDescReadMemoryByAddress or ApplDescWriteMemoryByAddress. 
Particularities and Limitations 
>  The memory access handler is called in the same cycle time (context) as the 
DescTask() 
 
12.6.9  Ring Buffer Mechanism 
The ring-buffer option can be used to save RAM when some responses are quite long and 
reserving such space of RAM is impossible. In contrast to the linear responses, where the 
response data will be first written and then the transmission to the tester will be initiated, 
the ring-buffer concept starts a transmission as soon as it has either the whole data (for 
short [single frame] responses) or at least enough data to fill a first-frame of a multi-frame 
transmission.  Once  the  ring  buffer  has  been  activated  and  the  response  transmission 
initiated, the application must supply enough data to keep the transmission away from lack 
of data. In multiple PID mode, the application can decide in each PID main handler to use 
the  ring  buffer  or  not.  However,  if  one  of  the  PIDs  has  dynamic  length,  the  ring  buffer 
mechanism can not be used for any PID in the list. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
103 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
 
Note 
The ring buffer should only be used for long responses, because using the ring buffer 
  instead of the linear buffer causes a runtime overhead. 
 
 
 
 
12.6.9.1  DescRingBufferStart() 
DescRingBufferStart 
Available since 2.00.00 

Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescRingBufferStart (void) 
Multi Context 
void DescRingBufferStart (vuint8 iContext) 
Parameter 
iContext 
reference to the corresponding request context 
Return  code 


Functional Description 
After completing the request validation the application can decide (in runtime), if the ring-
buffer mechanism should be used or not.  
By calling this function, the decision is made to use the ring-buffer. Otherwise 
DescProcessingDone() should be called, after filling the response data (in a linear way). 
Either DescProcessingDone() or DescRingBufferStart() will finish the response handling. 
Depending on the previous actions of the application the CANdesc module will either send 
a response (positive/negative depending on the error state machine) or no response will 
be send if the application/CANdesc decides that there must be no response (please refer 
the Part III User Manual). 
The transmission of the positive response will not start immediately. The application has to 
fill the ring-buffer first. If the ring-buffer has enough data, the transmission will be started 
(internally).  
Pre-conditions 
- ring-buffer has been enabled in the configuration 
Call context 
Within or after a ‘Service MainHandler’ function 
2015, Vector Informatik GmbH 
Version: 3.09.00 
104 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
>  This API must not be called from any of the other handler type (Pre- or PostHandlers) 
>  Either DescProcessingDone() or DescRingBufferStart() must be used to finish the 
response handling. 
>  Total response length must be written before! 
>  No response data must be written before! 
>  This function must not be called in interrupt context 
>  Limitation: Until CANdesc version 2.13.00 it was not possible to use the Ring-Buffer in 
‘Multiple PID’ services (as described in section 9.3.3 Multiple PID mode) 
>  UDS limitation: Always check the SPRMIB prior starting the ring-buffer. If this bit is 
set, the ring-buffer shall not be started. Instead DescProcessingDone() must be called 
(see 13.6). 
>  When Repeated Service Call feature is used for polling a function that fills the Ring-
Buffer, then the function DescStartRepeatedServiceCall() must be called after the 
function DescRingBufferStart(). 
 
12.6.9.2  DescRingBufferWrite() 
DescRingBufferWrite 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
vuint8 DescRingBufferWrite (DescMsg data, DescMsgLen dataLength) 
Multi Context 
vuint8 DescRingBufferWrite (vuint8 iContext, DescMsg data, DescMsgLen dataLength) 
Parameter 
iContext 
Reference to the corresponding request context 
DescMsg 
Pointer to application data, which should be copied into ring-
buffer. 
DescMsgLen 
Amount of data, which should be copied (from pointer data) into 
ring-buffer. 
Return  code 
vuint8 
kDescOk  
If the copy process was successful 
kDescFailed  
if the data are not copied into the ring-buffer 
2015, Vector Informatik GmbH 
Version: 3.09.00 
105 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
The application writes data into the ring-buffer by this function. It is not necessary that the 
application must write the data in the context of a special API function.  
The write order is always linear! The first written byte is the first byte in the response 
message.   
Pre-conditions 
ring-buffer has been enabled in the configuration; 
DescRingBufferStart() must be called first, to activate the ring-buffer mechanism. 
Call context 
- This API shall not interrupt the DescTask. Required for the case the currently ongoing 
transmission is interrupted due to a communication error, and the application still writes 
into the buffer. 
Particularities and Limitations 
>  dataLength must be lower or equal to the ring-buffer size, else the function will 
always fail 
>  CANdesc has already filled the first bytes (SID, etc.) into the ring-buffer. So in the first 
call of DescRingBufferWrite() the dataLength must lower as the buffer size + these byte 
 
12.6.9.3  DescRingBufferCancel() 
DescRingBufferCancel 
Available since 5.01.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescRingBufferCancel (void) 
Multi Context 
void DescRingBufferCancel (vuint8 iContext) 
Parameter 
iContext 
Reference to the corresponding request context 
Return  code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
106 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
The application may call this API once the a data acquisition error has been occurred after 
the ring-buffer has been activated viDescRingBufferStart(). 
 
CANdesc will automatically determine the appropriate action depending on its current 
internal state: 
if the response data transmission has not been started yet, a negative response will be 
sent back. 
If the response transmission has been started – a transmission interrupt will occur – the 
tester will not get a complete response. 
Pre-conditions 
ring-buffer has been enabled in the configuration 
DescRingBufferStart() must be called before to activate the ring-buffer mechanism 
Call context 
-  
Particularities and Limitations 
>   
 
 
12.6.9.4  DescRingBufferGetFreeSpace() 
DescRingBufferGetFreeSpace 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
DescMsgLen DescRingBufferGetFreeSpace (void) 
Multi Context 
DescMsgLen DescRingBufferGetFreeSpace (vuint8 iContext) 
Parameter 
iContext 
reference to the corresponding request context 
Return  code 
DescMsgLen 
The amount of free space/bytes in the ring-buffer. 
Functional Description 
This function returns the amount of free space/bytes in the ring-buffer.  
Pre-conditions 
ring-buffer has been enabled in the configuration 
DescRingBufferStart() must be called before to activate the ring-buffer mechanism 
2015, Vector Informatik GmbH 
Version: 3.09.00 
107 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Call context 

 
12.6.9.5  DescRingBufferGetProgress() 
DescRingBufferGetProgress 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
DescMsgLen DescRingBufferGetProgress (void) 
Multi Context 
DescMsgLen DescRingBufferGetProgress (vuint8 iContext) 
Parameter 
iContext 
reference to the corresponding request context 
Return  code 
DescRingBufferProgress  Current byte position in the whole response.  
Functional Description 
This function returns the progress of the copy process.  
Pre-conditions 
ring-buffer has been enabled in the configuration 
DescRingBufferStart() must be called before to activate the ring-buffer mechanism 
Call context 

Particularities and Limitations 
>   
 
12.6.10 Signal Interface of CANdesc  
CANdesc  will  provide  a  signal  interface  to  the  ECU  application.  This  can  help  the  ECU 
application  to  assemble  the  response  automatically.  No  further  code  changes  are 
necessary, if a signal will move or change its size. 
The  current  implementation  has  only  support  for  a  synchronous  signal  interface.  This 
means  the  ECU  application has  to  provide the  signal  value  within  the  call/context  of  the 
Signal Handler function (while reading) or to write thewithin the call/context of the Signal 
Handler function (while writing). 
2015, Vector Informatik GmbH 
Version: 3.09.00 
108 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.10.1 ApplDesc<Signal-Handler>() 
ApplDesc<Signal-Handler> 
Available since 2.00.00 
Is callback 
 
Prototype 
Single Context 
ApplDesc<Service-Qualifier + Data-Object-Qualifier + Instance-Qualifier> (-) 
Multi Context 
ApplDesc<Service-Qualifier + Data-Object-Qualifier + Instance-Qualifier> (-) 
Parameter 
vuint8, vsint8, 
Available for write services. 
vuint16, vsint16,  
Type depend on signal type 
vuint32, vsint32, 
DescMsg (vuint8*) 
DescMsg (vuint8*) 
Available for read services and signals > 32 bit (N bit) 
Return  code 
vuint8, vsint8, 
Available for read services. 
vuint16, vsint16,  
Type depend on signal type. 
vuint32, vsint32 
Functional Description 
A Signal Handler is generated if the Service MainHandler is configured to be generated. In 
this case, writing Signal Handlers are generated for all dataObjects transported with the 
request and reading Signal Handlers are generated for all dataObjects transported with 
the response (read/write from application point of view).  
The data type of the Signal Handler argument depends on the dataObject which is to be 
processed. 
Pre-conditions 
Must be configured to ‘generated’ in attribute ‘MainHandlerSupport’ 
Call context 
From DescTask() 
Particularities and Limitations 
>   You can override the given name extension (Service-Qualifier + Data-Object-Qualifier 
+ Instance-Qualifier) by using the SignalHandlerOverrideName. 
 
12.6.10.2 Configuration of direct signal access 
Application 
variable 
for 
direct 
access 
(default 

not 
set) 
If  this  variable  is  specified,  an  access  to  the  given  external  (=  application)  variable  is 
generated.  Nothing  has  to  be  done  by  the  application.  The  external  variable  must  be 
defined inside the application. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
109 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
SignalHandlerOverrideName 
(default 

not 
set). 
You can adapt the name of the Signal Handler setting this value. By using this “Override 
Name” it is also possible to reuse an already existing Signal Handler  
12.6.11 State Handling (CANdesc only) 
12.6.11.1 DescGetState<StateGroup>() 
DescGetState<StateGroup> 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
DescStateGroup DescGetState<StateGroup-Qualifier> (void) 
Multi Context 
DescStateGroup DescGetState<StateGroup-Qualifier> (void) 
Parameter 


Return  code 
DescStateGroup 
The current state of the state group 
Functional Description 
This function returns the current session state. Since the states are bit-coded the 
evaluation expressions may be optimized for multiple use cases. 
Example: Code execution only when either the current state of this group is either state X 
or state Y. 
lState = DescGetState< StateGroupQualifier >(); 
if ( (lState & (kDescState< StateGroupQualifier ><StateQualifier_X>) |  
                kDescState< StateGroupQualifier ><StateQualifier_Y>)) != 0 ) 

 /*execute code*/ 

Pre-conditions 

Call context 

Particularities and Limitations 
>  For each state of a state-group a constant is defined in desc.h:  
kDescState<StateGroup-Qualifier><StateQualifier> 
2015, Vector Informatik GmbH 
Version: 3.09.00 
110 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
 
12.6.11.2 DescSetState<StateGroup>() 
DescSetState<StateGroup> 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescSetState<StateGroup-Qualifier> (DescStateGroup newState) 
Multi Context 
void DescSetState<StateGroup-Qualifier> (DescStateGroup newState) 
Parameter 
DescStateGroup 
the state in which the state group should be changed  
Return  code 


Functional Description 
By this function the state of the state-group can be changed by the ECU application. The transition 
notification function ‘ApplDescOnTransition< StateGroupQualifier >’ will be called to notify the 
application about the new state.  
Example: 
 DescSetState<StateGroupQualifier>(kDescState<StateGroupQualifier><StateQualifier>);  
 
This line will force CANdesc to change the state of the given state group to the new one. 
Pre-conditions 

Call context 
-From a task with priority lower or equal to the DescTask. 
Particularities and Limitations 
>  For each state of a state-group a constant will be defined in desc.h:  
kDescState<StateGroup-Qualifier><State-Qualifier> 
>  The ApplDescOnTransition<StateGroup-Qualifier>() notification function is called in any 
case. Also if the newState is the same as the current stat 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
111 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.11.3 ApplDescOnTransition«StateGroup»() 
ApplDescOnTransition«StateGroup» 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void ApplDescOnTransition<StateGroup-Qualifier>(DescStateGroup newState, 
                                                DescStateGroup formerState) 
Multi Context 
void ApplDescOnTransition<StateGroup-Qualifier> (DescStateGroup newState, 
                                                 DescStateGroup formerState) 
Parameter 
newState 
the CANdesc component has changed to this session state 
formerState 
the CANdesc component has changed from this session state 
Return  code 


Functional Description 
This notification function will be called each time a transition has happened.  
Pre-conditions 

Call context 
From DescTask()  
interrupts might be disabled  
Particularities and Limitations 
>  For each state of a state-group a constant will be defined in desc.h:  
kDescState<StateGroup-Qualifier><StateName-Qualifier> 
>  For some exceptions (e.g. Session) the newState can be the same as the formerState. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
112 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.12 Force “Response Correctly Received - Response Pending” transmission 
In  some  cases  it  is  useful  for  the  application  to  be  sure  that  it  has  enough  time  to 
accomplish a  process  without  causing  the  tester  to  get  response timeout.  In  such  cases 
the  application  can  use  the  “force  RCR-RP”  mechanism  of  CANdesc,  which  prevents 
timeout between the tester and the ECU application.  
How it works: 
This feature is mostly applicable when a FlashBootLoader (FBL) is available for the ECU. 
Before  starting  it,  the  application  wants  to  assure  that  there  is  enough  time  to  perform 
reset  and  activate  the  FBL  before  the  tester  gets  response  timeout.  The  RCR-RP 
mechanism notifies the tester that some action is ongoing and so resets the timeout timer 
in the tester. 
To transmit a ‘Response Correctly Received - Response Pending’ response the application 
has  to  call  the  DescForceRcrRpResponse()  function.  To  be  sure  this  response  is 
transmitted,  the  application  has  to  wait  for  the  transmission  confirmation  of  this  forced 
RCR-RP  response  (the  function  ApplDescRcrRpConfirmation).  Depending  on  its 
transmission  status  parameter  the  application  can  decide  how  the  processing  shall 
continue (a jump to FBL or to close the request processingth negative response).  
 
12.6.12.1 DescForceRcrRpResponse() 
DescForceRcrRpResponse 
Available since 2.11.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescForceRcrRpResponse(void) 
Multi Context 
void DescForceRcrRpResponse(vuint8 iContext) 
Parameter 
iContext 
reference to the corresponding request context 
Return  code 


Functional Description 
Calling this function the application can force CANdesc to send immediately (not later than 
the next call of DescTask() function) a RCR-RP response. 
Pre-conditions 
CANdesc was configured to use this option (enabled in the GENtool). 
2015, Vector Informatik GmbH 
Version: 3.09.00 
113 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Call context 
Task or interrupt. 
Particularities and Limitations 
>  This function can be called: 
after a call of a MainHandler function (e.g. ApplDescCheckSessionTransition()
and until the call of ApplDescResponsePendingOverrun() or 
ApplDescResponsePendingOvertimed() orpConfirmation(). 
 
12.6.12.2 ApplDescRcrRpConfirmation() 
ApplDescRcrRpConfirmation 
Available since 2.11.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescRcrRpConfirmation(vuint8 status) 
Multi Context 
void ApplDescRcrRpConfirmation(vuint8 iContext, vuint8 status) 
Parameter 
iContext 
Reference to the corresponding request context 
status 
If the transmission was successful, the parameter value will be 
kDescOk
. Otherwise – kDescFailed. 
Return  code 


Functional Description 
Once the RCR-RP response has been forced, this function will be called in any case. The 
transmission status is reported by the status parameter. 
Pre-conditions 
CANdesc was configured to use this option (enabled in the GENtool). 
Call context 
CAN Driver TX-ISR  TP Confirmation  this function 
Particularities and Limitations 
>  Be aware of time consuming implementation for this function (interrupt call context). 
 
 
12.6.13 DynamicallyDefineDataIdentifier  ($2C) (UDS) functions 
Since this feature is only for some OEM available, please refer to the OEM specific documentation 
to find out if is applicable for your configuration. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
114 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
 
12.6.13.1 DescMayCallStateTaskAgain() 
DescMayCallStateTaskAgain 
Available since 4.00.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
DescBool DescMayCallStateTaskAgain (void) 
Multi Context 
DescBool DescMayCallStateTaskAgain (void) 
Parameter 

-  
Return code 
kDescTrue 
 TRUE if you may call again the state task within this application 
task cycle. 
kDescFalse 
 FALSE if the DescStateTask() must not be called again. 
Functional Description 
Motivation: The DescStateTask() can be called as fast as possible but it still can not be 
enough fast for complex service processing (e.g. DDIDs containing long descriptions) to 
match fast timing-performance requirements. This function provides the info if the 
application may call again the state-task in the same task context without causing endless 
loop (important for non-preemptive OS environments). 
Example of the API usage: 
void ApplDiagTask(void) /* application function called as fast as possible */ 

   do /* pump the state task as long as needed */ 
   { 
     DescStateTask(); 
   } 
   while(DescMayCallStateTaskAgain() == kDescTrue); 

2015, Vector Informatik GmbH 
Version: 3.09.00 
115 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Pre-conditions 
- Preprocessor define “DESC_ENABLE_HIPERFORMANCE_DYNDID_MODE” is 
available (using user-config file in GENtool). 
- The application uses the split-task concept (i.e. calls DescState-/TimerTask() instead of 
DescTask()). 
Call context 
Background-loop level or OSEK-OS Task. The Task should have a lower or equal priority 
than all other interaction to the CANdesc component. 
Particularities and Limitations 
>   
 
 
12.6.13.2 ApplDescCheckDynDidMemoryArea() 
ApplDescCheckDynDidMemoryArea  
Available since 3.02.00 
Must be Reentrant 
 
Is callback 
 
Prototype 
Any Context 
DescDynDidMemCheckResult  ApplDescCheckDynDidMemoryArea ( 
 DescDynDidMemBlockAddress srcAddr, 
 DescDynDidMemBlockSize    len      ); 
Parameter 
srcAddr 
Start address (Service $2C 02 request parameter ‘memoryAddress’). 
len 
Length of block to read (Service $2C 02 request parameter 
‘memorySize’). 
Return code 
memBlockOk 
Permit the access to requested memory block and extend the DDID. 
memBlockInvAddress 
Forbid the access due invalid requested memory address 
(requestOutOfRange). 
memBlockInvSize 
Forbid the access due invalid requested block length 
(requestOutOfRange). 
memBlockInvSecurity 
Forbid the access due current security mode settings prohibit the DDID 
definition (securityAccessDenied). 
memBlockInvCondition  Forbid the access due other restrictions (conditionsNotCorrect). 
If the memory access if forbidden, the Service $2C Request is negative responded with NRC 22 
(conditionsNotCorrect), 31 (requestOutOfRange) or 33 (securityAccessDenied). 
2015, Vector Informatik GmbH 
Version: 3.09.00 
116 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
Functional Description 
This callback function is triggered when defining a DDID that shall read bytes from the ECU’s 
memory (Service Request $2C 02). The application can permit the (re-)definition of the DDID or 
forbid it. 
The service request is responded according to this. 
The application must check 
if the given srcAddr and following len bytes are valid ECU addresses and if they are readable, 
if the current security state allows to define the DDID right now, 
if there are other conditions that may forbid the definition of the DDID. 
If all checks allow the DDID definition, the callback function must return memBlockOk. 
FYI: When later reading the defined DDIDs by service $22, the standard checks [of Service $23 
ReadMemoryByAddress] are executed, that perform security checks before accessing the 
memory. 
So, above security check with service $2C shall prove that the current security state permits the 
definition of the DDID, the security check in service $22 (resp. $23) proves [in the context of the 
then existing security state] the actual reading of the memory range. 
Pre-conditions 

Call context 
From DescTask() 
Particularities and Limitations 
 
 
12.6.13.3 Non-volatile memory support 
For  some  car-manufactures  CANdesc  provides  NVRAM  support  for  the  dynamically 
defined DID definitions. There are some APIs that must be operated and some call-backs 
to be implemented by the application in order to get the NVRAM support fully operational. 
 
The following diagrams show the two oeprations on NVRAM – restore (at power on) and st 
ore (usuall prior power off) data. 
 
Restore data at ECU power on 
 
Caution 
At each CANdesc initialization (e.g. ECU reset/ power on) the “restore” procedure must 
  be performed! 
2015, Vector Informatik GmbH 
Version: 3.09.00 
117 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
 
Figure 12-1 DynDID definition restore and tester interaction 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
118 / 158 
based on template version 5.1.0 



Technical Reference CANdesc 
Store data at ECU power down 
 
Info 
The store operation can be performed at any time not only at power down. 
 
 
 
Figure 12-2 Store DynDID definitions 
 
12.6.13.3.1 DescDynDefineDidPowerUp() 
DescDynDefineDidPowerUp 
Available since 5.06.09 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescDynDefineDidPowerUp (void) 
Multi Context 
void DescDynDefineDidPowerUp (void) 
2015, Vector Informatik GmbH 
Version: 3.09.00 
119 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Parameter 


Return  code 


Functional Description 
Once the ECU has been powered one/reset or just need to be reinitialized, this API must 
be called to restore the dynamically defined DID content. 
 
Usually called after the NVRAM manager is initialized. 
Pre-conditions 
- Service 0x2C needs to store the DynDID definitions to the NVRAM (OEM specific 
requirement) 
Call context 
- any  
Particularities and Limitations 
>  Must be called after DescInitPowerOn(). 
 
12.6.13.3.2 DescDynIdMemContentRestored () 
DescDynIdMemContentRestored 
Available since 5.06.09 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescDynIdMemContentRestored (DescDynDidStorageInfo storageInfo) 
Multi Context 
void DescDynIdMemContentRestored (DescDynDidStorageInfo storageInfo) 
Parameter 
storageInfo.nvData 
Not used 
The size (in bytes) of the restored table. 
storageInfo.nvDataSize  The stored checksum, calculated by CANdesc at store time. 
storageInfo.checkSum 
Return  code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
120 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
After CANdesc has requested the application to restore the DynDID data 
(“ApplDescRestoreDynIdMemContent ()), this API must be called to notify CANdesc that 
the DynDID content has been restored and can be used. 
 
Pre-conditions 
- Service 0x2C needs to store the DynDID definitions to the NVRAM (OEM specific 
requirement) 
Call context 
- any  
Particularities and Limitations 
>  none 
 
12.6.13.3.3 DescDynDefineDidPowerDown () 
DescDynDefineDidPowerDown 
Available since 5.06.09 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void DescDynDefineDidPowerDown (void) 
Multi Context 
void DescDynDefineDidPowerDown (void) 
Parameter 


Return  code 


Functional Description 
If the ECU has to be reset or just power off /shutdown, this API must be called to store the 
current DID definitions.  
 
In order to save E2PROM write cycles, the application may perform compare to the 
current E2PROM content and decide whether to store the table content or not. 
Pre-conditions 
- Service 0x2C needs to store the DynDID definitions to the NVRAM (OEM specific 
requirement) 
Call context 
- any  
2015, Vector Informatik GmbH 
Version: 3.09.00 
121 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Particularities and Limitations 
>  Shall be called prior power-down/shutdown execution 
>  May be called any time to store the current content of the DynDID tables. 
 
12.6.13.3.4 ApplDescStoreDynIdMemContent () 
ApplDescStoreDynIdMemContent 
Available since 5.06.09 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void ApplDescStoreDynIdMemContent (DescDynDidStorageInfo storageInfo) 
Multi Context 
void ApplDescStoreDynIdMemContent (DescDynDidStorageInfo storageInfo) 
Parameter 
storageInfo.nvData 
The pointer to the data to be stored; 
The size (in bytes) of the table; 
storageInfo.nvDataSize  The checksum value, calculated by CANdesc, to be stored. 
storageInfo.checkSum 
Return  code 


Functional Description 
Once this API is called by CANdesc, the application must trigger a write E2PROM 
procedure to store the data given by CANdesc and the checksum value. 
 
In order to save E2PROM write cycles, the application may perform compare to the 
current E2PROM content and decide whether to store the table content or not. 
 
Pre-conditions 
- Service 0x2C needs to store the DynDID definitions to the NVRAM (OEM specific 
requirement) 
Call context 
- any  
Particularities and Limitations 
>  CANdesc does not keep the data pointed by the parameter pointer during the write 
operation! The application must mirror the data if needed! 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
122 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.13.3.5 ApplDescRestoreDynIdMemContent () 
ApplDescRestoreDynIdMemContent 
Available since 5.06.09 
Is Reentrant 
 
Is callback 
 
Prototype 
Single Context 
void ApplDescRestoreDynIdMemContent (DescDynDidStorageInfo storageInfo) 
Multi Context 
void ApplDescRestoreDynIdMemContent (DescDynDidStorageInfo storageInfo) 
Parameter 
storageInfo.nvData 
The pointer to the data to where the stored data shall be written 
The size (in bytes) of the table expected. 
storageInfo.nvDataSize  Not used  
storageInfo.checkSum 
Return  code 


Functional Description 
Once this API is called by CANdesc, the application must trigger a read E2PROM 
procedure to restore the data for CANdesc and the checksum value. 
 
Once the read process has completed, the API DescDynIdMemContentRestored () must 
be called to acknowledge the operation status to CANdesc. 
Pre-conditions 
- Service 0x2C needs to store the DynDID definitions to the NVRAM (OEM specific 
requirement) 
Call context 
- any  
Particularities and Limitations 
>   
 
12.6.14 Memory Access Callbacks 
12.6.14.1 ApplDescReadMemoryByAddress() 
ApplDescReadMemoryByAddress 
Available since 5.06.04 
Is Reentrant 
 
Is callback 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
123 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Prototype 
Any Context 
void ApplDescReadMemoryByAddress (DescMsgContext* pMsgContext, 
t_descMemByAddrInfo* pMemInfo) 
Parameter 
pMsgContext 
Please refer to section 12.6.4.2 Service MainHandler for 
details about this parameter. 
pMsgContext->resData 
The response buffer pointer 
pMsgContext->resDataLen  The actual response length 
pMemInfo->address 
The address to read from 
pMemInfo->length 
The number of bytes to read 
Return  code 


Functional Description 
This callback is called for read memory by address requests. The application has to do 
following: 
Perform memory block validation (negative response can be set by calling 
DescSetNegResponse()). 
Optional: Perform additional state validations (negative response can be set by calling 
DescSetNegResponse()). 
Copy the requested memory contents into the response buffer. 
Set the response data length to the number of bytes copied. 
Confirm that the processing is finished (by calling DescProcessingDone()). 
Pre-conditions 
>  The read memory by address service is supported. 
>  Please refer to chapter 9.5 Read/Write Memory by Address (SID $23/$3D) (UDS) for 
more details of the availability of this API. If you don’t see this API provided in desc.h, 
then this feature is not supported for your project. 
Call context 
From DescTask() 
Particularities and Limitations 
>  To call this handler periodically, ‘DescStartMemByAddrRepeatedCall’ needs to be used 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
124 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.14.2 ApplDescWriteMemoryByAddress() 
ApplDescWriteMemoryByAddress 
Available since 5.06.04 
Is Reentrant 
 
Is callback 
 
Prototype 
Any Context 
void ApplDescWriteMemoryByAddress (DescMsgContext* pMsgContext, 
t_descMemByAddrInfo* pMemInfo) 
Parameter 
pMsgContext 
Please refer to section 12.6.4.2 Service MainHandler for 
details about this parameter. 
pMsgContext->reqData 
The pointer to the data to store 
pMemInfo->address 
The address to write to 
pMemInfo->length 
The number of bytes to write 
Return  code 


Functional Description 
This callback is called for write memory by address requests. The application has to do 
following: 
Perform memory block validation (negative response can be set by calling 
DescSetNegResponse()). 
Optional: Perform additional state validations (negative response can be set by calling 
DescSetNegResponse()). 
Copy the provided data into the memory area. 
Confirm that the processing is finished (by calling DescProcessingDone()). 
Pre-conditions 
>  The write memory by address service is supported. 
>  Please refer to chapter 9.5 Read/Write Memory by Address (SID $23/$3D) (UDS) for 
more details of the availability of this API. If you don’t see this API provided in desc.h, 
then this feature is not supported for your project. 
Call context 
From DescTask() 
Particularities and Limitations 
>  To call this handler periodically, ‘DescStartMemByAddrRepeatedCall’ needs to be used 
 
12.6.15 Flash Boot Loader Support 
CANdesc provides some features to comply with the HIS flash boot loader procedures.  
2015, Vector Informatik GmbH 
Version: 3.09.00 
125 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
These features are not released for all OEMs so if the below listed APIs are not available 
in your CANdesc version, then for the OEM, you currently use CANdesc, does not require, 
resp. has another FBL procedures. 
12.6.15.1 DescSendPosRespFBL() 
DescSendPosRespFBL 
Available since 4.05.00 
Is Reentrant 
 
Is callback 
 
Prototype 
Any Context 
void DescSendPosRespFBL (t_descFblPosRespType posRespSId) 
Parameter 
posRespSId 
One of the following values are allowed: 
>  kDescSendFblPosRespEcuHardReset 
>  kDescSendFblPosRespDscDefault. 
Return code 


Functional Description 
The application shall call this function as soon as possible after the initialization of the 
CANdesc component is done and the ECU is able to communicate. 
 
Once this function called, CANdesc will try to send the corresponding positive response 
as follows: 
>  kDescSendFblPosRespEcuHardReset – a positive response to EcuHardReset ($51 
$01) will be sent. 
>  kDescSendFblPosRespDscDefault – a positive response to DiagnosticSessionControl 
Default session ($50 $01 $P2time $P2Star/10) will be sent. 
 
If CANdesc is currently busy with a new tester request, there will be no response sent by 
this API. 
Pre-conditions 
The FBL positive response feature is supported. 
Call context 
Any. 
Particularities and Limitations 
>  See 13.8 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
126 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.15.2 ApplDescInitPosResFblBusInfo() 
ApplDescInitPosResFblBusInfo 
Available since 5.07.04 
Is Reentrant 
 
Is callback 
 
Prototype 
Any Context 
vuint8 ApplDescInitPosResFblBusInfo (t_descUsdtNetBus* pBusInfo) 
Parameter 
pBusInfo 
Reference to the bus information structure that will be 
initialized here. 
pBusInfo->busType 
The bus driver that will send the response 
pBusInfo->comChannel 
The communication channel on which the response will be 
sent. (relevant only on multi channel systems) 
pBusInfo->testerId 
The tester address which will be respond to. (relevant only on 
bus systems with source/target addresses) 
Return  code 
kDescOk 
Operation was successful, the FBL positive response will be 
sent. 
kDescFailed 
Operation failed – no FBL positive response will be sent. 
Functional Description 
This callback is called once the application decided to call the API DescSendPosRespFBL 
to get the concrete addressing information.  
 
The application shall initialize only the parameter described above. The optional ones can 
be skipped if not relevant on your system. 
 
Pre-conditions 
The FBL positive response feature is supported. 
Call context 
From DescSendPosRespFBL context. 
Particularities and Limitations 
>  
 
12.6.16 Debug Interface / Assertion 
12.6.16.1 ApplDescFatalError() 
ApplDescFatalError 
Available since 2.00.00 
Is Reentrant 
 
Is callback 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
127 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Prototype 
Single Context 
void ApplDescFatalError (vuint8 errorCode, vuint16 lineNumber) 
Multi Context 
void ApplDescFatalError (vuint8 errorCode, vuint16 lineNumber) 
Parameter 
errorCode 
The errorCode is a classification of the assertion. The 
errorCodes can be also found in file ‘desc.h’. The errorCodes 
are listed below: 
lineNumber 
A line number of file ‘desc.c’ from which this function is called.  
Return  code 


Functional Description 
The CANdesc debug interface is similar to assertion constructof common programming 
languages. Assertions are code checks which are written so that they should always 
evaluate to true. If an assertion is false, it indicates a possible bug in the program, corrupt 
system state or a misoperation of the user-interface.  
CANdesc is calling the function ApplDescFatalError() function to indicate a evaluation of 
an assertion to false. If this will happen it is recommended to halt the program's execution 
immediately. This could be reach by an endless loop in that call-back. 
The assertions can be disabled in the GenTool settings. The resource (ROM and runtime) 
consumption can be reduced by disabling the assertions. 
Error codes 
kDescAssertWrongTpTxChannel 
(0x00):  
The wrong TP channel is used – verify the TP interface to the CANdesc component 
 
kDescAssertIndexTableInvalidReference (0x02): 
Internal generation failure. 
 
kDescAssertSvcTableUnreachableItem (0x03): 
Internal generation failure. 
 
kDescAssertSvcTableInvalidReference (0x04): 
Internal generation failure. 
 
kDescAssertSvcTableInconsistentNumber (0x05): 
Internal generation failure. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
128 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
kDescAssertMissingMainHandler (0x06): 
Internal generation failure. 
 
kDescAssertInvalidContextId (0x08): 
Wrong iContext should be used - Check the consistency of the iContext parameter in the 
application. 
 
kDescAssertSvcTableIndexOutOfRange (0x09): 
Internal generation failure. 
 
kDescAssertSvcInstTableIndexOutOfRange (0x0A): 
Internal generation failure. 
 
kDescAssertContextIdWasModified (0x0B):   
The iContext member of the pMsgContext parameter in the MainHandler functions are 
illegal modified – verify the MainHandler functions in the application  
 
kDescAssertProcessingDoneCallAfterResFlushing (0x0E): 
DescProcessingDone() is called at least twice for one request – check the call of 
DescProcessingDone() in the application. 
 
kDescAssertTooLongSingleFrameResponse (0x0F): 
Response lengthof a periodic DID is exceeding the SingleFrame length – check the 
response length for periodic DIDs. 
 
kDescAssertApplLackOfConfirmation (0x11): 
The time for response processing is too long – verify if the call of DescProcessingDone() 
is done in any case. 
 
kDescAssertZeroStateValue (0x13): 
The state parameter is zero – check state handling 
 
kDescAssertInvalidContextMode (0x16): 
Internal runtime error 
 
kDescAssertUnexpectedWriteIntoRingBuffer (0x17): 
DescRingBufferWrite() is called without activated ring-buffer 
 
kDescAssertRingBufferWriteExceedsTheResLen (0x18): 
DescRingBufferWrite() is called to often  
 
kDescAssertIllegalUsageOfNegativeResponse (0x1A): 
After call of DescProcessingDone() a negative response is set  
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
129 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
kDescAssertDiagnosticBufferOverflow (0x1B): 
currently not available 
 
kDescAssertFuncReqWoResMayNotUseRingBuffer (0x1C): 
It is not possible to use the ring-buffer feature for functional request (KWP only) 
 
kDescAssertSchedulerTimerEventWithoutAnyPID (0x1E): 
Internal runtime error 
 
kDescAssertSchedulerRingBufferIsActivated (0x1F): 
For periodic DIDs it is not possible to use the ring-buffer. 
 
kDescAssertUnknownTpTransmissionType (0x21): 
Internal runtime error 
 
kDescAssertIllegalAddRequestCount (0x22): 
Internal runtime error 
 
kDescAssertNoSidCanBeReportedInIdleMode (0x23): 
Call of DescGetSeriveId() while not a user-service is processed 
 
kDescAssertInvalidUsageOfForceRcrRpApi (0x24): 
The DescForceRcrRpResponse() function is used illegal. 
 
kDescAssertPidResLenToCddDefNotMatched (0x26): 
The response length set by the application do not fit to the response length defined in 
CANdela (cdd). 
 
kDescAssertPidResLenToCurrLinearFreeSpace (0x27): 
Internal runtime error 
 
kDescAssertMissingDataForTransmission (0x28): 
Internal runtime error 
 
kDescAssertSchedulerFreeCellNotFound (0x29): 
Internal runtime error 
 
kDescAssertInvalidStateParameterValue (0x2A): 
The state parameter value is wrong – check state handling in your application 
 
kDescAssertNoFreeICNChannel (0x2B): 
Internal runtime error 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
130 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
kDescAssertInvalidDescICNClient (0x2C): 
Internal runtime error 
 
kDescAssertNoFreeMsgContext (0x2D): 
Internal runtime error 
 
kDescAssertUnExpectedContextWithResponse (0x2E): 
A response will be sent out of a wrong context.  
 
kDescAssertIllegalCallOfRingBufferCancel (0x2F): 
The API DescRingBufferCancel() has been called for a response that is not using the ring-
buffer concept (e.g. DescRingBufferStart() was not called). 
 
kDescNetAssertWrongIsoTpRxChannel (0x40): 
The wrong TP channel is used – verify the TP interface to the CANdesc component 
 
kDescNetAssertWrongIsoTpTxChannel (0x41): 
The wrong TP channel is used – verify the TP interface to the CANdesc component 
 
kDescNetAssertWrongBusType (0x42): 
The wrong bus type is used – verify the TP interface to the CANdesc component 
 
kDescAssertDescIcnIllegalTargetPointer (0x50): 
Internal runtime assertion  
 
Pre-conditions 
At least on type of assertions are activated 
Call context 
Form ISR or task level. The interrupts might be disabled 
Particularities and Limitations 
>  After a call of this function the system is not stable anymore. It can not be guaranteed 
that this component or the whole system is still working in correct manner.  
12.6.17 “Spontaneous Response” transmission 
 
To implement the service $86 (Respone On Event) it is necessary to transmit a message 
without a previous request. If the same CAN ID have to be used for this reponse as for the 
diagnostics response, CANdesc provides an API to trigger the transmission. 
12.6.17.1 DescSendApplSpontaneousResponse () 
DescSendApplSpontaneousResponse  
Available since 6.09.00 
Is Reentrant 
 
Is callback 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
131 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Prototype 
Any Context 
DescBool DescSendApplSpontaneousResponse (DescMsg resData,  
                                          DescMsgLen resLen,  
                                          t_descUsdtNetBus* pBusInfo) 
Parameter 
resData 
Pointer to an application buffer with response data (including 
posive response header). 
resLen 
Number of bytes to be sent (up to 4095 bytes). 
pBusInfo 
Reference to the bus information structure that will be initialized 
here. 
pBusInfo->busType 
The bus driver that will send the response. 
pBusInfo->comChannel 
The communication channel on which the response will be sent. 
(relevant only on multi channel systems). 
pBusInfo->testerId 
The tester address which will be respond to (relevant only on 
bus systems with source/target addresses). 
Return  code 
kDescTrue 
Operation was successful, the response will be sent. 
kDescFalse 
Operation failed – no response will be sent. 
Functional Description 
Calling this function the application can force CANdesc to send immediately a 
spontaneous response. 
If CANdesc is currently busy with a tester request, there will be no response sent by this 
API and kDescFalse will be returned. 
If this API returns kDescTrue, the application shall wait for the 
ApplDescSpontaneousResponseConfirmation() prior initiating a new spontaneous 
transmission. 
Pre-conditions 
The API is available under one of the following conditions: 
CANdesc was configured to use this option (enabled in the GENtool). Only 
possible to configure if Service 0x86 is contained in the cdd. 
For specific OEMs in case FBL behavior according to HIS is required (please refer 
to 13.8…send a positive response without request after FBL flash job) 
Call context 
Task or interrupt. 
Particularities and Limitations 
>  
2015, Vector Informatik GmbH 
Version: 3.09.00 
132 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
 
12.6.17.2 ApplDescSpontaneousResponseConfirmation() 
ApplDescSpontaneousResponseConfirmation 
Available since 6.09.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescSpontaneousResponseConfirmation(vuint8 status) 
Multi Context 
void ApplDescSpontaneousResponseConfirmation (vuint8 iContext, vuint8 status) 
Parameter 
iContext 
Will be always “kDescPrimContext”. 
status 
If the transmission was successful, the parameter value will be 
kDescOk
. Otherwise – kDescFailed. 
Return  code 


Functional Description 
Once the spontaneous response has been successfully triggered (ref. 
DescSendApplSpontaneousResponse ()), this function will be called in any case. The 
transmission status is reported by the status parameter. 
 
Pre-conditions 
Only available if the API DescSendApplSpontaneousResponse (is available. 
Call context 
CAN Driver TX-ISR  TP Confirmation  this function 
Particularities and Limitations 
>  Be aware of time consuming implementation for this function (interrupt call context). 
2015, Vector Informatik GmbH 
Version: 3.09.00 
133 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
12.6.18 Generic Processing Notifications  
12.6.18.1 ApplDescManufacturerIndication 
ApplDescManufacturerIndication 
Available since 6.13.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescManufacturerIndication(vuint8 sid, 
vuint8* data, 
vuint16 length, 
vuint8 reqType, 
t_descUsdtNetBus* pBusInfo) 
Multi Context 
void ApplDescManufacturerIndication(vuint8 iContext, 
vuint8 sid, 
vuint8* data, 
vuint16 length, 
vuint8 reqType, 
t_descUsdtNetBus* pBusInfo) 
Parameter 
iContext 
The current request context location 
(used only as a handle - DO NOT MODIFY). 
sid 
The service identifier of the received service request. 
data 
Pointer to the first byte of the request data (without service 
identifier byte). 
length 
Length of the request data (without service identifier byte) 
reqType 
The current request addressing method. Could be either 
‚kDescFuncReq’ or ‚kDescPhysReq’ (bitmapped). 
pBusInfo 
The current request communication information (i.e. driver type 
(CAN, MOST, FlexRay, etc.), addressing information, 
communication channel number, tester address (if applicable) 
etc. 
Return  code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
134 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
This function is called right before CANdesc starts the processing of a received request. 
 
Pre-conditions 
Only available if the feature “Manufacturer Notification Support” is activated and CANdesc 
UDS2012 is used. 
Call context 
From DescTask() 
Particularities and Limitations 
>   
 
12.6.18.2 ApplDescManufacturerConfirmation 
ApplDescManufacturerConfirmation 
Available since 6.13.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescManufacturerConfirmation(vuint8 status) 
Multi Context 
void ApplDescManufacturerConfirmation(vuint8 iContext, 
vuint8 status) 
Parameter 
iContext 
The current request context location 
(used only as a handle - DO NOT MODIFY). 
status 
kDescPostHandlerStateOk  
The positive response was transmitted successfully 
kDescPostHandlerStateNegResSent  
It was a negative response 
kDescPostHandlerStateTxFailed   
A transmission error occurred 
Return  code 


Functional Description 
This function is called after the processing of a request has been finished, a response has 
been sent (or sending has failed) and all service PostHandlers were called. 
 
Pre-conditions 
Only available if the feature “Manufacturer Notification Support” is activated and CANdesc 
UDS2012 is used. 
2015, Vector Informatik GmbH 
Version: 3.09.00 
135 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Call context 
From DescTask () 
Particularities and Limitations 
>   
12.6.18.3 ApplDescSupplierIndication 
ApplDescSupplierIndication 
Available since 6.13.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescSupplierIndication(vuint8 sid, 
vuint8* data, 
vuint16 length, 
vuint8 reqType, 
t_descUsdtNetBus* pBusInfo) 
Multi Context 
void ApplDescSupplierIndication(vuint8 iContext, 
vuint8 sid, 
vuint8* data, 
vuint16 length, 
vuint8 reqType, 
t_descUsdtNetBus* pBusInfo) 
Parameter 
iContext 
The current request context location 
(used only as a handle - DO NOT MODIFY). 
sid 
The service identifier of the received service request. 
data 
Pointer to the first byte of the request data (without service 
identifier byte). 
length 
Length of the request data (without service identifier byte) 
reqType 
The current request addressing method. Could be either 
‚kDescFuncReq’ or ‚kDescPhysReq’ (bitmapped). 
2015, Vector Informatik GmbH 
Version: 3.09.00 
136 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
pBusInfo 
The current request communication information (i.e. driver type 
(CAN, MOST, FlexRay, etc.), addressing information, 
communication channel number, tester address (if applicable) 
etc. 
Return  code 


Functional Description 
This function is called during the processing of a request, after CANdesc has verified that 
the requested service is allowed in the active session and security state. 
 
Pre-conditions 
Only available if the feature “Supplier Notification Support” is activated and CANdesc 
UDS2012 is used. 
Call context 
From DescTask() 
Particularities and Limitations 
>   
12.6.18.4 ApplDescSupplierConfirmation 
ApplDescSupplierConfirmation 
Available since 6.13.00 
Is callback 
 
Prototype 
Single Context 
void ApplDescSupplierConfirmation(vuint8 status) 
Multi Context 
void ApplDescSupplierConfirmation(vuint8 iContext, 
vuint8 status) 
Parameter 
iContext 
The current request context location 
(used only as a handle - DO NOT MODIFY). 
status 
kDescPostHandlerStateOk  
The positive response was transmitted successfully 
kDescPostHandlerStateNegResSent  
It was a negative response 
kDescPostHandlerStateTxFailed   
A transmission error occurred 
Return  code 


2015, Vector Informatik GmbH 
Version: 3.09.00 
137 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
Functional Description 
This function is called after the processing of a request has been finished, a response has 
been sent (or sending has failed) and all service PostHandlers were called. It is called 
before ApplDescManufacturerConfirmation()
 
Pre-conditions 
Only available if the feature “Supplier Notification Support” is activated and CANdesc 
UDS2012 is used. 
Call context 
From DescTask () 
Particularities and Limitations 
>   
2015, Vector Informatik GmbH 
Version: 3.09.00 
138 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
13  How To… 
 
13.1  …implement a protocol service MainHandler 
 
//1. Read ProtocolService 
// - dynamic length 
// - PIDs 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Check the length */ 
  if(pMsgContext->reqDataLen > 2) 
  { 
    /* Check the sub-parameters */ 
    vuint16 param; 
    /* Compose one parameter combining the HiByte and the LoByte in this order*/ 
    param = DescMake16Bit(pMsgContext->reqData[0], pMsgContext->reqData[1]); 
 
    /* Dispatch the parameter */ 
    switch(param) 
    { 
      case 0xFFFF: 
        if(pMsgContext->reqDataLen != 0xFFFF) 
        { 
          /* Write some data (skip the parameter offsets 0 und 1) */ 
          pMsgContext->resData[2] = DescGetLoByte(0x1234); 
          pMsgContext->resData[3] = DescGetHiByte(0x1234); 
          /* Set the response length */ 
          pMsgContext->resDataLen = 4; 
        } 
        else 
        { 
          DescSetNegResponse(pMsgContext->iContext, kDescNrcInvalidFormat); 
        } 
        break
      default: 
        /* unknown parameter */ 
        DescSetNegResponse(pMsgContext->iContext, kDescNrcInvalidFormat); 
    } 
  } 
  else 
  { 
    DescSetNegResponse(pMsgContext-iContext, kDescNrcInvalidFormat); 
  } 
  /* In this case we did everything in the main-handler */ 
  DescProcessingDone(pMsgContext->iContext); 

 
 
//2. Read ProtocolService 
// - dynamic length 
// - sub-function 

2015, Vector Informatik GmbH 
Version: 3.09.00 
139 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Check the length */ 
  if(pMsgContext->reqDataLen > 1) 
  { 
    /* Dispatch the sub-function */ 
    switch(pMsgContext->reqData[0]) 
    { 
      case 0xFF: 
        if(pMsgContext->reqDataLen != 0xFFFF) 
        { 
          /* Format check ok: write some data (skip the parameter) */ 
          pMsgContext->resData[1] = DescGetLoByte(0x1234); 
          pMsgContext->resData[2] = DescGetHiByte(0x1234); 
          /* Set the response length */ 
          /* Hint: if the response length wasn't set, zero value is assumed! */ 
          pMsgContext->resDataLen = 3; 
        } 
        else 
        { 
          /* Wrong sub-parameter format */ 
          DescSetNegResponse(pMsgContext->iContext, kDescNrcInvalidFormat); 
        } 
        break
      default: 
        /* Unknown sub-function */ 
        DescSetNegResponse(pMsgContext->iContext, 
                           kDescNrcSubfunctionNotSupported); 
    } 
  } 
  else 
  { 
    DescSetNegResponse(pMsgContext-iContext, kDescNrcInvalidFormat); 
  } 
  /* In this case we did everything in the main-handler */ 
  DescProcessingDone(pMsgContext->iContext); 

 
//3. Write ProtocolService 
// - dynamic length 
// - PIDs 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Check the sub-parameters */ 
  vuint16 param; 
 
  /* Check the length */ 
  if(pMsgContext->reqDataLen > 2) 
  { 
    /* Compose one parameter combining the HiByte and the LoByte in this order 
*/
 
    param = DescMake16Bit(pMsgContext->reqData[0], pMsgContext->reqData[1]); 
 
    /* Dispatch the parameter */ 
    switch(param) 
    { 
2015, Vector Informatik GmbH 
Version: 3.09.00 
140 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
      case 0xFFFF: 
        if(pMsgContext->reqDataLen != 0xFFFF) 
        { 
          /* Copy from the request data to your application */ 
          /* Use the data pointed by: pMsgContext->reqData[2],  
             pMsgContext->reqData[3], etc.*/
 
        } 
        else 
        { 
          DescSetNegResponse(pMsgContext->iContext, kDescNrcInvalidFormat); 
        } 
        break
      default: 
        /* unknown parameter */ 
        DescSetNegResponse(pMsgContext->iContext, kDescNrcRequestOutOfRange); 
    } 
  } 
  else 
  { 
    DescSetNegResponse(pMsgContext-iContext, kDescNrcInvalidFormat); 
  } 
  /* In this case we did everything in the main-handler */ 
  /* Hint: if the response length wasn't set, zero value is assumed! */ 
  DescProcessingDone(pMsgContext->iContext); 

 
//4. Write ProtocolService 
// - dynamic length 
// - Sub-function 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Check the sub-parameters */ 
  vuint16 param; 
 
  /* Check the length */ 
  if(pMsgContext->reqDataLen > 2) 
  { 
    /* Compose one parameter combining the HiByte and the LoByte in this order*/ 
    param = DescMake16Bit(pMsgContext->reqData[0], pMsgContext->reqData[1]); 
 
    /* Dispatch the parameter */ 
    switch(param) 
    { 
      case 0xFFFF: 
        if(pMsgContext->reqDataLen != 0xFFFF) 
        { 
          /* Copy from the request data to your application */ 
          /* Use the data pointed by: pMsgContext->reqData[2],  
             pMsgContext->reqData[3], etc.*/
 
        } 
        else 
        { 
          DescSetNegResponse(pMsgContext->iContext, kDescNrcInvalidFormat); 
        } 
        break
      default: 
        /* unknown sub-function / 
        DescSetNegResponse
(pMsgContext->iContext, 
2015, Vector Informatik GmbH 
Version: 3.09.00 
141 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
                           kDescNrcSubfunctionNotSupported);  
    } 
  } 
  else 
  { 
    DescSetNegResponse(pMsgContext-iContext, kDescNrcInvalidFormat); 
  } 
  /* In this case we did everything in the main-handler */ 
  /* Hint: if the response length wasn't set, zero value is assumed! */ 
  DescProcessingDone(pMsgContext->iContext); 

 
13.2  …implement a service MainHandler 
 
//5. Read Service 
// - dynamic length 
// - sub-function/PID 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Check the length */ 
  if(pMsgContext->reqDataLen != 0xFFFF) 
  { 
    /* Format check ok: write some data */ 
    pMsgContext->resData[0] = DescGetLoByte(0x1234); 
    pMsgContext->resData[1] = DescGetHiByte(0x1234); 
    /* Set the response length */ 
    /* Hint: if the response length wasn't set, zero value is assumed! */ 
    pMsgContext->resDataLen = 2; 
  } 
  else 
  { 
    /* Wrong sub-function format */ 
    DescSetNegResponse(pMsgContext->iContext, kDescNrcInvalidFormat); 
  } 
 
  /* In this case we did everything in the main-handler */ 
  DescProcessingDone(pMsgContext->iContext); 

 
 
//6. Read Service 
// - static length 
// - sub-function/PID 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Format check ok: write some data */ 
  pMsgContext->resData[0] = DescGetLoByte(0x1234); 
  pMsgContext->resData[1] = DescGetHiByte(0x1234); 
  /* Set the response length */ 
  /* Hint: if the response length wasn't set, zero value is assumed! */ 
  pMsgContext->resDataLen = 2; 
 
  /* In this case we did everything in the main-handler */ 
2015, Vector Informatik GmbH 
Version: 3.09.00 
142 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
  DescProcessingDone(pMsgContext->iContext); 

 
 
//7. Write Service 
// - dynamic length 
// - sub-function/PID 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Check the length */ 
  if(pMsgContext->reqDataLen != 0xFFFF) 
  { 
    /* Format check ok: write some data */ 
    /* Copy from the request data to your application */ 
    /* Use the data pointed by: pMsgContext->reqData[0],  
       pMsgContext->reqData[1], etc.*/
 
  } 
  else 
  { 
    /* Wrong sub-function format */ 
    DescSetNegResponse(pMsgContext->iContext, kDescNrcInvalidFormat); 
  } 
 
  /* In this case we did everything in the main-handler */ 
  /* Hint: if the response length wasn't set, zero value is assumed! */ 
  DescProcessingDone(pMsgContext->iContext); 

 
 
//8. Write  Service 
// - static length 
// - sub-function/PID 
 
void DESC_API_CALLBACK_TYPE ApplDescManiOnTimerEvent_storeEvent(DescMsgContext* 
pMsgContext) 

  /* Copy from the request data to your application */ 
  /* Use the data pointed by: pMsgContext->reqData[0], pMsgContext->reqData[1],     
     etc.*/
 
 
  /* In this case we did everything in the main-handler */ 
  /* Hint: if the response length wasn't set, zero value is assumed! */ 
  DescProcessingDone(pMsgContext->iContext); 

 
13.3  …implement a Signal Handler 
 
//1. ReadSignalHandler 
// - length <= 4Byte 
// Limitations: No DescProcessingDone() or DescSetNegResponse() allowed. 
 
vuintx DESC_API_CALLBACK_TYPE ApplDescGetTemp(void

  /* Return directly the signal value */ 
  return (vuintx)0xFFFF; 
2015, Vector Informatik GmbH 
Version: 3.09.00 
143 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 

 
 
//2. ReadSignalHandler 
// - length > 4Byte 
// Limitations: No DescProcessingDone() or DescSetNegResponse() allowed. 
 
DescMsgLen DESC_API_CALLBACK_TYPE ApplDescGetTemp(DescMsg tgt) 

  /* Copy the signal data into the buffer pointed by "tgt".*/ 
  /* Return the amount of written bytes */ 
  return 0; 

 
 
//3. WriteSignalHandler 
// - length <= 4Byte 
// Limitations: No DescProcessingDone() or DescSetNegResponse() allowed. 
 
void DESC_API_CALLBACK_TYPE ApplDescGetTemp(vuintx data) 

  /* "data" contains the signal value as-is from the request.  
     Copy it into your application. */
 

 
 
//4. ReadSignalHandler 
// - length > 4Byte 
// Limitations: No DescProcessingDone() or DescSetNegResponse() allowed. 
 
DescMsgLen DESC_API_CALLBACK_TYPE ApplDescGetTemp(DescMsg src) 

  /* Copy the signal data from the buffer pointed by "src".*/ 
  /* Return the amount of copied bytes */ 
  return 0; 

 
 
13.4  …implement a Packet Handler 
//1. ReadPacketHandler 
// Limitations: No DescProcessingDone() or DescSetNegResponse() allowed. 
 
void DESC_API_CALLBACK_TYPE ApplDescGetTemp(DescMsg pMsg) 

  /* Copy the signal value into the "pMsg" buffer. */ 
  pMsg[0] = DescGetLoByte(0x1234); 
  pMsg[1] = DescGetLoByte(0x1234); 

 
 
 
13.5  …implement a state transition function  
 
//1. StateTransitionNotification 
// Limitations: No DescProcessingDone() or DescSetNegResponse() allowed. 

2015, Vector Informatik GmbH 
Version: 3.09.00 
144 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
 
void DESC_API_CALLBACK_TYPE ApplDescOnTransitionSession(DescStateGroup 
formerState, DescStateGroup newState) 

  /* You are just notified that this state group has performed a transition from  
   * "formerState" to the "newState". */
 

 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
145 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
13.6  …work with the ring-buffer mechanism 
13.6.1  with asynchronous write 
TPMC
Desc
Appl_MainHandler
Appl_MainHandler_2
EEPROM 
Appl_PostHandler
Driver
call
Analyze and validate request
It is not possible to write data as in 
Write response length the standard way if a ring-buffer will 
be used (standard way is, to write to 
DescMsgContext->ResData)
DescRingBufferStart()
DescRingBufferWrite(* dataPtr, dataLength)
Now - it is possibel to 
Enough data are 
write data to the ring-buffer
stored in the 
ring-buffer to start 
the transmission
DescRingBufferWrite(* dataPtr, dataLength)
DescRingBufferWrite(* dataPtr, dataLength)
StartTransmission
Not enough free 
bytes to write 
new data
TP reads 
asynchronous the 
DescRingBufferGetFreeSpace
data out of the 
ring-buffer
return countOfFreeBytesInRingBuffer
TpCopyToCan
DescRingBufferGetFreeSpace
return countOfFreeBytesInRingBuffer
DescRingBufferWrite(* dataPtr, dataLength)
TpCopyToCan
DescRingBufferGetProgress
return currentBytePosition
FinishTransmission
Call of Service Post Handler
 
//1. Read Service (with asynchronous Ring-Buffer) 
// - static length 
// - sub-function/PID 
 
vuint8 g_iContext; 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
146 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
void DESC_API_CALLBACK_TYPE ApplDescReadDTC(DescMsgContext* pMsgContext) 

  vuint8 lData; 
  /* Format check already done by CANdesc */ 
 
  /* Analysis of request has to done by ECU application */ 
 
  /* Set the response length */ 
  pMsgContext->resDataLen = 16; 
 
  /* Fill the first data */ 
  lData = 5; 
 
  /* Store iContext for further interaction with CANdesc */ 
  g_iContext = pMsgContext->iContext; 
  /* check only on services with sub-function (e.g. 0x19) */ 
  if(pMsgContext->msgAddInfo.suppPosRes != 0) 
  { 
    /* since no response required – skip further processing */ 
    DescProcessingDone(pMsgContext->iContext); 
  } 
else 
  { 
   /* Now we have to set CANdesc into the Ring-Buffer mode */ 
   DescRingBufferStart(pMsgContext->iContext); 
   /* Now it is possible to write into the Ring-Buffer */ 
   DescRingBufferWrite(pMsgContext->iContext, &lData, 1); 
  
   /* Now trigger e.g. an EEPROM read event */ 
   ... 
  


     
EEPROM_TASK(xyz) 

  vuint8 lDTC[3]; 
 
  ... 
  /* Wait for EEPROM event */ 
  /* EEPROM event is finished with reading */ 
  { 
    DescRingBufferWrite(g_iContext, &lDTC, 3); 
  /* Now trigger next EEPROM reading */ 
  } 

 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
147 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
13.6.2  with synchronous write 
Desc
Appl_MainHandler
Appl_MainHandler_2
EEPROM 
Appl_PostHandler
Driver
call
Analyze and validate request
write response length
DescRingBufferStart
DescRingBufferWrite(* dataPtr, dataLength)
DescStartRepeatedServiceCall(&ApplMainHandler_2)
Within this function 
Activate the 
call the data can be 
multiple service 
written synchronous.
call to get a 
periodic call from 
CANdesc
call
GetEEPROMData
DescRingBufferWrite(* dataPtr, dataLength)
call
DescRingBufferGetFreeSpace
return countOfFreeBytesInRingBuffer
call
DescRingBufferGetFreeSpace
return countOfFreeBytesInRingBuffer
GetEEPROMData
DescRingBufferWrite(* dataPtr, dataLength)
PostHandler
 
//2. Read Service (with synchronous Ring-Buffer) 
// - static length 
// - sub-function/PID 
 
extern void ApplDescReadDTC_AddOn(DescMsgContext* pMsgContext); 
 
void DESC_API_CALLBACK_TYPE ApplDescReadDTC(DescMsgContext* pMsgContext) 

  vuint8 lData; 
  /* Format check already done by CANdesc */ 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
148 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
  /* Analysis of request has to done by ECU application */ 
 
  /* Set the response length */ 
  pMsgContext->resDataLen = 16; 
 
  /* Fill the first data */ 
  lData = 5; 
 
  /* check only on services with sub-function (e.g. 0x19) */ 
  if(pMsgContext->msgAddInfo.suppPosRes != 0) 
  { 
    /* since no response required – skip further processing */ 
    DescProcessingDone(pMsgContext->iContext); 
  } 
else 

    /* Now we have to set CANdesc into the Ring-Buffer mode */ 
    DescRingBufferStart(pMsgContext->iContext); 
    /* Now it is possible to write into the Ring-Buffer */ 
    DescRingBufferWrite(pMsgContext->iContext, &lData, 1); 
 
    /* Use RepeatedSeriveCall feature to poll e.g. EEPROM driver */   
    DescStartRepeatedServiceCall(pMsgContext->iContext, &ApplDescReadDTC_AddOn); 


 
void ApplDescReadDTC_AddOn(DescMsgContext* pMsgContext) 

  vuint8 lDTC[3]; 
  DescMsgLen freeSpace; 
  /* Check if enough space is free in ring-buffer */ 
  freeSpace = DescRingBufferGetFreeSpace(); 
  if (freeSpace >= 3) 
  /* try to read from EEPROM */ 
  { 
  /* Success - result is in lDTC */ 
    DescRingBufferWrite(pMsgContext->iContext, &lDTC, 3); 
  } 
  else 
  { 
    /* nothing to do, wait for next MainHandler call, ring-buffer is full */ 
  } 

 
 
13.7  …prevent the ECU going to sleep while diagnostic is active  
Most car manufactures have the requirement to keep the ECU alive while the diagnostic 
layer is active; including a pending request or a non-default session is currently active. 
This  requirement  is handled  by  CANdesc for  some  car  manufactures  (see  OEM  specific 
TechnicalReference_CANdesc document for details) 
The  following  code  example  shows  all  necessary  steps  to  keep  the  ECU  alive  while 
diagnostic jobs are running (e.g. non-default session): 

  DescContextActivity lActivity; 
2015, Vector Informatik GmbH 
Version: 3.09.00 
149 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
  DescStateGroup lState; 
 
  lAcitvity = DescGetActivityState(); 
  lState = DescGetStateSession(); 
   
  /* check for a pending request or a non-default session */ 
  if ( ((lState & kDescStateSessionDefault) == 0) ||  
       (lActivity != kDescContextIdle) ) 
  { 
    /* Force to stay alive */ 
  } 
  else 
  { 
    /* Ready for sleeping */ 
  } 

13.8  …send a positive response without request after FBL flash job 
According to some specifications the application has to send a positive response either to 
“diagnostic  session  control  –  default  session”  or  “ECU  reset  –  hard  reset”  after  a 
successful  flash  job  without  a  request.  The  Flash  Boot  Loader  has  to  set  a  flag  (reset 
response  flag)  in  RAM  or  EEPROM  which  has  to  be  evaluated  by  the  application  at 
startup.  Depending  on  its  value  the  application  has  to  call  the  CANdesc  function 
DescSendPosRespFBL() with the appropriate response ID. 
CANdesc provides the APDescSendPosRespFBL() for this purpose. 
Due  to  bus  communication  is  necessary  to  send  the  positive  response;  some  limitations 
have to be handled by the application: 
1) Bus communication is to be requested by the application 
2) If bus communication is possible, the application has to call DescSendPosRespFBL()
CANdescBasic will send the positive response. 
3) The application will be called (ApplDescInitPosResFblBusInfo()to provide the concrete 
addressing information of the response. 
4) Bus communication can be released by the application. 
13.9  …enforce CANdesc to use ANSI C instead of hardware optimized bit type  
CANdesc  uses  per  default  the  bit-type  definition  provided  by  the  CANdriver,  since  it  is 
selected  as  optimal  for  the  concrete  CPU.  On  this  way  the  CANdesc  ROM  and  RAM 
resource consumption is kept as low as possible. 
Due to the complexity of some CANdesc data structures there can be problems on certain 
compilers with special bit-structure compiler options.  
If you encounter such problems either at compile or at run-time, you can turn the ANSIC C 
bit-type support in CANdesc on. To do that, just add a user configuration file in GENy with 
the following content: 
#define DESC_USE_ANSI_C_BIT_TYPE 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
150 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
13.10  …configure Extended Addressing 
If Extended Addressing is used as TP Addressing mode some additional settings have to 
be done.  “DescCheckTA” has to be set for the “Target Address Message Filter” in GENy. 
 
 
Figure 13-1 GENy TP configuration 
Additional  a  user  configuration  file  has  to  be  used  to  configure  the  functional  target 
address. An example for the content of the user configuration file is given below.   
 
#define kDescOemExtAddrFuncTargetAddr  0xFE   
13.11  …use Multiple Addressing  
This  chapter  is  a  short  summary  of  additional  information  that  the  application  has  to 
provide for CANdesc if the Tp addressing mode is Multiple Addressing. 
In the case that a positive response has to be send after FBL flash job of the application, 
please  assure  that  the  correct  addressing  information  are  provided  in  the  callback  
ApplDescInitPosResFblBusInfo(). 
Furthermore, the “Rx Get Buffer” and “Rx Indication” functions have to be redirected to the 
application if one of the Tp Addressing modes is Normal Addressing. This can be done in 
the  GENy  configuration  of  the  TP,  a  callback  name  different  from  the  one  that  is 
implemented in CANdesc has to be entered.  
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
151 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
 
Figure 13-2 GENy TP callbacks 
The  callbacks  have  to  be  implemented  in  the  application.  In  the  Get  Buffer  function  the 
CAN Id has to be set for the FC in the case of Normal Addressing, 
 
/* Example: A configuration with only CANdesc Tp connections and only one Tp 
Tx/Rx channel. */ 
TP_MEMORY_MODEL_DATA canuint8* DispatcherDescGetBuffer(canuint8 tpChannel, 
canuint16 datLen) 

  TP_MEMORY_MODEL_DATA canuint8* retPtr = V_NULL; 
 
  retPtr = DescGetBuffer(tpChannel, datLen); 
 
   if(retPtr != V_NULL) 
   { 
    if((TpRxGetAddressingFormat(tpChannel) == kTpNormalAddressing)) 
    { 
         /* kApplNormalAddressingTxId, have to defined by the application*/ 
        TpRxSetTransmitID(tpChannel, kApplNormalAddressingTxId); 
    } 
   } 
       
 return retPtr; 

 
 
The  response  ID  for  Normal  Addressing  has  to  be  set  in  the  Indication  function.  The 
response Id has to be set after the call of DescPhysReqInd(). 
 
/* Example: A configuration with only CANdesc Tp connections and only one Tp 
Tx/Rx channel. */ 
2015, Vector Informatik GmbH 
Version: 3.09.00 
152 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
void DispatcherDescPhysReqInd(canuint8 tpChannel, canuint16 datLen) 

  vuint8 addressingType = (TpRxGetAddressingFormat(tpChannel)); 
 
  DescPhysReqInd(tpChannel, datLen); 
 
  /*Set CAN IDs for the Response*/ 
  if(addressingType == kTpNormalAddressing) 
  { 
/* kApplNormalAddressingTxId and kApplNormalAddressingPhysRxId, have to defined 
by     the    application*/ 
TpTxSetChannelID(0 /*tpTxChannel*/, kApplNormalAddressingTxId, 
kApplNormalAddressingPhysRxId); 
/* tpTxChannel = 0 is only possible because only one Tx Channel is configured.*/ 
  } 

 
 
13.12  …use “Dynamic Normal Addressing Multi TP” with multiple tester 
This  chapter  is  a  short  summary  of  additional  information  that  the  application  has  to 
provide for CANdesc if the Tp addressing mode is “Dynamic Normal Addressing Multi TP” 
with more than one tester. 
In the case that a positive response has to be send after FBL flash job of the application, 
please  assure  that  the  correct  addressing  information  are  provided  in  the  callback  
ApplDescInitPosResFblBusInfo() 
Furthermore, the “Rx Get Buffer” function has to be redirected to the application. This can 
be done in the GENy configuration of the TP, a callback name different from the one that is 
implemented in CANdesc has to be entered.  
 
Figure 13-3 GENy TP callbacks (physical addressing) 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
153 / 158 
based on template version 5.1.0 


Technical Reference CANdesc 
The  “Get  Buffer”  function  of  the  functional  connection  has  to  be  redirected  to  the 
application too. 
 
 
Figure 13-4 GENy TP callbacks (functional addressing) 
 
The callbacks have to be implemented in the application.  The received CAN ID has to be 
mapped to the  corresponding transmit CAN ID and the TP connection number has to be 
set in the xxxGetBuffer callback: 
TP_MEMORY_MODEL_DATA canuint8* DispatcherDescGetBuffer(canuint8 tpChannel, 
canuint16 datLen) 

  TP_MEMORY_MODEL_DATA canuint8* retPtr = V_NULL;  
 
  switch(TpRxGetChannelID(tpChannel)) 
  { 
  case kDispatcherRxDiagPhysCanId: 
    TpRxSetTransmitID(tpChannel, kDispatcherTxDiagPhysCanId); 
    TpRxSetConnectionNumber(tpChannel, kDescDiagConnection); 
    retPtr = DescGetBuffer(tpChannel, datLen); 
    break; 
 
  case kDispatcherRxDiagAddPhysCanId: 
    TpRxSetTransmitID(tpChannel, kDispatcherTxDiagAddPhysCanId); 
    TpRxSetConnectionNumber(tpChannel, kDescDiagAddConnection); 
    retPtr = DescGetBuffer(tpChannel, datLen); 
    break; 
 
  default: 
    ; 
  } 
  return retPtr; 

 
 
The  receiced  CAN  ID  has  to  be  mapped  to  the  corresponding  transmit  CAN  ID  in  the 
xxxGetFuncBuffer callback.  Furthermore it is important, that  the physical Rx ID is set for 
the response and not the functional one. This CAN ID is used to recognize the FC of the 
tester in case of a multiframe response: 
TP_MEMORY_MODEL_DATA canuint8* DispatcherDescGetFuncBuffer(vuint16 dataLength) 

  TP_MEMORY_MODEL_DATA canuint8* retPtr = V_NULL; 
 
  switch(TpFuncGetReceiveCanID()) 
  { 
  case kDispatcherRxDiagFunc: 
    TpFuncSetTransmitCanID(kDispatcherTxDiagPhysCanId); 
    TpFuncSetReceiveCanID(kDispatcherRxDiagPhysCanId); 
2015, Vector Informatik GmbH 
Version: 3.09.00 
154 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
    retPtr = DescGetFuncBuffer(dataLength); 
    break; 
 
  case kDispatcherRxDiagAddFunc: 
    TpFuncSetTransmitCanID(kDispatcherTxDiagAddPhysCanId); 
    TpFuncSetReceiveCanID(kDispatcherRxDiagAddPhysCanId); 
    retPtr = DescGetFuncBuffer(dataLength); 
    break; 
 
  default: 
    ; 
  } 
 
  return retPtr; 

 
The  code  examples  above  are for 2 testers,  in  the  example  are  some  defines  used  that 
have to be provided by the application corresponding to the configuration. 
 
Define 
Description 
kDispatcherRxDiagPhysCanId 
Physical request CAN ID of the first tester 
kDispatcherRxDiagFuncCanId 
Functional request CAN ID of the first tester 
kDispatcherTxDiagPhysCanId 
Response CAN ID of the first tester 
kDispatcherRxDiagAddPhysCanId 
Physical request CAN ID of the second tester 
kDispatcherRxDiagAddFuncCanId 
Functional request CAN ID of the second tester 
kDispatcherTxDiagAddPhysCanId 
Response CAN ID of the second tester 
kDispatcherTxDiagTpChannel 
Transmit  Tp  Channel  of  CANdesc.  If  only  one 
Tp Channel is used, it is has to be set to zero. 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
155 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
14  Related documents 
Abbreviation 
File Name 
Description 
/KWP2000/ 
 
Keyword 2000 protocol 
/TPMC/ 
 
User  manual  of  the  multi-connection 
transport  layer  module.  The  transport 
layer  is  implemented  according  to  /ISO 
15765/ 
/ISO 15765/ 
 
This  ISO  standard  describes  diagnostics 
and diagnostics on CAN.  
/AN-IDG-1-013/  AN-IDG-1-
Application  note  for  CANdela  Studio  on 
013_How_to_Specify_ how to configure OBD service 0x06. 
OBD_Service_06.pdf  The  application  note  is  available  in  the 
download center on our homepage. 
Note: If no file name is given, the document is not provided by Vector.  
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
156 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
15  Glossary 
 
Abbreviation  Description  
CANdb 

CAN database by Vector which is used by Vector tools.  
CANdesc 
CAN diagnostics embedded software component 
CDD 
CANdela Diagnostic Database 
CF 
Consecutive Frame (transport protocol frame) 
CCL 
Communication Control Layer 
DBC 
CAN database format of the Vector company, which is used by the 
GENtool to gather information about the ECUs in the network, their 
communication  relations,  message  definitions,  signals  of 
messages,  network  related  information  (e.g.  manufacturer  type, 
network management type, etc.). 
ECU 
Electronic Control Unit 
FBL 
Flash Boot Loader 
KWP 2000 
Keyword Protocol 2000 
OSEK 
German  abbreviation,  “Offene  Systeme  und  deren  Schnittstellen 
für die Elektronik im Kraftfahrzeug”, means “open systems and the 
corresponding interfaces for automotive electronics” 
RCR-RP 
Request Correctly Received – Response Pending 
SF 
Single Frame 
SID 
Service Identifier 
SPRMIB 
Suppress Positive Response Message Indication Bit 
TP 
Transport Protocol  
UDS 
Unified Diagnostic Services  
VSG 
Vehicle System Group 
 
 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
157 / 158 
based on template version 5.1.0 

Technical Reference CANdesc 
16  Contact 
Visit our website for more information on 
 
>  News 
>  Products 
>  Demo software 
>  Support 
>  Training data 
>  Addresses 
 
www.vector.com 
 
2015, Vector Informatik GmbH 
Version: 3.09.00 
158 / 158 
based on template version 5.1.0 

32 - TechnicalReference_Database_Attributes_GM

Database Attributes GMLAN V3.0

34 - TechnicalReference_Database_Attributes_GMs


 
 
 
 
 
 
 
 
 
 
 
 
Database Attributes 
Technical Reference 
 
GMLAN 3.1 
Version 2.02.01 
 
 
 
 
 
 
 
 
 
 
Authors 
Frank Triem 
Versions: 
2.02.01 
Status: 
Released 
 
 
 
 
 



Technical Reference Database Attributes  
 
1  Document Information 
1.1 
History 
Author 
Date 
Version 
Remarks 
Frank Triem 
2007-06-06 
1.0 
Creation of document based on “Database 
Attributes GMLAN V3.0”. 
Frank Triem 
2007-06-25 
1.1 
Database Attribute 
GenMsgMandatoryToSupervise corrected 
Frank Triem 
2008-01-23 
2.0 
Update for configuration tool GENy 
Frank Triem 
2008-02-06 
2.1 
Database attributes added 
- Baudrate 
- SamplePointMin 
- SamplePointMax 
- SyncJumpWidthMin 
- SyncJumpWidthMax 
Frank Triem 
2012-10-23 
2.2 
Database Attribute NodeSuprvStabilityTime 
added in chapter 3.2 
Frank Triem 
2013-01-28 
2.02.01 
ESCAN00064577: Update GMLAN version 
from GMLAN 3.0 to GMLAN 3.1 
Table 1-1   History of the Document 
 
 
 
 
 
 
 
 
 
 
 
Please note 
We have configured the programs in accordance with your specifications in the 
 
questionnaire. Whereas the programs do support other configurations than the one 
specified in your questionnaire, Vector’s release of the programs delivered to your 
company is expressly restricted to the configuration you have specified in the 
questionnaire. 
2013, Vector Informatik GmbH 
Version: 2.02.01 
2 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
Contents 
1 
Document Information ................................................................................................. 2 
1.1 
History ............................................................................................................... 2 
2 
Introduction................................................................................................................... 5 
3 
Attribute Definitions for GMLAN V3.0 Databases ....................................................... 6 
3.1 
Network Attributes .............................................................................................. 6 
3.1.1 
Network Attributes for Node Communication Active Message ............ 7 
3.1.2 
Network Attributes for Virtual Networks .............................................. 7 
3.1.3 
Network Attributes for Bit Timing Register setup ................................. 8 
3.2 
Node Attributes .................................................................................................. 8 
3.3 
Message Attributes ............................................................................................ 9 
3.3.1 
Attribute Definitions for Diagnostics .................................................. 10 
3.4 
Signal Attributes ............................................................................................... 11 
3.4.1 

VN-Assignment of Signals................................................................ 11 
3.4.2 
Signal Transmit Model Attributes ...................................................... 11 
3.4.3 
Signal Supervision Attributes ............................................................ 12 
3.4.4 
Signal Attributes ............................................................................... 13 
4 
Attribute Settings in Terms of GM Concepts ............................................................ 14 
4.1 
Signal Transmit Model ..................................................................................... 14 
4.1.1 

Message Attributes .......................................................................... 14 
4.1.2 
Signal Attributes ............................................................................... 15 
4.2 
Signal Supervision ........................................................................................... 16 
4.2.1 

Signal Attributes ............................................................................... 16 
5 
Database Attributes for CANoe Models .................................................................... 17 
6 
Database Attributes not evaluated by GENy ............................................................. 18 
6.1 
Signal Transmit Model Attributes ...................................................................... 19 
6.1.1 
Node Mapped Rx-Signal Default Value Attributes ............................ 20 
7 
Contact ........................................................................................................................ 21 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
3 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
Tables 
Table  1-1  
History of the Document ............................................................................. 2 
Table  3-1  
Network Attributes ...................................................................................... 7 
Table  3-2  
Network Attributes for Node Communication Active Message ..................... 7 
Table  3-3  
Network Attributes for Virtual Networks ....................................................... 7 
Table  3-4  
Network Attributes for Bit Timing Register setup ......................................... 8 
Table  3-6  
Node Attributes ........................................................................................... 8 
Table  3-7  
Message Attributes ..................................................................................... 9 
Table  3-8  
Attribute Definitions for Diagnostics .......................................................... 10 
Table  3-9  
VN-Assignment of Signals ........................................................................ 11 
Table  3-10  
Signal Supervision Attributes .................................................................... 12 
Table  3-11  
Signal Attributes ........................................................................................ 13 
Table  4-1  
Message Attributes of Transmit Model ...................................................... 14 
Table  4-2  
Signal Attributes of Transmit Model ........................................................... 15 
Table  4-3  
Signal Attributes for Supervision ............................................................... 16 
Table  4-4  
Signal Attributes for Failsoft Mechanism ................................................... 16 
Table  5-1  
Database Attributes for CANoe Models ..................................................... 17 
Table  6-1  
Network attributes not evaluated by GENy ............................................... 19 
Table  6-2  
Signal Transmit Model attributes not evaluated by GENy ......................... 19 
Table  6-3  
Rx-Signal Default attributes not evaluated by GENy ................................. 20 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
4 / 21 
Based on template version 2.8 



Technical Reference Database Attributes  
 
2  Introduction 
This document describes the database attributes that are used by the configuration and 
generation tool GENy for the configuration of the GMLAN Handler. In chapter 3 all possible 
attributes are listed along with a description of how the attributes should be set for use with 
GMLAN. 
A list of database base attributes that can be found in the GM databases, which are not 
used by GENy, can be found in chapter 6. Please note that this is not a complete list of all 
available database attributes. 
 
 
 
 
Caution 
This document is valid for GMLAN 3.1 and Nm_Gmlan_Gm version 4.02.00 and higher. 
 
 
 
 
 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
5 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
3  Attribute Definitions for GMLAN 3.1 Databases 
3.1 
Network Attributes 
On the network level the following attributes are evaluated by GENy: 
Name 
Type 
Description 
Manufacturer 
String 
This is a fixed value and must be set to “GM” 
Default: “GM” 
NmType 
String 
Must be set to “GMLAN” to define the GMLAN 
network management. 
Default: 
GMLAN” 
NmBaseAddress 
Hexadecimal  Defines the base address for the VNMF. This 
value is usually set to 0x620 to declare a range of 
0x620-0x63F in the CAN-identifier range for the 
VNMF. 
NmMessageCount 
Integer 
This attribute defines the maximum number of 
nodes on the network. This attribute is used in 
combination with NmBaseAddress and spans a 
range of CAN-identifier within the 11-bit range for 
the VNMF. The value must be given as 2N (e.g. 
16 or 32). 
NetworkType 
String 
Defines the type of the CAN-network. The 
following Network Types are known: 
Possible values:   
“Powertrain”, “Bodybus”, “Infotainment” 
GENy uses this attribute in order to configure the 
baud rate. 
VersionNumber 
BCD-coded 
This attribute can be used for versioning 
Integer 
purposes. The value shall be a BCD-coded 
format. Thus, the number 100 is treated as 
Version 1.00, or the value 245 is handled as 
V2.45. This attribute definition is stored in ROM in 
two 8-bit constant values that can be accessed 
globally. Mainly used to retrieve the DB-version 
number by diagnostics. 
The names of the global variables are: 
  kDataDictMainVersion,  
  kDataDictSubVersion
BusOffRecoveryTime 
Integer 
Defines the node recovery time after a BusOff 
event. 
BusWakeUpDelay 
Integer 
Defines the time between a High-Level Voltage 
Wakeup (HLVW) and the activation of Initially-
Active VNs. 
2013, Vector Informatik GmbH 
Version: 2.02.01 
6 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
This parameter is also used as a delay time 
between the Activation of shared-local input VNs 
and the actual activation inside the ECU. 
Table 3-1   Network Attributes 
3.1.1 
Network Attributes for Node Communication Active Message 
On the network level the following attributes are defined for the Node Communication 
Active (NCA) Message: 
Name 
Type 
Description 
NodeStatusMsgID 
Hexadecimal  Declares the CAN-identifier for the Node-
Communication-Active (NCA) message. This is a 
message transmitted by a node when using 
Parameter-IDs on the network. The node 
transmits the message with a pre-defined cycle 
time, whenever at least one Virtual Network gets 
active.  
Note that the last 8 bits of this parameter must be 
0. 
See also: NodeStatusMsgCycleTime  and 
NodeStatusMsgTimeoutTime,  
(Default: 0x13FFFE00) 
NodeStatusMessageCycleTime  Integer 
Defines the periodic rate for the NCA message. 
Default: 1200 
Unit: ms 
NodeStatusMsgTimeoutTime 
Integer 
Defines the minimum time a node must receive at 
least one message from a node for a specific 
source address. If at least one virtual network is 
active, but the node receives no messages 
(including NCAs) within this time; all NCA-
supervised messages and signals are handled by 
supervision failure. 
Default: 3000 
Unit: ms 
Table 3-2   Network Attributes for Node Communication Active Message 
3.1.2 
Network Attributes for Virtual Networks 
On the network level the following attributes are defined for the Virtual Networks: 
Name 
Type 
Description 
VN_<<vn-name>> 
Integer 
Declares the Virtual Network with the name <<vn-
Range: 
name>> (placeholder-name). The integer value 
0..55 
must be a contiguous and zero based number. 
VNInitAct<<vn-name>> 
Enum: 
Defines whether a Virtual Network is declared as 
No 
‘Initially Active’. 
Yes 
Default: No 
Table 3-3   Network Attributes for Virtual Networks 
2013, Vector Informatik GmbH 
Version: 2.02.01 
7 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
3.1.3 
Network Attributes for Bit Timing Register setup 
On the network level the following attributes are defined for Bit Timing Register (BTR) 
setup. All five database attributes have to be defined in conjunction for GENy. 
Name 
Type 
Description 
Baudrate 
Integer 
Defines the baud rate for the respective network. 
SamplePointMin 
Integer 
Defines the minimum sample point in [%] for the respective 
network. 
SamplePointMax 
Integer 
Defines the maximum sample point in [%] for the respective 
network. 
SyncJumpWidthMin 
Integer 
Defines the minimum synchronous jump width for the respective 
network. 
SyncJumpWidthMax 
Integer 
Defines the maximum synchronous jump width for the 
respective network. 
Table 3-4   Network Attributes for Bit Timing Register setup 
3.2 
Node Attributes 
On node level the following attributes are evaluated by GENy: 
Name 
Type 
Description 
ILUsed 
Enum: 
Defines whether the Interaction Layer of the 
No 
GMLAN-Handler shall be used or not. 
Yes 
If the attribute is not set, the IL-Option page will 
not appear in GENy. 
Default: “Yes” 
NmNode 
Enum: 
Defines whether the Network Management of the 
No 
GMLAN-Handler shall be used or not. 
Yes 
If the attribute is not set, the GMLAN-Option page 
will not appear in GENy. 
Default: “Yes” 
VNECU<<vn-name>> 
Enum: 
Defines the VN-Type for a specific Node for the 
None 
specific VN 
Activator 
Remoted 
Activator_Remoted 
Shared Local 
NodeSuprvStabilityTime  Integer: 
This attribute defines a delay time in ms between 
activation of a VN and start of supervision of the 
0..65535 
corresponding signals. 
The supervision stability time is used to avoid 
'Loss of Communication' DTCs due to transient 
conditions after VN activation. 
Default: “5000” 
Table 3-5   Node Attributes 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
8 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
3.3 
Message Attributes 
On message level the following message attributes are evaluated by GENy: 
Name 
Type 
Description 
GenMsgSendType 
Enum: 
Defines the send type of a message. It could either 
spontanX  be defined as periodic or non-periodic. 
cyclicX 
Periodic includes both strict periodic and periodic 
with event. Non-periodic is strictly event-based. 
cyclicX = periodic 
spontanX = non-periodic 
GenMsgCycleTime 
Integer 
If the message is defined as periodic, this attribute 
defines the periodic time. 
Unit: ms 
GenMsgDelayTime 
Integer 
Defines the minimum update time of a message. 
The value is given in units of ms. The minimum 
update time is mostly used for mixed send types, 
namely periodic and event send types. 
Unit: ms 
GenMsgStartDelayTime 
Integer 
Defines the start time after VN Activation when 
processing of message events is started (i.e. the 
cyclic transmission of the messages is started). 
Unit: ms 
GenMsgMandatoryToSupervision  Enum: 
Defines the default setting after Power-up before 
No 
the Source Learning procedure the functional 
Yes 
messages with extended IDs has been started. The 
source address of a message is either initialized to 
FF (Yes) or FE (No). Different indications to the 
application are given if a timeout occur for non-
learned messages. 
GenMsgILSupport 
Enum: 
Defines whether a message shall be handled by the 
No 
Interaction Layer. 
Yes 
Default: “Yes” 
Prio 
Integer 
Defines the priority of the functional messages in an 
Range: 
GM database. These are the first three bits of the 
0..7 
Extended CAN ID. 
The priority is added to the CAN Identifier, which 
can be found in the database, within GENy in order 
to build the Transmit CAN-identifier as defined for 
GMLAN with Extended CAN-Ids. 
NmMessage 
Enum: 
Declares a message as a Network Management 
No 
message. The attribute must be set to ‘Yes’ for all 
Yes 
Virtual Network Management Frames (VNMF 
messages). 
TpTxIndex 
Integer 
Defines application TP messages. 
Table 3-6   Message Attributes 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
9 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
3.3.1 
Attribute Definitions for Diagnostics 
The following message attributes need to be defined to assign CAN-messages for the 
Diagnostic communication: 
Name 
Type 
Description 
DiagState 
Enum: 
Defines the AllNodeMessage request message 
No 
wit the CAN-ID 0x101 as the functional 
Yes 
diagnostic request message. 
This attribute causes the GENy to reduce the 
DLC check to a 1-byte value in order to let 
messages shorter than 8 bytes also pass the 
DLC-check. 
It also forces the Generation Tool to generate a 
specific function call inside the GMLAN-handler. 
DiagRequest 
Enum: 
Defines the physical request message from the 
No 
tester to the node for the diagnostic 
Yes 
communication. Together with the definition of 
DiagResponse, GENy assigns a connection 
within the Transport Layer. 
Note that GENy can only manage one pair of 
diagnostic connection. Thus, only one message 
can be defined for DiagRequest for one node. 
DiagResponse 
Enum: 
Defines the physical response message from the 
No 
node to the tester for the diagnostic 
Yes 
communication. Together with the definition of 
DiagRequest, GENy assigns a connection within 
the Transport Layer.  
Note that GENy can only manage one pair of 
connection. Thus, only one message can be 
defined for DiagRequest for one node. 
TpApplType 
String 
Defines the UUDT message of a node. It has to 
be set to “DiagUUDTResponse” for all diagnostic 
UUDT response messages. 
This attribute causes GENy to generate separate 
naming independent macros used by CANdesc. 
It will also generate tables that can potentially 
used by Multiple Identity Modules (MIMs). 
Table 3-7   Attribute Definitions for Diagnostics 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
10 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
3.4 
Signal Attributes 
On Signal level there are four concepts that need to be defined: 
>  Assignments of signals to VNs 
>  Definition of signal transmit models 
>  Definition of signal supervision methods 
>  Define default values for signal attributes (valid-failed, supervision failed, VDA/Mask 
signal failed, start-up default value) 
3.4.1 
VN-Assignment of Signals 
VN assignments of  signals are signal-dependent and therefore  defined at signal level. 
Every signal can be assigned to any or all VNs. Signal VN assignments are defined 
through the use of VN-specific attributes one per VN per signal. 
Name 
Type 
Description 
VNSig<VnName> 
Enum: 
Declares if a signal is assigned to a VN or not 
No 
Yes 
Table 3-8   VN-Assignment of Signals 
3.4.2 
Signal Transmit Model Attributes 
Event-based signal transmit criteria are defined at the signal level. Periodic transmit 
criteria are defined at the message level and do not appear here. Refer to chapter 4.1.1 
“Message Attributes”

Name 
Type 
Description 
GenSigSendOnInit 
Enum: 
Defines whether a signal (and the message) 
NotInitialized 
should be transmitted upon: 
Application 
>  Reception or transmission of an I-VNMF that 
Handler 
initializes at least one VN that is associated to 
the VN 
>  Start of a Shared Local VN, which the 
message is associated to 
>  All Initial Messages that are associated to any 
Initially Active VN are transmitted upon 
reception of a HLVW. 

 
2013, Vector Informatik GmbH 
Version: 2.02.01 
11 / 21 
Based on template version 2.8 




Technical Reference Database Attributes  
 
3.4.3 
Signal Supervision Attributes 
Signal supervision attributes are node-dependent and therefore  defined at the Node-Rx-
Signal relation instead on the signal itself. A signal can have different supervision criteria in 
different messages and different nodes. 
Name 
Attribute  Attribute Type  Description 
Class 

GenSigTimeoutTime 
Signal 
Integer 
The attribute defines the timeout time for 
self-supervision or supervised-by-presence. 
If the corresponding message doesn’t come 
in within this time, supervision failure 
indication is done on this message. 
GenSigTimeoutMsg 
Signal 
Hex 
This value defines the CAN-identifier that is 
used for supervision. For self-supervised 
messages, this is the CAN-identifier of the 
same message. This attribute directs to the 
message used for supervision-by-presence. 
GenSigSuprvResp 
Node-
Enum: 
Defines the strategy concerning substitution 
Mapped 
None 
and notification in case the signal 
Rx Signal  Notify 
supervision has failed. 
Substitute 
>  Notify: 
NotifySubstitute  
A timeout flag is automatically configured 
for the signal. 
>  Substitute: 
The timeout default value defined by 
‘GenSigSuprvRespSubValue’ is 
automatically configured for the signal. 
>  NotifySubstitute: 
Both a timeout flag and timeout default 
value are configured automatically for the 
signal. 
 
GenSigSuprvRespSubValue  Node-
Integer 
Timeout substitution value for failsoft 
Mapped 
mechanism. It is automatically set in case 
Rx Signal 
‘GenSigSuprvResp’ is defined as 
‘Substitute’ or ‘NotifySubstitute’. 
Table 3-9   Signal Supervision Attributes 
 
Info 
Note: Validity signals are identified by the Capital-V at the end of its signal short name. 
 
The Validity signal must have the same base name as the signal it is assigned to. 
 
Example 
Signal name:   SysPwrMode 
 
Validity signal:  SysPwrModeV 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
12 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
3.4.4 
Signal Attributes 
The following signal attribute  is  used in order to define the default/initial behavior of 
signals. These values are defined on signal level and are the same  for all nodes that 
transmit the signal. 
Name 
Type 
Description 
GenSigStartValue 
Integer 
Default value for a signal used by the GMLAN-
Handler to initialize the transmit value during 
Power-Up initialization. 
Table 3-10   Signal Attributes 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
13 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
4  Attribute Settings in Terms of GM Concepts 
Understanding the attributes and how they affect GENy  and the configuration of GMLAN 
can lead to a simple mapping of attribute values to GM-specific concepts on transmit 
models and signal supervision.  
Below is an outline of how GM transmit model and signal supervision concepts can drive 
the settings for the attributes involved. 
4.1 
Signal Transmit Model 
4.1.1 
Message Attributes 
As signals can only be transmitted as part of a message, all signals in a message will 
share the same transmission behavior. The message transmit model must therefore be set 
correctly to ensure all signals contained in the message can be transmitted according to 
their signal-specific requirements. Signal attributes define  event-based transmit criteria, 
but not periodic transmit criteria. Periodic transmit criteria must be defined at the message 
level. Any message containing a signal that must be transmitted periodically, regardless of 
value, must be marked as periodic. Signal attributes do not contain this information. Signal 
transmission requirements must be considered by the serial data engineer and used to 
determine if a message must be transmitted periodically. Periodic messages allow for 
event-based transmission in addition to the regularly scheduled cyclic transmissions. 
For periodic messages, a cycle time must be defined. The cycle time must be equal to the 
shortest transmit cycle time of all signals contained in the message. For signals with both 
slow and fast cycle times, only the slow cycle time should be considered.  
For periodic messages, a minimum update (or delay) time must be defined. The minimum 
update time is the least amount of time that must elapse between  transmissions of the 
message. The minimum update time must be equal to the longest minimum update time of 
all signals contained in the message. 
Name 
Value for Transmit Model 
Strictly Event Driven  Periodic 
Periodic w/Event 
GenMsgSendType 
spontanX 
cyclicX 
cyclicX 
GenMsgCycleTime 
N/A 
cycle time in ms 
cycle time in ms 
GenMsgDelayTime 
minimum delay time in  N/A 
minimum delay time in ms 
ms 
Table 4-1   Message Attributes of Transmit Model 
 
 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
14 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
4.1.2 
Signal Attributes 
Event-based transmit criteria are defined at the signal  level. Every signal has its own 
event-based transmit criteria. The signal type determines the valid and possible event-
based transmit criteria. Signal type is defined by the SignalType attribute. 
Attributes displayed in italic font aren’t used any more. They are listed for documentation 
purpose only. 
Name 
Value for Transmit Model (by Signal Type) 
SignalType = ENM 
 
Any 
None 
GenSigSendType 
OnAnyChange 
NoSigSendType 
SignalType = BLN 
 
Send on 0-1 
Send on 1-0 
Send on Any Change 
None 
GenSigSendType 
OnChangeIfActive 
OnChangeIfActive 
OnAnyChange 
NoSigSendType 
GenSigInactiveValue 


N/A 
N/A 
SignalType = UNM 
 
Send on 
On Delta & 
On Delta & 
On Delta, Top & 
None 
Delta 
Top 
Bottom 
Bottom 
GenSigSendType 
OnDelta 
OnDelta 
OnDelta 
OnDelta 
NoSigSend 
Type 
GenSigDeltaValue 
delta 
delta value 
delta value 
delta value 
N/A 
value 
GenSigSendTopBottom 
None 
SendOnTop 
SendOnBottom 
SendOnTopBotto
N/A 

Table 4-2   Signal Attributes of Transmit Model 
 
 
 
 
 
 
 
 
 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
15 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
4.2 
Signal Supervision 
4.2.1 
Signal Attributes 
Signal supervision is defined at the signal level.  Every signal has its own supervision 
criteria. There are two concepts that define signal supervision criteria. One concept is the 
signal supervision method and the other is the response triggered by a supervision failure. 
Name 
Value for Supervision Method 
Unsuper
Source 
Self 
Supervised By 
Supervised 
vised 
Learning 
Supervised 
Presence 
By Value 
(direct) 
(indirect) 
NodeStatusMsgTime

> 0 
N/A 
N/A 
N/A 
outTime 
GenSigTimeoutTime 


time in ms 
time in ms 
N/A 
GenSigTimeoutMsg 


hex CAN-ID of 
hex CAN-ID of 
N/A 
message  
message that 
containing this  shall be used for 
signal 
supervision 
Table 4-3   Signal Attributes for Supervision 
Name 
Value for Supervision Failure Response Type 
None 
Notify 
Substitute 
Notify & Substitute 
Application 
Value 
GenSigSuprvResp 
None 
Notify 
Substitute 
NotifySubstitute 
GenSigSuprvRespSubValue 
N/A 
N/A 
raw bus value 
raw bus value 
Table 4-4   Signal Attributes for Failsoft Mechanism 
2013, Vector Informatik GmbH 
Version: 2.02.01 
16 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
5  Database Attributes for CANoe Models 
The following database attributes are used for the configuration of CANoe models. They 
are not used by the configuration tools for the GMLAN Handler: 
 
Attribute Name 
Attribute 
Attribute  Description 
Class 
Type 
NodeLayerModules1  Node 
String 
This attribute is used by CANoe to load 
NodeLayer DLLs. These DLLs are used to 
provide an advanced interface to CAPL and 
extended functionality of a specific node. 
Typically, the value “GMLAN02.DLL” is 
provided. This DLL extends CANoe to provide 
GMLAN-specific functionalities. Another 
attribute value is “osek_tp.dll”. This DLL 
provides  
Table 5-1   Database Attributes for CANoe Models 
 
 
                                            
1 This attribute is not used for the configuration of the GMLAN-Handler. 
2013, Vector Informatik GmbH 
Version: 2.02.01 
17 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
6  Database Attributes not evaluated by GENy 
This chapter contains database attributes, which are defined in GM’s network databases 
but are not evaluated by the configuration and generation tool GENy for configuration of 
the GMLAN-Handler. 
 
Attribute Name 
Attribute 
Attribute Type 
Description 
Class 
UseGMParameterIDs 
Network 
Integer 
Defines if the network uses the 
GMLAN parameter ID’s in the 
29-bit architecture. 
1: Network uses Parameter-Ids 
(29-Bit) 
0: Network uses no parameter-
ID’s (11-Bit) 
SourceID 
Node 
Hexadecimal 
The Source address of a node is 
given as an attribute inside the 
database. There are two 
possibilities to use this attribute: 
>  Instead of initialization of the 
Source Address by the 
application, the handler could 
do this in the function IlInit(). 
This would imply, that the 
value is always fixed (MIM-
modules will be handled 
correctly depending on the 
pre-selection of the 
application, which instant 
should run). 
>  The transmit messages 
inside the handler will already 
be pre-set with the Source 
Address given in this 
attribute. 
This would avoid the runtime 
effort of the driver to add the 
source address every time a 
message must be 
transmitted. The dynamic 
setting will only be required 
for MIM’s. 
GenSigVBitResp 
Node-
Enum: 
Identifies that a validity signal is 
Mapped 
No 
used for signal integrity. 
Rx Signal 
Yes 
GenSigVDAFailResp 
Node-
Enum: 
Identifies that a VDA signal is 
2013, Vector Informatik GmbH 
Version: 2.02.01 
18 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
Mapped 
No 
used for signal integrity. 
Rx Signal 
Yes 
Table 6-1   Network attributes not evaluated by GENy 
 
6.1 
Signal Transmit Model Attributes 
Name 
Type 
Description 
SignalType 
String 
Defines the type of the signal: 
“ENM” : Enumeration 
“BLN” : Boolean 
“UNM” : Unsigned Numeric 
GenSigSendType 
Enum:  
Defines the transmit criteria for a signal 
0  not used   
ENM:  
1  not used   
NoSigSendType or OnAnyChange 
2  not used   
UNM: 
3  not used   
NoSigSendType or OnDelta 
4  not used   
5  not used   
BLN: 
6  not used   
NoSigSendType or OnChangeIfActive or 
7  NoSigSendType 
OnANyChange 
8  not used   
9  not used   
10 OnAnyChange 
11 OnChangeIfActive 
12 OnDelta 
GenSigInactiveValue 
Integer 
Defines if a signal shall be transmitted if 
changed (SigSendType = OnChangeIfActive). It 
is not send if it reaches the inactive value. 
Used to define the send type 0-to-1 OR 1-to-0. 
GenSigInactiveValue is defined as a raw value 
(for signals of type Boolean only raw values are 
used at all). 
GenSigSendTopBottom  Enum:  
Defines whether a signal of type UNM needs to 
None  
be sent if the physical value reaches one or all 
SendOnTop 
of its limits. 
SendOnBottom 
The limits for Top and Bottom are defined in the 
SendOnTopBottom 
Min and Max values of the database. 
GenSigDeltaValue 
Integer 
This is used with SigSendType “OnDelta”. If the 
most recent value exceeds the value of Delta 
compared to the last value sent via CAN, the 
signal is transmitted again. 
Table 6-2   Signal Transmit Model attributes not evaluated by GENy 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
19 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
6.1.1 
Node Mapped Rx-Signal Default Value Attributes 
Name 
Type 
Description 
GenSigRxStartValue 
String 
Value receivers set signal to at power up. 
Used for documentation and UEF-Export. 
Table 6-3   Rx-Signal Default attributes not evaluated by GENy 
 
2013, Vector Informatik GmbH 
Version: 2.02.01 
20 / 21 
Based on template version 2.8 


Technical Reference Database Attributes  
 
7  Contact 
Visit our website for more information on 
 
>   News 
>   Products 
>   Demo software 
>   Support 
>   Training data 
>   Addresses 
 
www.vector-informatik.com 
2013, Vector Informatik GmbH 
Version: 2.02.01 
21 / 21 
Based on template version 2.8 

Document Outline


35 - TechnicalReference_GMLANCalibration

YourTopic

37 - TechnicalReference_GMLANCalibrations


 
 
 
 
 
 
 
 
 
 
 
 
GMLAN 3.1 
Technical Reference 
 
Calibration with GENy 
Version 2.01.01 
 
 
 
 
 
 
 
 
 
 
Authors 
Gunnar Meiss, Markus Schwarz, Jason Wolbers, Heiko 
Hübler, Frank Triem, Marco Pfalzgraf 
Versions: 
2.01.01 
Status: 
Released 
 
 
 
 
 



Technical Reference GMLAN 3.1  
 
1  Document Information 
1.1  History 
Author 
Date 
Version  Remarks 
Gunnar Meiss 
2007-04-13 
1.0 
Creation 
Gunnar Meiss 
2008-01-16 
2.0 
Added GENy Support 
Markus Schwarz 
2009-03-26 
2.00.01  Corrected generation rules for 
nmVNMFStartSendCalCnt 
Jason Wolbers 
2012-03-27 
2.00.02  Added descriptions for 
IlVnRxMessageEnabled, 
IlVnTxMessageEnabled 
Fixed Init Message description 
Heiko Hübler, 
2012-10-27 
2.01.00  Added description for Rx Timeout Time 
Marco Pfalzgraf, 
Chapter 3 added 
Frank Triem 
Added descriptions for ‘Sleep Transition Time’, 
‘Supervision Stability Time’, ‘Max No Sleep 
Confirmation’ 
Frank Triem 
2013-01-28 
2.01.01  ESCAN00064578: Update GMLAN version 
from GMLAN 3.0 to GMLAN 3.1 
Table 1-1  
History of the Document 
1.2  Reference Documents 
Index 
Document 
[1] 
Vector’s Interaction Layer User Manual 
[2] 
Vector’s Interaction Layer Technical Reference for GENy 
[3] 
Vector’s Interaction Layer Technical Reference for GM 
[4] 
Vector’s Network Management Technical Reference 
Table 1-2  
References Documents 
 
 
Please note 
We have configured the programs in accordance with your specifications in the 
 
questionnaire. Whereas the programs do support other configurations than the one 
specified in your questionnaire, Vector’s release of the programs delivered to your 
company is expressly restricted to the configuration you have specified in the 
questionnaire. 
2013, Vector Informatik GmbH 
Version: 2.01.01 
2 / 24 
based on template version 2.7 


Technical Reference GMLAN 3.1  
 
Contents 
3.1.1 
What is new?................................................................................................... 6 
3.1.2 
What has changed? ........................................................................................ 6 
3.2.1 
What is new?................................................................................................... 6 
3.2.2 
What has changed? ........................................................................................ 6 
5.1.1 
Message Delay Time ....................................................................................... 9 
5.1.2 
Minimum Update Time .................................................................................... 9 
5.1.3 
Periodic Rate................................................................................................. 10 
5.1.4 
Fast Periodic Rate ......................................................................................... 10 
5.1.5 
Init Message .................................................................................................. 10 
5.2.1 
Rx Timeout Time ........................................................................................... 11 
5.3.1 
Initial Transmit Value ..................................................................................... 12 
5.3.1.1 
GENy Configuration ...................................................................................... 13 
5.3.1.2 
Initial Default Values of Transmit Signals ....................................................... 13 
5.3.1.3 
Start and Stop Default Values of Transmit Signals ......................................... 14 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
3 / 24 
based on template version 2.7 


Technical Reference GMLAN 3.1  
 
Illustrations 
Figure 5-1 
Signal layout of the example message .......................................................... 12 
Figure 5-2 
GENy configuration of the ‚Tx Signals’ view  with the example message’s 
signals ........................................................................................................... 13 

Figure 6-1 
“BusOff Recovery Time” configuration in GENy ............................................. 16 
Figure 6-2 
“Init Delay Time” configuration in GENy ......................................................... 17 
Figure 6-3 
"Sleep Transition Time" configuration in GENy .............................................. 18 
Figure 6-4 
"Supervision Stability Time" configuration in GENy ........................................ 19 
Figure 6-5 
"Max No Sleep Confirmation" configuration in GENy ..................................... 20 
 
Tables 
Table 1-1  
History of the Document .................................................................................. 2 
Table 1-2  
References Documents ................................................................................... 2 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
4 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
2  Introduction 
This document describes the calibration (post build configuration) parameters of the 
GMLAN  Handler  that is configured with GENy.  It does not describe the process how the 
calibration of the GMLAN Handler is carried out. 
 
Please note 
This document is valid for GMLAN 3.1 
 
  Il_Vector_Gm version 1.01.00 and higher 
  Nm_Gmlan_Gm version 4.03.00 and higher 
Changes to previous module version can be found in chapter 3. 
 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
5 / 24 
based on template version 2.7 


Technical Reference GMLAN 3.1  
 
3  Module History 
This chapter describes the calibration  implementation of the Vector Interaction Layer and 
Network Management for General Motors in GENy. 
3.1 
Il_Vector_Gm Version 1.01.00 
3.1.1 
What is new? 
  The Rx Timeout Time for each message is calibrated (chapter 5.2.1)
3.1.2 
What has changed? 
  There are no changes in this version. 
3.2 
Nm_Gmlan_Gm Version 4.03.00 
3.2.1 
What is new? 
  New calibrateable values for ‘Sleep Transition Time’, ‘Supervision Stability Time’ and 
‘Max No Sleep Confirmation’ (chapters 6.5, 6.6 and 6.7). 
3.2.2 
What has changed? 
  There are no changes in this version. 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
6 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
4  GMLAN Handler Calibration 
The calibration of the GMLAN Handler is done by modification of the post build time 
configuration parameters (constant variables and tables) that can be found in gmlcal.c. 
 
The following chapter describes in detail the configuration parameters (constant variables 
and tables) of the generated file gmlcal.c. 
 
Info 
If the calculated Table Values have a remainder, the value has to be rounded depending 
 
on your needs. 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
7 / 24 
based on template version 2.7 


Technical Reference GMLAN 3.1  
 
5  Il_Vector_Gm : Interaction Layer 
This chapter describes the calibration capabilities of the Interaction Layer. 
5.1  Transmit Messages 
The GMLAN Handler provides the ability to enable and disable the transmit process for 
each transmitted functional message with the function IlSetTxMessageEnable(..). 
The default for this calibration is ‘enabled’. 
This can also be calibrated directly using the table IlVnTxMessageEnabled[]. Note 
that  using  the function IlSetTxMessageEnable  has the same effect as modifying 
IlVnTxMessageEnabled[], so it is not necessary to both calibrate the table and call the 
function. The table is a bit-packed field where each bit represents one IL transmit 
message. If the bit is a 1, the message is calibrated on and can be sent whenever a 
relevant VN is active; if the bit is a 0, the message is calibrated off and will never be sent 
by the IL at runtime regardless of VN activity.  The IL messages are ordered least 
significant bit to most significant bit in each byte. The first byte contains IL messages 7-0, 
the second byte 15-8, and so on. For example, consider a single CAN channel 
configuration with 10 IL messages: 
{0xFF, 0x03} – All 10 IL messages are calibrated on 
{0xFE, 0x03} – IL message 0 is calibrated off 
{0x7F, 0x03} – IL message 7 is calibrated off 
{0xFF, 0x01} – IL message 9 is calibrated off 
 
When a configuration contains more than one CAN channel, a new byte in 
IlVnTxMessageEnabled  is started to represent the IL messages for the next channel. 
The remaining bits in the byte for the previous channel are skipped and have no meaning. 
For example, consider a configuration with 10 IL messages on channel 0 and 12 IL 
messages on channel 1: 
{0xFF, 0x03, 0xFF, 0x0F} – All 22 IL messages are calibrated on 
{0xFF, 0x03, 0xFE, 0x0F}  –  IL message 10 (the first  IL  message on channel 1) is 
calibrated off 
{0xFF, 0x03, 0x7F, 0x0F} – IL message 17 (the eighth IL message on channel 1) is 
calibrated off 
 
The numbering of the IL messages can be found at the top of the generated file il_par.h 
in the format #define IlTxMsgHnd<message name>  <number>.  Non-IL messages 
(VNMF, HLVW, diagnostics, etc.) cannot be calibrated using this method. 
2013, Vector Informatik GmbH 
Version: 2.01.01 
8 / 24 
based on template version 2.7 


Technical Reference GMLAN 3.1  
 
5.1.1 
Message Delay Time 
The start delay time for each transmit message (Interaction Layer Tx Handle) is configured 
in the table IlTxStartCycles[]. 
Symbol 
Description 
GenMsgStartDelayTime 
The start delay time of a message in ms. 
This is also the corresponding database attribute. 
kIlTxCycleTime 
The call cycle time of the IlTxTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the corresponding IL Tx handle. 
 
The Formula for the Value Calculation is: 
GenMsgSt t
ar DelayTime  +1 = TableValue


 

kIlTxCycl Tim
e
e

If the following condition matches, the value 0 has to be used for the IL Tx handle. 
GenMsgSt t
ar DelayTime  = 0


 

kIlTxCycl Tim
e
e

5.1.2 
Minimum Update Time 
The  minimum update time for each transmit message (Interaction Layer Tx Handle) is 
configured in the table IlTxUpdateCycles[]. 
Symbol 
Description 
GenMsgDelayTime 
The delay time of a message in ms. 
This is also the corresponding database attribute. 
kIlTxCycleTime 
The call cycle time of the IlTxTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent IL Tx handle. 
 
The Formula for the Value Calculation is: 
GenMsgDel yT
a
ime  +1 = TableValue


 
 kIlTxCycl Tim
e

If the following condition matches, the value 0 has to be used for the IL Tx handle. 
GenMsgDel yT
a
ime  = 0


 
 kIlTxCycl Tim
e

 
2013, Vector Informatik GmbH 
Version: 2.01.01 
9 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
5.1.3 
Periodic Rate 
The periodic rate for each transmit message (Interaction Layer Tx Handle) is configured in 
the table IlTxCyclicCycles[]. 
Symbol 
Description 
GenMsgCycleTime 
The cycle time of a cyclic message in ms. 
This is also the corresponding database attribute. 
kIlTxCycleTime 
The call cycle time of the IlTxTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent IL Tx handle. 
 
The Formula for the Value Calculation is: 
GenMsgC eT
ycl
ime  = TableValue


 
 kIlTxCycl Tim
e

 
5.1.4 
Fast Periodic Rate 
The fast periodic rate for each transmit message (Interaction Layer Tx Handle) is 
configured in the table IlTxEventCycles[]. 
Symbol 
Description 
GenMsgCycleTimeFast 
The fast cycle time of a message in ms. 
This is also the corresponding database attribute. 
kIlTxCycleTime 
The call cycle time of the IlTxTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent IL Tx handle. 
 
The Formula for the Value Calculation is: 
GenMsgC eT
ycl
imeFast  = TableValue


 

kIlTxCycl Tim
e
e

 
5.1.5 
Init Message 
The Init Messages are enabled/disabled in the table IlVnTxSendOnInit[]. The table 
contains one bit for each transmit message (Interaction Layer Tx Handle): 
  0: The transmit message is not an Init Message 
  1: The transmit message is an Init Message 
  The layout of the table follows the same pattern as IlVnTxMessageEnabled[] for 
transmit messages.  Please see section 4.1 for a description and examples. 
Please note 
The implementation of the table has changed between CANGen and GENy. 
 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
10 / 24 
based on template version 2.7 


Technical Reference GMLAN 3.1  
 
Any message that is transmitted via the Interaction Layer (usually all messages with 
extended IDs) can be configured as Init Messages. These messages are transmitted 
according to the configured transmission type ‘cyclic’, ‘on event’ or ‘cyclic and on event’. 
The Init Messages are additional transmitted upon: 
  Reception or transmission of an I-VNMF that initializes at least one VN that is 
associated to the VN 
  Start of a Shared Local VN, which the message is associated to 
  All Initial Messages that are associated to any Initially Active VN are transmitted upon 
reception of a HLVW. 
The transmission of the Init Message is delayed according to the calibrated message delay 
time. Refer to 5.1.1. 
5.2  Receive Messages 
The GMLAN Handler provides the ability to enable and disable the receive process for 
each received functional message with the function IlSetRxMessageEnable(..).  
The default for this calibration is ‘enabled’. 
This can also be calibrated directly using the table IlVnRxMessageEnabled[].  Note 
that  using  the function IlSetRxMessageEnable  has the same effect as modifying 
IlVnRxMessageEnabled[], so it is not necessary to both calibrate the table and call the 
function.  The layout of the table follows the same pattern as IlVnTxMessageEnabled[] 
for transmit messages. Please see section 4.1 for a description and examples. 
5.2.1 
Rx Timeout Time 
The Rx Timeout Time for each message is configured in the table IlRxTimeoutTbl[]. 
Symbol 
Description 
GenSigTimeoutTime_<ECU>  Timeout time of a message in ms. 
This is also the corresponding database attribute. 
kIlRxCycleTime 
The call cycle time of the IlRxTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent IL Rx handle. 
 
The Formula for the Value Calculation is: 
GenSigTi o
me utTime  = TableValue


 
 kIlRxCycl Tim
e
e

2013, Vector Informatik GmbH 
Version: 2.01.01 
11 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
5.3  Transmit Signals 
5.3.1 
Initial Transmit Value 
This chapter describes the configuration of Tx signal default values that are set are set in 
the Interaction Layer state transitions IlInit / IlTxStart / IlTxStop. 
The following message layout is used as example in the following chapters. 
 
Figure 5-1 
Signal layout of the example message 
2013, Vector Informatik GmbH 
Version: 2.01.01 
12 / 24 
based on template version 2.7 





Technical Reference GMLAN 3.1  
 
5.3.1.1  GENy Configuration 
In order  to have the calibration (post build) capability of default values for all transmit 
signals the ‘Init default’, ‘Start default’ and ‘Stop default’ have to be activated in GENy as 
shown in the following figures. 
 
Figure 5-2 
GENy configuration of the ‚Tx Signals’ view  with the example message’s signals 
5.3.1.2  Initial Default Values of Transmit Signals 
The generated file gmlcal.c  contains for each transmit  message a table named 
<MessageName>IlTxDefaultInitValue with the data type vuint8 [].   
The size of the table depends on the length of the data of the corresponding message that 
is relevant for your node. The table contains the default values of the message. 
 
Example 
The SignalA is located in the first byte of the array. The signal starts in bit 4 and ends in 
 
bit 7 as shown in Figure 5-1. 
If for example the default value for the SignalA in the Intel format is 1 and for the SignalB 
and SignalC is 0, the table would contain the following values: 
 
GMLCAL_MEMROM0 GMLCAL_MEMROM1 vuint8 GMLCAL_MEMROM2 
MessageIlTxDefaultInitValue[] = { 
   0x10 
  ,0x00 
}; 
 
Caution 
The byte order (Little Endian / Big Endian) has to be taken in account when setting up 
 
the default values for the signals. 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
13 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
5.3.1.3  Start and Stop Default Values of Transmit Signals 
The generated file gmlcal.c  contains for each transmit  message a table named 
<MessageName>IlTxDefaultStartMask 
for the IlTxStart 
transition and 
<MessageName>IlTxDefaultStopMask for the IlTxStop transition with the data type 
vuint8 []. 
The size of these tables depends on the length of the data of the corresponding message 
that is relevant for your node. These  tables  contain  masks that are applied on the 
corresponding default value of the table <MessageName>IlTxDefaultInitValue. 
The mask table contains a ‘set bit’ at each bit position, where the default value is applied. 
 
Example 
If for example the default value for the SignalA shall be set at IlTxStart and not for 
 
SignalB and SignalC, the table would contain the following values: 
 
GMLCAL_MEMROM0 GMLCAL_MEMROM1 vuint8 GMLCAL_MEMROM2 
MessageIlTxDefaultStartMask[] = { 
   0xF0 
  ,0x00 
}; 
 
5.4  Receive Signals 
Receive signal calibration is not supported by the GMLAN Handler. 
2013, Vector Informatik GmbH 
Version: 2.01.01 
14 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
6  Nm_Gmlan_Gm : Network Management 
This chapter describes the calibration capabilities of the Network Management. 
6.1  nmVNMFStartSendCalCnt (Bus Wakeup Delay Time) 
This is the time between transmission of a HLVW message and a VNMF-Init message 
when activating a Virtual Network. Also known as the Bus Wakeup Delay Time. Time is 
measured in multiples of the Nm Cycle Time. Default value is 100ms. 
Symbol 
Description 
BusWakeupDelayTime 
Delay time in ms. 
NM_CYCLETIME 
The call cycle time of the IlNwmTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent NM channel. 
 
 NmInitDel yT
a
ime NM CYCLETIME − 1 = TableValue


 

NM CYCLETIME

 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
6.2  nmVNMFSendTimeCalCnt (VMNMF Periodic rate) 
Time between sending continue VNMFs. Time is measured as multiples of the Nm Cycle 
Time. Default value is 3000ms if the attribute GenMsgCycleTime for this VNMF message 
is not set to a different value in the database. 
Symbol 
Description 
VNMFPeriodicRate 
Cycle of the VNMF message time in ms. 
NM_CYCLETIME 
The call cycle time of the IlNwmTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent NM channel. 
 
VNMFPerio ic
d Rate NM CYCLETIME − 1 = TableValue


 

NM CYCLETIME

 
2013, Vector Informatik GmbH 
Version: 2.01.01 
15 / 24 
based on template version 2.7 





Technical Reference GMLAN 3.1  
 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
6.3  nmBusoffRecoveryTimeCalCnt (BusOff Recovery Delay Time) 
The ‘BusOff recovery Delay Time’ is the time to wait after a BUS-OFF event to reset the 
CAN controller and attempt recovery. The time is measured as multiples of the Nm Cycle 
Time. The value corresponds to the “BusOff Recovery Time” field in the channel properties 
of GENy. 
 
Figure 6-1 
“BusOff Recovery Time” configuration in GENy 
Symbol 
Description 
BusOffRecoveryDelayTime  Delay time in ms for Bus-Off recovery. 
NM_CYCLETIME 
The call cycle time of the IlNwmTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent NM channel. 
 
 BusOff Re cov eryDelayT me
i
NM CYCLETIME −1 = TableValue


 

NM CYCLETIME

 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
16 / 24 
based on template version 2.7 




Technical Reference GMLAN 3.1  
 
6.4  nmInitDelayTimeCalCnt (Init Delay Time) 
For initially-active Virtual Networks, the ‘Init DelayTime’ defines the time between reception 
of a HLVW message and transmission of Node Communication Active (NCA), periodic, 
and send on-init messages. The time is measured as multiples of the Nm Cycle Time. The 
value corresponds to the “Init Delay Time” field in the channel properties of GENy. 
 
Figure 6-2 
“Init Delay Time” configuration in GENy 
 
Symbol 
Description 
NmInitDelayTime 
Delay time in ms. 
NM_CYCLETIME 
The call cycle time of the IlNwmTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent NM channel. 
 
 NmInitDel yT
a
ime NM CYCLETIME − 1 = TableValue


 

NM CYCLETIME

 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
6.5  nmSleepTransitionDelayTimeCalCnt (Sleep Transition Time) 
The ‘Sleep Transition Time’ defines an extra delay time between CAN driver initialization 
and setting the transceiver into sleep mode during shut down. This extra time gap between 
CanInit() and ApplTrcvrSleepMode()provides additional protection against missing 
of wake-up messages (HLVW). 
The total time is calculated by adding the 'Bus Wakeup Delay Time' (chapter 6.1) and 
'Sleep Transition Time' (this value). Note: The total time must not exceed 4 seconds! 
2013, Vector Informatik GmbH 
Version: 2.01.01 
17 / 24 
based on template version 2.7 




Technical Reference GMLAN 3.1  
 
The value corresponds to the “Init Delay Time” field in the channel properties of GENy. The 
default value is 50ms. 
 
Figure 6-3 
"Sleep Transition Time" configuration in GENy 
 
Time is measured as multiples of the Nm Cycle Time. 
Symbol 
Description 
NmSleepTransitionTime 
Delay time in ms. 
NM_CYCLETIME 
The call cycle time of the IlNwmTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent NM channel. 
 
 NmSleepT n
ra sitionTime NM CYCLETIME − 1 = TableValue


 

NM CYCLETIME

 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
18 / 24 
based on template version 2.7 




Technical Reference GMLAN 3.1  
 
6.6  nmSupervisionStabilityTimeCalCnt (Supervision Stability Time) 
The ‘Supervision Stability Time’ defines a delay time between activation of a VN and start 
of Rx supervision of the corresponding signals. It is used to avoid 'Loss of Communication' 
DTCs due to transient conditions after VN activation. 
The value corresponds to the “Init Delay Time” field in the channel properties of GENy. It is 
derived by the dbc attribute 'NodeSuprvStabilityTime'. If attribute does not exist, a default 
value of 5000ms is used. 
 
Figure 6-4 
"Supervision Stability Time" configuration in GENy 
 
Time is measured as multiples of the Nm Cycle Time. 
Symbol 
Description 
NmSuprvStabilityTime 
Delay time in ms. 
NM_CYCLETIME 
The call cycle time of the IlNwmTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent NM channel. 
 
 NmSuprvSt b
a ilityTime NM CYCLETIME − 1 = TableValue


 

NM CYCLETIME

 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
19 / 24 
based on template version 2.7 




Technical Reference GMLAN 3.1  
 
6.7  nmMaxApplShutDownDenyCnt (Max No Sleep Confirmation) 
This value is only used if ‘Fault Detection and Mitigation’ and ‘Sleep Confirmation’ are both 
enabled in GENy. 
The value defines a threshold for number of times the application may deny the transition 
to sleep mode within ApplNwmSleepConfirmation(). For detailed description of Fault 
Detection and Mitigation Algorithm see chapter 3.11 in [4]. 
The value corresponds to the “Max No Sleep Confirmation” field in the channel properties 
of GENy. The default value is 5. 
 
Figure 6-5 
"Max No Sleep Confirmation" configuration in GENy 
 
The value is generated directly as defined in GENy. 
 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
20 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
6.8  GMLANNodeStatusTimeoutTimeCalCnt  (Node Communication Active Frame 
Timeout) 
The timeout for incoming Node Communication Active (NCA) messages is configured with 
kGMLANNodeStatusTimeoutTimeCalCnt. Failure to receive a NCA message in this 
period indicates that a node has failed. Time is measured as multiples of the Nm Cycle 
Time. The value corresponds to the value of the NodeStatusMsgTimeoutTime attribute in 
the database. 
Symbol 
Description 
NodeStatusMsgTimeoutTime  Timeout time in ms. 
NM_CYCLETIME 
The call cycle time of the IlNwmTask of the dependent 
channel in ms. 
TableValue 
The value in the table for the dependent NM channel. 
 
 NoteStatusMsgTimeoutTime NM CYCLETIME −1 = TableValue


 

NM CYCLETIME

 
Info 
For a single channel configuration, there is only a constant generated. 
 
For a multi channel configuration there will be an array generated which will have 
as much entries as CAN channels are configured. The first entry is used for the 
first CAN channel, the second for the second CAN channel and so on.  
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
21 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
7  Memory Definition file: MemDef.h 
In order to allow calibration of the GMLAN Handler without modification of the generated 
configuration files all calibration parameters are located in the same file (gmlcal.c). 
Since the calibration parameters are stored in non-volatile memory (flash or EEPROM) the 
possibility of linking/locating these parameters in a separate memory section is provided. 
There are mechanisms in order to support various compilers: 
  Memory Mapping via pre-processor directives (#pragma) 
  Linking of tables with memory qualifiers 
If necessary both mechanism may be combined. 
7.1  Memory Mapping 
The memory mapping with pre-processor directives is done with the definition of sections 
that are embraced with a start definition that is followed by MemDef.h and a stop definition 
that is followed by MemDef.h. By adding #pragma definitions at the beginning and end of 
a section the parameters (tables)  in-between  may  be linked in to a defined memory 
section. 
 
Example 
The following code shows a partial extract of gmlcal.c and a the mapping of the 
 
calibration parameters to the section CALIBRATION: 
gmlcal.c: 
#define GMLCAL_START_SEC_CONST 
#include "MemDef.h" 
 
GMLCAL_MEMROM0 GMLCAL_MEMROM1 canuint16 GMLCAL_MEMROM2 
nmBusoffRecoverTimeCalCnt = (NM_BUSOFF_RECOVER_TIME + NM_CYCLETIME-
1)/NM_CYCLETIME; 
 
#define GMLCAL_STOP_SEC_CONST 
#include "MemDef.h" 
 
MemDef.h: 
/* Definition of section for calibration parameters. */ 
#if defined ( GMLCAL_START_SEC_CONST ) 
#undef GMLCAL_START_SEC_CONST 
#pragma section .CALIBRATION 
#endif 
 
/* Definition of section for default parameters. */ 
#if defined ( GMLCAL_STOP_SEC_CONST ) 
#undef GMLCAL_STOP_SEC_CONST 
#pragma section .DEFAULT 
#endif 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
22 / 24 
based on template version 2.7 



Technical Reference GMLAN 3.1  
 
7.2  Memory Qualifiers 
Separate memory qualifiers are used for all calibration parameters instead of the GMLAN 
Handler’s Standard memory qualifiers in order to support linking these parameters to a 
separate memory section. These memory qualifiers have to be adapted to the user’s 
needs.  
The following table provides a list of these memory qualifiers that are defined in 
MemDef.h. 
Memory Qualifier 
Default definition 
GMLCAL_MEMROM0 
V_MEMROM0 
GMLCAL_MEMROM1 
V_MEMROM1 
GMLCAL_MEMROM2 
V_MEMROM2 (usually defined to const) 
GMLCAL_MEMROM3 
V_MEMROM3 
The memory qualifiers defined in MemDef.h are exclusive used in gmlcal.c and gmlcal.h 
The following example shows how the memory qualifiers are used in gmlcal.c. 
 
Example 
The following example shows how the memory qualifiers are used in gmlcal.c / gmlcal.h: 
 
GMLCAL_MEMROM0 extern GMLCAL_MEMROM1 canuint16 GMLCAL_MEMROM2 
nmBusoffRecoverTimeCalCnt; 
 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
23 / 24 
based on template version 2.7 


Technical Reference GMLAN 3.1  
 
8  Contact 
Visit our website for more information on 
 
>   News 
>   Products 
>   Demo software 
>   Support 
>   Training data 
>   Addresses 
 
www.vector.com 
 
2013, Vector Informatik GmbH 
Version: 2.01.01 
24 / 24 
based on template version 2.7 

Document Outline


38 - UserManual_CANdesc

User Manual <User Manual Titlel>

40 - UserManual_CANdescs









 
 
 
 
 
 
 
 
 

User Manual 
 
  CANdesc  
 
  A Step by Step Introduction
Version 1.7 
 
  English 
 
 
 
 

 
 
 
Impressum 
 
Vector Informatik GmbH 
Ingersheimer Straße 24 
D-70499 Stuttgart 
 
 
The information and data given in this user manual can be changed without prior notice. No part of this manual may be reproduced in 
any form or by any means without the written permission of the publisher, regardless of which method or which instruments, electronic 
or mechanical, are used. All technical information, drafts, etc. are liable to law of copyright protection. 
 © Copyright 2009, Vector Informatik GmbH  
All rights reserved. 
 

User Manual CANdesc  
Manual Information 
Manual History 
Author 
Date 
Version 
Details 
Klaus Emmert 
2004-05-10 
1.1 
Vector symbols included, template 
version 1.8 used (this history 
included), AppDesc… changed to 
ApplDesc due to software 
modifications, description of GENy 
as generation tool added, testing of 
diagnostics layer described with 
CANoe demo configuration, further 
Information about diagnostic buffer 
(linear and ring buffer mechanism) 
and the repeated service call 
feature 
Klaus Emmert 
2004-10-15 
1.2 
Modifications after Review. 
Klaus Emmert 
2005-08-12 
1.3 
Two new functions: 
DescTimerTask(), 
DescStateTask().  
These two functions can be used 
instead of DescTask to handle the 
timers and the application 
separately. 
Klaus Emmert 
2006-03-24 
1.4 
Issues in example code fixed 
Document overview added 
Oliver Garnatz 
2007-01-12 
1.5 
Added description of 
CANdesc_ConnectorCAN GENy 
component 
Klaus Emmert 
2008-01-28 
1.6 
References fixed 
Manuela Scheufele 
2009-07-27 
1.7 
(see section Version 1.7 on page 
66)  
 
 
Reference Documents 
No. 
Source 
Title 
[1] 
Vector Informatik  Technical Reference CANdesc 
[2] 
Vector Informatik  Technical Reference CANdescBasic 
  
 
© Vector Informatik GmbH 
Version 1.7 
- 3 - 

Manual Information 
User Manual CANdesc 
Inhaltsverzeichnis 
1 
Manual Information 
6 
1.1 
About this user manual 

1.1.1 
Certification 

1.1.2 
Warranty 

1.1.3 
Registered trademarks 

1.1.4 
Errata Sheet of manufacturers 

2 
Getting Started 
9 
2.1 
How to use this Manual 
10 
3 
Basic Information 11 
3.1 
An Overall View 
12 
3.2 
What is Diagnostic 
13 
3.3 
What happens during Diagnostics? 13 
3.4 
What is CANdesc? 
14 
3.5 
Tools and Files 
14 
3.5.1 
CANdela Studio, CDDT, CDD 14 
3.5.2 
Generation Tool, CDD, DBC 14 
3.5.3 
Generation Process with CANbedded Software Components 15 
3.6 
What CANdesc does 
15 
3.7 
Diagnostics – a more detailed View 17 
3.7.1 
Basic Nomenclature from the Bottom Up 18 
3.7.2 
The same Nomenclature from the Top Down 19 
3.7.3 
Where to find this Nomenclature in CANdela Studio 19 
3.7.4 
Generic Handling of a Diagnostic Request in the CANdesc Component 21 
3.7.5 
User, None, OEM, Generated – what does this mean? 23 
4 
A Few STEPS to CANdesc 24 
4.1 
STEP What do you need before start? 25 
4.2 
Startup Code 
25 
4.3 
Overview 
25 
4.4 
STEP Installation 
26 
4.5 
STEP Configuration with the Generation Tool 26 
4.5.1 

Using the Generation Tool CANgen 26 
4.5.2 
Using the Generation Tool GENy 27 
4.6 
STEP Generating Files 
29 
4.6.1 
Using Generation Tool CANgen 29 
4.6.2 
Using the Generation Tool GENy 32 
4.7 
STEP Add CANbedded to your Project 32 
4.8 
STEP Adapt Your Application Files 33 
4.8.1 

Including, Initializing and Cyclic Calling 33 
4.9 
STEP Functional Connection between your Application and CANdesc/CANdela Studio 35 
4.9.1 

How to handle User-Defined Handlers 35 
4.9.2 
How to Handle Predefined Handlers (for MainHandler only) 38 
4.9.3 
Handling OEM-Specific Settings 40 
- 4 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
Manual Information 
4.10 
STEP Compile and link your Project 41 
4.11 
STEP Test it via CANoe 41 
4.11.1 

Start CANoe.CAN OSEK TP enlarged 41 
4.11.2 
Test of CANdesc 42 
5 
Further Information 44 
5.1 
Diagnostic State Handling using CANdela Studio 45 
5.2 
Typical Examples of State Groups and States in an Automotive Environment 45 
5.3 
Creating and editing State Groups, States and Transitions 45 
5.4 
Connection between the states and your application 47 
5.5 
Diagnostic Buffer 
48 
5.5.1 
Linear Diagnostic Buffer 48 
5.5.2 
Ring Buffer Mechanism 49 
5.5.2.1 
Activation of the Ring Buffer 51 
5.5.2.2 
Main Control Functions for the Ring Buffer Mechanism 51 
5.5.2.3 
Examples for Ring Buffer Mechanism 52 
5.6 
Repeated Service Call Feature 55 
5.6.1 

Activation of the Repeated Service Call 55 
5.6.2 
Repeated Service Call and Ring Buffer 1 – “Write and Check” 56 
5.6.3 
Repeated Service Call and Ring Buffer 2 – “Check and Write” 57 
6 
Additional Information 58 
6.1 
Persistors 
59 
6.1.1 
Update Persistors – Install current Version 60 
7 
FAQs 
63 
7.1 
Introduction 
64 
7.2 
Frequently Asked Questions 64 
8 
What’s new, what’s changed 65 
8.1 
Version 1.7 
66 
8.1.1 
What’s new 
66 
8.1.2 
What’s changed 66 
9 
Address table 67 
10 
Glossar 69 
11 
Index 
70 
 
© Vector Informatik GmbH 
Version 1.7 
- 5 - 

Manual Information 
User Manual CANdesc 
1 Manual 
Information 
In this chapter you find the following information: 
1.1 
About this user manual  
page 
7
 
Certification 
 
Warranty 
 
Registered trademarks 
 
Errata Sheet of manufacturers 
  
 
- 6 - 
Version 1.7 
© Vector Informatik GmbH 








User Manual CANdesc  
Manual Information 
1.1 
About this user manual 
Finding information 
The user manual provides the following access help: 
quickly 
¼  At the beginning of each chapter you will find a summary of the contents, 
¼  In the header you can see in which chapter and paragraph you are, 
¼  In the footer you can see to which version the user manual replies, 
¼  At the end of the user manual you will find an index, with whose help you will 
quickly find information, 
¼  Also at the end of the user manual you will find a glossary in which you can look 
up an explanation of used technical terms 
  
Conventions 
In the two following charts you will find the conventions used in the user manual 
regarding utilized spellings and symbols. 
  
 
Style 
Utilization 
 
bold 
Blocks, surface elements, window- and dialog names of the 
software. Accentuation of warnings and advices. 
[OK] 
 
Push buttons in brackets 
File|Save 
Notation for menus and menu entries 
 
MICROSAR 
Legally protected proper names and side notes. 
 
Source Code 
File name and source code. 
 
Hyperlink 
Hyperlinks and references. 
 
<CTRL>+<S> Notation 
for 
shortcuts. 
  
 
Symbol 
Utilization 
 
Here you can obtain supplemental information. 
 
 
This symbol calls your attention to warnings. 
 
 
Here you can find additional information. 
 
 
Here is an example that has been prepared for you. 
 
 
Step-by-step instructions provide assistance at these points. 
 
 
Instructions on editing files are found at these points. 
 
 
 
This symbol warns you not to edit the specified file. 
 
  
© Vector Informatik GmbH 
Version 1.7 
- 7 - 



Manual Information 
User Manual CANdesc 
1.1.1  Certification 
Certified Quality 
Vector Informatik GmbH has ISO 9001:2000 certification. The ISO standard is a 
Management System  globally recognized standard. 
  
Spice Level 3 
The Embedded Software Components business area at Vector Informatik GmbH 
achieved process maturity level 3 during a HIS-conformant assessment. 
  
1.1.2  Warranty 
Restriction of 
We reserve the right to change the contents of the documentation and the software 
warranty 
without notice. Vector Informatik GmbH assumes no liability for correct contents or 
damages which are resulted from the usage of the documentation. We are grateful for 
 
references to mistakes or for suggestions for improvement to be able to offer you 
even more efficient products in the future. 
  
1.1.3  Registered trademarks 
Registered 
All trademarks mentioned in this documentation and if necessary third party 
trademarks 
registered are absolutely subject to the conditions of each valid label right and the 
rights of particular registered proprietor. All trademarks, trade names or company 
 
names are or can be trademarks or registered trademarks of their particular 
proprietors. All rights which are not expressly allowed are reserved. If an explicit label 
of trademarks, which are used in this documentation, fails, should not mean that a 
name is free of third party rights. 
 
¼ Outlook, Windows, Windows XP, Windows 2000, Windows NT, Visual Studio are 
trademarks of the Microsoft Corporation. 
  
1.1.4  Errata Sheet of manufacturers 
Caution: Vector only delivers software!  
 
Your hardware manufacturer will provide you with the necessary errata sheets 
concerning your used hardware. In case of errata dealing with CAN please provide us 
the relevant erratas and we will figure out whether this hardware problem is already 
known to us or whether to get a possible workaround.  
 
Info: Because of many NDAs with different hardware manufacturers or because we 
are not informed about, we are not able to provide you with information concerning 
 
hardware errata of the hardware manufacturers.  
 
 
- 8 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
Getting Started 
2 Getting 
Started 
In this chapter you find the following information: 
2.1 
How to use this Manual  
page 
10
  
 
© Vector Informatik GmbH 
Version 1.7 
- 9 - 

Getting Started 
User Manual CANdesc 
2.1 
How to use this Manual 
 
Just follow the description step by step. 
  
 
FAQ
To find answers to special questions without reading the whole document use the 
FAQ list (see section FAQs on page 63). 
  
- 10 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
Basic Information 
3 Basic 
Information 
In this chapter you find the following information: 
3.2 
What is Diagnostic 
 
 page 13
3.3 
What happens during Diagnostics?  
page 
13
3.4 
What is CANdesc? 
 page 14
3.5 
Tools and Files 
 page 14
 
CANdela Studio, CDDT, CDD 
 
Generation Tool, CDD, DBC 
 
Generation Process with CANbedded Software Components 
3.6 
What CANdesc does  
page 
15
3.7 
Diagnostics – a more detailed View  
page 
17
 
Basic Nomenclature from the Bottom Up 
 
The same Nomenclature from the Top Down 
 
Where to find this Nomenclature in CANdela Studio 
 
Generic Handling of a Diagnostic Request in the CANdesc Component 
 
User, None, OEM, Generated – what does this mean? 
  
© Vector Informatik GmbH 
Version 1.7 
- 11 - 



Basic Information 
User Manual CANdesc 
3.1 
An Overall View 
ECU in the focus 
What we are now talking about is an ECU, a module to be built-in a vehicle like 
shown in the figure below. Almost every ECU participates in a certain bus system like 
x
e.g. CAN, Fle Ray or LIN. 
  
 
Vehicle with different bus systems
‰
CAN Highspeed
‰
CAN Lowspeed
‰
LIN
‰
FlexRay
‰
MOST
  
 
So any ECU within one bus system has to provide an identical interface to this bus 
system because all ECUs have to share information via this bus system as you see in 
the figure below. 
 
CAN Lowspeed as 
an example bus 
system 
 
  
 
For that reason all ECUs are built-up in the same way. There is a software part to 
realize the main job (application) of this ECU e.g. to control the engine or a door. The 
other part is the software part to be able to communicate with the other ECUs via the 
bus system that is the communication software. 
  
- 12 - 
Version 1.7 
© Vector Informatik GmbH 



User Manual CANdesc  
Basic Information 
 
Application Software
Software for Network 
Communication and Diagnostics
 
 
 
3.2 
What is Diagnostic 
Dia'gno stics - 
Diagnostics in a technical context is the examination of a machine. But diagnostics in 
Detection, 
this context goes way beyond this definition.  
Examination of a 
Diagnostics comprises function monitoring, error detection, fault memory, activation, 
machine; 
data acquisition etc. and is used for variant coding, end-of-line programming, 
[greek. diagnoskein 
reprogramming, identification etc. 
„analyze deeply, 
differentiate] 
In contrast to Dia’gno 
‚ sis – Examination 
(med.) 
 
  
3.3 
What happens during Diagnostics? 
 
In most cases an Off-Board tester (Client) sends a diagnostic request to the ECU (via 
CAN) and the ECU (Server) sends back a diagnostic response. This can be a positive 
or a negative response. The following figure clearly shows a basic representation of 
this mechanism. 
  
CANdesc –  
CAN Diagnostic 
Embedded Software 
Component 
 
  
© Vector Informatik GmbH 
Version 1.7 
- 13 - 



Basic Information 
User Manual CANdesc 
3.4 
What is CANdesc? 
CANdesc is totally 
CANdesc stands for CAN Diagnostic Embedded Software Component.  
generated based 
This software component differs from all other CANbedded Software Components in 
upon the CDD file. 
that it is totally generated. To be able to generate this component you need a CDD 
 
file, a DBC file and the generation tool (GENy / CANgen). 
  
Generated Software 
Component based 
on .CDD and .DBC 
 
  
Info: The CANdesc will be explained in the section Generic Handling of a Diagnostic 
Request in the CANdesc Component on page 21, where you will get detailed insight 
 
into the CANdesc Component and how it works when processing a diagnostic 
request. 
  
3.5 
Tools and Files 
3.5.1  CANdela Studio, CDDT, CDD 
All settings you have  CANdela Studio is a PC tool. It reads in the diagnostic template file CDDT and 
ela 
to do in CANd
generates a diagnostic data base, the CDD file. 
Studio to use 
The CDDT is a description of the OEM diagnostic specification. 
CANdesc are stored 
in the CDD file. 
All necessary diagnostic information, such as supported diagnostic services, sub 
services, format, signals, state filters, state transitions etc., is described via CANdela 
Studio and stored in the CDD file. 
To use the CANdesc component, you need the CDD file and you need to know how 
to make the necessary settings in CANdela Studio. 
  
3.5.2  Generation Tool, CDD, DBC 
Remember to add 
The generation tool (GENy / CANgen) is a PC Tool, too. It generates configuration 
the path to the CDD 
files and signal interface files for the CANbedded Software Components. The 
file in the Generation  generation tool needs the DBC file to generate the files. 
ol 
To
 
 
The DBC file is designed by the vehicle manufacturer and distributed to all suppliers 
that develop an ECU. Thus every supplier uses the SAME DBC file for one vehicle 
There is the same 
platform and one bus system (powertrain, body CAN etc.) to guarantee a common 
DBC file per bus 
- 14 - 
Version 1.7 
© Vector Informatik GmbH 


User Manual CANdesc  
Basic Information 
system (high speed, 
basis for development. 
low speed, etc) for all  For example, every ECU has to know that a 1 in bit 7 in the 4th byte of the message 
suppliers to 
0x305 means “Ignition Key” on/off. 
guarantee a 

commo
The DBC file contains information about every node and the messages / sig
s the 
nal
basis for 
node has to send and to receive. 
development 
When using CANdesc for diagnostics the CDD file must be read in by the generation 
tool, to be able to generate the CANdesc code. 
  
3.5.3 
n Process w
Generatio
ith CANbedded Software Components 
 
Normally the generation tool generates files that contain the configuration and the 
signal interface of the CANbedded Software Components. CANbedded can be 
compiled and linked using the source code of each component. 
  
The standard 
generation process 
for Vector Software 
Components. 
 
 
 
 
 
 
 
CANdesc is a 
completely 
generated Software 
Component 
 
  
 
The main difference for CANdesc is that the source code for CANdesc is totally 
generated from the CDD file and therefore not included in your delivery as the other 
software components are. Since the CDD file contains most of the information about 
CANdesc, there are only a few configuration settings left that can be done via the 
generation tool on the CANdesc tab 
  
3.6 
What CANdesc does 
Handles Diagnostic 
¼  CANdesc receives addressed requests physically or/and functionally 
Communication 
¼  CANdesc generates and handles a physical or functional request with appropriate 
response message headers, corresponding to the given KWP2000/UDS (ISO 
14229-1) Diagnostics on CAN manufacturer specification. 
¼  CANdesc connects to underlying Transport Protocol and handles the 
communication errors of the underlying layers. 
© Vector Informatik GmbH 
Version 1.7 
- 15 - 

Basic Information 
User Manual CANdesc 
¼  CANdesc is capable of communication on any bus systems, using an own 
abstraction interface. 
  
Manages Diagnostic  ¼  CANdesc keeps the data consistency, which guarantees that no other request will 
Data (Buffer) 
delete the current diagnostic request data being processed. 
  
dle
Han
s Diagnostic 
¼  CANdesc prrovides centralized diagnostic error handling based on the method 
Errors 
report only first detected error
¼  CANdesc monitors timeouts (e.g. S3- “Tester Present”, P2- “Response pending”, 
etc.). 
  
Analyzes Requests 
¼  CANdesc detects relevant SID (Service Identifier) for the ECU. If an SID is not 
(state machine, 
supported by the current configuration, the appropriate reaction will be executed 
filtering) 
(e.g. negative response or the request will be ignored). 
¼  CANdesc analyzes the service instance. This includes recognition of the service-
specific sub functions for each supported SID. The request length is validated if it 
is defined to be constant. For dynamic fields, the application must do range 
checking of the request length. 
¼  CANdesc validates the states. The component ensures that a service is only 
executed if the diagnostic state allows the processing of that service. E. g. some 
services are only allowed to be executed inside a special diagnostic session. If 
the current state does not allow the execution, a corresponding negative 
response is sent automatically. 
  
Processes the 
¼  CANdesc generates a complete diagnostic handler function which fills out the 
request (optional) 
correct response data for the application. 
¼  CANdesc generates signal handlers to help the application place the response 
information. 
¼  CANdesc generates a Service MainHandler which will use data access functions 
provided by the application, but will place the information on the message as 
defined in the diagnostic data description. 
¼  CANdesc dispatches incoming request(s) to the application (Service MainHandler 
or signal handler level). 
  
- 16 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
Basic Information 
3.7 
Diagnostics – a more detailed View 
 this chapter 
In
you find the following information: 
3.7.1  Basic Nomenclature from the Bottom Up
 
  page 
18
3.7.2  The same Nomenclature from the Top Down  
page 
19
3.7.3  Where to find this Nomenclature in CANdela Studio  
page 
19
3.7.4  Generic Handling of a Diagnostic Request in the CANdesc Component  
page 
21
3.7.5  User, None, OEM, Generated – what does this mean?  
page 
23
  
 
© Vector Informatik GmbH 
Version 1.7 
- 17 - 



Basic Information 
User Manual CANdesc 
3.7.1  Basic Nomenclature from the Bottom Up 
Using the same 
Basic diagnostic communication is based upon a request / response mechanism. To 
expressions does not  understand the structure of 
ela Stu
CANd
dio it is necessary to make some detailed 
mean to talk about 
naming definitions. 
the same thing 
The combin
e
ation of a requ st and responses (positive and negative) forms a Service, 
 
as you can see in the figure below. A service (in the scope of CANdesc) is a concrete 
service of an ECU. 
This nomenclature 
should help to 
Request and responses are so-called service primitives. 
proceed with 
CANdesc and 
CANdela. 
  
Service Identifier = 
ID 
S
 
Build-up of Requests 
and Response 
Messages 
 
  
Service 
protocol service is a pattern for a service. The protocol service defines how the 
service primitives have to be built up. It determines the number and meaning of bytes 
Protocol Service 
for the sub service, and specifies the data bytes. 
Request 
Response 
Diagnostic Instance 
Diagnostic Class   
  
Info: The order of service identifier, sub service and data bytes can be found at the 
byte stream level, too. 
 
  
Request 
A request is a service primitive and is created as shown in figure above. A request is 
always sent from a tester to an ECU. The ECU processes the request and has to 
send back a response message. 
  
Response  
The positive response is calculated very easily by just adding the value 0x40 (hex 
format) to the SID of the request. The sub service is just repeated from the request 
 
and the data depends on the service. 
The negative response always starts with 0x7F as the SID followed by the SID of the 
request. The error code shows the reason for the negative response (e.g. wrong 
format of the request, …). 
  
 
Services with the same sub service (similar functional scope) are combined into the 
same Diagnostic Instance. This sub service is the characteristic factor for the 
- 18 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
Basic Information 
diagnostic instance. 
A diagnostic instance is a part of a 
nostic cla
diag
ss.  
A diagnostic class is the abstract description of a use case. 
This is shown in the following two illustrations. 
  
Services
 
 with the
Diagnostic Instance
ame Su
s
bservice are 
ned int
combi
o a 
Service 4
Diagnostic Instance - 
Service 3
the Sub Func

tio
Requ
Req est
4000
Serv
Ser ice 2
4000 is Just an 
Respo
sp nse
Requ
Req est
4000
4000
(positive)
Service 1
Respo
sp nse
Example 
Respo
sp nse
Requ
Re
e
qu st
4000
40(neg
00ative)
(positive)
Respo
sp nse
Res
Re ponse
Requ
Req est
(neg
4000
4000ative)
(posit
osi ive)
Res
Re ponse
Resp
Res onse
(negat
eg iv
4000 e)
(positive)
Resp
Res onse
(negative)
  
A Diagnostic 
Diagnostic Class
Instance is a part of 
a Diagnostic 
ss 
Cla
Diagnostic Instance 2
Diagnostic Instance 1
Diagnostic Instance 
Service 4
Service 3
Request
100A
Service 2
Reques
qu
t
es
100A
Resp
es onse
ons
Service 4
100A
(positive)
Service 1
Response
Service 3 Request
4000pons
4000
R
100esp
A
es onse
(posi
os tive)
ons
ve)
(negative)
Req
Re uest
Response
pons
4000
Respo
sp nse
Service 2
Request
(nega
4000
(p
4000 tive)
(posi
os tive)
Request
4000
Resp
Re o
sps nse
ponse
pons
4000
Respo
sp nse
Service 1
(neg
40(p at
os iiv
00tiev)e)
(p
Re os
sp it
o iv
n e)
se
Req
Re uest
4000
40Respons
00
e
(positive)
pons
)
Respo
sp nse
(negative)
(
R n
e eg
sp ati
egon ve
se )
Response
Request
pons
st
(neg
4000
4000ati
eg
ve)
(posi
pos tive)
Response
pons
Respo
sp nse
(negativ
4000 e)
(posi
os tive)
Respo
sp nse
(negative)
  
3.7.2 
e same Nomenclature from the Top Dow
Th

CANdela is top 
diagnostic class is an abstract description of a use case.  
own, CANd
d
esc 
diagnostic instance is derived from a diagnostic class. Some diagnostic classes 
bottom up – try to 
can be instantiated only once. Any diagnostic instance is unique and can be 
understand both 
distinguished from another diagnostic instance via its sub service (e.g
). 
. data identifier
directions. 
A diagnostic instance contains services. 
Services are composed of the three service primitives: request, positive response 
and negative response. The protocol service is the pattern for the service, the 
grammar definition.  
The service primitive data is a co
n
ncrete i formation unit exchanged between the 
tester and the ECU. In the automotive environment you call them signals, too. 
  
.7.3 
3
Where to find this Nomenclature in CANdela Studio 
Getting around in 
To generate CANdesc you will have to make settings in the CDD file, i.e. you will 
CANdela Studio  
have to work with CANdela Studio. That’s the reason why it is very importa
you 
nt that 
get to know the areas in the CANdela Studio where to make the necessary settings.  
Below there is a screenshot of CANdela Studio. 
  
© Vector Informatik GmbH 
Version 1.7 
- 19 - 



Basic Information 
User Manual CANdesc 
See the Diagnostics 
Classes and 
Diagnostic Instances 
in the CANdela 
Studio tree structure 
 
 
  
 
The structure within CANdela Studio is top down. In the tree on the left of CANdela 
Studio you will find the diagnostic class and the diagnostic instances as shown in the 
figure above. 
  
Info: To get familiar with the idea of diagnostic classes and diagnostic instances, 
have a look at all supported diagnostic classes. Verify for yourself what is meant by 
 
abstract description of a use case, e.g. talking about Sessions, Security Access, 
Fault Memory… 
  
 
If you click on a Service Instance you get a window like the following figure. Use this 
figure to understand the different areas on the diagnostic instance window and to 
close the gap between the nomenclature in the section above and it appears in 
CANdela Studio. 
  
- 20 - 
Version 1.7 
© Vector Informatik GmbH 



User Manual CANdesc  
Basic Information 
Diagnostic Instance 
window of CANdela 
Studio – a very 
important window 
 
 
 
 
 
  
3.7.4  Generic Handling of a Diagnostic Request in the CANdesc Component 
What happens in the  Now you know the basic diagnostic elements and the build-up of diagnostic services. 
CANdesc if a 
Now we take a closer look at how the diagnostic services are processed by CANdesc. 
diagnostic message 
You also need to know these processing steps so you can control and adapt this 
received? 
process. 
  
Info: For this adaptation you have to use CANdela Studio. 
 
  
 
The following figure shows the processing of a diagnostic service in detail. 
  
© Vector Informatik GmbH 
Version 1.7 
- 21 - 




Basic Information 
User Manual CANdesc 
Processing a 
Diagnostic Message 
received by 
CANdesc and the 
connections to the 
Application. 
 
  
n  Everything starts with a diagnostic request from a tester to the ECU. 
  
Info: The path of this message through the CAN Driver and the Transport Protocol is 
not shown in the illustration. 
 
  
o  Now this incoming diagnostic request will be checked in different ways. Is the SID 
supported in the ECU? Is this SID supported in the current session? Is the service 
supported? Is the format of this request message correct, i.e. correct length? Correct 
 
data? etc.
  
p  If any of these checks fail a negative response is sent
to the tester. Th
 back 
e error 
code informs about the reason (e.g. wrong format). 
  
q  If the incoming diagnostic request passes all of these checks, a PreHandler function 
could be called. This PreHandler function is optional. You have options to set it to 
<none>, <user> or <OEM>. 
  
r  The next function is the MainHandler. This is a mandatory function. Every service 
must provide a MainHandler. The MainHandler is designed to analyze the request 
and assemble the response message. The MainHandler provides the options <user>, 
<OEM> and <generated>. 
  
s  After the MainHandler has processed the diagnostic data, provided the data for the 
response and informed the CANdesc Component about the end of the processing 
(processing done), the positive response message will be sent back to the tester. 
  
Info: The path through the Transport Protocol and the CAN Driver is not shown in the 
figure above. 
 
  
t  After the diagnostic response is sent by the transport layer (ACK) 
  
u  the call of the PostHandler function is triggered. This function is optional too and 
- 22 - 
Version 1.7 
© Vector Informatik GmbH 




User Manual CANdesc  
Basic Information 
can be set to <none>, <user> and <OEM>. Use this function to do any kind of state 
updates. 
  
Info: A typical example for the PostHandler is to reset the CPU to start the 
bootloader. 
 
  
3.7.5  User, None, OEM, Generated – what does this mean? 
 
As you have read in the section above, a Pre-, Main- and PostHandler can be 
selected for any service to process the diagnostic service in a very user-friendly 
manner. 
  
All handlers can be 
defined via CANdela  Handler 
Selectable settings 
Studio 
 
PreHandler 
none, user, OEM 
 
MainHandler 
user, OEM, generated 
 
PostHandler 
none, user, OEM 
  
None 
None can be selected for Pre and PostHandlers only because these handlers are 
optional. As the name says, none switches the handler off. 
  
er 
Us
The setting user means that you have to do the complete code for this handler. The 
function prototype is generated in appdesc.h. 
  
OEM (predefined) 
The setting OEM handles the request as required by the car manufacturer. The 
implemen tion is pa
ta
rt of the CANbedded Software Component. The user does not 
have to add anything. 
  
Info: The setting OEM should only be used if it is predefined. 
 
  
Generated 
If you select Generated you have two options for this handler (MainHandler) 
(Signal Handler) 
1.  Generate a function prototype (appdesc.h). Use this function to handle the 
diagnostic data by returning the current value (reading service) or using the 
parameter (writing service).  
2. In 
CANdela Studio you can enter the name of the variable. In appdesc.h the 
external decl
his variable is
aration of t
 generated and you only need to define this 
variable in your application and that’s all. Your application now just has to keep 
the content up to date. 
  
Cross reference: For more details about the using the handlers and how to make the 
settings in CANdela refer to STEP Functional Connection between your Application 
 
and CANdesc/CANdela Studio on page 35. 
 
 
 
 
© Vector Informatik GmbH 
Version 1.7 
- 23 - 

A Few STEPS to CANdesc 
User Manual CANdesc 
4 A 
Few 
STEPS to CANdesc 
In this chapter you find the following information: 
4.1 
STEP What do you need before start?  
page 
25
4.2 
Startup Code 
 page 25
4.3 
Overview 
25
 page 
4.4 
STEP Installation 
 page 26
4.5 
STEP Configuration 
e Gen
with th
eration Tool  
page 
26
 
Using the Generation Tool CANgen 
 
Using the Generation Tool GENy 
4.6 
STEP Generating Files
page 
29
  
 
Using Generation Tool CANgen 
 
Using the Generation Tool GENy 
4.7 
STEP Add CANbedded to 
r Proje
you
ct  
page 
32
4.8 
STEP Adapt Your Application Files
 
33
  
page
 
Including, Initializing and Cyclic Calling 
4.9 
STEP Functional Connection between your Application and CANdesc/CANdela Studio  
page 
35
 
How to handle User-Defined Handlers 
 
How to Handle Predefined Handlers (for MainHandler only) 
 
Handling OEM-Specific Settings 
4.10  STEP Compile and link your Project  
page 
41
4.11  STEP Test it via CANoe
 
  page 
41
 
Start CANoe.CAN OSEK TP enlarged 
 
Test of CANdesc 
  
 
- 24 - 
Version 1.7 
© Vector Informatik GmbH 



User Manual CANdesc  
A Few STEPS to CANdesc 
4.1 
STEP What do you need before start? 
Check before you 
Before you start make sure
 
 that you have received everything you need. 
start 
  
edd
CANb
ed 
d
Did you get the CANbed ed delivery? 
  
YES? Then go on 
Except for the converter, you should answer all other questions with yes before going 
on here. 
  
.2 
4
Startup Code 
It is yo
 
ur 
The startup code of the microcontroller is not part of the Vector delivery. The startup 
responsibility 
code complete is in your responsibility.  
Take care to provide an appropriate startup code regarding e.g. wait states, etc.  
  
Info: The startup code is not part of the Vector delivery. 
 
 
4.3 
Overview 
Step overview 
This overview show
steps to CA
s the 
Ndesc. These steps are described in detail on 
ing s
the follow
ections. 
 
  
 
© Vector Informatik GmbH 
Version 1.7 
- 25 - 








A Few STEPS to CANdesc 
User Manual CANdesc 
4.4 
STEP Installation 
As you see in the picture before, you need 2 PC tools to work with CANbedded 
containing CANdesc as a diagnostic component. 
  
Generation Tool 
The first tool is the generation tool. It 
delivered 
is 
with the CANbedded Software 
Components. Extract the files to an appropriate folder and follow the installation 
instructions. 
  
Info: There are two kinds of generation tools, CANgen and GENy. Which of them you 
have to use depends on the delivery. In the following steps the usage of both tools 
 
are shown. 
  
CANdela Studio 
The second PC tool is CANdela Studio. This tool is for editing the *.CDD file. Install 
the tool by following the installation instructions. 
 
edde
Extract CANb

The number of CANbedded components in your delivery depends on your project.  
ftware 
So
To use CANdesc you need at least a CAN Driver and a Transport Protocol (e.g. 
Components 
OSEK / ISO 15765-2).  
Copy all C and H files which are necessary for the components into your application 
project folder.  
  
Cross reference: Refer to the corresponding user manuals (e.g. CANDriver User 
Manual) to get further information about the files of the different Software 
 
Components. 
  
Info: Since CANdesc is totally generated, you won’t find any source files for CANdesc 
in your delivery. 
 
  
4.5 
STEP Configuration with the Generation Tool 
As described above there are two generation tools for configuring the CANbedded 
Software Components, CANgen and GENy.  
 
In the following chapters we describe the handling of both tools, beginning with 
 
en
CANg
. Figure out which tool you use and read the corresponding chapters only. 
  
4.5.1 
 the G
Using
eneration Tool CANgen 
 
Open CANgen. Add a data base (DBC file) via the green plus 

 
Info: Normally you get a data base (DBC) from your vehicle manufacturer that is 
designed for your project. 
 
  
Are the files 
Make all the component settings as described in the appropriate User Manuals. For 
generated in the 
the Transport Protocol use the default [Set Defaults] for the first attempt. 
- 26 - 
Version 1.7 
© Vector Informatik GmbH 





User Manual CANdesc  
A Few STEPS to CANdesc 
correct path? 
  
Info: Remember to set the paths where the generation tool does the output. 
 
  
 
To configure CANdesc, open the CANdesc options tab. For this first attempt click 
[Set Defaults]. The generation tool needs to read an additional data base, the 
 
CANdela data base (CDD file). Browse for the CANdela data base file and select the 
 
CDD file you received from your vehicle manufacturer. 
Very few settings 
have to be made in 
the Generation Tool 
CANgen for 
CANdesc 
If the two checkboxes for debugging are checked you have to provide debug callback 
functions in your application. 
A very important entry is the Call Cycle. This call cycle must be the one you call the 
DescTask function or the DescTimerTask function in your application (this will be 
explained in detail in the next steps). 
  
4.5.2  Using the Generation Tool GENy 
 
Open the generation tool GENy and create a new project as described in the 
OnlineHelp of GENy in the chapter First Steps
  
Info: Normally you get a data base (DBC) from your vehicle manufacturer that is 
designed for your project. 
 
  
 
Make all the 
one
comp
nt settings as described in the appropriate User Manuals.  
  
Info: Remember to set the paths where the generation tool does the output. 
 
  
© Vector Informatik GmbH 
Version 1.7 
- 27 - 




A Few STEPS to CANdesc 
User Manual CANdesc 
 
Activate the component CANdesc in the component selection view. 
  
 
 
Component 
ie
Selection V w of 
GENy 
 
  
 
The activation of the CANdesc component is modified with the 
Diag_CANdesc_xxx.DLL version 3.0. 
  
mp
Co
onent 
Selection View of 
GENy with separate 
CANdesc_Connector
CAN component 
 
  
 
Starting with this version 
sc 
CANde
can be connected to more than one channel or 
can be used standalone. The Diag _CANdesc_UDS/KWP component includes the 
main configuration window of CANdesc. The Diag_CANdesc_Conn
N
ectorCA  
component connects CANdesc to a CAN network and configures the TPMC to work 
with CANdesc. 
  
Caution: If you do not activate CANdesc_ConnectorCAN component CANdesc will 
generate successful as standalone CANdesc. Therefore it is necessary to connect 
 
CANdesc with the CANdesc_ConnectorCAN component to a channel, if the TPMC 
shall be used. 
  
- 28 - 
Version 1.7 
© Vector Informatik GmbH 



User Manual CANdesc  
A Few STEPS to CANdesc 
GENy Configuration 
View for CANdesc 
 
  
 
To configure CANdesc, open the CANdesc configuration via the 
Diag_CANde
view. 
sc_UDS in the navigation 
As you see in the figure above, the 
generation tool needs to read an additional data base, the CANdela data base (CDD 
file). Browse for the CANdela data base file and select the CDD file you received from 
your vehicle manufacturer. 
If the two checkboxes for 
rt
Debug Suppo  are checked you have to provide debug 
callback functions in your a plication. 
p
A very important entry is the Call Cycle (“Cycle Time”). This call 
 th
cycle must be

one you call the DescTask function or your DescTimerTask function in your 
application (this will be explained in detail in the next steps). 
  
4.6 
STEP
n
 Ge erating Files 
.6.1 
4
Using Generation Tool CANgen 
 
If you have finished the settings in the previous step, hit the [Generate] 
 button. 
You get a message box containing information about the generation process and a 
[Success] window containing information about the generated files and their paths. 
Check to see if the files are generated into the correct folders. 
  
© Vector Informatik GmbH 
Version 1.7 
- 29 - 



A Few STEPS to CANdesc 
User Manual CANdesc 
Success Window 
after a Generation 
Process 
 
  
 
Open the folder you generated in the files listed above. There you should find the 
generated files for CANdesc, too. These are: 
  
desc.c  
This file contains the implementation and the private interface of the Diagnostic 
Software Component. 
 
  
This file contains the public interface of CANdesc. You will also find the <Negative 
esc.h 
d
response codes> here. 
  
appdesc.c 
This file is an implementation example for the proper usage of the diagnostics 
callback func
s. All nece
tion
ssary callback functions are generated in this file and 
commented what is left to be done (<<TBD>>). See the example below: 
  
Example: Extract of the Generated Callback Functions Template. 
 
- 30 - 
Version 1.7 
© Vector Informatik GmbH 



User Manual CANdesc  
A Few STEPS to CANdesc 
/* ********************************************************************************
* Function name:ApplDescReadVoltageService_Instance_For_Demonstration_Purposes
* Description: Reads a signal.
* Returns: signal value
* Parameter(s): none
* Particularitie(s) and limitation(s):
*   - The function "DescProcessingDone" may not be called.
*   - The function "DescSetNegResponse" may not be called.
******************************************************************************** */
vuint8 DESC_API_CALLBACK_TYPE 
ApplDescReadVoltageService_Instance_For_Demonstration_Purposes(void)
{
/*<<TBD>> Remove this comment once you have completely implemented this function!!!*/
/*Return the signal value.*/
return 0xFF;
}
/* ********************************************************************************
* Function name:ApplDescReadCurrentService_Instance_For_Demonstration_Purposes
* Description: Reads a signal.
* Returns: signal value
* Parameter(s): none
* Particularitie(s) and limitation(s):
*   - The function "DescProcessingDone" may not be called.
*   - The function "DescSetNegResponse" may not be called.
******************************************************************************** */
vuint8 DESC_API_CALLBACK_TYPE 
ApplDescReadCurrentService_Instance_For_Demonstration_Purposes(void)
{
/*<<TBD>> Remove this comment once you have completely implemented this function!!!*/
/*Return the signal value.*/
return 0xFF;
}
/* ********************************************************************************
* Function name:ApplDescReadResistanceService_Instance_For_Demonstration_Purposes
* Description: Reads a signal.
* Returns: signal value
* Parameter(s): none
* Particularitie(s) and limitation(s):
*   - The function "DescProcessingDone" may not be called.
*   - The function "DescSetNegResponse" may not be called.
******************************************************************************** */
vuint16 DESC_API_CALLBA
YPE
CK_T
 
ApplDescReadResistanceService_Instance_For_Demonstration_Purposes(void)
{
/*<<TBD>> Remove this comment once you have completely implemented this functio
*
n!!! /
/*Return the signal value.*/
return 0xFFFF;
}
  
Appdesc modification   If you start programming in the file appdesc.c, you fill in the missing code for the 
services and 
ne
you start a 
w generation process, the generation tool detects whether 
Detection to prevent 
the file has been chan

ge or not: 
loss of changes 
 
  
Info: So better rename the file before you implement the diagnostic services. 
 
  
appdesc.h 
This file provides prototypes of the application diagnostic callback functions and 
© Vector Informatik GmbH 
Version 1.7 
- 31 - 








A Few STEPS to CANdesc 
User Manual CANdesc 
external application declarations, which are accessed by CANdesc. 
All callback function 
prototypes are 
generated in 
appdesc.h. 
  
Appdescdev.c 
This file contains the definition of the used variables in CANdela Studio.  
  
Info: This file shall be used only during the first integration in order to make your 
project fully compile- and linkable. This file is no necessary later, since the variables 
 
that will be defined here shall be implemented within your ECU application code. 
  
Cross reference: (see section How to Handle Predefined Handlers (for MainHandler 
only) on page 38) 
 
  
4.6.2  Using the Generation Tool GENy 
 
If you have finished the settings in the pr
s
eviou  step, hit the [Generate] 
 button.  
  
Info: All files for the CANdesc Software Component are generated! 
 
  
Generated Files for 
In the Genera
iew you see the f
ted Files v
iles listed as shown in the figure below. Use 
Nd
CA
esc –CANdesc  this output to check the paths. In the list you only see the CANdesc-relevant files. The 
Core File
re 
s a
files are the same as generated with CANgen, so refer above for de
ation. 
tailed inform
Gene
o! 
rated, to
 
  
4.7 
STEP Add CANbedded to your Project 
What to do in this step depends on your development environment. Perhaps you are 
working with a makefile? 
 
Regardless of this you have to add the CANbedded files to your project. These are 
the files discussed in Section Extract CANbedded Software Components on page 26 
and the ones generated in the previous step. 
  
Caution: Always make sure that the path in which you generate the files and the path 
your compiler is working on are the same! 
 
  
 
Now there are several adaptations for you to make in your application. 
  
- 32 - 
Version 1.7 
© Vector Informatik GmbH 





User Manual CANdesc  
A Few STEPS to CANdesc 
4.8 
STEP Adapt Your Application Files 
Now all files for CANbedded and CANdesc are included in your project, and we can 
go on to make the necessary adaptations in your application files. 
 
  
 
These adaptations can be split in two categories: 
¼  Include, initialize and make the cyclic calls for the CANbedded Software 
Components (use the component-specific documentation for details). 
¼  Connect your application to CANdesc 
  
4.8.1  Including, Initializing and Cyclic Calling 
Two CANdesc 
As for all other CANbedded Components, CANdesc must be included, initialized and 
headers have to be 
used via a cyclic call. 
included in your 
application: 
desc.h 
appdesc.h 
 
Keep the including 
file structure. 
The figure shows all generated files of CANdesc. Your application only needs to 
include the files desc.h and appdesc.h in the order they are mentioned. 
  
Info: Any User Manual dealing with our CANbedded Software Components shows 
this kind of illustration. Always keep the include file structure that is shown. 
 
  
Like all other 
As for all other CANbedded Software Components the initialization function follows 
CANbedded 
the same naming conventions. For CANdesc use: 
Software 
DescInitPowerOn( initParameter ); 
Components, 
 
 
 
 
/*Interrupts must be disabled*/ 
CANdesc must be 
initialized and the 
Interrupts must be 
disabled during 
initialization 
  
Cross reference: For information about the initParameter  refer to your OEM-specific 
Technical Reference for CANdesc. 
 
  
 
Make sure that DescInitPowerOn is called after the call of CanInitPowerOn and 
© Vector Informatik GmbH 
Version 1.7 
- 33 - 




A Few STEPS to CANdesc 
User Manual CANdesc 
TpInitPowerOn.  
Normally the components are initialized from the bottom up according to the layer 
model. Always do these initializations with disabled interrupts. 
This is the correct order of initialization if you use CAN Driver, Transport Protocol and 
CANdesc. 
1. CanInitPowerOn(); 
2. TpInitPowerOn(); 
3. DescInitPowerOn(0); 
  
 
As you adjusted things in Using the Generation Tool CANgen on page 26 (Call cycle 
for CANdescMain
) the components need a cyclic call in your application to work 
properly. The call cycle must be the same as entered on the CANdesc tab / view 
(CANgen / GENy). The functions to call cyclically are: 
  
It is very important 
DescTask( ); or 
that you call 
ther with DescStateTask) 
DescTimerTask(); (toge
DescTask( ) or 
DescTimerTask() 
c
cycli ally and keep 
the adjusted call 
cle 
cy
  
Caution: Never use DescTask() and DescTimerTask() / DescStateTask() together! 
 
 
Using DescTask 
With the call of this single function the handling of the timers and of the internal 
service processing (including application functions) is triggered. If you receive a 
diagnostic request, the response can be handled not until the next call of DescTask.  
  
Info: This could lead to slower service processing. 
 
  
Using 
This concept splits the timer handling for CANdesc from the internal service 
scTimerTask
De
 
processing. Now only the function DescTimerTa
has to be 
sk() 
called in the predefined 
and 
(configuration tool) cycle time.  
DescStateTask 
The function DescStateTask() has to be call
cyclic ma
ed in a 
nner too, but does not 
need a fix cycle time. It can be called very fast to speed-up the reaction on a 
diagnostic request or it can be called as soon as there are free resources (e.g. an idle 
task in an operating system). 
  
Info: CANdesc and DescTimerTask use the cyclic call as a time base for the timing 
calculations. 
 
Do not make this call out of a timer interrupt. Just call DescTask() or 
DescTimerTask() at the task level. 
  
- 34 - 
Version 1.7 
© Vector Informatik GmbH 






User Manual CANdesc  
A Few STEPS to CANdesc 
4.9  STEP Functional Connection between your Application and 
CANdesc/CANdela Studio 
 
It is up to you when you perform this step: before STEP Configuration with the 
Generation Tool (page 26), as a part of STEP Adapt Your Application Files (page 33) 
or perhaps at both times. 
  
Info: There is a very close connection between the settings in CANdela Studio and 
what to do in your application. 
 
  
Have a look a look at section Generic Handling of a Diagnostic Request in the 
CANdesc Component on page 21. 
 
As you can see, there are three types of handlers (Pre-, Main- and PostHandler) that 
can be selected for any service. It is very important to know what happens when you 
choose the Value
he h
 for t
andlers. For this decision you need an overview of the 
great flexibility arising with the choice. 
We will first go through the possible settings for one service as an example. With the 
knowledge you gain from this you can then go on with the other services. 
The settings of the handlers value can be made in the Properties windows of each 
service on the 
 tab (see value
Attributes
s in the following figure). 
  
How are the settings 
in CANdela  appe
m

to your application? 
 
 
 
Support for the 
different Handlers 
can be adjusted on 
the Service Property 
Page 
 
  
4.9.1 
ow
H
 to handle User-Defined Handlers 
If you choose for the handlers to be user-defined, you have to do all the programming 
work for this service yourself, except for the checks. A callback function prototype will 
be generated in the file appdesc.h. 
 
  
Service Qualifier 
Open the Service Properties and then the General tab. 
© Vector Informatik GmbH 
Version 1.7 
- 35 - 




A Few STEPS to CANdesc 
User Manual CANdesc 
 
  
Diagnostic Instance 
Open the Diagnostic Instance Properties and then the General Tab 
Qualifier 
  
Names of the 
The names of these callback functions are built as the following  
generated callback 
 
functions 
  
Example: For this example, the callback function would look like this: 
appldesc + Read + Service_Instance_For_Demonstration_Purposes 
 
appldesc +PreRead + Service_Instance_For_Demonstration_Purposes 
appldesc +PostRead + Service_Instance_For_Demonstration_Purposes 
with parameters: 
void ApplDescReadService_Instance_For_Demonstration_Purposes(DescMsgContext* pMsgContext);
void ApplDescPreReadService_Instance_For_Demonstration_Purposes(void);
void ApplDescPostReadService_Instance_For_Demonstration_Purposes(vuint8 status);
  
 
Now you have to provide all the prototypes of the appdesc.h file as functions in your 
application and do the coding for each service, i.e. for each Pre-, Main- and 
PostHandler that is switched to User.  
See an example for a ReadDataByIdentifier MainHandler for the service above 
- 36 - 
Version 1.7 
© Vector Informatik GmbH 




User Manual CANdesc  
A Few STEPS to CANdesc 
defined for User. The data bytes of this service are: 
¼  g_Voltage (1 Byte) 
¼  g_Current (1 Byte) 
¼  g_Resistant (2 Bytes) 
  
 
To process this service by yourself, you need to know how to access the diagnostic 
data. The following figure 
w
sho s the data access for a reading service (upper figure) 
and a writing service. 
A reading service consists of a SID and perhaps a Sub-Service. The requested da  
ta
is then sent with the response. 
A writing service consists of a SID, perhaps a Sub-Service and the data. The 
response is only a confirmation with SID+0x40 and perhaps a Sub-Service. 
When working with CANdesc you only need to process the data. That is the reason 
why the pointer is directed to the first data byte.  
The same Diagnostic Buffer is used for receiving a diagnostic request AND sending the response
reqDataLen = 0
Diagnostic request (A: reading service)
reqData[ 0 ]
Diagnostic
SID 
Sub Service
-
-
-
Buffer
SID + 0x40
Sub Service
Data
Data
Data
(RAM Memory)
resData[ 1 ]
resData[ 2 ]
Positive Diagnostic response
resData[ 0 ]
resDataLen
reqData[ 0 ]
reqDataLen
Diagnostic request (B: writing service)
reqData[ 1 ]
reqData[ 2 ]
Diagnostic
SID 
Sub Service
Data
Data
Data
Buffer
SID + 0x40
Sub Service
-
-
-
(RAM Memory)
Positive Diagnostic response
resData[ 0 ]
resDataLen = 0
 
  
Info: The request data and the response data are stored to the same memory 
location. Writing the response data means deleting the request data. 
 
  
Example: The example below shows a very easy way to process a diagnostic 
request. The data is copied to the Diagnostic Buffer, the amount of the response 
 
data is determined and the diagnostic service is finished via DescProcessingDone. 
 
Code Example for 
the MainHandler 
Using the User 
Option 
  
© Vector Informatik GmbH 
Version 1.7 
- 37 - 




A Few STEPS to CANdesc 
User Manual CANdesc 
Example: When preparing the diagnostic response, it is very important to provide the 
correct data and calculate the length of the response (ÆresDataLen).  
 
To finish the service processing with a positive response, call: 
DescProcessingDone();  
For a negative response, finish the service processing with: 
DescSetNegResponse(<errorCode>); 
DescProcessingDone(); 
  
Info: A negative response can also be set in the PreHandler. There it is enough to 
call DescSetNegResponse(<errorCode>). The PreHandler must not be finished with 
 
DescProcessingDone. See desc.h for the definitions of the erro
es. 
r cod
Remember: in the PreHandlers no access to the diagnostic data buffer is possible. 
  
Response pending 
What to do if the response cannot be sent immediately? 
will be sent 
In some cases (e.g. writing data to the EEPROM) you cannot send the response 
automatically by 
immediately, but you need not treat this as an exception. CANdesc will automatically 
CANdesc 
inform the tester about the delay in the diagnostic response. So process the request 
and if you finish it, send DescProcessingDone. All other timing aspects are realized 
by CANdesc (Response Pending). 
  
4.9.2  How to Handle Predefined Handlers (for MainHandler only) 
If you select generated you need not to program the complete service by hand. Using 
this option gives you two further options: 
1.  A signal callback function will be generated 
  2.  You can tell CANdela the name of the variable (and data type) for a certain 
service and you only have to provide this variable in your application code. 
 
To get a signal callback function generated, i.e. to implement the first option, right 
click on a data object and choose Properties from the pull down menu. Now the 
Properties window of the chosen data object opens. In this example it is the data 
c
obje t Voltage. 
  
- 38 - 
Version 1.7 
© Vector Informatik GmbH 




User Manual CANdesc  
A Few STEPS to CANdesc 
Signal Access via the 
Application and a 
Callback Function 
 
  
Example: Make sure that the Overwritten Value field on the Attributes tab is empty. 
The generated prototype should look like this.  
 
vuint8  
ApplDescReadVoltageService_Instance_For_Demonstration_Purposes(
void); 
  
Example: All you have to do in your application for this MainHandler is to provide the 
function ApplDescReadVoltageService_Instance_For_Demonstration_Purposes and 
 
return the current value for the voltage stored anywhere in your application. The data 
type of the return value will be adjusted automatically to the data type (Element Type) 
in CANdela Studio. In this case it is a 1 byte value, therefore it is the data type vuint8. 
vuint8  
oses(
ApplDescReadVoltageService_Instance_For_Demonstration_Purp
void); 

  return g_Voltage; 

  
Generated does not 
The second option is to connect the settings in CANdela Studio more closely to your 
mean that you do not  application. Do the same steps as described above, but now enter the name of the 
have to do anything 
variable in the value field of the Attributes tab as shown in the following figure. 
– but there is little 
prog
m
ram ing work 
left to do 
  
© Vector Informatik GmbH 
Version 1.7 
- 39 - 




A Few STEPS to CANdesc 
User Manual CANdesc 
Direct Signal Access 
  
Example: Now an external declaration of the variable g_Voltage prototype should be 
generated. 
 
extern vuint8 g_Voltage; 
The data type for this declaration again depends on the element type of the data 
object, in this case 1 byte again. 
Provide g_Voltage in your application (or use the appdescdev.c) and use it for storing 
the current voltage value. If a diagnostic request requests this value, CANdesc 
automatically refers to the content of g_Voltage. There is nothing more left to do for 
you. 
  
4.9.3  Handling OEM-Specific Settings 
 
The third choice is OEM. Do not change this. If the setting is on OEM, leave the 
settings as they are and refer to the OEM-specific documentation on how to deal with 
this service. 
Now your task is to implement all diagnostic services you have to support and select 
the desired status for Pre-, Main- and PostHandlers (none, user, OEM, generated). 
 
  
Caution: Do not touch the OEM-defined handlers. 
 
  
 
Then save the settings. This will change the CDD file. Depending on which step you 
are on right now, either 
- 40 - 
Version 1.7 
© Vector Informatik GmbH 




User Manual CANdesc  
A Few STEPS to CANdesc 
continue with STEP Configuration with the Generation Tool on page 26 or 
start the generation process again to generated the files containing the changes you 
made. 
  
Info: Sometimes in development, not all diagnostic services have been defined yet by 
the OEM. Provide this function anyway and send a negative response back. Then you 
 
can compile and link and test the other functions until the specification of the missing 
services is completed. 
  
4.10  STEP Compile and link your Project 
Now we have all the includes and all initializations. The components have the cyclic 
calls of their task functions and all callback functions are provided and programmed. 
 
Start the compiler or makefile and get the project compiled and linked.  
Is it ok? No errors? 
Congratulations! That’s it.  
Go on to the next step and do the testing. 
  
4.11  STEP Test it via CANoe 
Since you have arrived at this step, you are now able to compile and link. Have you 
already downloaded the code to your target platform?  
 
Testing of the generated CANdesc depends on you and the OEM you are working for. 
Perhaps you do have a diagnostic tester, perhaps not.  
If you do not have an appropriate tester, we recommend using CANoe (a Vector PC 
tool) and one of its demo configurations. 
  
4.11.1  Start CANoe.CAN OSEK TP enlarged 
The CANoe demo 
To test you diagnostics layer use one of the CANoe demo applications. Open this 
environment is very 
config
n via 
uratio
Start/Programs/CANoe/Demos/More Demos/CANoe.CAN OSEK 
simple way to 
d
TP enlarge 
basically test 
A CANoe configuration will open with four nodes (A to D). All nodes look quite the 
requests and 
same like this: 
responses 
© Vector Informatik GmbH 
Version 1.7 
- 41 - 





A Few STEPS to CANdesc 
User Manual CANdesc 
 
  
 
Set the baud rate in CANoe to the one of your ECU and connect it to CANoe via CAN 
(CANcardXL, CANAC2…). Now run CANoe via the yellow lightning bolt and run 
YourECU. 
  
Info: Make sure that the CANoe mode is switched to Real bus and you have 
selected the same baud rate as the real node “YourECU” is working with. 
 
  
4.11.2  Test of CANdesc 
 
Use one of the four nodes for your tests. Change the TpTxId and the TpRxId in the 
“Addressing” field of the node window. 
  
Caution: The TpTxId is the Rx Diagnostic message in your generation tool and the 
TpRxId is the Tx Diagnostic message. In the example case the DiagResponse 
 
message is 0x7C0 and the DiagRequest message 0x7B0. 
It is optional to set the time for ST Min from 64ms (default) to 20ms. This is to prevent 
the ECU from running in time out. 
  
- 42 - 
Version 1.7 
© Vector Informatik GmbH 





User Manual CANdesc  
A Few STEPS to CANdesc 
Panel to Test 
Diagnostics Layer 
 
 
 
 
 
 
Compare the Values 
with the ones shown 
in CANdela Studio 
  Æ...
 
  
 
It is very simple to test the services using CANoe. Enter the request in the 
Transmission box and press Send Data and see the response in the same box. 
Compare this response with the desired one in CANdela Studio. The contents of the 
signals depend on the application. 
  
Info: Make some variations to the signal contents to confirm the tests. 
 
  
 
Repeat this for all other services. 
  
© Vector Informatik GmbH 
Version 1.7 
- 43 - 

Further Information 
User Manual CANdesc 
5 Further 
Information 
In this chapter you find the following information: 
5.1 
Diagnostic State Handling using CANdela Studio  
page 
45
5.2 
Typical Examples of State Groups and States in an Automotive Environment  
page 
45
5.3 
Creating and editing State Groups, States and Transitions  
page 
45
5.4 
Connection between the states and your application  
page 
47
5.5 
Diagnostic Buffer 
 page 48
 
Linear Diagnostic Buffer 
 
Ring Buffer Mechanism 
5.6 
Repeated Service Call Feature  
page 
55
 
Activation of the Repeated Service Call 
 
Repeated Service Call and Ring Buffer 1 – “Write and Check” 
 
Repeated Service Call and Ring Buffer 2 – “Check and Write” 
  
 
- 44 - 
Version 1.7 
© Vector Informatik GmbH 


User Manual CANdesc  
Further Information 
5.1  Diagnostic State Handling using CANdela Studio 
 
Executing a diagnostic service generally causes a state change in the electronic 
control unit. Some services may only be executed if the electronic control unit is in a 
particular state. For example, services that change critical data may only be executed 
if the electronic control unit is first switched into a “security mode” (for example with 
the specification of a numeric key).  
CANdela Studio offers the opportunity to define and edit global states and state 
transitions for the services of a diagnostic instance. In addition, states can be 
combined into state groups. 
  
5.2  Typical Examples of State Groups and States in an Automotive 
Environment 

 
The sessions (which should already be predefined) are a very “famous” example of a 
state group. Any diagnostic session has its set of services that are executable while 
the ECU is in this session. There are basically three sessions, defined from the ISO: 
¼  Default session – as the name says, this is the standard session 
¼  Programming session – while the ECU is in reprogramming mode (flashing) 
¼  Extended Session – session for e.g. the development phase, providing an 
extended amount of services 
Another very easy example for state groups is the security access. The ECU must be 
set to a specific state to be able to do critical data manipulation, su
s
ch a  the flashing 
action mentioned above. For example, the states for the state group security access 
would be: 
¼  Locked  
¼  Access granted 
We use this example to very basically explain the state concept of CANdela Studio. 
  
Cross reference: For more detailed information about this topic refer to the CANdesc 
Technical Reference. 
 
  
5.3 
Creating and editing State Groups, States and Transitions 
 
To create or edit the State Groups, click on [State Groups] in the CANdela Studio 
tree. Enter the new State Group Security Access by clicking on the text. A new State 
Group will be created called:  
New State Group 1. 
If you generate more than one State Group without renaming the previous ones, the 
groups are numbered counting from 1 up.  
To edit the new State Group you have two options. The first is to click on the State 
Group name and edit the name, then click on the description field and enter the text. 
Another way is to open the pull down menu of the State Group with a right click on the 
row of SecurityAccess and select Properties. The Properties of State Group 
Security Access”
 window will open. Enter the name and description. 
  
© Vector Informatik GmbH 
Version 1.7 
- 45 - 





Further Information 
User Manual CANdesc 
Info: The qualifier will be created automatically. 
 
  
 
 
  
 
Now we can add the states below in the same way. Click on the text to create a new 
element, adjust the names and enter a description. 
The next step is to assign the relevant services to the states. 
  
Defining States for 
the Service 
SecurityAccess – 
Request Seed 
 
  
 
Select the Diagnostic Instance Security Access Seed and open the Properties of the 
Service Request Seed. Select the tab State Transitions and then SecurityAccess
- 46 - 
Version 1.7 
© Vector Informatik GmbH 




User Manual CANdesc  
Further Information 
You see the service with the two columns states Locked and Access granted
  
 
Info: To select yes or no just select the row, click on the yes/no and then use the pull 
down menu. 
 
  
Info: Pull down menu selections: 
No = Must not be executed 
 
Yes = may be executed, no state transition 
Locked = state transition 
Access granted = state transition 
  
 
The following figure shows the properties for the service Send Key in the Key 
instance. This service is also assigned to both of the states, but there is also a 
transition to state defined. How do you interpret this entry?  
The service Send Key could be executed in the state Locked. If the data is 
processed (depending on the OEM, this must be done by the application or is a 
generated, OEM-specific Code) and a positive response is sent back, CANde
 
sc
switches the state from Locked to Access Granted. In case of a negative re
o
sp nse 
the ECU remains in the diagno
 state 
stic
Locked. 
  
A positive response 
is the trigger for a 
transition from the 
Locked state to the 
state Access granted 
 
 
  
5.4 
Connection between the states and your application 
 
The initial state after the ECU starts is the st
this case the 
ate at the top of the list. In 
initial state is Locked. 
  
© Vector Informatik GmbH 
Version 1.7 
- 47 - 






Further Information 
User Manual CANdesc 
Info: Think about the states very carefully before editing. Make sure that the initial 
state is listed on top. 
 
  
Example: The state transition mentioned above is monitored to your application via a 
callback function. You will find the prototype of this function, as usual, in the 
 
appdesc.h file. It may look like this: 
void ApplDescOnTransitionSecurityAccess(DescStateGroup 
newState, DescStateGroup formerState); 
The parameters show the direction of the transition. Provide the function and react to 
a transition as you wish. 
  
Example: There is another way to switch states. Leave the transition to state empty 
and do the state transition in your application. This could look like: 
 
DescSetStateSecurityAccess( 
kDescStateSecurityAccessAccess_granted ); 
Use  
DescStateGroup DescGetStateSession (void) 
to find out the current session. 
  
Info: The function declaration and parameter can be found in the generated file 
desc.h. 
 
  
5.5 
Diagnostic Buffer 
 
As described in chapter How to handle User-Defined Handlers on page 35, the 
diagnostic buffer is an area in the RAM where the application and the CANdesc 
Software Component are allowed to write on and read from. How this is handled is 
described in this chapter above. 
What is not explained until now is: 
¼  how to choose the length of the diagnostic buffer 
¼  that there are two mechanisms of using the buffer and 
¼  when to use which mechanism  
  
5.5.1  Linear Diagnostic Buffer 
 
The easiest way of using the diagnostic buffer is to use it as a linear buffer. The size 
of the buffer in bytes must be the size of the longest data (diagnostic response or 
request). 
  
Info: Normally this is a diagnostic trouble code message (DTC) and can reach up to 
100 bytes and more. 
 
  
 
Copy the complete response information to the diagnostic buffer and confirm this via 
the call of DescProcessingDone. 
- 48 - 
Version 1.7 
© Vector Informatik GmbH 


User Manual CANdesc  
Further Information 
This is easy to handle but there are some disadvantages arising with this concept: 
¼  The RAM consumption could be enormous 
¼  The delay time between the reception of a Diagnostic Request and the first 
response message could be very long, depending on the service and the amount 
f the respon
of bytes o
se message. 
There is another concept without these disadvantages but this concept needs a little 
bit more insight in CANdesc func onality. 
ti
  
5.5.2  Ring Buffer Mechanism 
 
There are several reason
ring buffe
s for using the 
r mechanism: 
¼  Little RAM consum
cau
ption be
se of small diagnostic buffer 
¼  Shorter delay between the diagnostic request and the first response message 
The ring buffer mechanism offers the following features: 
¼  Asynchronous writing of serial diagnostic data to the diagnostic buffer 
¼  Underrun allowed, time monitored (in case of TP underrun the PostHandler is 
called with a Tx error code) 
¼  Overrun prevented and monitored via return code 
One of the advantages of the ring buffer mechanism is the little RAM consumption 
(compared with the linear buffer). The consequence is that this little diagnostic buffer 
can hold less data than a diagnostic buffer de
ed for linea
sign
r buffer mechanism. 
That means that the application has to fill the buffer in portions until the complete 
diagnostic response is sent. 
The following example is very simple and designed to understand the concept behind 
the ring buffer mechanism. 
  
Ring Buffer STEP 1 
– Application Data 
and Ring Buffer 
  
 
Starting point is a diagnostic buffer with 10 bytes size and 12 bytes of application data 
to be sent. First you have to set the length of the complete diag
stic data 
no
(resDataLen = 12) and start the ring buffer mechanism 
(DescRingBufferStart). 
  
© Vector Informatik GmbH 
Version 1.7 
- 49 - 




Further Information 
User Manual CANdesc 
Ring Buffer STEP 2 
– First four data 
bytes are copied to 
e Ring Buffer 
th
 
  
 
Now hand over the pointer to the location 
plicatio
of the first four ap
n data bytes 
e
(point r and amount of data - DescRingBufferWrite) to the CANdesc Software 
Component. CANdesc Basic copies the four data bytes to the diagnostic buffer. 
  
ng Buffer S
Ri
TEP 3 
– Eight Data Bytes in 
the Diagnostic 
Buffer, six Bytes are 
being sent via CAN 
 
  
 
Hand over the pointer to the location of the next four application data bytes and 
CANdesc copies the data to the diagnostic buffer right after the first four bytes. Now 
there is enou
ta in the
gh da
 buffer and CANdesc sends the first six data bytes via the 
CAN bus. 
  
Info: The first 2 bytes of the message are transport information and therefore not 
 
free
for application data (TP bytes on position 0 and 1). 
 
 
- 50 - 
Version 1.7 
© Vector Informatik GmbH 






User Manual CANdesc  
Further Information 
Ring Buffer STEP 4 
– The Diagnostic 
Buffer is filled round 
robin 
 
  
 
Now there are only four bytes left to be copied to the Diagno

stic Buffer. The first tw
bytes are stored in position
 9 of the 
 8 and
buffer, the next two bytes in position 0 and 
1. 
  
Info: Now it should be obvious why this concept is called Ring Buffer; the buffer is 
filled round robin. 
 
  
 
In a next step the six data bytes will be copied and sent via CAN starting with the byte 
on position 6.  
That is the basic mechanism, but how do you know when there is enough space in 
the buffer? What happens if the application writes data and the buffer is not free? 
How to handle this buffer in code details? 
  
5.5.2.1 
Activation of the Ring Buffer 
Activation of Ring 
Although the ring buffer could be used for any service and you can meet this decision 
Buffer in GENy 
at run-time you must activate this functionality in general.  
Do this on the CANdesc configuration view in GENy by clicking the Ring Buffer 
Support
 checkbox. 
  
Activation of Ring 
In CANgen you have to select the Ring buffer checkbox at tab CANdesc Options
Buffer in CANgen 
 
  
 
5.5.2.2 
Main Control Functions for the Ring Buffer Mechanism 
Cross reference: For a more detailed description of the API refer to the 
TechnicalReference_CANdesc.pdf. 
 
  
DescRingBufferStart  The call of this function starts the ring buffer mechanism. You can use it for any 
© Vector Informatik GmbH 
Version 1.7 
- 51 - 




Further Information 
User Manual CANdesc 
service and it replaces the DescProcessingDone that you use for the linear buffer 
mechanism. 
  
Info: Call DescRingBufferStart on MainHandler level. 
 
  
DescRingBufferWrite  Via this function you tell CANdesc the location and the amount of the application 
diagnostic data and the software component copies this data to the diagnostic buffer. 
The function has two parameters; one is a pointer which points to the memory 
location of the next diagnostic data. The other parameter is the amount of data that 
should be copied (should be lower or equal to the ring buffer size). 
The return value of this function can be kDescOk or kDescFailed and indicates that 
the write process to the diagnostic buffer was successful or that there was not enough 
free space in the buffer. 
  
Info: In case of kDescFailed no data has been written to the diagnostic buffer. 
 
  
sc
De
RingBufferGetF
This function shows the amount of free space in the diagnostic buffer. 
reeSpace 
  
DescRingBufferGetP
This function shows the amount of data that has already been written to the 
rogress 
diagnostic buffer (for this service). 
 
  
5.5.2.3 
Examples for Ring Buffer Mechanism 
 
Now start the coding for the example above (chapter 5.5.2). The diagnostic buffer is 
10 bytes and the amount of application data to be sent via a diagnostic response is 
12. In the example you write to the diagnostic buffer in four byte portions. 
The examples use an OSEK-OS operating system, but it should be very easy for you 
to transfer this to a system without OSEK-OS. 
  
ing Buffer Example 1 - “Write and Check” 
R
Example: MainHandler of the Service “Service” 
uint8 state; /*global variable*/
 
void ApplDescService( DescMsgContext* pMsgContext)
{
pMsgContext->resDataLen = 12;  /*amout of the complete data to be sent*/
DescRingBufferStart( ); 
state = 0;
DescRingBufferWrite( &dataPtr[state*4], 4 );  /*first write to diagnostic buffer*/
state++;
SetRelAlarm(ALServiceStateMachine, 0, <cycle> ); /*Alarm for activating the Basic 
TASK*/
}
  
 
Define the length of the complete diagnostic response (resDataLen = 12) and start 
the ring buffer mechanism (DescRingBufferStart). The global variable state is to 
- 52 - 
Version 1.7 
© Vector Informatik GmbH 



User Manual CANdesc  
Further Information 
identify in which state your state machine is and it is an index for the data pointer 
dataPtr.  
In the MainHandler you write to the diagnostic buffer the first time for this service - it 
must be free. So you can write the first four data bytes via DescRingBufferWrite. 
  
Info: As the handling of the diagnostic (CANdesc only works if its task is called 
cyclically) needs a cyclic call of the DescTask() or DescStateTask() you have to fill 
 
the diagnostic buffer gradually e.g. by the means of a cyclic basic task. Otherwise the 
DescTask() or DescStateTask() would not be called and the CANdesc could not work.
  
 
Now start an alarm to get the basic task BTServiceStateMachine called all 
<cycle> ms. 
  
Basic Task to Handle 
TASK( BTServiceStateMachine )
the Service State 
{
Machine 
if( DescRingBufferWrite( &dataPtr[state*4], 4 ) == kDescOk )
{
state++;

if( state == 3 ) 
{
CancelAlarm( ALServiceStateMachine );   /*all data (3x4 bytes) has been 
transferred to diagnostic buffer*/
}
TerminateTask( BTServiceStateMachine);
}
  
 
This basic task is designed to write the next 8 data bytes to the diagnostic buffer. But 
the application does not know if the buffer is free or not (Write and Check). To get 
this information use the return value of the DescRingBufferWrite function. Is it 
kDescOk, then the write was successful and we can increment the state. If not 
(kDescFailed), we have to repeat writing the last four bytes agai
l of 
n in the next cal
the task.  
If state is equal to three, 
een
i.e. all 12 bytes have b
 written to the diagnostic buffer, 
we cancel the alarm to stop
 handlin
 the
g of this diagnostic service. 
  
am
Ring Buffer Ex
ple 2 - “Check and Write” 
 
The MainHandler for this example is the same as in example 1. 
The difference is, that you first check whether there is enough free space in the buffer 
before you write the next data (check and write). Via the function 
DescRingBufferGetFreeSpace you get the information about the free space in 
the buffer. If there is enough space, write the next data and increm
t, 
ent the state, if no
terminate the task and repeat the try with the next activation of the task. 
  
Example:  
 
© Vector Informatik GmbH 
Version 1.7 
- 53 - 


Further Information 
User Manual CANdesc 
TASK( BTServiceStateMachine )
{
DescMsgLen freeSpace;
freeSpace = DescRingBufferGetFreeSpace();  /*MISRA*/
if( freeSpace >= 4 )
{
DescRingBufferWrite( &dataPtr[state*4], 4 );
state++;

if( state == 3 ) 
{
CancelAlarm( ALServiceStateMachine );   /*all data (3x4 bytes) has been 
transferred to diagnostic
u
 b ffer*/
}
TerminateTask( BTServiceStateMachine);
}
  
ing Buffer Example 3 – “GetProgress” 
R
 
In this example you use th
a
e alre dy mentioned function 
DescRingBufferGetProgress to figure out how many bytes you have written to 
the buffer until now. This makes the example much easier but a little bit more difficult 
to understand why it works in this way.  
As you see you do not need a global variable for the state. The state now is defined 
by the amount of data that you have already written to the buffer. 
 
Example:  
 
void ApplDescService(DescMsgContext* pMsgContext)
{
pMsgContext->resDataLen = 12;
DescRingBufferStart();
DescRingBufferWrite( &dataPtr[ DescRingBufferGetProgress() ], 4); /* will be 0 at 
the beginning*/
SetRelAlarm( ALServiceStateMachine, 0, cycle ); /*Alarm for activating the Basic 
TASK*/
}
TASK( BTServiceStateMachine )
{
DescMsgLen progress = DescRingBufferGetProgress();
if(progress < 12)
{
DescRingBufferWrite( &data

Ptr
progress ], 4 );
}
TerminateTask( BTServiceStateMachine );
}
  
Conclusion 
 
As you see in these three little examples, the handling of the ring buffer is always the 
same. You start the writing, you write cyclically and in portions and you have to define 
an ending criteria – a typical state machine.  
CANdesc offers a feature to support that kind of handling that is not only useful when 
working with ring buffer mechanism – the repeated service call. 
  
- 54 - 
Version 1.7 
© Vector Informatik GmbH 


User Manual CANdesc  
Further Information 
5.6 
Repeated Service Call Feature 
 
The easy way would be to transfer all data in the MainHandler to the diagnostic 
buffer, to call DescProcessingDone and the service is done. 
But what to do with information that cannot be provided immediate
aso
ly? For this re

you have to trigger a further function that handles the provision of diagnostic da

ta an
then finishes the service via DescProcessingDone. 
The Repeated Service Call helps you to handle situations like above very easy. Via 
the function call DescStartRepeatedServiceCall( CyclicFunction ) you 
trigger the call of the “CyclicFunction” with the call cycle of DescTask
ith 
 or w
the call of 
cStateTask
Des

  
Repeated Service 
CanDesc
ApplDescMainHandler
CyclicFunction
Call 
call
DescStartRepeatedServiceCall(CyclicFunction)
  
 
The CyclicFunction can be the function where from you call the repeated service call 
or a second function.  
At the end of the service handling you can stop the function from being called 
cyclically in two ways: 
¼  call DescProcessingDone in linear mode 
¼  if you have copied all announced data bytes to the diagnostic buffer if ring buffer 
mechanism is used 
The repeated service call is stopped too, if you  
¼  call DescRingBufferStart 
¼  call (another) DescStartRepeatedServiceCall( ) 
  
Info: Using repeated service call and the ring buffer you have to take care about the 
order DescRingBufferStart and DescStartRepeatedServiceCall. 
 
  
6.1 
5.
Activation of the Repeated Service Call 
 
u
As the ring b ffer mechanism you have to activate the repeated service call in the 
generation tool. 
In GENy you have to select a mode for repeated service call in the CANdesc 
configuration view. CANgen offers the same modes in the CANdesc option tab. 
As you see in the screenshot there are three modes for the Repeated Service Call: 
  
  
Deactivated 
You cannot use this feature at all. 
© Vector Informatik GmbH 
Version 1.7 
- 55 - 






Further Information 
User Manual CANdesc 
  
Deactivated 
You cannot use this feature at all. 
 
The repeated service call is switched to on for any service in the 
Always 
way that the MainHandler is called cyclically as long as you call 
DescProcessingDone or all data is written to the ring buffer. 
 
With the individual setting you decide for every service whether to 
use the repeated service call or not. To use it, just activate it via 
Individual 
DescStartRepeatedServiceCall as you see in the following 
examples. 
  
Selection for 
Repeated Service 
Call in GENy 
 
  
Selection for 
Repeated Service 
Call in CANgen 
 
  
 
The following two examples show the handling of the ring buffer mechanism using the 
repeated service call. 
  
Info: The setting in the generation tool is individual. 
 
  
5.6.2  Repeated Service Call and Ring Buffer 1 – “Write and Check” 
 
This is the same example as in the chapter dealing with the ring buffer mechanism. 
This time use the repeated service call instead of the OSEK-OS task. And in this first 
example, define the MainHandler itself to be called cyclically via: 
  
Example: DescStartRepeatedServiceCall( ApplDescService ); 
 
  
 
For this case the MainHandler must be realized as a state machine because the start 
of the repeated service call has to be done only once per diagnostic request handling. 
  
Example:  
 
- 56 - 
Version 1.7 
© Vector Informatik GmbH 


User Manual CANdesc  
Further Information 
uint8 state; /*global variable, set to 0 in PreHandler*/
void ApplDescService( DescMsgContext* pMsgContext)
{
if( state == 0)
{
pMsgContext->resDataLen = 12;
/*amout of the complete data to be sent*/
DescRingBufferStart( );
DescRingBufferWrite( &dataPtr[ state*4 ], 4 )
DescStartRepeatedServiceCall(ApplDescService);
state++;
}
else
{
if( DescRingBufferWrite( *dataPtr[ state*4 ], 4 ) == kDescOk )
{
state++; /*if resDataLen data bytes have been copied to the diagnostic   
buffer the repeated service call stops automatically*/
}
}
}
  
5.6.3  Repeated Service Call and Ring Buffer 2 – “Check and Write” 
 
Now add a second function and call it cyclically after the MainHandler has been 
called. The MainHandler acts as initialization of the state machine and the second 
function handles all further states. 
  
Example:  
 
uint8 state; /*global variable*/
void ApplDescService( DescMsgContext* pMsgContext)
{
state = 0;
pMsgContext->resDataLen = 12;
/*amout of the complete data to be 
sent*/
DescRingBufferSt
( );
art
DescRingBufferWrite( &dataPtr[ state*4
 4
 ],
)
DescStartRepeatedServiceCall( SecondFunction );
}
void SecondFunction( DescMsgContext* pMsgContext ) /*prototype must be defined 
by application*/
{
DescMsgLen freeSpace;
freeSpace = DescRingBufferGetFreeSpace();  /*MISRA*/
if( freeSpace >= 4 )
{
state++; 
DescRingBufferWrite( &dataPtr[
tat
 s
e*4 ], 4 ); 
/*if resDataLen (12) data byte
hav

e been copied to the diagnostic buffer
the repeated service call
op
 st
s automatically*/
}
}
  
 
© Vector Informatik GmbH 
Version 1.7 
- 57 - 

Additional Information 
User Manual CANdesc 
6 Additional 
o
Informati n 
In this chapter you find the following information: 
6.1 
Persistors 
 page 59
 
Update Persistors – Install current Version 
  
- 58 - 
Version 1.7 
© Vector Informatik GmbH 


User Manual CANdesc  
Additional Information 
6.1 
Persistors 
What is the Persistor  The CANdela data base file (CDD) is created by CANdela Studio and used by GENy 
for? 
for configuring CANdesc. 
If you use a newer version of the CANdela Studio, the format of the CDD file could be 
also newer than your GENy is able to deal with. 
The Persistors are responsible to convert the newer CDD file into a CDD file which is 
able to read by GENy.  
  
Update Persistors – 
The latest Persistors can be downloaded from Vector homepage 
Download current 
www.vector.com
Version 
Select Downloads and then the three settings for ProductsCategories and 
Standards.  
¼  Products: CANdela Studio 
¼  Categories: Add-Ons/Freeware 
¼  Standards: All Standards 
  
Cross reference: See the following illustration. 
 
  
Available for 
The name for the Persistors download is:  
NT/2000/XP or 
¼  Converters for CANdela diagnostic descriptions for Windows xxx
Windows 9.x 
  
 
© Vector Informatik GmbH 
Version 1.7 
- 59 - 



Additional Information 
User Manual CANdesc 
 
 
Download 
Select on or more items from the list (
) and click on [>> Select one or more items, 
then continue] to download the files after entering some administrative information.  
  
6.1.1  Update Persistors – Install current Version 
Follow description 
Start the downloaded file SetupPersistorsXP.exe
step by step 
    
- 60 - 
Version 1.7 
© Vector Informatik GmbH 



User Manual CANdesc  
Additional Information 
 
 
Click [Next]
 
 
Select Custom and enter the path to the …\Generators\Components folder as 
Destination Folder for Custom Setup and click [OK]
© Vector Informatik GmbH 
Version 1.7 
- 61 - 



Additional Information 
User Manual CANdesc 
 
Click [Install] and the installation process will be started and then on [Finish] when 
ready. 
  
Ready 
Now the current Persistors are installed and your GENy is able to read the latest CDD 
file.  
  
 
- 62 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
FAQs 
7 FAQs 
In this chapter you find the following information: 
7.1 
Introduction 
 page 64
7.2 
Frequently Asked Questions  
page 
64
  
© Vector Informatik GmbH 
Version 1.7 
- 63 - 


FAQs 
User Manual CANdesc 
7.1 
Introduction 
Find not search 
You have a certain question? You just want to know how to do e.g. a certain setting 
without reading the whole document again? 
Then go on reading the following list and use the links to get at the place in the 
document where your question will be answered. 
This chapter will be extended continuously. 
  
7.2 
Frequently Asked Questions 
FAQ: RingBuffer and the UDS SuppressPositiveResponseMessageIndicationBit 
(SPRMIB) 
 
If the application wants to use the ring-buffer for a diagnostic service with a sub-
function (usually service 0x19 "ReadDtcInformation") it shall consider the SPRMIB 
prior deciding to start the ring buffer. The reason for that is, once the ring-buffer 
response is activated this means to CANdesc that the application wants to send data. 
But if the SPRMIB=TRUE, there shall be no positive response on the communication 
bus. So in such cases the Application shall follow the sequence below: 
 
if(pMsgContext->msgAddInfo.suppPosRes != 0) 

  DescProcessingDone();/* just close the service processing 
now. No response will be sent back*/ 

else 

  DescRingBufferStart(); /* initate the ring-buffer response 
transmission */ 

  
 
- 64 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
What’s new, what’s changed 
8  What’s new, what’s changed 
In this chapter you find the following information: 
8.1 
Version 1.7 
 page 66
 
What’s new 
 
What’s changed 
  
 
© Vector Informatik GmbH 
Version 1.7 
- 65 - 

What’s new, what’s changed 
User Manual CANdesc 
8.1 
Version 1.7 
What’s new and 
This explains the changes within this document form the previous Versi
 
on to the one
what’s changed  
mentioned in this headline. 
 
8.1.1  What’s new 
w ch
Ne
apter 
There is a new chapter for additional information about Persistors setup and update 
at chapter additional information (see section Persistors on page 59). 
Persistors setup and 
update  
  
8.1.2  What’s changed 
New Layout 
The Document has got a new template. 
 
- 66 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
Address table 
9 Address 
table 
Vector Informatik 
Vector Informatik GmbH  
GmbH 
Ingersheimer Str. 24  
D-70499 Stuttgart  
one: +4
Ph
9 (711) 80670-0  
Fax: +49 (711) 80670-111  
mailto:info@de.vector.com  
http://www.vector-informatik.com/ 
  
Vector CANtech, Inc.  Vector CANtech, Inc.  
Suite 550  
39500 Orchard Hill Place  
USA-Novi, Mi 48375  
Phone: +1 (248) 449 9290  
Fax: +1 (248) 449 9704  
mailto:info@us.vector.com  
http://www.vector-cantech.com/ 
  
Vector France SAS 
Vector France SAS  
168, Boulevard Camélinat  
F-92240 Malakoff  
Phone: +33 (1) 4231 4000  
Fax: +33 (1) 4231 4009  
mailto:info@fr.vector.com  
http://www.vector-france.com/ 
  
Vector GB Ltd. 
Vector GB Ltd. 
Rhodium Central Boulevard Blythe Valley Park 
Solihull, Birmingham 
West Midlands B90 8AS 
Phone: +44 121 50681-50 
mailto:info@uk.vector.com  
http://www.vector-gb.co.uk 
  
© Vector Informatik GmbH 
Version 1.7 
- 67 - 

Address table 
User Manual CANdesc 
Vector Japan Co., 
Vector Japan Co., Ltd.  
Ltd.  
Seafort Square Center Bld. 18F  
2-3-12, Higashi-shinagawa, Shinagawa-ku  
J-140-0002 Tokyo  
Phone: +81 3 (5769) 7800  
Fax: +81 3 (5769) 6975  
mailto:info@jp.vector.com  
http://www.vector-japan.co.jp/ 
  
Vector Korea IT Inc. 
Vector Korea IT Inc. 
Daerung Post Tower III, 508 
Guro-d
uro
ong, G
-gu, 182-4 
2
Seoul, 15 -790 
Republic of Korea 
Phone: +82(0)2 2028 0600 
Fax: +82(0)2 2028 0604 
mailto:info@kr.vector.com  
http://www.vector-korea.com/ 
  
VecScan AB  
VecScan AB  
Theres Svenssons Gata 9 
SE-417 55 Göteborg  
Phone: +46 (31) 76476-00  
Fax: +46 (31) 76476-19  
mailto:info@se.vector.com  
http://www.vecscan.com/ 
  
 
  
- 68 - 
Version 1.7 
© Vector Informatik GmbH 

User Manual CANdesc  
Glossar 
10 Glossar 
Callback function 
This is a function provided by an application. E.g. the CAN Driver calls a callback 
function to allow the application to control some action, to make decisions at runtime 
and to influen
 work o
ce the
f the driver. 
Diagnostics layer 
Diagnostics services that ar
omotive appli
e used in aut
cations have recently become 
standardized. As a result, basic requirements can be implemented by a software 
component for KWP20
S. 
00/UD
  
 
 
© Vector Informatik GmbH 
Version 1.7 
- 69 - 

User Manual CANdesc  
Index 
11 Index 
 
DescRingBufferWrite ......................................... 52 
A 
development environment ................................. 32 
Adapt Your Application Files ..............................33 
Diagnostic Buffer................................................ 48 
AppDesc .............................................................36 
Diagnostic Class .......................................... 18, 19 
appdesc.h .....................................................31, 33 
Diagnostic Instance...................................... 18, 19 
application...........................................................33 
Diagnostic Request.................... 11, 14, 17, 21, 35 
Asynchronous writing..........................................49 
Diagnostics .................................................. 11, 17 
C 
E 
call-back function ................................................48 
Example 1 .......................................................... 52 
CANbedded ..................................................

24, 3
Example 2 .......................................................... 53 
CANdela Studio ................... 11, 14, 19, 20, 45, 55 
Example 3 .......................................................... 54 
CANdesc.......................................... 11, 14, 15, 33 
Examples ........................................................... 52 
Ndesc
CA
 tab.......................................................15 
Extended Session .............................................. 45 
CANgen
.............
.........
........................................26 
CanInitPowerOn .................................................33 
G 
CANoe ..........................................................41, 42 
Generate Files ................................................... 29 
CDD ..............................................................

11, 1
Generated .............................................. 11, 17, 23 
Compile.........................................................24, 41 
Generation Process ..................................... 11, 15 
compiler ..............................................................
 
32
Generation Tool ........................................... 14, 26 
onfiguration
C
................................... 24, 26, 35, 40 
GENy ................................................................. 26 
c c
y lic calls ...........................................................33 
I 
D 
Include ......................................................... 24, 33 
data .....................................................................19 
Initialization .................................................. 24, 33 
DBC ....................................................................14 
initParameter...................................................... 33 
DBC file...............................................................14 
K 
Default session ...................................................45 
KWP2000........................................................... 16 
delay ...................................................................38 
desc.c .................................................................30 
L 
desc.h ...........................................................30, 33 
Linear Diagnostic Buffer .................................... 48 
desccore.h ..........................................................30 
Link .............................................................. 24, 41 
DescInitPowerOn................................................33 
M 
DescRingBufferGetProgress ..............................52 
MainHandler........................................... 24, 32, 38 
DescRingBufferStart ...........................................51 
makefile.............................................................. 32 
© Vector Informatik GmbH 
Version 1.7 
- 70 - 

User Manual CANdesc  
Index 
N 
Service ............................................................... 18 
Nomenclature .................................. 11, 17, 18, 19 
service primitives ............................................... 19 
None .......................................................11, 17, 23 
Sessions ............................................................ 45 
signal.................................................................. 38 
O 
State Groups................................................
 
44, 45
OEM........................................................11, 17, 23 
e Handlin
Stat
g ............................................. 44, 45 
OSEK Transport 
to
Pro col ...................................26 
States ...........................................................
 
44, 45
P 
T 
Programming session .........................................45 
Test ........................................................ 24, 41, 42 
roperies
P
............................................................38 
test environment ................................................ 41 
protocol service...................................................18 
transition to state................................................ 47 
R 
Transitions ......................................................... 45 
RAM consumption ........................................48, 49 
U 
Repeated Service Call Feature ..........................55 
UDS ................................................................... 16 
Request ..............................................................18 
User ....................................................... 11, 17, 23 
Response............................................................18 
User-Defined Handlers ...................................... 35 
Response Pending .............................................38 
Ring Buffer Mechanism ......................................49 
V 
value field........................................................... 39 
S 
variable .............................................................. 38 
security access ...................................................45 
 
© Vector Informatik GmbH 
Version 1.7 
- 71 - 


 
 
Get more Information! 
Visit our Website for: 
> News 
> Products 
> Demo Software 
> Support 
> Training Classes 
> Addresses 
 
 
 
 
 
 
 
 
www.vector-worldwid .com 

e
 

Document Outline


41 - UserManual_CANoe_Model_Generator

User Manual GMLAN Package

43 - UserManual_CANoe_Model_Generators









 
 
 
 
 
 
 
 
 

User Manual 
 
  GMLAN Package 
 
  Installation and usage in CANoe 
Version 2.10.0 
  
  English 
 
 
 

 
 
 
Imprint 
 
Vector Informatik GmbH 
Ingersheimer Straße 24 
D-70499 Stuttgart 
 
 
The information and data given in this user manual can be changed without prior notice. No part of this manual may be reproduced in 
any form or by any means without the written permission of the publisher, regardless of which method or which instruments, electronic 
or mechanical, are used. All technical information, drafts, etc. are liable to law of copyright protection. 
 Copyright 2013, Vector Informatik GmbH  
All rights reserved. 

User Manual GMLAN Package  
Table of contents 
Table of contents 
1 
Introduction 
3 
1.1 
Package Overview 

1.2 
Reference Documents 

1.3 
Features 

1.4 
History 

1.5 
Releases and Compatibility 

1.6 
About this User Manual 

1.6.1 
Access Helps and Conventions 

1.6.2 
Certification 

1.6.3 
Warranty 

1.6.4 
Support 

1.6.5 
Registered Trademarks 

2 
Installation and Configuration 
9 
2.1 
Prerequisites 
10 
2.2 
Installation 
10 
2.3 
Update of CANoe 
10 
3 
Quick Start 
11 
3.1 
Automatic Generation of the Simulation Model (recommended) 
12 
3.1.1 
Model Generation by Drag & Drop 
12 
3.1.2 
Model Generation Wizard 
12 
3.1.3 
Trouble-shooting 
14 
3.1.4 
Result of the Automatic Generation 
14 
3.2 
Database Settings – to be Considered before the Simulation Model can be Operated 
15 
3.2.1 
Network Attributes 
15 
3.2.2 
Node Attributes 
15 
3.2.3 
Message Attributes 
16 
3.2.4 
Signal Attributes 
17 
4 
Operate the Simulation Model 
19 
4.1 
Main Panel 
20 
4.2 
ActiveX Controls 
21 
4.2.1 
ActiveX Message Send Control 
22 
4.2.2 
ActiveX Message Display Control 
23 
4.2.3 
ActiveX Network Management Control 
24 
4.3 
Trouble-shooting 
25 
4.3.1 
Missing VNMF Messages 
25 
4.3.2 
Nodes with the Same Source ID 
25 
5 
Interface Specifications 
27 
5.1 
Interaction Layer (IL) 
28 
5.1.1 
Interaction Layer Control 
28 
5.1.2 
Setting Signal Values 
29 
5.1.3 
Setting Signal Values - Obsolete API Functions 
31 
5.1.4 
Reading Signals within CAPL 
32 
5.1.5 
Incomplete Transmission Models and Tests 
33 
© Vector Informatik GmbH 
Version 2.10.0 
- I - 

Table of contents 
User Manual GMLAN Package 
5.1.6 
Fault Injection Functions 
34 
5.1.7 
GM Specific Functions 
36 
5.1.8 
Error Codes 
37 
5.1.9 
Definition of Return Codes for the IL 
38 
5.1.10  CAPL Call-back Functions 
38 
5.1.11  IL States 
39 
5.1.12  Write Window Outputs 
40 
5.2 
Network Management (NM) 
40 
6 
Restrictions and Deficiencies 
41 
6.1 
Restrictions 
42 
7 
Tips and Examples 
43 
7.1 
Tips 
44 
7.2 
Examples 
47 
8 
Index 
49 
 
- II - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Introduction 
1  Introduction 
In this chapter you find the following information: 
1.1  Package Overview 
 page 4 
1.2  Reference Documents 
 page 4 
1.3  Features 
 page 4 
1.4  History 
 page 5 
1.5  Releases and Compatibility 
 page 5 
1.6  About this User Manual 
 page 7 
 
Access Helps and Conventions 
 
Certification 
 
Warranty 
 
Support 
 
Registered Trademarks 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 3 - 


Introduction 
User Manual GMLAN Package 
1.1  Package Overview 
 
This document is the enclosing document for the GMLAN specification 3.0 support 
package. 
Components 
This package contains the following components: 
>  CANoe Interaction Layer GMLAN (GMLAN IL “CANoeILNLGM.DLL”) 
>  ActiveX message control panel for GM 
>  GMLAN Network Management simulation (GMLAN NM “GMLAN02.DLL”) 
>  GMLAN ActiveX NM control panel 
>  CAPL generator for GM (“CaplGeneratorGMIL.exe”) 
>  Model Generation Support 
 
Info: This package requires as minimal CANoe version 7.1. 
 
 
1.2  Reference Documents 
[1] 
CANoe online help and manual 
[2] 
Documentation GMLAN NM DLL (CANoe Start Menu – Help) 
[3] 
Documentation IVLAN NM DLL (CANoe Start Menu – Help) 
 
1.3  Features 
 
The CANoe GMLAN Package supports the GMLAN standard within CANoe. It allows 
creating automatically a simulation model using the network database, and it sup-
ports the Interaction Layer and Network Management functionality within the 
simulation. 
 
CANoe IL GMLAN 
>  Provides a signal-oriented interface 
>  Controls the transmission of messages dependent to the send types of signals and 
messages. 
>  Provides the possibility to send messages on request (using a signal or a 
message as triggering object) 
>  Provides a fault injection interface to influence the sending of messages 
 
Network 
>  The appropriate DLL implements the GMLAN NM protocol that allows nodes that 
Management 
are simulated by CANoe to interact with hardware nodes attached to the CAN 
GMLAN 
network 
>  Handles all network management concerns for GMLAN including "Virtual Net-
works" (VNs) 
 
ActiveX message 
>  Displays the message- and signal-related information and establishes possibilities 
control/GM 
to control them 
 
- 4 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Introduction 
ActiveX NM 
>  Displays the network management related information and establishes possibilities 
control/GM 
to control them in a dedicated way for GMLAN 
 
Main Panel 
>  Displays all nodes of a configuration and establishes the possibility to open their 
ActiveX message and NM controls 
 
1.4  History 
  
Package version 
Description 
 
2.10.0 of 2013-03-08  Updated CANoe IL CANoeILNLGM.dll to version 2.13.30 
>  Supporting new message attribute 
AppGenMsgCycleTime: If attribute 
AppGenMsgCycleTime > 0 and GenMsgSendType is not 
‘cyclicX’ and GenMsgCycleTime == 0 and 
GenSigCycleTime == 0, then the message will be set to 
‘cyclicX’ with period := AppGenMsgCycleTime
Updated GMLAN NM DLL GMLAN02.dll to version 1.9.17 
and documentation to version 1.14, cf. [2]: 
>  Supports enabling/disabling of “shared local” VNs by 
manipulating system variable 
>  Removed function ILOutput(…) and added new 
function ILOutput2(…). 
Updated "OSEK NM Control" for CANoe 8.0 SP4 
 
2.9.1 of 2012-01-31 
Updated CANoe IL CANoeILNLGM.dll to version 2.12.22 
>  Added function applILTxPending(long aId, 
dword aDlc, byte data[]), cf. section 5.1.10 
Updated the GMLAN02 DLL 1.9.14 and documentation to 
version 1.13, cf. [2] 
Added the IVLAN DLL in version 2.0.0 with manual [3] and 
demo configuration 
 
2.9.0 of 2010-10-26 
Updated "OSEK NM Control" for CANoe 7.5 
Added "Version History" and "Releases and compatibility" 
section 
 
2.8.0 of 2010-02-12 
Release for CANoe 7.2 
 
2.7.0 of 2008-01-30 
Release for CANoe 7.0 
 
2.6.0 of 2006-12-01 
Release for CANoe 6.0 
 
2.5.0 of 2006-04-05 
Release for CANoe 5.2 
 
2.3.0 of 2004-11-12 
Release for CANoe 5.1 
>  Added IL 
 
1.5.5 of 2003-08-01 
Release for CANoe 4.1 (NM only) 
 
1.5  Releases and Compatibility 
Min. CANoe version  Package name 
Package version 
Min. CANoe version 
 
GMLAN Package 
2.10.0 
7.1 
© Vector Informatik GmbH 
Version 2.10.0 
- 5 - 


Introduction 
User Manual GMLAN Package 
Min. CANoe version  Package name 
Package version 
Min. CANoe version 
 
GMLAN Package 
2.9.1 
7.1 
 
GMLAN Package 
2.9.0 
7.1 
 
GMLAN Package 
2.8.0 
7.1 
 
GMLAN Package 
2.7.0 
7.0 
 
GMLAN Package 
2.6.0 
6.0 
 
GMLAN Package 
2.5.0 
5.2 
 
GMLAN Package 
2.3.0 
5.1 
 
GMLAN Package 
1.5.5 
4.1 
 
Caution: Always use the latest possible package version according to your CANoe 
version! 
 
 
Min. package version  CANoe version 
Package name 
Min. package version 
 
>= 8.0 SP4 
GMLAN Package 
2.10.0 
 
>= 7.5 
GMLAN Package 
2.9.1 
 
< 7.5 and >= 7.1 
GMLAN Package 
2.8.0 
 
< 7.1 and >= 7.0 
GMLAN Package 
2.7.0 
 
< 7.0 and >= 6.0 
GMLAN Package 
2.6.0 
 
< 6.0 and >= 5.2 
GMLAN Package 
2.5.0 
 
< 5.2 and >= 5.1 
GMLAN Package 
2.3.0 
 
< 5.1 and >= 4.1 
GMLAN Package 
1.5.5 
- 6 - 
Version 2.10.0 
© Vector Informatik GmbH 








User Manual GMLAN Package  
Introduction 
1.6  About this User Manual 
1.6.1  Access Helps and Conventions 

To find information 
The user manual provides you the following access helps: 
quickly 
>  At the beginning of each chapter you will find a summary of the contents, 
>  In the header you can see in which chapter and paragraph you are ((situated)), 
>  In the footer you can see to which version the user manual replies, 
>  At the end of the user manual you will find an index, with whose help you will 
quickly find information. 
  
Conventions 
In the two following charts you will find the conventions used in the user manual 
regarding utilized spellings and symbols. 
  
 
Style 
Utilization 
 
bold 
Blocks, surface elements, window- and dialog names of the 
software. Accentuation of warnings and advices. 
[OK]   
Push buttons in brackets 
File | Save 
Notation for menus and menu entries 
 
CANoe 
Legally protected proper names and side notes. 
 
Source code  File name and source code. 
 
Hyperlink 
Hyperlinks and references. 
 
<STRG>+<S> 
Notation for shortcuts. 
  
 
Symbol 
Utilization 
 
Here you can obtain supplemental information. 
 
 
This symbol calls your attention to warnings. 
 
 
Here you can find additional information. 
 
 
Here is an example that has been prepared for you. 
 
 
Step-by-step instructions provide assistance at these points. 
 
 
Instructions on editing files are found at these points. 
 
 
This symbol warns you not to edit the specified file. 
 
  
© Vector Informatik GmbH 
Version 2.10.0 
- 7 - 

Introduction 
User Manual GMLAN Package 
1.6.2  Certification 
Certified Quality 
Vector Informatik GmbH has ISO 9001:2000-12 certification. 
Management System  The ISO standard is a globally recognized quality standard. 
  
1.6.3  Warranty 
Restriction of 
We reserve the right to change the contents of the documentation and the software 
warranty 
without notice. Vector Informatik GmbH assumes no liability for correct contents or 
damages which are resulted from the usage of the user manual. We are grateful for 
references to mistakes or for suggestions for improvement to be able to offer you 
even more efficient products in the future.  
  
1.6.4  Support 
You need support? 
You can get through to our hotline at the phone number 
+49 (711) 80670-200 
or you send a problem report to the CANoe-Support. 
  
1.6.5  Registered Trademarks 
Registered 
All trademarks mentioned in this user manual and if necessary third party registered 
trademarks 
are absolutely subject to the conditions of each valid label right and the rights of 
particular registered proprietor. All trademarks, trade names or company names are 
or can be trademarks or registered trademarks of their particular proprietors. All 
rights, which are not expressly allowed, are reserved. If an explicit label of 
trademarks, which are used in this user manual, fails, should not mean that a name is 
free of third party rights. 
 
>  Outlook, Windows, Windows XP, Windows 2000, Vista, Windows7 are trademarks 
of the Microsoft Corporation. 
  
 
- 8 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Installation and Configuration 
2  Installation and Configuration 
In this chapter you find the following information: 
2.1  Prerequisites 
 page 10 
2.2  Installation 
 page 10 
2.3  Update of CANoe 
 page 10 
  
 
© Vector Informatik GmbH 
Version 2.10.0 
- 9 - 



Installation and Configuration 
User Manual GMLAN Package 
2.1  Prerequisites 
Operating system 
Generation: Microsoft® Windows® 2000, XP, Vista or Windows7 
 
Simulation: Refer the Operating Systems that are supported by CANoe. 
 
CANoe 
Version 7.1 (7.1.43) or later must be installed. 
 
User Requirements 
The user should be familiar with 
>  Microsoft® Windows® 
>  CANoe  
If the user intends to do any changes in the simulation model, then the user should be 
familiar with 
>  CAPL 
>  Interaction Layer functioning 
>  Network Management functioning 
 
Hardware 
Refer CANoe's hardware requirements. 
Requirements 
 
2.2  Installation 
Software Installation  Close all applications 
Start the setup program - it will guide you through the installation process 
 
Note: Please note that the directory to select is the root directory of your CANoe 
installation, not the Exec32 directory within this root-directory. 
 
  
2.3  Update of CANoe 
Updating CANoe 
The GMLAN package extends and/or modifies some basic CANoe components. 
Thus, the GMLAN package is to be re-installed after CANoe is updated. 
 
Note: Always de-install the GMLAN package before you update CANoe, and then 
install it again. 
 
 
- 10 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Quick Start 
3  Quick Start  
In this chapter you find information about “How to create with the Simulation Model”: 
3.1  Automatic Generation of the Simulation Model (recommended) 
 page 12 
 
Model Generation by Drag & Drop 
 
Model Generation Wizard 
 
Trouble-shooting 
 
Result of the Automatic Generation 
3.2  Database Settings – to be Considered before the Simulation Model can be Operated 
 page 15 
 
Network Attributes 
 
Node Attributes 
 
Message Attributes 
 
Signal Attributes 
  
© Vector Informatik GmbH 
Version 2.10.0 
- 11 - 






Quick Start 
User Manual GMLAN Package 
3.1  Automatic Generation of the Simulation Model (recommended) 
3.1.1  Model Generation by Drag & Drop 
1.  Prepare a new directory that shall contain the simulation configuration. 
2.  There, create the folder 'candb' and copy your network database into this folder. 
 
The nodes will be generated to the folder "<Database-folder>/../Nodes". 
The panels will be generated to the folder "<Database-folder>/../Panels". 
 
3.  The set-up program has installed a new icon onto your desktop “Create GMLAN 
configuration”. Open the Windows™-Explorer, drag the network database and 
drop it onto this icon. 
 
 
4.  A command-line-window is opened and CANoe is started automatically. 
The Simulation creation runs about ½ up to 2 minutes, depending on your 
hardware configuration and the complexity of the model. You can track the status 
of the generation within the write window of CANoe. 
 
Caution: Please do not operate CANoe before the message 
  "GMLAN Simulation creation finished." has occurred there. 
Don't modify any configuration settings, e.g. channel settings, before the model 
generation is finished. 
 
3.1.2  Model Generation Wizard 
1.  Prepare a new directory that shall contain the simulation configuration. 
2.  There, create the folder 'candb' and copy your network database into this folder. 
 
The nodes will be generated to the folder "<Database-folder>/../Nodes". 
The panels will be generated to the folder "<Database-folder>/../Panels". 
 
3.  Since the CANoe 5.2 release there is a new model generation tool with a very 
simple graphical user interface. Start the Model Generation Wizard from the 
Tools’ start menu of the CANoe: 
 
- 12 - 
Version 2.10.0 
© Vector Informatik GmbH 





User Manual GMLAN Package  
Quick Start 
  
If your CANoe installation is not correctly registered at the system, you will be 
notified about that and an automated possibility to adjust the registration will be 
offered. 
 
There are a few settings that can be changed before the generation of the model 
can be started. First, select the OEM "GMLAN modeling", then the generation 
mode: 
 
>  Create configuration: A new configuration will be created. Please select the 
network database and verify the output root folder. 
 
>  Extend configuration: A new bus will be added to the configuration that is 
currently loaded and active in CANoe. Please select the network database; 
the output root folder is retrieved from the CANoe configuration automatically. 
  
Note: se the “Extend configuration” mode only with configurations that were 
initially created by the model generation wizard in the “Create configuration” 
 
 
mode. Don’t modify any configuration settings, e.g. channel settings, before the 
model generation is finished. 
  
   4.  Push the button ‘Generate’. 
 
 
 
CANoe is started automatically. The Simulation creation runs about ½ up to 2 
minutes, depending on your hardware configuration and the complexity of the 
model. You can track the status of the generation within the write window of 
CANoe. 
  
Caution: Please do not operate CANoe before the message 
  "GMLAN Simulation creation finished." has occurred there. 
Don't modify any configuration settings, e.g. channel settings, before the model 
generation is finished. 
  
Note: " The original database will be not modified. A copy of the database will be 
created and used for the CANoe simulation. The suffix "Cpy" will be appended to the 
  filename of the network database. 
  
© Vector Informatik GmbH 
Version 2.10.0 
- 13 - 








Quick Start 
User Manual GMLAN Package 
Note: The run of the automatic simulation creation requires the confirmation of the 
disclaimer of CANoe. Refer the section "COM Server" within CANoe's online-help for 
  details about this topic. 
  
Note: If old CAPL files are found during the generation process, they will be kept. 
 
  
Note: " If the generation mode "Extend configuration" is used, the new panels are 
saved in a folder that is named like "…/Panels/<database name>" 
 
  
Caution: When using the generation mode “Extend Configuration”: 
>  Use this mode only with configurations that were initially created by the model 
 
generation wizard 
>  Don't modify any configuration settings, e.g. channel settings, before the model 
generation is finished. 
 
3.1.3  Trouble-shooting 
Problems 
If the automatic simulation creation fails, then please check the following topics: 
 
Is CANoe currently running? If yes, is the currently active configuration already 
saved? 
  If the currently running configuration is not yet saved, then save it. 
 
Do you have multiple installations of CANoe on your system? 
  During the set-up of the GMLAN Package, do you have selected the CANoe 
installation area you have installed at last?  
In this case please deinstall the GMLAN Package and reinstall it to the CANoe, you 
have installed at last. If you do not want to use the GMLAN Package within this 
CANoe installation, then please install the intended CANoe version and then install 
the GMLAN-package to this CANoe version. 
 
Is your operating system supported? 
  Refer chapter 2.1 for details. 
 
3.1.4  Result of the Automatic Generation 
CANoe configuration  CANoe simulation of all nodes of the given database 
CAPL simulation files  Each node of the configuration contains a CAPL file. 
Main Panel 
Panel with all nodes in order to open their message and NM control panels 
 
- 14 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Quick Start 
3.2  Database Settings – to be Considered before the Simulation Model 
can be Operated 
 
Network databases for the CANoeIL must fulfil several requirements. Please ensure 
that you use a GM database with a version that is at least 7.01 or later.  
Binary enumerations such as yes/no are expected always with the negative clause on 
index 0. 
There are several attributes that must be defined to use the database. 
 
3.2.1  Network Attributes 
IL 
Name 
Type 
Values 
Description 
 
UseGMParameterIDs 
Integer  0, 1 
Defines if the network uses the 
GMLAN parameter ID’s in the 
29-bit architecture. 
Default: 1 
 
GMLAN NM 
Name 
Type 
Values 
Description 
 
VN_<name> 
Integer  0 – 255 
Defines a unique network ID 
for the virtual network 
<name>. 
 
VNInitAct<name> 
Enum 
0 – No, 
If the value of this attribute is 
1 – Yes 
"Yes", the VN <name> will be 
active on initialization of the 
system, or on reception of a 
high voltage wakeup. 
Otherwise it is in-active and 
has to be activated explicitly 
by a node. 
 
NmBaseAddress 
Hex 
0x620 – 
Base address for the VNMF 
0x63F 
messages 
Default: 0x620 
 
NmMessageCount 
Integer  0 – 32 
Maximum number of nodes in 
a network 
Default: 32 
 
NodeStatusMsgID 
Hex 
0x0 – 
ID of the NCA messages 
0x1FFFFFFF  Default: 0xFFFE000 
 
NodeStatusMsgCycleTime  Integer  0 – 65535 
Periodic rate [ms] of the NCA 
messages 
Default: 1200 
 
3.2.2  Node Attributes 
CANoe 
Name 
Type 
Values 
Description 
 
NodeLayerModules 
String 
e.g. 
Defines the modules the node 
CANoeILNLGM.dll,  
GMLAN02.dll 
needs in the simulation model 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 15 - 

Quick Start 
User Manual GMLAN Package 
IL 
Name 
Type 
Values 
Description 
 
SourceId 
Hex 
0x0 – 0xFF 
Source address of a node. 
Used to build the transmission 
CAN ID. 
 
GMLAN NM 
Name 
Type 
Values 
Description 
 
VNECU<name> 
Enum 
0 – 4 
Role of the node for the 
specific VN <name>. 
Enum  Mode 

None 

Activator 

Remoted 

Activator and Remoted 

Shared Local 
 
 
NmStationAddress 
Integer  0 – 31 
Station address of the node – 
used by the network 
management (cf. [2]) 
 
3.2.3  Message Attributes 
IL 
Name 
Type 
Values 
Description 
 
GenMsgILSupport 
Enum 
0 – No, 
Yes defines the support of the 
1 – Yes 
CANoe IL for this message. 
Default: Yes 
 
NmMessage 
Enum 
0 – No, 
NM messages are not 
 
1 – Yes 
supported by the CANoe IL. 
Default: No 
 
TpApplType 
String 
 
TP or diagnostics messages 
are not supported by the 
CANoe IL. 
 
Prio 
Integer  0 – 7 
Priority of the message. Used 
to build the transmission CAN 
ID. 
Default: 4 
 
GenMsgSendType 
Enum 
0, 1 
Send type of the message 
Default: NoMsgSendType 
Due to the signal-oriented 
approach of the CANoe IL the 
signal attribute 
GenSigSendType is normally 
used to define the send types 
of the simulation model. 
Enum  Mode 

cyclicX 

spontanX 
Default: spontanX 
- 16 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Quick Start 
 
GenMsgCycleTime 
Integer  0 – 10000 
Cycle time of periodic 
messages [ms] 
 
AppGenMsgCycleTime 
Integer  0 – 10000 
If attribute 
AppGenMsgCycleTime > 0 
and GenMsgSendType is not 
‘cyclicX’ and 
GenMsgCycleTime == 0 and 
GenSigCycleTime == 0, then 
the message will be set to 
‘cyclicX’ with period := 
AppGenMsgCycleTime
 
GenMsgCycleTimeFast 
Integer  0 – 10000 
Fast cycle time of messages 
(‘IfActive’ send types) [ms] 
 
GenMsgStartDelayTime 
Integer  0 – 10000 
Defines the delay time after 
start-up of the CANoe IL [ms] 
 
GenMsgDelayTime 
Integer  0 – 10000 
Defines the minimum delay 
time between multiple 
sendings of a message [ms] 
 
3.2.4  Signal Attributes 
IL 
Name 
Type 
Values 
Description 
 
GenSigStartValue 
Integer  0 – 65535 
Start value of the signal (raw 
format) 
Default: 0 
 
GenSigSendType 
Enum 
0, 1, 7, 10, 11,  Send type of the signal 
12 
Default: NoSigSendType 
Enum  Mode 

Periodic 

OnWrite 

NoSigSendType 
10 
OnAnyChange 
11 
OnChangeIfActive 
12 
OnDelta 
 
 
GenSigInactiveValue 
Integer   
Value of the signal at which it 
is in an Inactive state. Used by 
send types 
OnChangeIfActive’. 
Default: 0 
 
GenSigCycleTime 
 
 
Cycle time for a periodic send 
type 
 
GenSigDeltaValue 
Integer   
Defines the delta for the send 
type ‘OnDelta’ 
Default: 0 
 
GenSigSendTopBottom 
Enum 
0 – 3 
Used for the send type 
OnDelta’ to send the value 
although the delta < 
© Vector Informatik GmbH 
Version 2.10.0 
- 17 - 



Quick Start 
User Manual GMLAN Package 
IL 
Name 
Type 
Values 
Description 
GenSigDeltaValue 
Enum  Mode 

None 

SendOnTop 

SendOnBottom 

SendOnTopBottom 
Default: None 
 
GMLAN NM 
Name 
Type 
Values 
Description 
 
VNSig<name> 
Enum 
0 – No, 
Declares if the signal is 
1 – Yes 
assigned to the VN <name>. 
 
Reference: See more about the GMLAN NM attributes in [2]. 
 
 
Reference: For possible values of the attribute ‘GenSigSendType’ cf. “CANoe IL | 
Vector IL | Used Attributes in the Database” in [1]. 
 
 
- 18 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Operate the Simulation Model 
4  Operate the Simulation Model 
In this chapter you find the following information: 
4.1  Main Panel 
 page 20 
4.2  ActiveX Controls 
 page 21 
 
ActiveX Message Send Control 
 
ActiveX Message Display Control 
 
ActiveX Network Management Control 
4.3  Trouble-shooting 
 page 25 
 
Missing VNMF Messages 
 
Nodes with the Same Source ID 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 19 - 


Operate the Simulation Model 
User Manual GMLAN Package 
4.1  Main Panel 
 
The generated Main Panel displays all nodes of the configuration. The node buttons 
opens the ActiveX Message Controls and the ActiveX NM Controls for the appropriate 
node. 
 
 
 
 
 
- 20 - 
Version 2.10.0 
© Vector Informatik GmbH 



User Manual GMLAN Package  
Operate the Simulation Model 
4.2  ActiveX Controls 
 
For each simulation node, there are 3 panels available  
>  Send Panel” - where all transmitted messages are displayed and their mapped 
signals can be changed 
>  Display Panel” - where all received messages and received signals are displayed 
and can be observed. Only the received signals are listed within the received 
messages. 
>  “ECU NM Panel” - where the status of the Virtual Networks (VNs) can be viewed. 
This panel additionally allows activating and deactivating the Virtual Networks from 
the Node's application view for these VNs, the node is an activator. 
 
The send and display panels for the GM package were improved concerning 
performance and usability issues. They are using the new message group control. 
 
 
 
Within this group control the user gets control about the visualization of a possible 
huge amount of messages. The user is able to open and close single message 
controls on demand. 
 
1.  Chose the node you want to observe and press the appropriate button on the 
main panel. 
 
2.  The Network Management Panel shows the current status of the Virtual 
networks. If a VN is active (for the node) then the rightmost indicator is 
highlighted. You can activate and deactivate those VNs, the node is an 
activator.  
At last, you can switch off all sending activities of the node by operating the 
'Online'-switch. The node is active per default. 
3.  Now you can easily set signal values on the send-panels of the node. Each 
© Vector Informatik GmbH 
Version 2.10.0 
- 21 - 


Operate the Simulation Model 
User Manual GMLAN Package 
signal is represented by a value-control you can change. Additionally, each 
message has a “Set Event”-button available, where an additional transmission 
can be forced. Normally the IL takes care about the send model itself, but for 
test purposes, this button can be used. Please note, that the message is sent 
only, if at least one VN of the mapped signals is currently activated. If not, then 
a text message is written to the write window of CANoe and no transmission is 
done. 
4.  You can additionally observe all messages with their signals, the node 
receives. The received messages with their signals are listed onto the 
"display-panels". Please keep in mind, that GMLAN allows the sending of the 
same message by multiple nodes. Therefore the panels are grouped by the 
message name and by the sending node. Display panels are not intended to 
change values; they are intended just to observe the current status. 
 
4.2.1  ActiveX Message Send Control 
Preconditions 
This panel requires a simulated send node where the IL is loaded as node-layer DLL. 
Features 
The representation of the message ID can be changed between decimal and 
hexadecimal. The sending can be de-/activated by the checkbox "Enabled". 
The enable state of the message can also be changed by the CAPL functions 
ILFaultInjectionEnableMessage() and 
ILFaultInjectionDisableMessage(). Calling those functions also changes this 
“Enabled” checkbox. 
The Button 'DB Info' of the send and display control opens a window that shows the 
dependency of the virtual networks of the message. This is the resulting dependency 
after considering all signals of this message. 
The status line shows the messages send type (right cell) and the signals send type 
(middle cell) of the currently selected signal. 
The send types are taken from the database. 
 
 
 
- 22 - 
Version 2.10.0 
© Vector Informatik GmbH 


User Manual GMLAN Package  
Operate the Simulation Model 
 
 
  
The send control provides two possibilities to send a message: 
>  The Button that shows the message name ignores the transmission model of the 
database and leads to a message transmission if one of the associated signals 
takes part at a currently activated VN (analogously to the CAPL function 
ILSetMsgEvent(dbMessage msg) of the Interaction Layer). 
>  The Input of a value in the column ‘Value’ leads to a transmission of the message 
dependent on the transmission model of the database (analogously to the CAPL 
function SetSignal(dbSignal sig,double value) or $Node::Signal = 
value;). There are three possibilities to set a signal value: 
>  Combo Box with Enumeration values  signals that are defined with a value 
table in the database 
>  Check Box  one bit signals without a value table in the database 
>  Decimal Field  signals longer one bit and without a value table in the 
database 
 
Some features were added to display the signal values: 
>  The cell of the signal value is greyed means  The current value in the cell is not 
the value that was received last from the bus. 
>  The signal value has red colour means  The current value is out of range. The 
ranges were taken from the database (min/max value of the signal). The ranges 
are considered only, if at least min or max is different to 0 (zero). 
 
4.2.2  ActiveX Message Display Control 
Preconditions 
None 
Features 
This panel is able to work in both, the simulated and the real environment because it 
reflects the current signal values. 
 
There are only minor differences between the send and the display control: 
>  The display control has no 'Set Event' Button, thus no possibility to send 
>  Signal values are read-only 
>  The signals of the specific receiver node will be displayed 
© Vector Informatik GmbH 
Version 2.10.0 
- 23 - 



Operate the Simulation Model 
User Manual GMLAN Package 
 
 
 
4.2.3  ActiveX Network Management Control 
Preconditions 
This control requires the observed node being simulated and the Node-Layer DLLs 
GMLAN02.dll and CANoeILNLGM.dll loaded into this node. 
 
 
Features 
The network management control shows the status of all relevant virtual networks of 
the node ('S' for status) and provides the possibility to activate/deactivate all virtual 
networks ('A' for Application-Activation) with the appropriate association 'Shared 
Local', 'Activator' or 'Activator & Remoted'. 
 
If a 'Shared Local' network is activated by a network management control, all 
nodes that are configured as 'Shared Local' for this network will be activated 
too. As an exception, the diagnostic network (VN number 0) supports only an 
activation of the single local node. 
 
The information about the NCA, VNMF and Source Id is displayed first after 
measurement start, because this is runtime information of the GMLAN02.dll. 
 
The Check Box 'Online' establishes the possibility to stop all sending of this node, 
both from the Interaction Layer and from the Network Management. If one of these 
two components is inactive, the Check Box will be greyed. This checkbox allows to 
mute the sending of CANoe IL and NM completely, e.g. for manually executed 
supervision tests. Please note that the functionality of CANoe IL and NM do not take 
care about the setting except being silent. After switching a node "offline", the 
recovery into the online-mode is done roughly just be letting through all further 
sending. All sending that became due while being 'offline' have been lost. 
 
If it is needed to switch the sending on/off in a more deterministic way (e.g. for 
reproducible automated tests), then the following API functions are to be used 
- 24 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Operate the Simulation Model 
>  ILControlStop() and ILControlStart() (for CANoe IL) and 
>  NwmDiag(…) (for NM, refer [2] for more details). 
 
4.3  Trouble-shooting 
4.3.1  Missing VNMF Messages 
Missing VNMF 
The current revision of the database (8.54) results in a generated configuration that 
Messages 
cannot be operated at once, due to network management reasons: So if the 
measurement cannot be started with your database, please have a look into the write 
window of your CANoe. With the mentioned database revision, CANoe complains 
about missing VNMF Messages. You can recognize problematic node's simulations 
additionally by the NM address that is shown within the simulation set-up. If there is -1 
assigned, then the network management is not able to work for this node.  
 
You can solve this problem by one (or more) of the following means: 
 
>  Switch all these problematic nodes into the inactive mode (if the node is not to be 
simulated) 
 
>  Add a valid VNMF-frame into the database and associate it as send message to 
the node (if the database has to be changed) 
 
>  Deactivate network management for these nodes (if the real nodes do not have 
network management). But please be aware that you then have to 
activate/deactivate the VNs for the Interaction Layer manually by using the CAPL 
functions GMILActivateVN(…) and GMILDeactivateVN(…). 
To deactivate the network management, you can choose one of the following 
possibilities: 
1.  Do not use the GMLAN02.dll for these nodes. You can deactivate this module 
within the configuration menu for each (problematic) simulation node, within 
the tab "modules". Just uncheck the module "GMLAN02.dll" 
2.  You can change the database, that this module is not loaded within the node. 
Just remove the text GMLAN02.dll from the attribute NodeLayerModules of 
each problematic node. 
 
4.3.2  Nodes with the Same Source ID 
Multiple defined 
There is another issue within the current database revision (8.54): There may exist 
Source IDs 
several nodes having the same Source ID. If these nodes are running in parallel 
within one simulation, then these nodes are working concurrently. This results e.g. in 
alternating contents of the panels, because the different Interaction Layers are each 
sending different values. This constellation is to be changed by selecting one node 
(the right one that is intended for your network setup) for simulation, and deactivating 
the others. 
 
The CANoe IL detects this case during measurement start. It is indicated by a 
message within the write window, e.g. 
Source ID 96 is multiple defined in the database. 
 
This message is indicated once for each overlapping. So two occurring messages 
indicate two additional nodes; that mean that there are 3 nodes of the same Source 
ID. 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 25 - 



User Manual GMLAN Package  
Interface Specifications 
5  Interface Specifications 
Note: The tool-chain generates a fully working simulation model. You should read this chapter 
only if there is a need to modify the automatically generated CAPL code. 
 
In this chapter you find the following information: 
5.1  Interaction Layer (IL) 
 page 28 
 
Interaction Layer Control 
 
Setting Signal Values 
 
Setting Signal Values - Obsolete API Functions 
 
Reading Signals within CAPL 
 
Incomplete Transmission Models and Tests 
 
Fault Injection Functions 
 
GM Specific Functions 
 
Error Codes 
 
Definition of Return Codes for the IL 
 
CAPL Call-back Functions 
 
IL States 
 
Write Window Outputs 
5.2  Network Management (NM) 
 page 40 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 27 - 


Interface Specifications 
User Manual GMLAN Package 
5.1  Interaction Layer (IL)  
Note: These functions (except ILControlInit()) should not be used in the “on 
PreStart()” event procedure. 
 
 
5.1.1  Interaction Layer Control 
 
The following functions are suitable to control the Interaction Layer. These functions 
can be used when needed. This may be the case when simulating bus-off-states or 
network management sleep active states. The standard NM-module (GMLAN02.dll) 
doesn't need those functions. 
 
Init IL 
Syntax 
long ILControlInit (); 
 
Function 
Initializes the IL. If this function is called in “on PreStart()”, then the 
IL will enter the stop state during “on Start()” and must explicitly be 
started. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
Start IL 
Syntax 
long ILControlStart (); 
 
Function 
When the IL is started, then it is fully operating and sending. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
Stop IL 
Syntax 
long ILControlStop (); 
 
Function 
Stops sending of messages. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
Suspend IL 
Syntax 
long ILControlWait (); 
 
Function 
Stops sending, but accepts signal changes. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
Resume IL 
Syntax 
long ILControlResume (); 
 
Function 
Resumes a suspended IL and starts sending messages again. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
- 28 - 
Version 2.10.0 
© Vector Informatik GmbH 




User Manual GMLAN Package  
Interface Specifications 
Stop IL simulation 
Syntax 
long ILControlSimulationOff (); 
 
Function 
Stops the simulation of the IL. The IL is not operational. All API 
function except function ILControlSimulationOn() will not 
work. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
Start IL simulation 
Syntax 
long ILControlSimulationOn (); 
 
Function 
Starts the simulation of the IL. The IL is operational and started. 
The IL will send messages. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
 
Please find the state graph that is traversed by these functions in section 5.1.10. 
 
Note: Please note, that send panels require a running IL, otherwise the sending of 
messages cannot be controlled there. 
 
 
5.1.2  Setting Signal Values 
 
In order to set a signal value the following assignment should be used: 
 
Set physical signal 
Syntax 
value 
$dbSignal = value; 
 
Function 
The assignment sets the physical value of the signal. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
value: The pysical value to be set. 
 
Returns 
Nothing 
 
Set raw signal value  Syntax 
$dbSignal.raw = value; 
 
Function 
The assignment sets the raw value of the signal. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
value: The raw value to be set. 
 
Returns 
Nothing 
 
Example: 
  $SignalABC = 1; 
 
Note: It is recommended to use this assignment to set a signal (with less or equal 
than 32 Bits) or a floating point signal. 
 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 29 - 




Interface Specifications 
User Manual GMLAN Package 
Note: The sending of the mapped messages is dependent to the chosen send types 
for the message and for the signal that was set. 
 
 
 
The following functions can be used for setting signal values directly by the GMLAN 
IL (obsolete): 
  
Set physical signal 
Syntax 
value 
long ILSetSignal (dbSignal, double value);  
 
Function 
The function sets the physical value of the signal directly at the IL. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
value: The pysical value to be set. 
 
Returns 
Refer to section 5.1.8 
 
Set raw signal value  Syntax 
long ILSetSignalRaw (dbSignal, double value);  
 
Function 
The function sets the raw value of the signal directly at the IL. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
value: The pysical value to be set. 
 
Returns 
Refer to section 5.1.8 
 
Set raw signal byte 
Syntax 
long ILSetSignalRawField (dbSignal, const byte 
field 
pData[], long aDataLen);  
 
Function 
The function sets the raw value of the signal as a data field. With 
this function, there is the possibility to set lengthy integers 
(> 32 Bits). 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
pData: Reference to the input byte array. 
aDataLen: Size of the input byte array. 
 
Returns 
Refer to section 5.1.8 
 
Example 1: Setting an integer signal with less or equal 32 Bits or a floating point 
signal: 
  ILSetSignal(MessageXYZ::SignalABC, 1); 
 
Example 2: Setting a signal with more than 32 Bits: 
   void codeQWord2ByteArray (qword value, byte data[]) 

  int i; 
  for (i=0; i<8; i++) { 
    // Motorola coding: 
    data[i] = (value & 0xFF); 
    value = value >> 8; 
  } 

 
on key '2' 

- 30 - 
Version 2.10.0 
© Vector Informatik GmbH 


User Manual GMLAN Package  
Interface Specifications 
  qword val = 0; 
  byte data[8]; 
 
  val += 1; 
  codeQWord2ByteArray(val, data); 
  ILSetSignalRawField(ECU_APPL_BCM::ECU_APPL_BCM, data, 
                      elcount(data)); 

 
Note: If groups of signals shall be set consistently without intermediate inconsistent 
transmissions, no additional API is needed. 
 
 
5.1.3  Setting Signal Values - Obsolete API Functions 
 
It is highly recommended always to use the functions that are described within sec-
tion 5.1.2, that all use the symbolic access by "dbSignal", the functions described in 
this section are obsolete but still supported. 
  
Set physical signal 
Syntax 
value 
long ILSetSignal (dword sigHandle, double value);  
 
Function 
The function sets the physical value of the signal directly at the IL. 
 
Parameter 
sigHandle: The signal handle of a signal that must be created prior 
to the call of this function (see hints below). 
value: The pysical value to be set. 
 
Returns 
Refer to section 5.1.8 
 
Set raw signal value  Syntax 
long ILSetSignalRaw (dword sigHandle, double 
value);  
 
Function 
The function sets the raw value of the signal directly at the IL. 
 
Parameter 
sigHandle: The signal handle of a signal that must be created prior 
to the call of this function (see hints below). 
value: The pysical value to be set. 
 
Returns 
Refer to section 5.1.8 
 
Set raw signal byte 
Syntax 
long ILSetSignalRawField (dword sigHandle, const 
field 
byte pData[], long aDataLen);  
 
Function 
The function sets the raw value of the signal as a data field. With 
this function, there is the possibility to set lengthy integers 
(> 32 Bits). 
 
Parameter 
sigHandle: The signal handle of a signal that must be created prior 
to the call of this function (see hints below). 
pData: Reference to the input byte array. 
aDataLen: Size of the input byte array. 
 
Returns 
Refer to section 5.1.8 
 
Signal Handles 
Within CANoe 5.0, it is possible to pass signal objects as "Signal Handles". With the 
earlier version of CANoe (4.1), the Signal Handle had to be produced in CAPL by the 
programmer. So the programmer had to call the following function to obtain signal 
© Vector Informatik GmbH 
Version 2.10.0 
- 31 - 

Interface Specifications 
User Manual GMLAN Package 
handles: 
dword ILConfigureSignal(char QualifiedSignalName[]); 
 
Tip: 
The function returns over the whole measurement time the same handle for 
the same signal name. So it may be called multiply or only once after the initialization. 
To reduce database lookups, it is recommended to call this function only once per 
signal and node. 
 
The qualified signal name must be enclosed in string quotation marks and may 
consist of  
>  the network database name (optional) 
>  the message name (optional) 
>  the signal name (mandatory) 
 
If the qualified signal name is not valid respectively to the quotation, it is not possible 
to obtain a valid signal handle. Then the handle 0 (zero) is returned. If there is interest 
to gather more hints for the failure, the user may call the following function: 
long ILErrno(); 
This function returns the error code, if it is called directly after the call of an Interaction 
Layer API-function. 
 
5.1.4  Reading Signals within CAPL 
 
You can use the functions GetSignal(…) to read out the current value of a signal. 
For GM Extended messages, the signal must be qualified with the node to get the 
value that was sent last by the node having the dedicated source id. Just have a look 
into the CAPL browser in the section "Signal Access". 
  
Get physical signal 
Syntax 
value 
var = $dbSignal; 
 
Function 
Retrieves the current physical value of a signal. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
var: The name of the variable that should store the signal’s value. 
 
Returns 
Nothing 
 
Get raw signal value  Syntax 
var = $dbSignal.raw; 
 
Function 
Retrieves the current raw value of a signal. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
var: The name of the variable that should store the signal’s value. 
 
Returns 
Nothing 
 
 
The following functions can be used for reading signal values: 
  
Get physical signal 
Syntax 
value 
double GetSignal (dbSignal);  
 
Function 
Retrieves the current physical value of a signal. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
 
Returns 
The physical value of the signal 
 
- 32 - 
Version 2.10.0 
© Vector Informatik GmbH 



User Manual GMLAN Package  
Interface Specifications 
Get raw signal value  Syntax 
double GetSignalRaw (dbSignal);  
 
Function 
Retrieves the current raw value of a signal. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
 
Returns 
The raw value of the signal 
 
Get last reception 
Syntax 
time 
dword GetSignalTime (dbSignal);  
 
Function 
Retrieves the CANoe time when the signal was on the bus at last. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
 
Returns 
Returns 0 if never 
 
Check range 
Syntax 
long CheckSignalInRange (dbSignal, 
float lowLimit, float highLimit);  
 
Function 
Checks if a signal value is in a dedicated range. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
lowLimit: lower limit to check 
highLimit: upper limit to check 
 
Returns 
Returns 1 if the signal is in the range, returns 0 if the signal is 
outside the range. 
 
Caution: For GM Extended messages, the signal must be qualified with the node to 
get the value that was sent last by the node having the dedicated source ID. 
 
 
Example: Code for Standard-CAN: 
double value; 
 
value = GetSignal(SignalName); 
or 
value = $SignalName; 
Example code for GM-Extended: 
double value; 
value = GetSignal(NodeName::SignalName); 
or 
value = $NodeName::SignalName; 
 
 
5.1.5  Incomplete Transmission Models and Tests 
 
It is possible to ignore the transmit-model in the database and to generate the 
transmission event manually. 
 
There are two possible levels, where “events” can be injected: 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 33 - 



Interface Specifications 
User Manual GMLAN Package 
Set signal event 
Syntax 
long ILSetEvent (dbSignal);  
 
Function 
This function considers GenMsgDelayTime, and it also considers 
the activity of the network. So a call of this function will lead to a 
transmission of the associated message, if there is any active VN, 
the signal is associated to. If there is no active VN, then a message 
is provided to the write window. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
 
Returns 
Refer to section 5.1.8 
 
Set message event 
Syntax 
long ILSetMsgEvent (dbMessage);  
 
Function 
A call of this function will lead to a transmission of the associated 
message. This function considers GenMsgDelayTime. The call will 
lead to a message transmission if one of the associated signals 
takes part at a currently active VN. 
 
Parameter 
dbMessage: The symbolic name of a message in the database. 
 
Returns 
Refer to section 5.1.8 
 
Caution: It is strongly recommended, to use this functionality only for test purposes 
and not in real simulations. The database should be corrected instead. 
 
 
5.1.6  Fault Injection Functions 
Reference: The IL provides a standard fault injection interface which is suitable to 
control the sending of messages. For more information about these functions refer to 
  the CANoe Online Help [1] Technical Reference: CAPL Functions | CANoe IL”. 
 
Generic fault 
With these fault injection functions the sending behavior of a message can be 
injections 
changed.  
 
Disable message 
Syntax 
long ILFaultInjectionDisableMsg (dbMessage);  
 
Function 
Disables the sending of the message except by calling the function 
ILSetMsgEvent(). 
 
Parameter 
dbMessage: The symbolic name of a message in the database. 
 
Returns 
Refer to section 5.1.8 
 
Enable message 
Syntax 
long ILFaultInjectionEnableMsg (dbMessage);  
 
Function 
Enables the sending of the message. 
 
Parameter 
dbMessage: The symbolic name of a message in the database. 
 
Returns 
Refer to section 5.1.8 
 
- 34 - 
Version 2.10.0 
© Vector Informatik GmbH 



User Manual GMLAN Package  
Interface Specifications 
Set cycle time 
Syntax 
long ILFaultInjectionSetMsgCycleTime (dbMessage, 
dword value);  
 
Function 
Assigns a new cycle time to the message. 
 
Parameter 
dbMessage: The symbolic name of a message in the database. 
value: new cycle time in [ms]. 
 
Returns 
Refer to section 5.1.8 
 
Reset cycle time 
Syntax 
long ILFaultInjectionResetMsgCycleTime 
(dbMessage);  
 
Function 
Resets the cycle time back to its original value from the DBC. 
 
Parameter 
dbMessage: The symbolic name of a message in the database. 
 
Returns 
Refer to section 5.1.8 
 
Set DLC 
Syntax 
long ILFaultInjectionSetMsgDlc (dbMessage, 
dword DLC);  
 
Function 
Sets a new DLC for the message. 
 
Parameter 
dbMessage: The symbolic name of a message in the database. 
DLC: new data length code. 
 
Returns 
Refer to section 5.1.8 
 
Reset DLC 
Syntax 
long ILFaultInjectionResetMsgDlc (dbMessage);  
 
Function 
Resets the DLC back to its original value from the DBC. 
 
Parameter 
dbMessage: The symbolic name of a message in the database. 
 
Returns 
Refer to section 5.1.8 
 
Reset all 
Syntax 
long ILFaultInjectionResetAllFaultInjections ();  
 
Function 
Resets the fault injection settings for all messages of the node. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
Note: These fault injection functions can also be used for messages with extended 
IDs (available with CANoe 7.0 SP3). Therefore the ID-based functions have to be 
  used: 
  id_DDM = gmLanId(Driver_Door_Status, DDM); 
   testDisableMsg(id_DDM); 
This example disables the sending of the message "Driver_Door_Status" of node 
"DDM". 
 
Reference: Some fault injection functions are also available in CAPL test modules. 
Refer to the CANoe Online Help [1] Technical Reference: CAPL Functions | Test 
  Feature Set | Fault Injection Functions”. 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 35 - 


Interface Specifications 
User Manual GMLAN Package 
Caution: It is strongly recommended, to use these fault injections only for test 
purposes and not in real simulations. The database should be corrected instead. 
 
 
5.1.7  GM Specific Functions 
VN activity control 
The following functions are provided to control the activity of virtual networks. If the 
simulation node uses the Node-Layer module "GMLAN02.dll", then it is not needed to 
call these functions explicitly, because the Interaction Layer is informed automatically 
by the network management component about changes in the activity of Virtual 
Networks. 
 
Activate VN 
Syntax 
long GMILActivateVN(long VirtualNetwork);  
 
Function 
Activates the supplied VN. 
 
Parameter 
VirtualNetwork: The number of the VN 
 
Returns 
Refer to section 5.1.8 
 
Deactivate VN 
Syntax 
long GMILDeactivateVN(long VirtualNetwork);  
 
Function 
Deactivates the supplied VN. 
 
Parameter 
VirtualNetwork: The number of the VN 
 
Returns 
Refer to section 5.1.8 
 
Check activation 
Syntax 
state of VN 
long GMILIsVNActive (long VirtualNetwork);  
 
Function 
Returns the activity state of the supplied VN. 
 
Parameter 
VirtualNetwork: The number of the VN 
 
Returns 
Returns 1 if yes, 0 if no. 
 
Signal observation 
The following function registers a CAPL Handler for a specific signal. It can be used 
to decide whether a VN should be activated or deactivated. It is possible to provide 
one handler per signal. On “setting a signal” following conditions would lead to a call 
of the handler: 
>  Send type "OnAnyChange", "OnChangeIfActive" and cyclic sending: only if the 
signal value has changed 
>  Send type "OnWrite": Always 
>  Send type "OnDelta": Only if the delta has exceeded 
 
- 36 - 
Version 2.10.0 
© Vector Informatik GmbH 


User Manual GMLAN Package  
Interface Specifications 
Register signal 
Syntax 
long ILRegisterSignalObserver(dbsignal, 
observer 
char handlerName[]);  
 
Function 
Register a call-back function in CAPL as a signal observer. 
 
Parameter 
dbSignal: The symbolic name of a signal in the database. 
handlerName: The function name of the call-back function. This 
call-back function must match the following signature: 
void 
nameOfTheSignalObserver(double signalValue) 
 
Returns 
Refer to section 5.1.8 
 
5.1.8  Error Codes 
 
Most of the API-functions are able to return error codes. Some of the API functions 
when successful return an object that may be de-referenced later on. 
In most cases the exact reason of the error is obvious and there is no need to 
interpret the error code, because the errors are output to the write window 
additionally. All error messages should contain enough context information to localize 
the source of the problem. 
 
 
If there is interest to gather more hints for a failure, the user may call the following 
function: 
 
Get last error code 
Syntax 
long ILErrno ();  
 
Function 
This function returns the last error code, if it is called directly after 
the call of an Interaction Layer API-function. 
 
Parameter 
None 
 
Returns 
Refer to section 5.1.8 
 
 
The IL helps CAPL to supply an error message by the transformation of the error 
code into an error text. The following function can be used for that: 
 
Get error text 
Syntax 
long ILSetResultString (long aResult, char 
aText[], long aLenText);  
 
Function 
This function transforms an error code of the IL into an error text. 
 
Parameter 
aResult: An error code that is returned by any IL function. 
aText: The output buffer for the text string. 
aLenText: The size of the output buffer. 
 
Returns 
Refer to section 5.1.8 
 
Example:  
  long ret; 
char buffer[256]; 
ret = ILSetSignal(MessageXYZ::SignalABC, 1.0); 
ILSetResultString(ret, buffer, 255); 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 37 - 

Interface Specifications 
User Manual GMLAN Package 
5.1.9  Definition of Return Codes for the IL 
 
It is not necessary to check the error codes of the API functions. In case of an error 
the errors are additionally output to the write window. 
 
  
num. Value (long)  Explanation 
 

Request processed 
 
Warnings 
Are not reported to the write window 
 
-1 
IL is in a state that ignores the given request.  State graph 
of the IL 
 
-2 
Allowed value range of a signal exceeded.  
(The exceeded value is transmitted to the bus nevertheless) 
 
Configuration errors 
Are reported to write window – indicate a fundamental 
problem that must be solved before usage 
 
-50 
Node-Layer is not active. Presumably it is deactivated in the 
node’s configuration dialog. 
 
-51 
API function not supported 
 
-52 
The node is connected to another bus like the CAN Bus 
 
Dynamic Errors 
Are reported to write window. The supplied data is not 
consumed; therefore it is not needed to set signal’s value 
back. 
 
-100 
Signal/message not found in DB, or not mapped to the node 
 
-101 
Maximum possible value range exceeded. (There is no 
transmission to the bus) 
 
-102 
A Network management-, diagnosis, or transport protocol 
signal was set. IL declines such types of signals, because it 
is not intended to connect these layers to the IL. 
 
-103 
Invalid value supplied (for all types of requests) 
 
-104 
General error for invalid requests that are not described 
furthermore. 
  
5.1.10 CAPL Call-back Functions 
Background 
The CAPL program may define these optional functions (all marked with the prefix 
applIL) to receive indications about events from the IL. 
 
- 38 - 
Version 2.10.0 
© Vector Informatik GmbH 


User Manual GMLAN Package  
Interface Specifications 
Syntax 
dword applILTxPending(long aId, dword aDlc, byte 
TX pending 
data[]); 
dword applILTxPending(long aId); // deprecated 
 
Function 
This call-back is optionally being called before the IL sends a 
message to the bus. In this call-back it is possible to prevent the 
sending of the message or to change the data of the message. 
An example can be found in section 7.2. 
 
Parameter 
aId: With the ID you can identify the message. 
aDLC: 
The DLC of the message to be sent and the length of the 
data bytes array. 
data: Data bytes array with the bytes to be sent. The bytes can 
optionally be changed. 
 
Returns 
>  If the return value of this function is 0, then sending of the 
message with the supplied aId is prevented. 
>  If the return value of this function is 1, then the sending of the 
message with the supplied aId is done. 
 
Caution: You should not use "set signal" functionality within the call-backs, because 
this may trigger another sending to the bus. 
 
 
5.1.11 IL States 
 
If the IL is simulated (default), it knows the following states. Please refer the Interface 
functions for details how to traverse the state graph. These functions are described in 
section 5.1.2. 
  
 
running
event ILSetSignal/ process
do/ checkSendDues / process
ILControlRelease / 
ILControlWait
ILControlStop
process pending requests
ILControlStart
ILControlStop / 
waiting
delete pending 
suspended
requests
event ILSetSignal/ store as pending request
event ILSetSignal/ ignore
ILControlInit / initialize
uninited
startup
Start
event ILSetSignal/ return error
 
 
Simulation On/Off 
If the IL is not simulated, the described functions have no consequences to the IL. 
 
If the IL changes from "SimulationOn" to "SimulationOff", the IL is stopped. 
© Vector Informatik GmbH 
Version 2.10.0 
- 39 - 

Interface Specifications 
User Manual GMLAN Package 
If the IL changes from "SimulationOff" to "SimulationOn", the IL is started. 
 
5.1.12 Write Window Outputs 
 
Here some outputs to the write window are described: 
  
SignalHandle invalid  This signal is not known in the node scope of the IL. Reasons: 
>  Attribute ‘GenMsgILSupport’ of the associated message is not correctly set. 
>  Send node of the associated message is not the node the IL is responsible for. 
>  Associated message was identified as a diagnostic, NM or TP message. 
MessageHandle 
This message is not known in the node scope of the IL. Reasons: 
invalid 
>  Attribute ‘GenMsgILSupport’ of the message is not correctly set. 
>  Send node of the message is not the node the IL is responsible for. 
>  Message was identified as a diagnostic, NM or TP message. 
 
Message for 
A set signal request doesn’t cause a output of the associated message to the bus. 
(un)changed signal is  Reasons: 
not sent 
>  IL inactive 
>  Sporadic message send type and no signal send type 
Sending of message  Only a notification that the message was sent although the send type had prevented 
forced 
a sending. Reasons: 
>  Usage of “ILSetEvent” or ”ILSetEvent” in CAPL 
>  Usage of the send button of an ActiveX send control 
 
5.2  Network Management (NM) 
 
The NM features and interface is described in [2]. 
NM ↔ IL  
There is not implemented any automatic local coordination between the IL and the 
NM module. The IL and NM in CANoe for GM work independently of each other. 
Thus, also the CAPL functions for the activation and deactivation of the (local) VN are 
both present (with different names) at the IL and NM DLL. 
ActiveX NM Control  The controls of the Active X NM panel sometime have impact simultaneously onto the 
NM and IL and sometimes even to a group of nodes (VN) instead of having only local 
impact to the NM module! (cf. section 4.2.3) 
DLL 
A NM node’s node attribute NodeLayerModules in the database must contain the 
entry “GMLAN02.dll”. 
In opposite to the ActiveX NM Controls all DLL functions (of the IL and the NM) have 
only impact on the local module (either NM or IL) of that node the CAPL program is 
attached to. 
 
- 40 - 
Version 2.10.0 
© Vector Informatik GmbH 

User Manual GMLAN Package  
Restrictions and Deficiencies 
6  Restrictions and Deficiencies 
In this chapter you find the following information: 
6.1  Restrictions 
 page 42 
 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 41 - 

User Manual GMLAN Package  
Restrictions and Deficiencies 
6.1  Restrictions 
Integer signals > 52  The standard message panel-controls that are delivered with this package are 
bits 
working in the following way: 
>  The setting of values is not possible. (cf. also tip “Sending integer signals > 52 
bits” in chapter 7.1) 
>  The display of values is possible for the maximum value of 252-1. 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 42 - 

User Manual GMLAN Package  
Tips and Examples 
7  Tips and Examples 
In this chapter you find the following information: 
7.1  Tips 
 page 44 
7.2  Examples 
 page 47 
© Vector Informatik GmbH 
Version 2.10.0 
- 43 - 




Tips and Examples 
User Manual GMLAN Package 
7.1  Tips 
Write window views 
  Make the write window docked so that other windows will not hide it. Sometimes it is 
crucial to cf. the write window because all error messages and warnings will be output 
there. 
  
Setting a signal at the IL 
  If you use the function ILSetSignal() make sure that you use it in the correct 
node. I.e. if you want to set a ESP signal value you must edit the “ESP.can” file, 
otherwise you will see no change to the signal value. This is a correct behaviour of 
the IL because one node cannot set a signal value of another node. Therefore it is 
recommended to use always the SetSignal() function. Then the routing to the 
correct node is done automatically. 
  
Sending integer signals > 52 bits 
  If the standard mechanism (refer 5.1) does not match the requirements, then an 
additional API function of GM CANoe IL can be used. With this function, the raw 
value can be set. It is not possible to set the physical value of such signals within 
CAPL. 
1.  Create an environment variable of type 'data' with the intended length within 
the network database (or an additional database you have to associate to the 
used channel(s)). 
2.  Put a Hex-Edit-control onto a (new) panel and associated it to environment 
variable that was created in the previous step. 
3.  Open the CAPL program of the send node of the signal, add an "on envVar"-
handler for that environment variable and add the following code fragment: 
on EnvVar <myEnvvar> 

  byte lValue [8]; 
  GetValue (this, lValue); 
 
  ILSetSignalRawField(<Message>::<Signal>, lValue, 8); 

Then replace the names in brackets: 
>  <myEnvvar> by the previously created environment variable 
>  <Message> by the message that contains the lengthy signal 
>  <signal> by the lengthy signal. 
Please note, that all these names are to be inserted without any quotation. 
There are some rules to follow when operating these hex-edit controls: 
>  The first byte to enter is the lease significant byte of the raw value of the signal. 
>  Only those bytes are affected that are supplied in the control. If for example the 
last byte is omitted, then this last byte remains unaffected!  ' It is recommended to 
supply always all needed bytes. 
It is currently not possible to display these lengthy integers on the panels: 
 
- 44 - 
Version 2.10.0 
© Vector Informatik GmbH 








User Manual GMLAN Package  
Tips and Examples 
Caution: The displayed values represent only a part (52 bits) of the really received 
value. Recommendation not to consume the value from the display panel. Use the 
  trace window instead. 
 
Get hooks on activation/deactivation of Virtual Networks 
  The network management component communicates automatically with the 
Interaction-Layer component and automatically activates and deactivates the VNs. If 
the activation/deactivation of the Virtual Networks should be observed, then it is 
possible to define CAPL functions that are called on activation/deactivation of the 
Virtual Networks. See [2] and 5.1.7 for details. 
 
Avoid the automatic start of the Interaction Layer 
  The Interaction Layer is started per default on start of measurement. If this should be 
prevented, then call the initialization function (cf. 5.1.1) of the CANoe IL in the pre-
start section manually. Then the automatic start is not done. Please note, that send 
panels require a running CANoe IL, otherwise the sending of messages cannot be 
controlled there. 
 
Get application callbacks (hooks) on transmit activity of the Interaction Layer 
  It is possible to get an application call-back within CAPL before the GMLAN IL sends 
a message to the bus. In this call-back it is possible to prevent the sending of the 
message or to change the data of the message. 
dword applILTxPending(long aId, dword aDlc, byte data[]); 
dword applILTxPending(long aId); // old version 
>  Cf. section 5.1.10 for details. 
 
 
Caution: You should not use "set signal" functionality within the call-back, because 
this may trigger another sending to the bus. 
 
 
CAPL signal driver 
  If a signal value will be set (e.g. in a panel, by the COM-API, within CAPL) a signal 
driver is used to set the value and send the message. Normally the GMLAN IL is the 
signal driver of all TX signals within an ECU. But for dedicated signals or for test 
purposes it might be helpful to send the message within CAPL. Therefore a CAPL 
signal driver (CAPL call-back) can be registered, that is called on each set signal 
request. 
 
long registerSignalDriver(dbSignal, char callback[]) 
 
The CAPL call-back must have following signature: void fct(double value) 
 
How to globally activate a VN from CAPL that is locally “shared local”? 
  All CAPL function for the activation or deactivation of the VN has only impact on the 
local node. Especially al nodes that are “shared local” to this VN can only be activated 
in their local CAPL program. In order to trigger all nodes from one dedicated node a 
new trigger event must be defined, that is handled in all participating nodes 
© Vector Informatik GmbH 
Version 2.10.0 
- 45 - 

Tips and Examples 
User Manual GMLAN Package 
accordingly. 
1.  Create an environment variable of type 'integer' with name VN_Act_<name> 
for the VN <name> with the ID n within the network database (or an additional 
database you have to associate to the used channel(s)) of the CANoe 
configuration.. 
2.  Open the CAPL programs of all participating nodes, add an "on envVar"-
handler for that environment variable and add the following code fragment: 
on EnvVar VN_Act_<name> 

  long i; 
  i = <n>; 
  if (@this == 0) 
  { 
    GMILDeactivateVN(i); // Deactivate VN at IL 
    ILDeactivateVN(i); // Deactivate VN at NM 
  } 
  else 
  { 
    GMILActivateVN(i); // Activate VN at at IL 
    ILActivateVN(i); // Activate VN at NM 
  } 

Then replace the names in brackets: 
>  <name> by the name of the VN 
>  <n> by the unique ID of the VN (equal to value of database network 
attribute VN_<name>
Please note, that all these names are to be inserted without any quotation. 
3.  In the local node’s CAPL program that should activate or deactivate the 
appropriate VN simply set the value of the environment variable: 
@VN_Act_<name> = 1; // 1 to activate or 0 to deactivate 
the VN 
Instead of using an environment variable also a system variable of CANoe can be 
used. 
 
- 46 - 
Version 2.10.0 
© Vector Informatik GmbH 



User Manual GMLAN Package  
Tips and Examples 
7.2  Examples 
Example 1: Individual calculation of a checksum and a message counter 
   dword applILTxPending (long aId, dword aDlc, byte data[]) 

  dword i; 
  byte xor; 
 
  /* Message 0x1A0 contains a XOR checksum in Byte 0. It will  
   * be calculated from the other data bytes of the message. 
   */ 
  if(aId == 0x1A0) 
  { 
    // calculate 
    xor = 0x00; 
    for(i = 1; i < aDlc; ++i) { 
      xor = xor ^ data[i]; 
    } 
    // set the new checksum 
    data[0] = xor; 
  } 
   
  /* Message 0x1A1 contains a 4-Bit message counter in  
   * the first 4 Bits of Byte 0. 
   */ 
  if(aId == 0x1A1) 
  {   
    // get the old value 
    i = data[0] & 0x0F; 
     
    // increment 
    i++; 
    i = i % 16; 
     
    //set the new message counter 
    data[0] = i & 0x0F; 
  } 
 
  return 1; // don't prevent sending of the message 

 
Note: Use the new fault injection interface (4.1.6) to prevent the sending of a 
message. 
 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 47 - 


User Manual GMLAN Package  
Index 
8  Index
ILFaultInjectionSetMsgDlc .............................. 35 
C 
ILRegisterSignalObserver ............................... 37 
CANoe CAPL functions 
ILSetEvent ...................................................... 34 
CheckSignalInRange ....................................... 33 
ILSetMsgEvent................................................ 34 
GetSignal ......................................................... 32 
ILSetResultString ............................................ 37 
GetSignalRaw .................................................. 33 
ILSetSignal ................................................ 30, 31 
GetSignalTime ................................................. 33 
ILSetSignalRaw ........................................ 30, 31 
ILSetSignalRawField ................................ 30, 31 
D 
Installation .......................................................... 10 
Database settings ............................................... 15 
Interface Specifications ...................................... 27 
F
Interaction Layer (IL) ....................................... 28 
 
Network Management (NM) ............................ 40 
Features ................................................................ 4 
M 
H 
Minimal CANoe version ....................................... 4 
History ................................................................... 5 
Model Generation by Drag & Drop .................... 12 
I 
Model Generation Wizard .................................. 12 
IL CAPL callback functions 
applILTxPending .............................................. 39 
O 
IL CAPL functions 
Operate the simulation model ............................ 19 
GMILActivateVN .............................................. 36 
GMILDeactivateVN .......................................... 36 
P 
GMILIsVNActive .............................................. 36 
Prerequisites ...................................................... 10 
ILControlInit ..................................................... 28 
ILControlResume ............................................. 28 
Q 
ILControlSimulationOff .................................... 29 
Quick start .......................................................... 11 
ILControlSimulationOn .................................... 29 
ILControlStart ................................................... 28 
R 
ILControlStop ................................................... 28 
Restrictions and Deficiencies ............................. 41 
ILControlWait ................................................... 28 
ILErrno ............................................................. 37 
T 
ILFaultInjectionDisableMsg ............................. 34 
Tips and Examples ............................................ 43 
ILFaultInjectionEnableMsg .............................. 34 
ILFaultInjectionResetAllFaultInjections ........... 35 
W 
ILFaultInjectionResetMsgCycleTime ............... 35 
Warranty .............................................................. 8 
ILFaultInjectionResetMsgDlc ........................... 35 
ILFaultInjectionSetMsgCycleTime ................... 35 
 
© Vector Informatik GmbH 
Version 2.10.0 
- 49 - 


 
 
Get more Information! 
Visit our Website for: 
> News 
> Products 
> Demo Software 
> Support 
> Training Classes 
> Addresses 
 
 
 
 
 
 
 
 
www.vector.com 

 
 

Document Outline


44 - UserManual_Startup_with_GMLAN_GENy

User Manual

46 - UserManual_Startup_with_GMLAN_GENys

 
 
 
 
 
 
 
 
 
 
 
 
  Startup with GMLAN and   
  GENy 
   User Manual 
    (Your First Steps) 
 
 
    Version 1.0.1 
 
 
 
 
 
 
 
    Vector Informatik GmbH, Ingerheimer Str. 24, 70499 Stuttgart 
    Tel. 0711/80670-0, Fax 0711/80670-399, Email can@vector-informatik.de 
    Internet http:\\www.vector-informatik.de 



User Manual  Startup with GMLAN 
 
1 / 32 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Authors:  Klaus Emmert 
Version:  1.0.1 
Status: 
in preparation (in preparation/completed/inspected/released) 
 
 
 
 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
2 / 32 
History 
Author 
Date 
Version 
Remarks 
Klaus Emmert 
2008-03-10 
1.0 
Created 
Klaus Emmert 
2011-11-11 
1.0.1 
Improved Understandability 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 



User Manual  Startup with GMLAN 
 
3 / 32 
Motivation For This Work 
You want to read a document and follow its installation hints and as a result the 
software is basically running? Then continue reading this user manual.  
It is a guide through the installation of the GMLAN components, helps you to 
configure you application for the needs of GMLAN and gives you precious hints for 
the different requirements an ECU using GMLAN has to fulfill (PowerTrain, 
SingleWire CAN…). 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
WARNING 
All application code in any of the Vector User Manuals are for training 
purposes only. They are slightly tested and designed to understand the basic 
idea of using a certain component or a set of components. 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
4 / 32 
Contents 
1  About this Document ...................................................................................... 7 
1.1 
Legend and Explanation of Symbols .................................................. 7 
2  What is GMLAN ................................................................................................ 8 
2.1 
Virtual Networks .............................................................................. 10 
3  Your ECU ........................................................................................................ 12 
3.1 
Body Bus ECU ................................................................................. 12 
3.2 
Infotainment ECU ............................................................................ 13 
3.3 
PowerTrain ECU (or Chassis expansion or Powertrain 
expansion) ....................................................................................... 13 
4  GMLAN In 6 Steps ......................................................................................... 14 
4.1 
STEP 1   Prepare Your Software Project ......................................... 15 
4.2 
STEP 2   Configuration Tool GENy and DBC File ............................ 16 
4.2.1 
Setting of Generation Paths ............................................................. 18 
4.2.2 
Component Selection ...................................................................... 18 
4.2.3 
Tree view – A List of all selected components ................................. 18 
4.2.4 
HW_<microcontroller> ..................................................................... 19 
4.2.5 
Nm_Gmlan_Gm ............................................................................... 19 
4.2.6 
Tp_Iso15765.................................................................................... 20 
4.2.7 
Diagnostics – Diag_CanDesc_KWP ................................................ 20 
4.2.8 
DrvCan_<microcontroller> ............................................................... 21 
4.2.9 
Settings are Finished ....................................................................... 23 
4.3 
STEP 3   Add Files to Your Application ............................................ 24 
4.4 
STEP 4  Adaptations For Your Application ...................................... 24 
4.4.1 
Includes ........................................................................................... 24 
4.4.2 
Initialization ...................................................................................... 24 
4.4.3 
Cyclic calls to keep the components running ................................... 25 
4.4.4 
Provide Callback functions ............................................................... 25 
4.5 
STEP 5  Compile And Link .............................................................. 27 
4.6 
STEP 6  Test the Software Component ........................................... 27 
5  Further Information ....................................................................................... 28 
5.1 
Full CAN Message Transmission with Extended Ids ........................ 28 
5.2 
Take care when working with VNs ................................................... 28 
5.3 
Validity of Signals ............................................................................ 29 
5.4 
Signals assigned to different VNs and located in one message ....... 29 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
5 / 32 
5.5 
Source Learning for Single Wire CAN with Mixed Identifiers (11 
bit and 29 bit) ................................................................................... 30 
5.6 
Activation and deactivation of VNs ................................................... 30 
5.6.1 
IlNwmActivateVN( channel, VN) ...................................................... 30 
5.7 
llNwmDeactivateVN ......................................................................... 30 
6  Index ................................................................................................................. 1 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
6 / 32 
Illustrations 
Figure  2-1  GMLAN Layers with standard and optional components ............................ 8 
Figure  2-2  Virtual Networks ....................................................................................... 10 
Figure  4-1  Setup Dialog ............................................................................................. 16 
Figure  4-2  Add data base file for a certain bus system, here CAN. ............................ 16 
Figure  4-3  Channel Setup Window ............................................................................ 17 
Figure  4-4  Paths To Generate Files to destined folders ............................................. 18 
Figure  4-5  Component Selection ............................................................................... 18 
Figure  4-6  Tree View of all selected components ...................................................... 19 
Figure  4-7  Settings for GMLAN .................................................................................. 20 
Figure  4-8  Path to the CDD file on the Configuration View of 
Diag_CanDesc_KWP ............................................................................... 21 
Figure  4-9  Acceptance Filters and Bus timing are channel-dependent settings ......... 21 
Figure  4-10  CAN Bus Timing Register Setup............................................................... 22 
Figure  4-11  Success Window containing Information about Generated Files. .............. 23 
Figure  5-1  Extended CAN Identifier 29bit .................................................................. 28 
Figure  5-2  Signals of Different VNs in One Message ................................................. 29 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 









User Manual  Startup with GMLAN 
 
7 / 32 
1  About this Document 
This document gives you an understanding of GMLAN. You will receive general 
information, a step-by-step tutorial to get the Startup with GMLAN running. 
1.1  Legend and Explanation of Symbols 
You find these symbols at the right side of the document. Use this helpful feature to 
find fast the topics, you need information about. 
These areas 
to the right of 
Symbol 
Meaning 
the text 
contain brief 
items of 
The building bricks mark examples. 
information 
that will 
 
facilitate your 
search for 
Comm  
ents 
You will find key words and information in short sentences in the margin.  This will 
and 
specific 
explanation
 
greatly simplify your search for topics. 
topics. 
The footprints will lead you through the steps until you can use the Startup with 
GMLAN. 
 
There is something you should take care about. 
 
Useful and additional information is displayed in areas with this symbol. 
 
This file you are allowed to edit on demand. 
 
This file you must not edit at all.  
 
This indicates an area dealing with frequently asked questions (FAQ). 
 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 



User Manual  Startup with GMLAN 
 
8 / 32 
2  What is GMLAN 
GMLAN is CANbedded for GM 
GMLAN is General Motors' network operating software, which is supplied 
exclusively by Vector. Vector has great experience with GMLAN from its beginning 
on since 1999. Used by GM and its subsidiaries worldwide, GMLAN provides a 
multi-layered network software solution for CAN bus management and access.  
GMLAN consists of mandatory components and optional components. 
Vector provides all current GMLAN software implementations and each software 
implementation is: 
  Microcontroller-specific 
  CAN controller-specific 
  Compiler-specific 
 
 
Figure  2-1 GMLAN Layers with standard and optional components 
 
 
Mandatory components of GMLAN 
CAN Driver 
The CAN Driver interconnects to the CAN controller, manages CAN transmission 
and  reception, handles CAN initialization, bit  rate, sample  point,  SJW value  and 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 



User Manual  Startup with GMLAN 
 
9 / 32 
filtering. The CAN Driver interfaces with the GM-specific network software  and 
provides a common low-level interface across a variety of CAN controllers. 
Interaction Layer 
It handles message reception,  transmission,  event  and  periodic messages, 
manages Virtual Network initialization and fault detection (signal faults, VN faults). 
Transport Protocol 
The Transport Protocol implements the requirements of GMLAN network layer and 
is primarily used for diagnostics. It manages large data transfers using USDT with 
data size up to 4095 bytes. The Transport Protocol is based on ISO 15765. 
GMLAN Network Management 
It handles both node  and network management, manages communication states 
(active, enabled, sleep). It manages node states (power up, sleep, wake up) and 
the virtual networks. It also handles the use of the VNMF message. 
Configuration Tool 
It is PC-based and operates with Windows 2000/XP. The configuration tool is 
delivered with the GMLAN Software Components and is used to scale the software 
down to your specific needs, to optimize the use of ROM / RAM resources and to 
select the GMLAN features that require integration into your ECU. 
 
Info 
The CAN Driver and the Transport Protocol are standard components and are not GM-specific. 
The main difference of the GMLAN software stack in comparison with other OEM-specific stacks 
is the Interaction Layer / GMLAN Network Management and the concepts of the virtual networks. 
 
Additional components, optional available: 
Diagnostics - CANdesc
 
  HIGHLY RECOMMENDED by GM! 
This is a functional  interface for diagnostic  services based upon the CDD 
diagnostic data  base created by CANdelaStudio. It fulfills the requirements of 
GMW3110, V1.5  and  handles direct processing of CAN-specific  diagnostic 
requests (enable/disable normal message transmission), negative responses (e.g. 
service not available), exceptions  (e.g.  busy,  request  pending) and address 
handling (detection of response  service  identification). It also supports UUDT-
message transmission. Testing of diagnostic is easy using CANdito, CANoe or 
CANape  
Communication Control Layer CCL 
It supports integration of the software components CAN Driver, Interaction Layer, 
Network Management, Transport Protocol and Diagnostics. 
Also it provides an abstraction for different vehicle manufacturers, microcontrollers, 
compiler/linker,  CAN controllers / transceivers. It supports a global  debug 
mechanism and is configured via the configuration tool. 
Measurement and Calibration (CCP/XCP) 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 



User Manual  Startup with GMLAN 
 
10 / 32 
The CCP/XCP is a high performance CAN-based monitor program. It supports 
memory read / write and calibration activities and provides data acquisition. It can 
also be used for flash programming  and data security. It works with Vector’s 
CANape tool. 
 
2.1  Virtual Networks 
In general the ECUs form a network where every ECU is a network node.  
The concept of GMLAN Network Management groups distributed functions into so-
called Virtual Networks (VNs). 
 
 
Figure  2-2 Virtual Networks 
 
What comes along with this concept? 
  Each VN is a functional entity of GMLAN. 
  The location of a VN or parts of it is independent of the physical partitioning 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
11 / 32 
  The VNs are spread over the different ECUs. An ECU can only go to sleep 
mode, if all VNs inside are asleep.  
  Each VN handles its related signals, the use of the network and may include 
sleep/wakeup. 
  Related signals are grouped according to their function 
  A message can contain signals of different VNs. There must be a decision 
whether a signal of a VN is valid (VN awake) or not (VN sleeps). 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
12 / 32 
3  Your ECU 
Before you start with implementing GMLAN Software Components take a look at 
the ECU you have to develop regarding the following questions: 
 
  Is it a Body Bus ECU? With Single Wire CAN and mixed IDs (11bit and 29bit) 
or 11 bit IDs only? Is it a multiple Identity ECU?  
  Is it an Infotainment ECU?  
  Is it a Powertrain ECU?  
The above mentioned kinds of ECUs and bus systems have many settings in 
common and differ in special settings. 
The following installation description shows typical configurations including the 
differences for the three mentioned cases. 
3.1  Body Bus ECU 
Single Wire CAN Mixed Identifiers (11bit and 29bit) 
  Typically 33.333 kBaud 
  1 wire ( bus communication possible while other ECUs are in sleep mode) 
  2 initialization objects predefined: 33.333 kBaud and 83.333 kBaud for flashing 
  29 bit application messages 
  Source Learning 
  Flexible monitoring of receive messages 
Single Wire CAN 11 Bit Identifier 
  Typically 33.333 kBaud 
  1 wire ( bus communication possible while other ECUs are in sleep mode) 
  2 initialization objects predefined: 33.333 kBaud and 83.333 kBaud for flashing 
Multiple ECU on Single Wire CAN 
  Used for nodes that exist more than once in a car with only a few differences 
  At power up the application decides by means of a function call (see below), 
which node should be realized, e.g. left passenger door, or right driver door. 
  To reduce the memory consumption messages that are sent exclusively from 
one node can be overlapped with the exclusively sent messages from the other 
nodes. The result of this overlapping is that all these messages share a 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
13 / 32 
common memory location for the transmit data. This can be configured 
manually in the Send message tab in the Configuration Tool. 
3.2  Infotainment ECU 
  CAN Class C 
  125 kBaud 
  2 wires 
  Able to be woken up 
  Mixed IDs 
3.3  PowerTrain ECU (or Chassis expansion or Powertrain expansion) 
  CAN Class C 
  500 kBaud 
  2 wires 
  Clamp 15 with and without follow-up time 
  Shared local-input activated VN 
  Special bus off recovery time 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
14 / 32 
4  GMLAN In 6 Steps 
STEP 1 :  PREPARE YOUR SOFTWARE PROJECT  
Create folders in your application to store the delivered source code components and 
the generated files in. 
 
 
STEP 2:   CONFIGURATION TOOL AND DATA BASE FILE  
Read-in the data base files that should be provided from your OEM (DBC file / CDD file 
for diagnostics) in the Configuration Tool and make the configuration settings for the 
CANbedded Software Components. 
 
 
STEP 3:  ADD FILES TO YOUR APPLICATION 
Add the CANbedded C and H files to your project or makefile. 
 
 
STEP 4:   ADAPTATIONS FOR YOUR APPLICATION 
Now your application files must be modified to use the CANbedded Software 
Components (includes, cyclic calls, initialization) and do the call back functions. 
 
 
STEP 5:   COMPILE AND LINK 
Compile and link the complete project and download it to your test hardware or 
development environment. 
 
 
STEP 6:   TEST THE SOFTWARE COMPONENT 
Test the software via a suitable test environment. 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 






User Manual  Startup with GMLAN 
 
15 / 32 
4.1  STEP 1    Prepare Your Software Project 
Following the GM_Readme  document you have already installed the delivered 
GMLAN Software Implementation package. To use the GMLAN components for 
your application copy the needed component source code into your project folder.  
Normally these are the following component folders: 
 
This includes the code for the CAN Driver, the Interaction Layer, the Network 
Management (GMLAN) and the Transport Protocol.  
 
 
Info 
For the diagnostic there is an additional software component of Vector Informatik available - 
CANdesc. This component is completely generated; you won’t find any source code in your 
delivery. 
 
 
A folder gendata is optional but recommended to be the target for all the data that 
is generated by the Configuration Tool. 
 
 
 
 
 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 







User Manual  Startup with GMLAN 
 
16 / 32 
4.2  STEP 2    Configuration Tool GENy and DBC File 
 
Info 
Use the online help of the configuration tool GENy for more information about using GENy and its 
concepts. You additionally find a comparison between GENy and CANgen.  
 
Start the Configuration Tool  GENy.exe. Select pre-configuration file, 
microcontroller, derivative and compiler in the first Setup Dialog window.  
 
Figure  4-1 Setup Dialog 
The Preconfiguration selection determines which settings are preset in GENy and 
which settings are not shown at all. This makes configuration for you very easy.  
There is available:  
  Bodybus 
  Infotainment 
  Powertrain 
 
Then go on with adding a data base file using the green plus  
 
Figure  4-2 Add data base file for a certain bus system, here CAN. 
 
Info 
The DBC file is designed by the vehicle manufacturer and distributed to all suppliers that develop an 
ECU. Thus every supplier uses the SAME DBC file for one vehicle platform and one bus system 
(powertrain, body CAN etc.) to guarantee a common basis for development. 
The DBC file contains e.g. information about every node in the network, the messages/signals each 
node has to send or to receive. The distribution of the signals among the messages is stored in the 
DBC file, too. 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 





User Manual  Startup with GMLAN 
 
17 / 32 
 
Use the browse button […] to select your data base file (DBC).  
As you will use a 
different data 
base file you will 
get more and 
other data base 
nodes displayed.  
 
Figure  4-3 Channel Setup Window 
 
The Nodes list shows all available ECUs within the CAN network. Select yours. 
 
Caution for Multiple ECUs 
Use the <Strg> key to mark more than one ECU in the Nodes 
list box then the Multiple Nodes section will be accessible. 
Confirm with [OK]
 
 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 




User Manual  Startup with GMLAN 
 
18 / 32 
4.2.1  Setting of Generation Paths  
Open the menu Configuration|Generation Paths…  to set the paths where the 
Configuration Tool has to generate the files in. Here we use the folder gendata to 
collect all generated files. 
 
Figure  4-4 Paths To Generate Files to destined folders 
Enter your Root Path for relative directories. Additionally you can add extra path 
extensions below the Path  column. Always make sure that the Resolved  Path 
points to the correct path! 
4.2.2  Component Selection 
Use the Component Selection to choose all components you need for your project. 
The screenshot below shows a possible selection.  
 
Figure  4-5 Component Selection 
4.2.3  Tree view – A List of all selected components 
All components selected before are now displayed in the Tree View  below 
MyECU|Components.  
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 



User Manual  Startup with GMLAN 
 
19 / 32 
 
Figure  4-6 Tree View of all selected components 
Now select the different components to perform their individual configuration in 
their Configuration View right besides the Tree View
4.2.4  HW_<microcontroller>  
This contains the hardware specific CAN driver settings for your controller. Refer to 
the manual TechnicalReference_CANDriver_<hardware>.pdf and to your controller 
manual for more information. 
4.2.5  Nm_Gmlan_Gm 
These settings are derived from the data base file. For this first start-up you can 
work with the default settings. 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 






User Manual  Startup with GMLAN 
 
20 / 32 
 
Figure  4-7 Settings for GMLAN 
All necessary settings for the VNs are already done derived from the data base file.  
 
Info 
Attributes are defined in the data base to specify the characteristics of a network, an ECU, a 
network node, a message or a signal. These settings are common for all ECUs that are based upon 
this data base file.  
E.g. the attribute NetworkType can only be modified in the data base file (dbc). It can be set to 
PowerTrain or BodyBus and determines whether it is a CAN Class C or a CAN single wire CAN. 
 
4.2.6  Tp_Iso15765 
You need the Transport Protocol normally for diagnostic purposes only. Use the 
default. 
Info 
For more information about the settings of the transport protocol for your individual 
  needs, refer to the TechnicalReference_TPMC.pdf or the UserManual_TP_GM.pdf. 
 
4.2.7  Diagnostics – Diag_CanDesc_KWP 
If you use diagnostic component select it in the Component Selection view. 
 Read-in an appropriate CDD file and use the default settings.  
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 




User Manual  Startup with GMLAN 
 
21 / 32 
 
Figure  4-8 Path to the CDD file on the Configuration View of Diag_CanDesc_KWP 
The CDD file has to be created and edited with the Vector Tool CANdelaStudio. 
 
4.2.8  DrvCan_<microcontroller> 
There is the access point for two very important setting, the bus timing registers 
and the acceptance registers.  
 
Figure  4-9 Acceptance Filters and Bus timing are channel-dependent settings 
As bus timing register and acceptance register settings are channel-dependant, the 
buttons to open the appropriate windows […]  can be found in the configuration 
view of the channels.  
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 



User Manual  Startup with GMLAN 
 
22 / 32 
 
Bus timing registers 
The values for the bus timing registers are preset via data base attributes and 
should be 33.333 kBaud for Single Wire CAN and 500 kBaud for PowerTrain. 
Check those values again.  
Enter the correct value for the Clock [kHz] of your hardware. 
 
Figure  4-10  CAN Bus Timing Register Setup 
Acceptance registers 
Per default the acceptance registers are set to be open. Optimize filters… to get a 
minimum of non-relevant messages into your system. 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 




User Manual  Startup with GMLAN 
 
23 / 32 
4.2.9  Settings are Finished 
After the settings are done start the generation process of the tool via the yellow 
flash button. 
Use the views Generated Files and Messages to get information during and after 
the generation process. 
 
Figure  4-11  Success Window containing Information about Generated Files. 
Messages 
In the messages view the generation process puts out necessary information like 
what has been done correctly or which errors occurred.  
GENy e.g. checks whether all receive messages of your ECU will pass the 
acceptance filters. If not, a warning will be displayed, containing the message(s) 
that won’t pass the filter.  
Generated Files 
This view displays all generated files and the path, where the files have been 
written to. A good chance to check the correctness of your path settings again.  
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 






User Manual  Startup with GMLAN 
 
24 / 32 
4.3  STEP 3    Add Files to Your Application 
Now you have to add the files of GMLAN Software Components to your application 
files in your project or makefile.  
This includes 
  delivered source code files and (see the list of files in GM_Readme.pdf) 
  generated files in the gendata folder 
 
 
4.4  STEP 4   Adaptations For Your Application 
To use the GMLAN Software Components you have to do a few adaptations to 
your application code.  
4.4.1  Includes 
The only file you have to include is il_inc.h. 
#include “il_inc.h”  
 
4.4.2  Initialization 
/* make sure all interrupts are disabled*/ 
CanInitPowerOn();  /*If this initialization is  
                     demanded to be done from the NM, you do not have to    
                     call it.  
                     The selection above can be done in the Generation  
                     Tool*/ 
IlInitPowerOn(); 
TpInitPowerOn(); 
DescInitPowerOn();  /*optional, if CANdesc is used*/ 
 
/*Enable or Disable RX Messages based on Calibrations*/ 
IlSetRxMessageEnable(<Rx_Message_Name>, 0 or 1 for on or off); 
This is optional 
and only used to 
cut down the 
 
message set. 
/*Enable or Disable TX Messages based on Calibrations*/ 
IlSetTxMessageEnable(<Rx_Message_Name>, 0 or 1 for on or off); 
 
For 29-bit IDs 
IlSetOwnNodeAddress(SWCAN, <srcAddress>); 
only 
 
/*Get learnt source IDs from EEPROM (single channel system)*/ 
for( index=0; index<kIlNumberOfExtIdRxObjects; index++) 

2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 




User Manual  Startup with GMLAN 
 
25 / 32 
  IlSetRxMessageSourceAddress(index, GetBLearnedSourceId(index)); 

 

4.4.3  Cyclic calls to keep the components running 
The CAN Driver is the only component that is event triggered and that does not 
need a cyclic call to work properly (except for the CAN Driver used in polling 
mode). 
All other components provide a task function that you have to call in the correct call 
cycle that is entered in the Configuration Tool for each component.  
 
/*Network Management task*/ 
IlNwmTask();   
 
/*Interaction Layer tasks, separated in Tx and Rx*/ 
IlRxTask();   
IlTxTask(); 
 
/*Transport Protocol tasks, separated in Tx and Rx*/ 
TpRxTask(); 
TpTxTask(); 
 
/*Diagnostics task - CANdesc*/ 
DescTask(); 
 

4.4.4  Provide Callback functions 
The GMLAN Software Components call the application on internal events. For this 
case there are callback functions to enable the application to know about the 
program flow and to intervene if necessary. These callback functions must be 
provided by the application. For the first attempt in most of the cases it is enough to 
provide an empty callback function.  
 
Callback functions for the Interaction Layer 
void ApplIlNodeCommActiveFailed( vuint8 srcAddress ){} /*for mixed IDs  
                                                           only*/ 
 
void ApplIlRxMsgSrcAddressLearned( IlReceiveHandle ilRxHnd, vuint8 

srcAddress ){}   /*for mixed IDs only*/ 
 

2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
26 / 32 
void ApplIlNodeCommActiveRecovery( vuint8 srcAddress ){}  /*for mixed IDs  
                                                            only*/ 
 
void ApplIlSourceAddressLearned( vuint8 srcAddress ){}     /*for mixed IDs  

                                                           only*/ 
Callback functions for the Diagnostics 
This depends on the selected diagnostic functions.  
 
Callback functions for the Network Management 
canuint8 ApplNwmSleepConfirmation( NM_CHANNEL_APPLTYPE_ONLY ) 

  return NmSleepOk; 

 
void ApplNwmReinitRequest( NM_CHANNEL_APPLTYPE_FIRST  unsigned char VnNr, 

unsigned char ReinitRequest ){} 
 
void ApplTrcvrNormalMode( NM_CHANNEL_APPLTYPE_ONLY ){} 
 
void ApplTrcvrSleepMode( NM_CHANNEL_APPLTYPE_ONLY ){} 
 

void ApplTrcvrHighVoltage( NM_CHANNEL_APPLTYPE_ONLY ){} 
 
void ApplNwmVnDeactivated( NM_CHANNEL_APPLTYPE_FIRST  unsigned char VnNr 

){} 
 
void ApplNwmVnActivated( NM_CHANNEL_APPLTYPE_FIRST  unsigned char VnNr 

){} 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 




User Manual  Startup with GMLAN 
 
27 / 32 
4.5  STEP 5   Compile And Link 
Now we compile and link the project. There should not be any errors or linker 
problems. 
 
 
 
4.6  STEP 6   Test the Software Component 
To test the result download the executable to an appropriate target and test it e.g. 
with CANoe. 
 
 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 




User Manual  Startup with GMLAN 
 
28 / 32 
5  Further Information  
5.1  Full CAN Message Transmission with Extended Ids 
A 29bit message in GMLAN is build-up as shown. The lower 8 bits (Source 
Address) are set by the CAN Driver.  
Priority: 
Parameter ID: 
Reserved: 
Source Address: 
3 bits
13 bits
5 bits
8 bits
 
Figure  5-1 Extended CAN Identifier 29bit 
If the message is a full CAN message the source address will not be written by the 
CAN Driver as the full CAN messages are initialized at startup. There are two 
strategies dealing with full CAN messages: 
  Avoid putting extended ID messages to a full CAN object 
  Use a pretransmit function to set the source address for every full CAN 
transmission by hand. The disadvantage is the delay time for calling the 
function and setting the source address. 
Info 
It would be sufficient to set the source address only once after initialization of the full CAN transmit 
objects. 
 
 
5.2  Take care when working with VNs 
Caution 

An IlSetEvent for transmitting a corresponding message will be deleted if the ECU is still sleeping. 
 
The transmission of messages caused by an event has to be handled by the 
application. For this case the application has to perform an IlPut to put in the new 
value of the signal and an IlSetEvent  to trigger the actual sending of the 
corresponding message. 
A state transition of the Interaction Layer from suspended to running mode will 
reset the settings of the Interaction Layer including all pending IlSetEvents.  
A state transition will be performed every time a node wakes up.  
Solution 
An  IlSetEvent  should only be performed if the Interaction Layer is in running 
mode. Use the function  IlNwmGetStatus  to check the state of the Interaction 
Layer.  
 
If( IlNwmStateNMActive( IlNwmGetStatus() ) ) == 1 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
29 / 32 

  IlSetEvent… 

 
Another solution would be to use the StateOn flags  for signals. They can be 
activated in the Configuration Tool on the tab Send signals and look like e.g.  
ILGetTxDgnInfStateOn(); 
It returns a true value (0x01) if the corresponding VN is active. Then you could set 
your event, too. 
 
5.3  Validity of Signals 
There are three mechanisms to define a signal to be valid or to be invalid. 
 
  Timeout – message timeout, signal timeout --> flag or function, Configuration 
Tool 
  Validity bit in the same message as the signal 
  VDA – Virtual device availability 
 
To find out which signal is using which of the three mechanisms refer to your 
specification.  
Before you use the content of a signal do the testing if the signal is valid right now. 
 
5.4  Signals assigned to different VNs and located in one message 
Lets suppose that a message contains signals that are assigned to different VNs. 
One VN is active the other VN is inactive.  
 
VN1 is active
VN2 is inactive
Signal1( VN1 )
Signal2( VN2 )
CAN Message  
data
data
data
data
data
data
data
data
 
Figure  5-2 Signals of Different VNs in One Message 
As a result the confirmation and indication flags of the Signal2 (inactive VN) could 
be set regardless that the corresponding VN is inactive. Transmission of this signal 
is possible too and an IlSetEvent will provoke the transmission of the message 
triggered by an inactive VN. 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
30 / 32 
The other ECUs know that the message had been sent by an inactive VN and that 
the corresponding signals are invalid. 
Suggestion 
You could check before the IlSetEvent if the corresponding VN is active or not. 
 
5.5  Source Learning for Single Wire CAN with Mixed Identifiers (11 bit and 
29 bit) 
The reason for the source learning mechanism is a flexible monitoring of the 
receive messages. 
Received messages are learned and this information is stored in an array by the 
Interaction Layer. The application is informed about new learned entries via 
callback functions  
( ApplIlRxMsgSrcAddressLearned, ApplIlSourceAddressLearned ).  
 
The application only has to store this array in a non-volatile memory and update 
that array at startup time with the values from the non-volatile memory. 
Refer to TechnicalReference_InteractionLayer_GM.pdf in the chapter “Dealing with 
extended IDs” for more information. 
5.6  Activation and deactivation of VNs 
The Virtual Networks are activated or deactivated either by the network 
management (initially active) or by the application. This also depends on the VN 
configuration. 
VN configuration:  
  Activator 
  Remotely Activated 
  Local 
  Initially Active 
5.6.1  IlNwmActivateVN( channel, VN) 
Via this function you activate a virtual network. Only VNs that are configured as 
activator or local can be manually activated with this function. With it the Interaction 
Layer is activated to send and receive messages/signals. 
5.7  llNwmDeactivateVN 
Deactivates the corresponding virtual network and stops Interaction Layer from 
transmitting.  
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 


User Manual  Startup with GMLAN 
 
1 / 32 
6  Index 
Acceptance registers .................................. 22 
Interaction Layer ..................................... 9, 25 
Bus timing registers .................................... 22 
makefile ....................................................... 24 
callback functions ....................................... 25 
Measurement and Calibration (CCP/XCP) ... 9 
CAN Driver .................................................... 8 
Motivation ...................................................... 3 
CAN driver (Advanced) ............................... 18 
Multiple ECU ......................................... 12, 17 
CANdesc ..................................................... 15 
Network Management ................................. 26 
Communication Control Layer CCL .............. 9 
project ......................................................... 24 
Compile ....................................................... 27 
Shared input activated VN .......................... 13 
Configuration Tool .... 9, 14, 15, 16, 18, 25, 29 
Signals ........................................................ 29 
Cyclic calls .................................................. 25 
source code ................................................. 24 
DBC ............................................................ 16 
Source Learning .......................................... 30 
dbc file......................................................... 16 
STEP 1 .................................................. 14, 15 
Diagnostics - CANdesc ................................. 9 
STEP 2 .................................................. 14, 16 
gendata ........................................... 15, 18, 24 
STEP 3 .................................................. 14, 24 
generated files ...................................... 18, 24 
STEP 4 .................................................. 14, 24 
Generation Paths ........................................ 18 
STEP 5 .................................................. 14, 27 
GENy .......................................................... 16 
STEP 6 .................................................. 14, 27 
GM_Readme .............................................. 15 
Symbols ........................................................ 7 
GMLAN Network Management ..................... 9 
Test ............................................................. 27 
GMLAN options .......................................... 19 
TP options ................................................... 20 
IlSetEvent ....................................... 28, 29, 30 
Transport Protocol......................................... 9 
Includes....................................................... 24 
Validity of Signals ........................................ 29 
Init registers ................................................ 21 
VNs.............................................................. 28 
Initialization ................................................. 24 
 
2011, Vector Informatik GmbH 
 
Version: 1.0.1 
 
based of template version 2.0 

Document Outline