This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Assign a CDL value to TCL variable.
- From: Sergei Gavrikov <sergei dot gavrikov at gmail dot com>
- To: Ilija Kocho <ilijak at siva dot com dot mk>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Sun, 8 Jul 2012 23:56:44 +0300 (FET)
- Subject: Re: [ECOS] Assign a CDL value to TCL variable.
- References: <4FF9E752.3030606@siva.com.mk>
On Sun, 8 Jul 2012, Ilija Kocho wrote:
> Hi colleagues
>
> Is there a way to assign a value of CDL option/component to a TCL
> variable. something equivalent to:
>
> cdl_option CYGFOO {
> flavor data
> calculated 5
> }
>
> set cygbar some_function(CYGFOO)
> # Here cygbar == 5
Hi Ilija
Would not you use TCL's ``set'' command for that? E.g.
cdl_package CYGPKG_FOO {
cdl_option CYGGLO_FOOBAR {
flavor data
calculated [set ::foobar 5]
}
}
In such a case you'll find in pkgconf/foo.h
#define CYGGLO_FOOBAR 5
#define CYGGLO_FOOBAR_5
Sure that global TCL variable ``foobar'' will be set to 5 too.
HTH
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss