TinyOS is an event-driven operating system designed for sensor network nodes that have very limited resources (e.g., 8K bytes of program memory, 512 bytes of RAM). TinyOS, is used, for example, on the Berkeley MICA motes, which are small wireless sensor nodes. nesC is an extension to the C programming language designed to embody the structuring concepts and execution model of TinyOS.
nc2moml is used to convert nesC files (.nc configuration or
module files with at least one interface) into MoML (.moml) files. This will create the Viptos
(Ptolemy II) libraries of components that are used to assemble
models. TinyOS provides a rich library of nesC components. If you
install TinyOS 1.x in
$PTII/vendors/ptinyos/tinyos-1.x
, then the Viptos
(Ptolemy II) configure script will find it and automatically make
the TinyOS libraries available.
cd $PTII/ptolemy/domains/ptinyos/util ./unzip-opts.sh
If the executable permissions are not set correctly, run:
chmod a+x unzip-opts.shthen try the step above again.
If you placed your tinyos-1.x tree in a different
location, you can find the opts.tar.gz
file in
$TOSROOT/contrib/ptII
.
$PTII/bin
have been built:
cd $PTII/bin make
cd $PTII/ptolemy/domains/ptinyos/util/nc2moml ./nc2momlIf the executable permissions are not set correctly, run:
chmod a+x nc2moml*then try the step above again. The
nc2moml
command will take 10-30 minutes to complete.
$PTII/vendors/ptinyos/moml
$PTII/bin/vergil -viptos