Professional Documents
Culture Documents
Abstract— CANoe is a development and testing tool mainly outgoing events (pressed key, access to serial port, access
used in automotive industry. The major drawback of the to parallel port) and events on CAN (reception of a
CAPL application and programming language is the message, signal or errors), which more than three decades
absence of a signal datatype, CAPL functions being called has been the main standard for automotive networking [4].
with the signal’s name from the database. If two similar With the continuous development of technology, the
software should be tested with minor changes in terms of software has become more and more complex, the
signals names, the same test cannot run on both units, even requirements increased and the time became shorter to
if their functionality is the same. Also, if only one software is bring a product as quickly as possible on the market.
tested, but the client wants changes to the database, all tests Thus, the trend is to develop generic software, which,
must be modified to make the desired change. The solution
through few modifications, can serve a wide range of
presented in this paper removes all these problems. Using a
machines. That is why testing must be carried out in a
file containing the generic name of the signals, functions will
more general manner. One obstacle to this goal is the
be generated to replace the CANoe functions provided by
impossibility to declare signal-type variables in the CAPL
CAPL. Thus, significant benefits are gained in terms of final
product cost and development time, reducing the risk of not
language. Thus, to check a signal, the function call is
testing the software altogether.
made with the name of the signal as defined in the
database. If two similar software versions are coming up
for testing, with minor changes of the signals names in the
I. INTRODUCTION database, the same test cannot run on both units, even if
their functionality is the same. Also, if only one software
When General Motors introduced the first engine is tested, but the client wants changes to the database, all
control unit (ECU) on an automobile in 1980, no one tests need to be modified to make the desired change.
predicted how critical in terms of cost, safety and security Thus, the costs of the final product will increase as well as
software would become. In the beginning, testing was the development time. Another risk is not testing the
mainly done directly on the automobile, and the software altogether.
complexity of the software was not very large, just a few
ECUs being used [1]. Nowadays this is no longer possible, One way to overcome some of these issues is to add if
more than 60 ECUs are being installed in some luxury or switch statements. Thus, within the test, depending on
class cars [1]. Even if final testing is still done on site, the tested software version, for instance, signal1 or
when the software arrives on the machine, it has been signal2 will be checked. This method does not solve all
tested beforehand by various methods. To do this, the the problems. If the client decides to change the signals
Hardware in-the-loop (HIL) method has been from the database, into the test the replacements will be
implemented [2]. This method involves the existence of done manually, all tests being modified. Also, to introduce
hardware and software tools capable of reproducing the a new software version can be challenging, instead of if
environment of a machine. Thus, an ECU can be tested the switch statement should be used, all tests being
without being introduced into the car. modified. No matter if the changes are minor or not, the
tests, which can be hundreds, have to be manually updated
In support of automotive companies, Vector Informatik and each one can have thousands of lines of code, making
GmbH has developed the CANoe program. This is a the process quite difficult and time consuming.
development and testing tool mainly for the automotive
industry to develop, analyze, simulate, test and diagnose The solution presented in this paper removes all these
control units as well as the networks they form [3]. Due to problems, generating functions that replace the ones
its wide use and due to the large number of provided by CAPL. The solution aims to generate a set of
communication protocols supported, it is an ideal tool for functions that can be used in automated testing using
developing conventional control units as well as hybrid CANoe. The user can generate, based on a configuration
and electric vehicles. The program supports protocols file and a file containing the signals definition as well as
such as CAN, LIN, FlexRay, Ethernet. generic names for the signals, a generic set of functions,
which can be included in the test files to verify multiple
CAPL is a dedicated software which can be used both versions of software using the same test.
in testing and environment simulation. As an event-based
program, it has functions such as timers, incoming /
II. METHODS
000310
SACI 2018 • IEEE 12th International Symposium on Applied Computational Intelligence and Informatics • May 17-19 • Timiúoara, Romania
000311
D. Georgescu, L. Stanciu • Designing and Implementing a Solution to Manipulate Signals in Automated Testing Using CANoe
struct ltFunc funcSetup; generator of variants, having as input a file with the
funcSetup.funcCall = GET_SIGNAL; generic name of the signals. Thus, if a signal changes, it
G_VAR_FuncSwitch(aSignal, funcSetup); only appears in the file, and then the functions will be
return funcSetup.retValFloat; automatically generated. Also, if a new software version is
} introduced, the change consists only in the insertion of a
This function will in turn call the function new column in the .csv file, which will indicate the signals
G_VAR_FuncSwitch by transmitting the signal ID and in the new database. Even changing the database does not
the type of action that is to be performed, namely reading cause big problems, the signals that have changed are
the signal. This function is automatically generated by the passed to the .csv file and a new version of the functions is
program and contains a series of switches that allow generated. At the time the tests call the generated
identification of the message based on the ID and the functions, based on the tested software version, the signals
variant to be tested. Once the message is identified, the of that variant will be checked or modified. Since the
function void G_VAR_Func (signal * generic name of the signal has not changed, the tests do
aSignal, struct ltFunc funcSetup) is called not need to be altered, thus saving time.
to perform the action sent via the funcSetup The user interface is very simple and consists in a panel
parameter. The difference between the two files is the type included in the CANoe configuration of the project. The
of functionalities they meet. Thus, the Generic_ panel has a button that generates the tests, a button for
VARIANT_Func.cin file contains functions that run selecting the configuration file, and a panel displaying
immediately, they do not require waiting times, whereas error messages or running result (Fig. 2). This way the
the Generic_VARIANT_TST_Func.cin file contains user can easily see the results of the generation. It uploads
the functions that test the signal for a certain period of a configuration file, containing the paths to the required
time until they give a verdict. files, as well as information about the variants being
tested. If the file is not loaded or the paths in it are not
After generating generic files, they must be included valid an error message will be displayed on the panel.
into the test: When the program has finished running, a message will be
#include displayed to let the user know which files were created.
"..\Include\Test_VARIANT_SignalConstants.cin"
#include
"..\Include\Test_VARIANT_Signal.cin" REFERENCES
#include [1] T. Riegraf S. Beeh S. Krauß "Efficient testing in automotive
"..\Include\Test_VARIANT_SignalTest.cin" electronics", From simulation to diagnostics Development
At this point, the user will be able to use newly created Measurement Techniques, vol. 109 no. 7 pp. 16-19, July 2007.
features, referring to the signal that he wants to teste or [2] B. Müller and S. Köhl, "Simulating and Testing In-Vehicle
Networks by Hardware-in-the-Loop Simulation," SAE Technical
change by its generic name, for instance: Paper 2008-01-1220, 2008, https://doi.org/10.4271/2008-01-1220.
G_TestStep_VAR_SetSignal ("1", "", vcISw_Stat,
4); [3] Rishvanth , D. Valli , K. Ganesan , "Design of an In-Vehicle
Network (Using LIN, CAN and FlexRay), Gateway and its
The result of this function call will be to set the Diagnostics Using Vector CANoe", American Journal of Signal
ISw_Stat signal to 4 for the software version to be Processing, vol. 1, no. 2, 2011, pp. 40-45. doi:
tested. Fig. 4 presents two report models, one for a variant 10.5923/j.ajsp.20110102.07.
of software that uses the FlexRay protocol and the other [4] Bosch. CAN specification 2.0. esd.cs.ucr.edu/webres/can20.pdf,
1991. Visited February 2018.
for a software version using the CAN protocol.
[5] FlexRay communication system, protocol specification, version
2.0, http://www.flexray.com/. Visited February 2018.
IV. CONCLUSIONS
[6] Programming with CAPL, December 14, 2004
The application is designed to create a set of functions [7] C. Liu and F. Luo, “A Co-Simulation-and-Test Method for CAN
to test multiple software variants using the same tests. The Bus System”, Journal of Communications, vol. 8, no. 10, pp. 681-
network can be both CAN and FlexRay. The solution 689, October 2013, doi:10.12720/jcm.8.10.681-689.
chosen to solve the problems induced by the fact that there
is no signal type in CAPL is to create an automatic
000312