You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be able to read/write information to nodes that are asleep we need to put commands in a send queue. Battery powered devices usually wake up something like each hour and is awake for about 1 second. During this time we need to send all the commands in the queue to that specific node.
There is already a IsAwake() function that returns a blocking channel that can be used to wait for a node to wake up.
An other solution could be to start a go-routine each time we are going to send a message and first call the IsAwake() function. That way the go-routine will wait to send the message until the node is awake.
The text was updated successfully, but these errors were encountered:
Does order matter here? If not i think the second solution with multiple waiting goroutines is better. But if we need a specific order we should have one goroutine per device with a queue in it.
To be able to read/write information to nodes that are asleep we need to put commands in a send queue. Battery powered devices usually wake up something like each hour and is awake for about 1 second. During this time we need to send all the commands in the queue to that specific node.
There is already a IsAwake() function that returns a blocking channel that can be used to wait for a node to wake up.
An other solution could be to start a go-routine each time we are going to send a message and first call the IsAwake() function. That way the go-routine will wait to send the message until the node is awake.
The text was updated successfully, but these errors were encountered: