OMNET++ CASTALIA TUTORIAL

Castalia:

OMNET++ CASTALIA TUTORIAL for Wireless Sensor Networks (WSN), Body Area Networks (BAN) and generally networks of low-power embedded devices.OMNET++ CASTALIA can also be used to evaluate different platform characteristics for specific applications, since it is highly parametric, and can simulate a wide range of platforms.

Features of Castalia:

  • Probability of reception based on SINR, packet size, modulation type.
  • Complex model for temporal variation of path loss.
  • Highly flexible physical process model.
  • Fully supports mobility of the nodes.
  • Realistic modeling of RSSI and carrier sensing.
  • Interference is handled as received signal strength, not as separate feature.
  • Model defines a map of path loss, not simply connections between nodes.

 

Sample code for Castalia:

This is the sample code for setting packet size in communication layer

SN.node[*].Communication.Routing.maxNetFrameSize = 2500 
SN.node[*].Communication.MAC.maxMACFrameSize = 2500 
SN.node[*].Communication.Radio.maxPhyFrameSize = 2500

Code for application module,
SN.node[*].ApplicationName = "ThroughputTest" 
SN.node[*].Application.packet_rate = 5 
SN.node[*].Application.constantDataPayload = 2000 
# application's trace info for node 0 (receiving node) 
# is turned on, to show some interesting patterns 
SN.node[0].Application.collectTraceInfo = true

Code for creating static node,
SN.node[0].xCoor = 0 
SN.node[0].yCoor = 0 
SN.node[1].xCoor = 50 
SN.node[1].yCoor = 50 
SN.node[2].xCoor = 150 
SN.node[2].yCoor = 150