Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Coding Style_v0.80.0

Marcin K Szczodrak edited this page Apr 19, 2014 · 1 revision

Fennec Fox does not force any specific coding style.

However, the existing code follows TinyOS Coding and Naming Recommendations with the exception to code indentation.

For indentation the code follows Linux Coding Style with TAB (8 characters).

Then we add the following indentation exception:

NesC configuration, module, generic, and implementation keywords do not increase indentation.

That means, for nesC configurations the following style is used:

configuration <configuration_name>C {
provides interface <interface_name>;

...
}

implementation {
components <configuration_name>P;
<interface_name> = <configuration_name>P;

...

}

and for nesC modules, the following style is used:

module <module_name>C {
provides interface <interface_name>;

...
}

implementation {

command error_t ... {
        ...
        return SUCCESS;
}
...

event ... {
        ...
}

}

Clone this wiki locally