simulator - How to change parameters in Contiki 2.7 simulation? -


i started learning on contiki os. trying analyze few parameters energy efficiency, latency, delivery ratio etc different deployment scenarios. first should change parameter like:

  1. channel check rate 16/s (i use rpl-sink)
  2. rpl mode of operation no_downward_route
  3. send interval 5s
  4. udp application packet size 100 bytes

could please tell me how change these parameter in contiki 2.7?

my answers reference:

channel check rate 16/s (i use rpl-sink)

#undef  netstack_rdc_channel_check_rate #define netstack_rdc_channel_check_rate 16 

rpl mode of operation no_downward_route

it's called non-storing mode. enable it:

#define rpl_conf_with_non_storing 1

send interval 5s

depends on application; there no standard name parameter. if we're talking ipv6/rpl-collect/, should #define period 5 in project-conf.h.

udp application packet size 100 bytes

the payload constructed in udp-sender.c:

uip_udp_packet_sendto(client_conn, &msg, sizeof(msg),                       &server_ipaddr, uip_htons(udp_server_port)); 

so in order change payload size, need change size of locally-defined anonymous struct variable called msg. can add dummy fields it, example.

struct {   uint8_t seqno;   uint8_t for_alignment;   struct collect_view_data_msg msg;   char dummy[100 - 2 - sizeof(struct collect_view_data_msg)]; } msg; 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -