This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: CDL Interface Configury
- From: Jay Foster <jay at systech dot com>
- To: 'Bart Veer' <bartv at ecoscentric dot com>, Jay Foster <jay at systech dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Mon, 15 Oct 2007 09:16:15 -0700
- Subject: RE: [ECOS] CDL Interface Configury
Thanks, Bart. That is more like what I expected, but am not seeing. Here
is a bit more information, which seems to be making the difference:
My (simplified) CDL file has:
requires 1 == CYGINT_XXX
cdl_component CYGPKG_A_OPTIONS {
flavor none
no_define
cdl_interface CYGINT_XXX {
}
cdl_option CYGOPT_OPTION_A {
flavor bool
default_value 0
implements CYGINT_XXX
}
cdl_option CYGOPT_OPTION_B {
flavor bool
default_value 0
implements CYGINT_XXX
}
The .ecc file has:
cdl_interface CYGINT_XXX {
# Implemented by CYGOPT_OPTION_A, active, enabled
# Implemented by CYGOPT_OPTION_B, active, disabled
# This value cannot be modified here.
# Flavor: data
# Current_value: 1
# The following properties are affected by this value
# package CYGPKG_MYPACKAGE
# Requires: 1 == CYGINT_XXX
};
What I want is to have several optional implementations of an option
(currently two implementations), and have the CDL enforce that one and only
one of the options is configured. Normally, I would have the default value
for one of the implementations set to '1' (true), and the rest '0' (false),
but I set them both to false to test that the CDL fails if no implementation
is configured. However, ecosconfig seems to be automatically enabling one
of the options (the first one) to satisfy the requirement. Not what I want
or expect.
Jay
-----Original Message-----
From: Bart Veer [mailto:bartv@ecoscentric.com]
Sent: Sunday, October 14, 2007 1:03 PM
To: Jay Foster
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] CDL Interface Configury
>>>>> "Jay" == Jay Foster <jay@systech.com> writes:
Jay> I'm having a problem using the cdl_interface CDL configury. I
Jay> have a CDL package where I have:
Jay> requires (CYGINT_XXX == 1)
Jay> cdl_interface CYGINT_XXX {
Jay> display ""
Jay> }
Jay> I (currently) do not have any implementations for this
Jay> interface enabled. I would expect to get a CDL configure
Jay> error, but do not. Instead, I get:
Jay> U CYGINT_XXX, new inferred value 1
Jay> as output from ecosconfig. Why is that? How do I make
Jay> ecosconfig fail if the requirement is not met, rather than
Jay> inferring a value for it? The result of the ecosconfig not
Jay> failing is that the compile then fails later, since there is
Jay> no implementation code.
This should not be happening, and when I try it in my world I get
reported conflict from ecosconfig as expected. Within libcdl an
interface is not directly modifiable, it should be impossible for the
inference engine to change its value directly. Instead the only ways
in which the inference engine can affect an interface is by making it
active or inactive, or by changing the state/value of something that
implements the interface.
If you look at the generated ecos.ecc file, what does it say about
CYGINT_XXX? My ecos.ecc contains the following:
cdl_interface CYGINT_XXX {
# No options implement this inferface
# This value cannot be modified here.
# Flavor: data
# Current_value: 0
# The following properties are affected by this value
# package CYGPKG_DEVS_FRAMEBUF_SYNTH
# Requires: CYGINT_XXX == 1
};
>>>>> "Andrew" == Andrew Lunn <andrew@lunn.ch> writes:
Andrew> The interface should be declared outside of the package
Andrew> that requires it be implemented.
No, there is no such requirement within CDL. If the parent package has
an active_if on the interface then things can get confusing, but that
is a separate issue. Here we are talking about requires properties.
Bart
--
Bart Veer eCos Configuration Architect
eCosCentric Limited The eCos experts http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss