1nescc-wiring(1)             General Commands Manual            nescc-wiring(1)
2
3
4

NAME

6       nescc-wiring - check wiring of nesC program
7

SYNOPSIS

9       nescc-wiring nesc-xml-file
10
11

DESCRIPTION

13       nescc-wiring  is  a tool to verify that wiring constraints specified on
14       individual components are respected in a  nesC  program.  These  wiring
15       constraints  can specify that an interface provided or used by a compo‐
16       nent must be wired at least once, at most once, or exactly once. If  no
17       wiring  constraints  are violated, nescc-wiring terminates with an exit
18       status of 0. Otherwise, appropriate  error  messages  are  printed  and
19       nescc-wiring terminates with a non-zero exit status.
20
21       Wiring  constraints  are  specified by placing @atmostonce(), @atleast‐
22       once() and @exactlyonce() attributes on the  relevant  interfaces.  For
23       instance, writing
24
25         module Fun {
26           provides interface Init @atleastonce();
27         ...
28
29       ensures  that programs using module Fun must wire its Init interface at
30       least once.
31
32       Specifically, when the annotation is placed on  a  provided  interface,
33       there  must  be  the specified number of paths in the wiring graph from
34       any module to that interface. If the annotations are placed on  a  used
35       interface,  there  must  be the specified number of paths in the wiring
36       graph from the interface to any module.
37
38       To use this wiring check tool,  you  must  declare  the  @atmostonce(),
39       @atleastonce() and @exactlyonce() attributes in some global header file
40       as follows:
41
42         struct @atleastonce() { };
43         struct @atmostonce() { };
44         struct @exactlyonce() { };
45
46       and you must pass the following options to nescc to create the XML file
47       that you pass to nescc-wiring:
48
49         -fnesc-dump=wiring
50         -fnesc-dump='interfaces(!abstract())'
51         -fnesc-dump='referenced(interfacedefs, components)'
52         -fnesc-dumpfile=nesc-xml-file
53
54

SEE ALSO

56       nescc(1)
57
58
59
60                                January 4, 2006                nescc-wiring(1)
Impressum