Sensornet Protocol (SP): Primary link communication mechanism.
SP is a unifying link abstraction for running network protocols over a variety of link layer and physical layer technologies without changing network protocol implementation.
SPC and its interfaces are described in detail in the following
publication:
A Unifying Link Abstraction for Wireless Sensor Networks
In Proceedings of the Third ACM Conference on Embedded Networked
Sensor Systems (SenSys), November 2-4, 2005.
Messages are transmitted using the SPSend interface and message futures are handled through the SPSendNext interface. To send a message on a particular AM type, such as AM type 5, wire your network protocol to SPSend[5]. The SP message pool will hold on to a message and its corresponding packets until it may be sent over the channel.
Fields of each SP message (sp_message_t) should never be directly accessed. Instead, they can be set using the parameters of the SPSend interface. Reading parameter should be done through the SPMessage interface.
Reception is on a per packet basis (not a per message basis like SPSend). Packets are immediately dispatched to higher layer services based on AM type.
The SP Neighbor Table is accessed through the SPNeighbor interface. Users must wire to the SP Neighbor Table with the parameter unique("SPNeighbor"). Each service then has its own identity for controlling the insertions, removals, and changes of entries in the SP Neighbor Table. See the SPNeighbor interface for more info.
Various utilities as part of SP's processing are available in the SPUtil interface. These include link estimation functions and link post-arbitration time stamps.