Skip to main content
. 2015 Feb 25;15(3):4677–4699. doi: 10.3390/s150304677
1 #include <stdio .h>
2 … // Standard ns–3 modules are omitted.
3 #include “ns3/symphony–module.h”
4 using namespace ns3;
5 int main(int argc, char *argv[]) {
6  …
7  TosNodeContainer c; //enables TinyOS nodes
8  c.Create(10, “libtossecurity .so”); // creates ten nodes with os the image to libtossecurity .so
9  TosHelper wifi;
10  wifi.SetStandard(ZIGBEE_PHY_STANDARD_802154); //creates wireles standard
11  wifi.SetNodeModel(“tos–security.xml”);
12  YansTosPhyHelper wifiPhy = YansTosPhyHelper::Default(); //creates wifi channel
13  wifiPhy.Set(“RxGain”, DoubleValue(0));
14  …
15  TosNetDeviceContainer devices = wifi.Install(wifiPhy, c); //installs wifi devices
16  TosMobilityHelper mobility;
17  …
18 }