09.01.2013 Views

CANoe DENoe - KEMT FEI TUKE

CANoe DENoe - KEMT FEI TUKE

CANoe DENoe - KEMT FEI TUKE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

154<br />

6 CAPL Programming<br />

This chapter offers you a basic introduction in working with the programming language<br />

CAPL. Examples and a reference of all commands you can find in the online<br />

help.<br />

6.1 Overview<br />

The universal applicability of <strong>CANoe</strong> results in large measure from its user programmability.<br />

The CAN Access Programming Language<br />

CAPL is a C-like programming language,<br />

which allows you to program <strong>CANoe</strong> for individual applications. In the development of<br />

network nodes, for example, the problem arises that the remaining bus nodes are not<br />

yet available for tests. To emulate the system environment, the data traffic of all remaining<br />

stations can be simulated with the help of CAPL.<br />

All <strong>CANoe</strong> program variations/ options support the CAPL functions. The following<br />

program variations offer additional CAPL functions:<br />

• <strong>CANoe</strong>.LIN resp. <strong>DENoe</strong>.LIN<br />

• <strong>CANoe</strong>.MOST resp. <strong>DENoe</strong>.MOST<br />

• <strong>CANoe</strong>.J1939<br />

You can also write programs for problem-specific analysis of data traffic with CAPL,<br />

or you can program a gateway - a connecting element between two buses - to exchange<br />

data between different CAN buses.<br />

CAPL nodes are inserted in the data flow plan as function blocks. Event procedures<br />

serve as inputs in CAPL. These procedures can react to external events (e.g. the<br />

occurrence of specific messages). You send messages by calling the function<br />

output(). These language tools and symbolic access to the various variables in the<br />

database make it possible to create simple prototypical models of nodes. The event<br />

procedures can be edited in the user-friendly Browser.<br />

Note: You can find a detailed description of all CAPL functions in the online help.<br />

6.1.1 Potential Applications of CAPL Programs<br />

CAPL programs have an input through which messages pass as events into the<br />

block. Appearing at the output are all messages that either pass through the program<br />

or are generated by it. Furthermore, the program block can react to keyboard inputs<br />

(Key), time events (Timer) and - with <strong>CANoe</strong> - to changes in environment variables<br />

such as switches or slider positions.<br />

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

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

Saved successfully!

Ooh no, something went wrong!