02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

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.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

For Tornado 2.x, the same feature captured by the Tornado 1.0.1 code above, would<br />

be written in CDL as follows:<br />

Selection SELECT_TIMESTAMP {<br />

NAME<br />

select timestamping<br />

COUNT 1-1<br />

CHILDREN INCLUDE_SYS_TIMESTAMP \<br />

INCLUDE_USER_TIMESTAMP \<br />

INCLUDE_SEQ_TIMESTAMP<br />

DEFAULTS INCLUDE_SEQ_TIMESTAMP<br />

}<br />

There are three timestamp drivers available, as indicated by the three values for the<br />

CHILDREN property. The COUNT permits a choice of one, that is, a minimum and<br />

a maximum of 1.<br />

Components<br />

The component object class defines the source and object code associated with a<br />

component, much of the integration information, and any associated parameters.<br />

In the project facility, components are represented by the building block icon, as<br />

shown in Figure 6-1.<br />

Previously, this kind of information was included in usrConfig.c or src/config/*<br />

files and surrounded by #ifdef/#endif statements, as follows:<br />

#ifdef INCLUDE_LOGGING<br />

logInit (consoleFd, MAX_LOG_MSGS);<br />

#endif /* INCLUDE_LOGGING */<br />

Tornado 2.x configuration files contain only the information necessary to build the<br />

application or VxWorks, and not all the code related to the hundreds of other<br />

components that could be included. Furthermore, dependencies among<br />

components can be detected and the related components can be automatically<br />

added by the project facility. It does this by analyzing the global symbols in each<br />

associated object module and knowing within which components they are<br />

contained. The same message logging component above could be written in CDL<br />

as follows:<br />

Component INCLUDE_LOGGING {<br />

NAME<br />

message logging<br />

SYNOPSIS Provides logMsg support<br />

MODULES logLib.o<br />

INIT_RTN logInit (consoleFd, MAX_LOG_MSGS);<br />

CFG_PARAMS MAX_LOG_MSGS<br />

HDR_FILES logLib.h<br />

}<br />

120

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

Saved successfully!

Ooh no, something went wrong!