]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
quick fix for commands in specs of generic components - produces large XML files
authoridgay <idgay>
Tue, 17 Jun 2008 19:02:03 +0000 (19:02 +0000)
committeridgay <idgay>
Tue, 17 Jun 2008 19:02:03 +0000 (19:02 +0000)
tools/tinyos/ncc/nesdoc-py/archive.py
tools/tinyos/ncc/nesdoc.in

index 99f4cda3f5a7d427798729a8642b40d055e45342..4fcc05b11a0ccf8a313269103b6e06d08f9f6c4b 100644 (file)
@@ -150,7 +150,8 @@ for x in interfaces.getElementsByTagName("interface"):
 # and bare commands, events
 for x in functions.getElementsByTagName("function"):
   # hack: tasks don't show up with a command/event attribute
-  if x.hasAttribute("event") or x.hasAttribute("command"):
+  # don't include commands/events from interfaces
+  if (x.hasAttribute("event") or x.hasAttribute("command")) and (not xml_tag(x, "interface-ref")):
     incomponent = get1(x, "component-ref").getAttribute("qname")
     if speclist.has_key(incomponent):
       speclist[incomponent].append(x)
index 9d8aa3d4a26058dab4a3a27fb7d157d709137097..eaad3cbd0c925ce4a3095307dd1a15470402215f 100644 (file)
@@ -137,7 +137,7 @@ unshift @ncc_args, "-fnesc-dump=interfacedefs";
 unshift @ncc_args, "-fnesc-dump=components(wiring)";
 unshift @ncc_args, "-fnesc-dump=interfaces";
 unshift @ncc_args, "-fnesc-dump=functions(!global())";
-unshift @ncc_args, "-fnesc-dump=referenced(interfaces,components)";
+unshift @ncc_args, "-fnesc-dump=referenced(interfaces,components,functions)";
 unshift @ncc_args, "$exec_prefix/bin/ncc";
 
 print STDERR join(' ', @ncc_args), "\n" if $verbose;