This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: need cdl help


>>>>> "Jifl" == Jonathan Larmour <jifl at eCosCentric dot com> writes:

    Jifl> Andrew Lunn wrote:
    >> On Wed, Apr 02, 2003 at 10:52:02AM +0200, Koeller, T. wrote:
    >> 
    >>> Hi all,
    >>> 
    >>> I have a question about the watchdog.cdl file located
    >>> in io/watchdog/current/cdl/watchdog.cdl:
    >>> 
    >>> The interface CYGINT_WATCHDOG_IMPLEMENTATIONS has a
    >>> 'requires  1 == CYGINT_WATCHDOG_IMPLEMENTATIONS' constraint.
    >>> I would have expected to find this constraint at the package
    >>> level (since it is the package as a whole that requires exactly
    >>> one implementation), not with the interface itself.
    >> 
    >> Im not a CDL expert....
    >> 
    >> I don't think it makes a difference if the requires is inside
    >> the interface declaration or at the top of the package
    >> declaration. I think keeping it all together inside the
    >> interface declaration makes it easier to read, but thats a
    >> personal opinion.

    Jifl> Actually it is a bit of a mistake. When the interface has no
    Jifl> implementations, the requires will have no effect because
    Jifl> the interface will then be inactive (in the CDL sense). So
    Jifl> in practice this would permit no watchdog implementations.

No. By default interfaces have the data flavor, not bool or booldata,
so they are always enabled. Hence the "requires" property is always
active, whether it belongs to the package or to the interface. It can
be argued that the "requires" property is more properly associated
with the package or the interface. IIRC in an early implementation the
"requires" property did have to belong to the interface, so much
existing CDL will reflect that.

    Jifl> So in fact it should be in the package, not the interface.
    Jifl> I'll change that.

A harmless change, albeit unnecessary.

Bart

-- 
Bart Veer                       eCos Configuration Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]