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.

VxWorks 5.5<br />

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

NOTE: In general, the project facility is designed to increase flexibility when<br />

selecting components, that is, to increase scalability; specifying a REQUIRES<br />

relationship reduces flexibility. Be sure that using REQUIRES is the best course of<br />

action in your situation before implementing it.<br />

Step 7:<br />

List Associated Parameters<br />

In the component object, use the CFG_PARAMS property to declare all associated<br />

parameters, for example, FOO_MAX_COUNT.<br />

...<br />

CFG_PARAMS<br />

...<br />

FOO_MAX_COUNT<br />

Step 8:<br />

Define Parameters<br />

For each parameter declared by CFG_PARAMS, create a parameter object to<br />

describe it. Provide a name using the NAME property.<br />

Use the TYPE property to specify the data type, either int, uint, bool, string, exists,<br />

or untyped.<br />

Use the DEFAULT property to specify a default value for each parameter.<br />

Parameter FOO_MAX_COUNT {<br />

NAME<br />

Foo maximum<br />

TYPE<br />

uint<br />

DEFAULT 50<br />

}<br />

! CAUTION: A component is considered misconfigured if it contains a parameter<br />

without an assigned value. Be sure to assign default values, unless there is no<br />

reasonable default and you want to force the user to set it explicitly.<br />

Step 9:<br />

Define Group Membership<br />

A component must be associated with either a folder or selection, otherwise it is<br />

not visible in the project facility GUI. Assign a component to a folder because of its<br />

logical inclusion in the group defined by the folder, based on similar or shared<br />

functionality, for example. By including a component in a folder, you make it<br />

possible for the user to load it simultaneously with other components in its group<br />

by declaring them as default values for the folder, using the folder object’s<br />

DEFAULTS property.<br />

...<br />

_CHILDREN<br />

...<br />

FOLDER_ROOT<br />

132

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

Saved successfully!

Ooh no, something went wrong!