09.01.2013 Views

CANoe DENoe - KEMT FEI TUKE

CANoe DENoe - KEMT FEI TUKE

CANoe DENoe - KEMT FEI TUKE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1.3.12 Simulation of Distributed Systems in <strong>CANoe</strong><br />

<strong>CANoe</strong> provides environment variables to model the functional bus behavior of network<br />

nodes. These environment variables are described by events and states of the<br />

system environment (external pressure, temperature, switch positions, etc.). You can<br />

observe and intentionally change these states - i.e. the values of the environment<br />

variables - on user-definable control panels.<br />

To work with environment variables in CAPL you use the event procedure type on<br />

envVar (React to change in environment variable). The CAPL functions<br />

getValue() and putValue() are used to read and write environment variables.<br />

These language tools and symbolic access to the various variables defined in the<br />

database make it possible to create simple prototypical network node models.<br />

The following task consists of creating a complete <strong>CANoe</strong> configuration with two network<br />

node models and associated periphery, i.e. control panels. This should only involve<br />

implementation of distributed functions: After the user activates a switch, the<br />

first node informs the second node of this action. The second node then activates an<br />

indicator lamp in its periphery.<br />

evSwitch evLight<br />

I/O Interface<br />

Application<br />

Bus Interface<br />

effect<br />

Msg1.bsSwitch<br />

I/O Interface<br />

Application<br />

Bus Interface<br />

This simplest functionality was purposely selected to direct the user's attention to the<br />

creation of models and not to their functionality. More complex distributed systems<br />

can build upon the same conceptual pattern in <strong>CANoe</strong> without any difficulty.<br />

A model for distributed systems can be created efficiently in <strong>CANoe</strong> in three steps: :<br />

1. Create the database with messages, signals and environment variables<br />

2. Create the network node periphery, i.e. the control panels<br />

3. Create the network node models in CAPL<br />

To prepare for the task you might, for example, create a new empty configuration by<br />

pressing the button on the toolbar.<br />

1.3.12.1 Creating the Database<br />

The first step involves creating a database which describes the following two significant<br />

aspects of the system:<br />

© Vector Informatik GmbH <strong>CANoe</strong>/<strong>DENoe</strong> Manual Version 4.1.1<br />

27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!