hi,
i wanted an integer to hav number of children a node has and its
cluster id.im using surge application.as each mode id is unique, i
used parentaddr as CH id and i added a function getnoofchildren in
routecontrol interface and implemented in MultihopLEPSM module whose
code is as below
command uint8_t RouteControl.getnoofchildren() //inserted one
{
uint8_t i,c=0;
for (i = 0;i < ROUTE_TABLE_SIZE;i++) {
if (NeighborTbl[i].flags) {
if(NeighborTbl[i].parent==TOS_LOCAL_ADDRESS)
{
c++;
}
}
}
dbg(DBG_TEMP,"no of children of node 0x%x are 0x%x\n",TOS_LOCAL_ADDRESS,c);
return c;
}
i wanted to know if the approach is correct .and also where to add
aggregation functionality as i need clustering and aggregation in my
application.I would be thankful if you could help me.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help