Interface: tos.chips.cc2420_tkn154.Timestamp

interface Timestamp

Commands
command void modifyMACPayload(uint8_t token, uint8_t offset, uint8_t *buf, uint8_t len) Modify (overwrite) the contents of the MAC payload.

Events
event void transmissionStarted(uint8_t frameType, uint8_t msduHandle, uint8_t *payload, uint8_t token) The transmission of a packet has started (the PHY preamble is being transmitted).
event void transmittedSFD(uint32_t time, uint8_t frameType, uint8_t msduHandle, uint8_t *payload, uint8_t token) The Start-of-Frame Delimiter of an outgoing frame has been transmitted.

Commands - Details

modifyMACPayload

command void modifyMACPayload(uint8_t token, uint8_t offset, uint8_t *buf, uint8_t len)

Modify (overwrite) the contents of the MAC payload. This command must only be called in the context of a transmittedSFD()<\code> event and it should return fast. Note: the smaller offset is the faster transmittedSFD()<\code> must be finished (offset of zero might not work).

Parameters:
token - the token signalled by transmittedSFD()<\code>
offset - the offset in the frame's payload to start modifying; an offset of zero means the first byte of the MAC payload field
buf - data to write
len - number of bytes to write

Events - Details

transmissionStarted

event void transmissionStarted(uint8_t frameType, uint8_t msduHandle, uint8_t *payload, uint8_t token)

The transmission of a packet has started (the PHY preamble is being transmitted). Within the event handler the modifyPayload()<\code> command can be called to modify the contents of the frame's payload.

Parameters:
frameType - the type of frame (BEACON=0, DATA=1, ACK=2, COMMAND=3)
msduHandle - for DATA frames the handle associated with the MSDU, otherwise undefined
payload - the MAC payload (e.g. in a DATA frame this is the msdu, in a BEACON frame this is the first byte of the SFSpec)
token - a token to be used as parameter for the modifyPayload()<\code> command

transmittedSFD

event void transmittedSFD(uint32_t time, uint8_t frameType, uint8_t msduHandle, uint8_t *payload, uint8_t token)

The Start-of-Frame Delimiter of an outgoing frame has been transmitted. Within the event handler the modifyPayload()<\code> command may be called to modify the contents of the frame's payload.

Parameters:
time - the time when the SFD was transmitted, expressed in 15.4 symbols as determined by a call to a T62500hz Alarm/Timer.getNow()
frameType - the type of frame (BEACON=0, DATA=1, ACK=2, COMMAND=3)
msduHandle - for DATA frames the handle associated with the MSDU, otherwise undefined
payload - the MAC payload (e.g. in a DATA frame this is the msdu, in a BEACON frame this is the first byte of the SFSpec)
token - a token to be used as parameter for the modifyPayload()<\code> command