nescc-wiring(1)

πŸ“¦ version 1.3.5, in debian bookworm, ubuntu jammy

✨ nescc-wiring ✨

okay so bestie, this is the manual for nescc-wiring, from the General Commands Manual section β€” it's a whole vibe and it's about to check ur nesC wiring for u πŸ’…


🌸 NAME 🌸

nescc-wiring β€” check wiring of nesC program πŸ¦‹


⭐ SYNOPSIS ⭐

nescc-wiring nesc-xml-file

πŸ’– DESCRIPTION πŸ’–

nescc-wiring is a tool that verifies the wiring constraints u specified on individual components are actually respected in a nesC program. no cap. these wiring constraints can say that an interface provided or used by a component must be wired at least once, at most once, or exactly once. and if nothing got violated? nescc-wiring bails with an exit status of 0. πŸŽ€ but if something did get violated, it prints appropriate error messages and terminates with a non-zero exit status. not the slay ending we wanted 😭

Wiring constraints get specified by placing @atmostonce(), @atleastonce() and @exactlyonce() attributes on the relevant interfaces. for instance, writing

module Fun {
  provides interface Init @atleastonce();
...

ensures that programs using module Fun must wire its Init interface at least once. it's giving "u WILL wire this, bestie" πŸ‘‘

Specifically β€” and listen closely bc this is the iconic part β€” when the annotation is placed on a provided interface, there must be the specified number of paths in the wiring graph from any module to that interface. and if the annotations are placed on a used interface, there must be the specified number of paths in the wiring graph from the interface to any module. πŸ”₯

To use this wiring check tool, u have to declare the @atmostonce(), @atleastonce() and @exactlyonce() attributes in some global header file like this:

struct @atleastonce() { };
struct @atmostonce() { };
struct @exactlyonce() { };

and u also have to pass these following options to nescc to create the XML file that u then pass to nescc-wiring:

-fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=nesc-xml-file
fr fr, don't skip the header declarations OR the nescc options β€” u need both or the whole thing does not work πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie 🫢 this one's dated January 4, 2006, and it comes to u from the General Commands Manual β€” go forth and wire responsibly βœ¨πŸ’œ

πŸ“¦ where this page comes from