Collect View in Cooja contiki os

Collect View in Cooja contiki os

         As the matter of fact, our experienced technical professionals are well qualified and ready to provide appropriate guidance in Cooja. Without any delay, let’s see the utilization of collect view in Cooja over this article.

        The collect view code in Cooja is performed through the simulation code which is highlighted in following.

void
collect_view_construct_message(struct collect_view_data_msg *msg,
const linkaddr_t *parent,
uint16_t parent_etx,
uint16_t current_rtmetric,
uint16_t num_neighbors,
uint16_t beacon_interval)
{
static unsigned long last_cpu, last_lpm,
last_transmit, last_listen;
unsigned long cpu, lpm, transmit, listen;
msg->len = sizeof(struct collect_view_data_msg) / sizeof(uint16_t);
msg->clock = clock_time();
#if TIMESYNCH_CONF_ENABLED
msg->timesynch_time = timesynch_time();
#else /* TIMESYNCH_CONF_ENABLED */
msg->timesynch_time = 0;
#endif /* TIMESYNCH_CONF_ENABLED */
energest_flush();
cpu = energest_type_time(ENERGEST_TYPE_CPU) – last_cpu;
lpm = energest_type_time(ENERGEST_TYPE_LPM) – last_lpm;
transmit = energest_type_time(ENERGEST_TYPE_TRANSMIT) – last_transmit;
listen = energest_type_time(ENERGEST_TYPE_LISTEN) – last_listen;
/* Make sure that the values are within 16 bits. If they are larger,
we scale them down to fit into 16 bits. */
while(cpu >= 65536ul || lpm >= 65536ul || transmit >= 65536ul || listen >= 65536ul) {
cpu /= 2;
lpm /= 2;
transmit /= 2;
listen /= 2;
}
msg->cpu = cpu;
msg->lpm = lpm;
msg->transmit = transmit;
msg->listen = listen;
last_cpu = energest_type_time(ENERGEST_TYPE_CPU);
last_lpm = energest_type_time(ENERGEST_TYPE_LPM);
last_transmit = energest_type_time(ENERGEST_TYPE_TRANSMIT);
last_listen = energest_type_time(ENERGEST_TYPE_LISTEN);
memcpy(&msg->parent, &parent->u8[LINKADDR_SIZE – 2], 2);
msg->parent_etx = parent_etx;
msg->current_rtmetric = current_rtmetric;
msg->num_neighbors = num_neighbors;
msg->beacon_interval = beacon_interval;
memset(msg->sensors, 0, sizeof(msg->sensors));
collect_view_arch_read_sensors(msg);
}

       Following that, we have implemented the collect view in Cooja through opening the configuration file and starting the simulation process in simulation window and the result is shown in the following image.

Collect View of Cooja Simulation

       Don’t worry if you’ve any doubts, because our technical experts are always ready to help you out.

Live Tasks
Technology Ph.D MS M.Tech
NS2 75 117 95
NS3 98 119 206
OMNET++ 103 95 87
OPNET 36 64 89
QULANET 30 76 60
MININET 71 62 74
MATLAB 96 185 180
LTESIM 38 32 16
COOJA SIMULATOR 35 67 28
CONTIKI OS 42 36 29
GNS3 35 89 14
NETSIM 35 11 21
EVE-NG 4 8 9
TRANS 9 5 4
PEERSIM 8 8 12
GLOMOSIM 6 10 6
RTOOL 13 15 8
KATHARA SHADOW 9 8 9
VNX and VNUML 8 7 8
WISTAR 9 9 8
CNET 6 8 4
ESCAPE 8 7 9
NETMIRAGE 7 11 7
BOSON NETSIM 6 8 9
VIRL 9 9 8
CISCO PACKET TRACER 7 7 10
SWAN 9 19 5
JAVASIM 40 68 69
SSFNET 7 9 8
TOSSIM 5 7 4
PSIM 7 8 6
PETRI NET 4 6 4
ONESIM 5 10 5
OPTISYSTEM 32 64 24
DIVERT 4 9 8
TINY OS 19 27 17
TRANS 7 8 6
OPENPANA 8 9 9
SECURE CRT 7 8 7
EXTENDSIM 6 7 5
CONSELF 7 19 6
ARENA 5 12 9
VENSIM 8 10 7
MARIONNET 5 7 9
NETKIT 6 8 7
GEOIP 9 17 8
REAL 7 5 5
NEST 5 10 9
PTOLEMY 7 8 4

Related Pages

Workflow

YouTube Channel

Unlimited Network Simulation Results available here.