With the interactive console:
user@instant-contiki:rpl-attacks>> make_all sample-attacks
Or with Fabric:
../rpl-attacks$ fab prepare:test-campaign
When generating the campaign JSON, the framework will fill the docstrings at the beginning of the file with some useful information about available items, namely:
- Building-blocks
- Root mote types (the C files prefixed with
root-
in[FRAMEWORK_FOLDER]/templates/experiment/motes/
) - Sensor mote types (the C files prefixed with
sensor-
in[FRAMEWORK_FOLDER]/templates/experiment/motes/
) - Malicious mote types (the C files prefixed with
malicious-
in[FRAMEWORK_FOLDER]/templates/experiment/motes/
)
{
"BASE": {
"simulation": {
"[field]": [value],
...
},
"malicious": {
"[field]": [value],
...
}
},
"[experiment]": {
"simulation": {
"[field]": [value],
...
},
"malicious": {
"[field]": [value],
...
}
},
[other experiment blocks]
}
BASE: (mandatory)
simulation
Field Value title
string goal
string notes
string Inside the simulation file (.CSC), the text in the SimulationNotes plugin will be generated with the following layout:
Goal: [goal]
[notes]
Field Value number-motes
non-null positive integer (this is the number of non-root motes) target
string amongst the available platforms in [CONTIKI_FOLDER]/platform/
duration
non-null positive integer, duration in seconds debug
boolean, for printing debug messages of the ContikiRPL library repeat
non-null positive integer, number of simulation repetitions [NOT IMPLEMENTED YET] root
string amongst the suffixes (that is, excluding root-
) of C files in[FRAMEWORK_FOLDER]/templates/experiment/motes/
sensor
string amongst the suffixes (that is, excluding sensor-
) of C files in[FRAMEWORK_FOLDER]/templates/experiment/motes/
minimum-distance-from-root
non-null positive integer determining the minimal distance of the malicious mote from the root transmission-range
positive integer greater than or equal to minimum-distance-from-root
interference-range
positive integer greater than or equal to transmission-range
area-square-side
positive integer greater than or equal to `sqrt(2) * minimum-distance-from-root wsn-generation-algorithm
string indicating the WSN topology generation algorithm to be used
malicious: NOT present in BASE (the experiments start after the BASE definition)
[experiment]: (mandatory)
simulation
Here, the same parameters as for simulation in BASE can be entered. They override these of the BASE block.
malicious
Field Value target
string amongst the available platforms in [CONTIKI_FOLDER]/platform/
type
string amongst the suffixes (that is, excluding malicious-
) of C files in[FRAMEWORK_FOLDER]/templates/experiment/motes/
building-blocks
list of strings amongst the blocks defined in [FRAMEWORK_FOLDER]/templates/building-blocks.json
external-library
the path to a user-defined RPL library This means that the malicious mote can be compiled with a platform different than the rest of the WSN.
Same as for the structure with BASE, except that this block is not present and each experiment holds a simulation section with the same available parameters (if this section is not mentioned, default parameters are used).