SIM_INTERFACE(ieee_802_15_4_link) { ieee_802_15_4_transmit_status_t (*transmit)( conf_object_t *NOTNULL obj, const frags_t *frame, uint16 channel_page, uint16 channel_number, ieee_802_15_4_frame_crc_status_t crc_status); }; #define IEEE_802_15_4_LINK_INTERFACE "ieee_802_15_4_link"
The ieee_802_15_4_link
interface is implemented by the IEEE
802.15.4 link endpoint objects that provide an interface for frame traffic.
Transceiver calls transmit to send out frames. The return value
is using one of the values in the
ieee_802_15_4_transmit_status_t
enum:
IEEE_802_15_4_Transmit_No_Error
means that the frame was
sent out without error.IEEE_802_15_4_Transmit_Channel_Contention
means that there
was collision and the frame was not sent out.IEEE_802_15_4_Transmit_Data_Corruption
means that the
endpoint detected CRC mismatch and didn't send out the frame.typedef enum { IEEE_802_15_4_Transmit_No_Error = 0, IEEE_802_15_4_Transmit_Channel_Contention, IEEE_802_15_4_Transmit_Data_Corruption } ieee_802_15_4_transmit_status_t;
The crc_status parameter provides out-of-band information on
the contents of the frame with regards to the CRC field using one of the
values in the ieee_802_15_4_frame_crc_status_t
enum:
IEEE_802_15_4_Frame_CRC_Match
means that to the link that,
regardless of the actual contents of the CRC field in frame, the CRC is
considered matching the frame contents.IEEE_802_15_4_Frame_CRC_Mismatch
means that the CRC field
and the frame contents do not agree. Just like the Ethernet links, the
endpoint does not really send out the packet in this case.IEEE_802_15_4_Frame_CRC16_Unknown/IEEE_802_15_4_Frame_CRC32_Unknown
means that the link to compute the CRC and compare it with
FCS (Frame Check Sequence) of the MAC frame. If the CRC field and frame
contents do not agree, the endpoint does not send out the packet.
IEEE_802_15_4_Frame_CRC32_Unknown
is for 802.15.4g only.typedef enum { IEEE_802_15_4_Frame_CRC_Match = 0, IEEE_802_15_4_Frame_CRC_Mismatch, IEEE_802_15_4_Frame_CRC16_Unknown, IEEE_802_15_4_Frame_CRC32_Unknown, } ieee_802_15_4_frame_crc_status_t;
The frequency channels are defined through a combination of channel numbers and channel pages. Channel page is a concept added to IEEE 802.15.4 in 2006 to distinguish between supported PHYs. Both channel page and channel number must match on source and target sides for successful transmission.