Hi,
I am trying to modify Multihop protocol implemented in tinyos. For this , I
have created new file namely
mul.nc, in the same directory where MultiHopLQIM.nc is located. Now, I am
trying to send Phase Messages
( its structure have been defined in multihop.h). here is the part of code
where I am sending these messages:-
void sendWeightUpdate() {
TOS_MHopMsg* _mhopmsg = (TOS_MHopMsg*)&m_routemsg.data[0];
PhaseMsg* _pmsg = (PhaseMsg*)&_mhopmsg->data[0];
if (m_ispending == TRUE)
return;
atomic {
_mhopmsg->sourceaddr = _mhopmsg->originaddr =
TOS_LOCAL_ADDRESS;
_mhopmsg->ttl = 1;
_pmsg->phase = hs_phase;
_pmsg->weight = hs_weight;
_pmsg->sender = hs_sender;
_mhopmsg->originseqno = m_seqNo;
_mhopmsg->seqno = m_seqNo++;
}
if (!m_ispending) {
if (call SPSend.send( &m_spmsg, m_spmsg.msg, TOS_BCAST_ADDR,
offsetof(TOS_MHopMsg,data) + sizeof(PhaseMsg) ) == SUCCESS) {
m_ispending = TRUE; // this condition is getting false
only
}
}
}
The problem I am fetting is following:-
when this function is called, the condition if ( call SPSend.send ()
== SUCCESS)
never gets true. This means, SPSend.send is not suceeding.
Can anybody help me and tell me what might be the potential problem due to
which this condition is never becomming true
I have tried everything i could, please help me.
Thanks
Harmeet Singh
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help