Interface: moteiv.tos.lib.sp.SPUtil
interface SPUtil
Utility functions for SP's primary operations, including
link quality support and time stamping support.
- Author:
-
Joe Polastre, Moteiv Corporation <info@moteiv.com>
Commands
command uint16_t getQuality(sp_neighbor_t *n, TOS_Msg *msg)
command uint32_t getReceiveTimestamp(TOS_MsgPtr msg)
command uint32_t getSenderTimestamp(TOS_MsgPtr msg, int8_t offset)
Commands - Details
getQuality
command uint16_t getQuality(sp_neighbor_t *n, TOS_Msg *msg)
- Parameters:
-
n
- Neighbor whose link quality should be adjusted
-
msg
- Incoming message used for adjusting current link quality
- Returns:
-
new link quality based on the above requirements
getReceiveTimestamp
command uint32_t getReceiveTimestamp(TOS_MsgPtr msg)
- Parameters:
-
msg
- Received message
- Returns:
-
32-bit 32.768kHz timestamp
getSenderTimestamp
command uint32_t getSenderTimestamp(TOS_MsgPtr msg, int8_t offset)
- Parameters:
-
msg
- Received message
- Returns:
-
32-bit 32.768kHz timestamp