1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="The eCos Component Writer's Guide"
20 HREF="cdl-guide.html"><LINK
22 TITLE="CDL Language Specification"
23 HREF="reference.html"><LINK
26 HREF="ref.include-files.html"><LINK
29 HREF="ref.library.html"></HEAD
40 SUMMARY="Header navigation table"
52 > Component Writer's Guide</TH
60 HREF="ref.include-files.html"
74 HREF="ref.library.html"
85 NAME="REF.LEGAL-VALUES"><SPAN
99 > -- Impose constraints on the possible values for an option.</DIV
101 CLASS="REFSYNOPSISDIV"
113 >cdl_option <name> {
114 legal_values <list expression>
129 >Options with the <TT
136 > flavors can have an arbitrary sequence of
137 characters as their data. In nearly all cases some restrictions have
138 to be imposed, for example the data should correspond to a number
139 within a certain range, or it should be one of a small number of
143 > property can be used to impose such
144 constraints. The arguments to the property should be a <SPAN
149 HREF="language.values.html#LANGUAGE.LIST-EXPRESSION"
150 >the Section called <I
154 syntactic details. Common examples include:</P
162 CLASS="PROGRAMLISTING"
163 > legal_values 0 to 0x7fff
164 legal_values 9600 19200 38400
165 legal_values { "RAM" "ROM" }</PRE
173 > property can only be used for options with the
181 it makes little sense to further constrain the legal values of a
182 boolean option. An option can have at most one <SPAN
194 >If the first entry in a <SPAN
197 > list expression is a negative
201 >legal_values -1 to 1</TT
203 be misinterpreted as an option instead of as part of the expression.
207 > property does not take any options, but
208 this may change in future. Option processing halts at the sequence
212 >, so the desired range can be expressed safely
215 >legal_values -- -1 to 1</TT
226 >Architectural HAL packages should provide constants which can be used
230 > list expressions. For example it should be possible
231 to specify a numeric range such as
234 >0 to CYGARC_MAXINT</TT
236 hard-wiring numbers such as <TT
240 not be valid on all targets. Current HAL packages do not define such
254 > property is restricted mainly to numerical ranges
255 and simple enumerations, and cannot cope with more complicated data
256 items. Future versions of the configuration system will provide
257 additional data validation facilities, for example a
261 > property which specifies a Tcl script
262 that can be used to perform the validation.</P
280 CLASS="PROGRAMLISTING"
281 >cdl_option CYGNUM_LIBC_TIME_STD_DEFAULT_OFFSET {
282 display "Default Standard Time offset"
284 legal_values -- -90000 to 90000
287 This option controls the offset from UTC in
288 seconds when in local Standard Time. This
289 value can be positive or negative. It
290 can also be set at run time using the
291 cyg_libc_time_setzoneoffsets() function."
306 HREF="ref.calculated.html"
313 HREF="ref.default-value.html"
320 HREF="ref.flavor.html"
332 SUMMARY="Footer navigation table"
343 HREF="ref.include-files.html"
352 HREF="cdl-guide.html"
361 HREF="ref.library.html"
380 HREF="reference.html"