I am trying to simulate a node moving with circular trajectory, which is receiving data from 4 stationary nodes. The simulation is working fine on the older version (1.6), however it is not working on 3.1.0. There is no error and the simulation is being completed, however no packets are being transmitted or received. Is there any major differences between these two versions in terms of syntax or models, due to which no packet transmission is taking place? The codes were written for the older version.
'''
if(addr==31)
{
add new WakerBehavior(2200, {
phy[1].powerLevel = -35.dB; // must be non- positive
phy[2].powerLevel = -35.dB;
phy << new ClearReq()
phy << new DatagramReq(to: 21 ,data : neighbouraddr1 , protocol:cluster_protocol)
println "data sent by 31 to 21"
})
'''
This is the code snippet for one of the stationary nodes. Similarly, we have codes for the other 3 nodes.
'''
void processMessage(Message msg) {
if(addr == 21)
{
if (msg instanceof DatagramNtf && msg.protocol == cluster_protocol && ( msg.from == 31 || msg.from == 32 || msg.from == 33 || msg.from == 34 || msg.from == 35) ) //notfication recieved
{
println "message processed in address:"+addr
println "DATA Received by ${addr} from ${msg.from}, DATA VALUE is ${msg.data}"
collectB.addAll(msg.data)
println "now total value is ${collectB}"
}
}
'''
We used this to consolidate the messages received at node B.