Title: Initialization
1Initialization
Parameters S sleep duration A awake
duration
Data Type Schedule Node address, next time to
wake-up Variable Array of Schedule - the size
of the array depends on the density of the
network This nodes schedule
Packet types SYNC - contains senders address
and time to next sleep
Pick random time time to sleep
Didnt hear a SYNC.
Wait and listen for SYNC
Heard SYNC
Set this nodes schedule to match the received
schedule and set time to go to sleep
Set timer to random time tr
Record schedule (leave this nodes schedule as is)
Listen for SYNC
Heard SYNC
Timer expired
Broadcast SYNC
Record schedule (leave this nodes schedule as is)
Listen for SYNC
Heard SYNC
Go-to-sleep timer expired
Set sleep duration timer
Go to sleep
2Normal Awake and listen
Woke-up
Set go-to-sleep time
Determine if SYNC should be sent. -Pick a random
number between 0 and 1
Record schedule (leave this nodes schedule as is)
Random number gt 0.5
Heard SYNC
Send SYNC (no CS but wait a random time after
wake-up)
Listen
Go-to-sleep-timer expired
Set timer to random value (what should the range
be?)
Set sleep duration time
Record schedule (leave this nodes schedule as is)
Listen
timer expired
Sent SYNC
Go to sleep