02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

6<br />

Components<br />

Parameters<br />

Parameters are one of the user’s primary means of configuring a system. Typically,<br />

one or more parameters control a component’s features. As an example, we can<br />

consider the maximum number of log messages in the logging queue. In Tornado<br />

1.0.1, this was in target/config/configAll.h as:<br />

#define MAX_LOG_MSGS 50<br />

For Tornado 2.x, use the parameter object class to describe those parameters listed<br />

by a particular component’s CFG_PARAMS property. The logging example is as<br />

follows:<br />

6<br />

Parameter MAX_LOG_MSGS {<br />

NAME max # queued messages<br />

TYPE uint<br />

DEFAULT 50<br />

}<br />

The following properties describe a parameter:<br />

NAME<br />

A readable name, the one that appears below the list of parameter IDs in the<br />

Params tab of the project facility’s Properties window, as shown in Figure 6-3.<br />

Figure 6-3<br />

The Properties Window<br />

TYPE<br />

The type of parameter, that is, int, uint, bool, string, exists, or untyped.<br />

123

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

Saved successfully!

Ooh no, something went wrong!