[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection
TreeRouting.h, NONE, 1.1.2.1 TreeRouting.notes, NONE,
1.1.2.1 TreeCollectionC.nc, 1.1.2.1, 1.1.2.2
Rodrigo Fonseca
rfonseca76 at users.sourceforge.net
Mon May 15 09:52:45 PDT 2006
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection
ForwardingEngineP.nc, 1.1.2.7, 1.1.2.8
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestTreeRouting
Makefile, NONE, 1.1.2.1 Makefile.driver, NONE, 1.1.2.1 README,
NONE, 1.1.2.1 TestTreeRoutingC.nc, NONE,
1.1.2.1 TestTreeRoutingP.nc, NONE, 1.1.2.1 test.cc, NONE,
1.1.2.1 test.py, NONE, 1.1.2.1 topo.txt, NONE, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13912
Modified Files:
Tag: tinyos-2_0_devel-BRANCH
TreeCollectionC.nc
Added Files:
Tag: tinyos-2_0_devel-BRANCH
TreeRouting.h TreeRouting.notes
Log Message:
--- NEW FILE: TreeRouting.h ---
#ifndef _TREE_ROUTING_H
#define _TREE_ROUTING_H
enum {
AM_TREE_ROUTING_CONTROL = 0xCE,
BEACON_INTERVAL = 8192,
INVALID_ADDR = TOS_BCAST_ADDR,
ETX_THRESHOLD = 50, // link quality=20% -> ETX=5 -> Metric=50
PARENT_SWITCH_THRESHOLD = 15,
MAX_METRIC = 0xFFFF,
};
typedef struct {
am_addr_t parent;
uint8_t hopcount;
uint16_t metric;
} route_info_t;
typedef struct {
am_addr_t neighbor;
route_info_t info;
} routing_table_entry;
inline void routeInfoInit(route_info_t *ri) {
ri->parent = INVALID_ADDR;
ri->hopcount = 0;
ri->metric = 0;
}
typedef nx_struct beacon_msg_t {
nx_am_addr_t parent;
nx_uint8_t hopcount;
nx_uint16_t metric;
} beacon_msg_t;
#endif
--- NEW FILE: TreeRouting.notes ---
Miscelaneous notes on the TreeRoutingP module details.
Rodrigo Fonseca
Timer has period P jittered with +- P/2
RouteInfo:
metric is a 16 bit number that measures quality to the root. See below.
hopcount
parent: a link neighbor address (next hop)
Root:
rootControl interface.
if isRoot()
parent = self
hopcount = 0
metric = 0
has_route = true
Update task updates the parent before sending out beacon.
This is not done right when you receive a beacon, because the qualities may change right before you send. This is a policy question, anyway, and can be changed easily.
Quality is converted to a 'path metric' by evaluateMetric().
Path metric is ADDITIVE along a path, and smaller metric is always better.
Currently, it is 10*ETX along the path.
Index: TreeCollectionC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection/Attic/TreeCollectionC.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** TreeCollectionC.nc 25 Apr 2006 15:01:52 -0000 1.1.2.1
--- TreeCollectionC.nc 15 May 2006 16:52:40 -0000 1.1.2.2
***************
*** 8,19 ****
implementation {
enum {
! CLIENT_COUNT = uniqueCount(UQ_COLLECTION_CLIENT)
};
! components new PoolC(message_t, FORWARD_COUNT);
components new QueueC(message_t*, CLIENT_COUNT + FORWARD_COUNT);
components new ForwardingEngineP as FE;
! FE.Pool -> PoolC;
FE.SendQueue -> QueueC;
}
--- 8,48 ----
implementation {
enum {
! CLIENT_COUNT = uniqueCount(UQ_COLLECTION_CLIENT),
! FORWARD_COUNT = 5,
! TREE_ROUTING_TABLE_SIZE = 12,
};
! components new PoolC(message_t, FORWARD_COUNT) as ForwardPool;
components new QueueC(message_t*, CLIENT_COUNT + FORWARD_COUNT);
components new ForwardingEngineP as FE;
+ components new TimerMilliC() as FETimer;
! FE.ForwardPool -> ForwardPool;
FE.SendQueue -> QueueC;
+
+ components new TreeRoutingEngineP(TREE_ROUTING_TABLE_SIZE) as RE;
+ components new TimerMilliC() as REBeaconTimer;
+ components new RandomC() as RERandom;
+ components LinkEstimatorP as LE;
+
+ RE.BeaconSend -> LE.Send;
+ RE.BeaconReceive -> LE.Receive;
+ RE.LinkEstimator -> LE.LinkEstimator;
+ RE.LinkSrcPacket -> LE.LinkSrcPacket;
+
+ RE.AMPacket ->
+ RE.RadioControl ->
+
+ RE.BeaconTimer -> BeaconTimer;
+ RE.Random -> RERandom;
+
+ FE.AMSend ->
+ FE.SubReceive ->
+ FE.SubSnoop ->
+ FE.SubPacket ->
+
+ FE.UnicastNameFreeRouting -> RE.Routing;
+ FE.RadioControl ->
+ FE.QEntryPool ->
+
}
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection
ForwardingEngineP.nc, 1.1.2.7, 1.1.2.8
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestTreeRouting
Makefile, NONE, 1.1.2.1 Makefile.driver, NONE, 1.1.2.1 README,
NONE, 1.1.2.1 TestTreeRoutingC.nc, NONE,
1.1.2.1 TestTreeRoutingP.nc, NONE, 1.1.2.1 test.cc, NONE,
1.1.2.1 test.py, NONE, 1.1.2.1 topo.txt, NONE, 1.1.2.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list