📄 cdl-configuration-items.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>Configuration Items</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos User Guide"HREF="ecos-user-guide.html"><LINKREL="UP"TITLE="CDL Concepts"HREF="cdl-concepts.html"><LINKREL="PREVIOUS"TITLE="Packages"HREF="cdl-packages.html"><LINKREL="NEXT"TITLE="Conflicts"HREF="cdl-conflicts.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos User Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="cdl-packages.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 24. CDL Concepts</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="cdl-conflicts.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="CDL-CONFIGURATION-ITEMS">Configuration Items</H1><P><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Configuration items</I></SPAN> are the individual entities that form a configuration. Each item corresponds to the setting of a C pre-processor macro (for example, <TTCLASS="LITERAL">CYGHWR_HAL_ARM_PID_GDB_BAUD</TT>). The code of <SPANCLASS="PRODUCTNAME">eCos</SPAN> itself is written to test such pre-processor macros so as to tailor the code. User code can do likewise.</P><P>Configuration items come in the following flavors:</P><P></P><UL><LI><P><SPANCLASS="emphasis"><ICLASS="EMPHASIS">None</I></SPAN>: such entities serve only asplace holders in the hierarchy, allowing other entities to be groupedmore easily.</P></LI><LI><P><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Boolean</I></SPAN> entities are the most commonflavor; they correspond to units of functionality that can be eitherenabled or disabled. If the entity is enabled then there will bea #define; code will check the setting using, for example, #ifdef</P></LI><LI><P><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Data</I></SPAN> entities encapsulate some arbitrarydata. Other properties such as a set or range of legal values canbe used to constrain the actual values, for example to an integeror floating point value within a certain range.</P></LI><LI><P><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Booldata</I></SPAN> entities combine the attributesof <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Boolean</I></SPAN> and <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Data</I></SPAN>: theycan be enabled or disabled and, if enabled, will hold a data value.</P></LI></UL><P>Like packages, configuration items exist in a tree-based hierarchy:each configuration item has a parent which may be another configurationitem or a package. Under some conditions (such as when packagesare added or removed from a configuration), items may be “re-parented” suchthat their position in the tree changes. </P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1898">Expressions</H2><P>Expressions are relationships between CDL items. There arethree types of expression in CDL:</P><DIVCLASS="TABLE"><ANAME="CDL-EXPRESSIONS"><P><B>Table 24-1. CDL Expressions</B></P><TABLEBORDER="1"CLASS="CALSTABLE"><THEAD><TR><THALIGN="LEFT"VALIGN="TOP">Expression Type</TH><THALIGN="LEFT"VALIGN="TOP">Result</TH><THALIGN="LEFT"VALIGN="TOP">Common Use (see <AHREF="cdl-configuration-items.html#TABLE-CONFIGURATION-PROPERTIES">Table 24-2</A>)</TH></TR></THEAD><TBODY><TR><TDALIGN="LEFT"VALIGN="TOP">Ordinary</TD><TDALIGN="LEFT"VALIGN="TOP">A single value</TD><TDALIGN="LEFT"VALIGN="TOP">legal_values property</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">List</TD><TDALIGN="LEFT"VALIGN="TOP">A range of values (for example “1 to 10”)</TD><TDALIGN="LEFT"VALIGN="TOP">legal_values property </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Goal</TD><TDALIGN="LEFT"VALIGN="TOP">True or False</TD><TDALIGN="LEFT"VALIGN="TOP">requires and active_if properties</TD></TR></TBODY></TABLE></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1923">Properties</H2><P>Each configuration item has a set of properties. The followingtable describes the most commonly used:</P><DIVCLASS="TABLE"><ANAME="TABLE-CONFIGURATION-PROPERTIES"><P><B>Table 24-2. Configuration properties</B></P><TABLEBORDER="1"CLASS="CALSTABLE"><THEAD><TR><THALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Property</I></SPAN></TH><THALIGN="LEFT"VALIGN="TOP"><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Use </I></SPAN></TH></TR></THEAD><TBODY><TR><TDALIGN="LEFT"VALIGN="TOP">Flavor</TD><TDALIGN="LEFT"VALIGN="TOP">The “type” of the item, as described above </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Enabled</TD><TDALIGN="LEFT"VALIGN="TOP">Whether the item is enabled </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Current_value</TD><TDALIGN="LEFT"VALIGN="TOP">The current value of the item </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Default_value</TD><TDALIGN="LEFT"VALIGN="TOP">An ordinary expression defining the default value of the item</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Legal_values</TD><TDALIGN="LEFT"VALIGN="TOP">A list expression defining the values the item may hold (for example, 1 to10) </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Active_if</TD><TDALIGN="LEFT"VALIGN="TOP">A goal expression denoting the requirement for this item to be active(see below: <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Inactive Items</I></SPAN>) </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Requires</TD><TDALIGN="LEFT"VALIGN="TOP">A goalexpression denoting requirements this item places on others (seebelow: <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Conflicts</I></SPAN>) </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Calculated</TD><TDALIGN="LEFT"VALIGN="TOP">Whetherthe item as non-modifiable </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Macro</TD><TDALIGN="LEFT"VALIGN="TOP">The correspondingC pre-processor macro </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">File</TD><TDALIGN="LEFT"VALIGN="TOP">The C headerfile in which the macro is defined </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">URL</TD><TDALIGN="LEFT"VALIGN="TOP">The URL ofa documentation page describing the item </TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">Hardware</TD><TDALIGN="LEFT"VALIGN="TOP">Indicatesthat a particular package is related to specific hardware</TD></TR></TBODY></TABLE></DIV><P>A complete description of properties is contained in the <ICLASS="CITETITLE">ComponentWriter’s Guide</I>.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN1976">Inactive Items</H2><P>Descendants of an item that is disabled are inactive: theirvalues may not be changed. Items may also become <SPANCLASS="emphasis"><ICLASS="EMPHASIS">inactive</I></SPAN> ifan active_if expression is used to make the item dependenton an expression involving other items. </P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="cdl-packages.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="cdl-conflicts.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Packages</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="cdl-concepts.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Conflicts</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -