ConOpSys V2970  P004.07
ANVILEX control operating system
Classes | Macros | Variables
ieee802154.h File Reference
#include "lwip/opt.h"
Include dependency graph for ieee802154.h:

Go to the source code of this file.

Classes

struct  ieee_802154_hdr
 

Macros

#define IEEE_802154_ADDR_MODE_NO_ADDR   0x00 /* PAN ID and address fields are not present */
 
#define IEEE_802154_ADDR_MODE_RESERVED   0x01 /* Reserved */
 
#define IEEE_802154_ADDR_MODE_SHORT   0x02 /* Address field contains a short address (16 bit) */
 
#define IEEE_802154_ADDR_MODE_EXT   0x03 /* Address field contains an extended address (64 bit) */
 
#define IEEE_802154_FC_FT_MASK   0x0007 /* bits 0..2: Frame Type */
 
#define IEEE_802154_FC_FT_BEACON   0x00
 
#define IEEE_802154_FC_FT_DATA   0x01
 
#define IEEE_802154_FC_FT_ACK   0x02
 
#define IEEE_802154_FC_FT_MAC_CMD   0x03
 
#define IEEE_802154_FC_FT_RESERVED   0x04
 
#define IEEE_802154_FC_FT_MULTIPURPOSE   0x05
 
#define IEEE_802154_FC_FT_FRAG   0x06
 
#define IEEE_802154_FC_FT_EXT   0x07
 
#define IEEE_802154_FC_SEC_EN   0x0008 /* bit 3: Security Enabled */
 
#define IEEE_802154_FC_FRAME_PEND   0x0010 /* bit 4: Frame Pending */
 
#define IEEE_802154_FC_ACK_REQ   0x0020 /* bit 5: AR (ACK required) */
 
#define IEEE_802154_FC_PANID_COMPR   0x0040 /* bit 6: PAN ID Compression (src and dst are equal, src PAN ID omitted) */
 
#define IEEE_802154_FC_RESERVED   0x0080
 
#define IEEE_802154_FC_SEQNO_SUPPR   0x0100 /* bit 8: Sequence Number Suppression */
 
#define IEEE_802154_FC_IE_PRESENT   0x0200 /* bit 9: IE Present */
 
#define IEEE_802154_FC_DST_ADDR_MODE_MASK   0x0c00 /* bits 10..11: Destination Addressing Mode */
 
#define IEEE_802154_FC_DST_ADDR_MODE_NO_ADDR   (IEEE_802154_ADDR_MODE_NO_ADDR << 10)
 
#define IEEE_802154_FC_DST_ADDR_MODE_SHORT   (IEEE_802154_ADDR_MODE_SHORT << 10)
 
#define IEEE_802154_FC_DST_ADDR_MODE_EXT   (IEEE_802154_ADDR_MODE_EXT << 10)
 
#define IEEE_802154_FC_FRAME_VERSION_MASK   0x3000 /* bits 12..13: Frame Version */
 
#define IEEE_802154_FC_FRAME_VERSION_GET(x)   (((x) & IEEE_802154_FC_FRAME_VERSION_MASK) >> 12)
 
#define IEEE_802154_FC_SRC_ADDR_MODE_MASK   0xc000 /* bits 14..15: Source Addressing Mode */
 
#define IEEE_802154_FC_SRC_ADDR_MODE_SHORT   (IEEE_802154_ADDR_MODE_SHORT << 14)
 
#define IEEE_802154_FC_SRC_ADDR_MODE_EXT   (IEEE_802154_ADDR_MODE_EXT << 14)
 

Variables

PACK_STRUCT_BEGIN struct ieee_802154_hdr PACK_STRUCT_STRUCT
 

Detailed Description

Definitions for IEEE 802.15.4 MAC frames

Macro Definition Documentation

◆ IEEE_802154_ADDR_MODE_EXT

#define IEEE_802154_ADDR_MODE_EXT   0x03 /* Address field contains an extended address (64 bit) */

◆ IEEE_802154_ADDR_MODE_NO_ADDR

#define IEEE_802154_ADDR_MODE_NO_ADDR   0x00 /* PAN ID and address fields are not present */

◆ IEEE_802154_ADDR_MODE_RESERVED

#define IEEE_802154_ADDR_MODE_RESERVED   0x01 /* Reserved */

◆ IEEE_802154_ADDR_MODE_SHORT

#define IEEE_802154_ADDR_MODE_SHORT   0x02 /* Address field contains a short address (16 bit) */

◆ IEEE_802154_FC_ACK_REQ

#define IEEE_802154_FC_ACK_REQ   0x0020 /* bit 5: AR (ACK required) */

◆ IEEE_802154_FC_DST_ADDR_MODE_EXT

#define IEEE_802154_FC_DST_ADDR_MODE_EXT   (IEEE_802154_ADDR_MODE_EXT << 10)

◆ IEEE_802154_FC_DST_ADDR_MODE_MASK

#define IEEE_802154_FC_DST_ADDR_MODE_MASK   0x0c00 /* bits 10..11: Destination Addressing Mode */

◆ IEEE_802154_FC_DST_ADDR_MODE_NO_ADDR

#define IEEE_802154_FC_DST_ADDR_MODE_NO_ADDR   (IEEE_802154_ADDR_MODE_NO_ADDR << 10)

◆ IEEE_802154_FC_DST_ADDR_MODE_SHORT

#define IEEE_802154_FC_DST_ADDR_MODE_SHORT   (IEEE_802154_ADDR_MODE_SHORT << 10)

◆ IEEE_802154_FC_FRAME_PEND

#define IEEE_802154_FC_FRAME_PEND   0x0010 /* bit 4: Frame Pending */

◆ IEEE_802154_FC_FRAME_VERSION_GET

#define IEEE_802154_FC_FRAME_VERSION_GET (   x)    (((x) & IEEE_802154_FC_FRAME_VERSION_MASK) >> 12)

◆ IEEE_802154_FC_FRAME_VERSION_MASK

#define IEEE_802154_FC_FRAME_VERSION_MASK   0x3000 /* bits 12..13: Frame Version */

◆ IEEE_802154_FC_FT_ACK

#define IEEE_802154_FC_FT_ACK   0x02

◆ IEEE_802154_FC_FT_BEACON

#define IEEE_802154_FC_FT_BEACON   0x00

◆ IEEE_802154_FC_FT_DATA

#define IEEE_802154_FC_FT_DATA   0x01

◆ IEEE_802154_FC_FT_EXT

#define IEEE_802154_FC_FT_EXT   0x07

◆ IEEE_802154_FC_FT_FRAG

#define IEEE_802154_FC_FT_FRAG   0x06

◆ IEEE_802154_FC_FT_MAC_CMD

#define IEEE_802154_FC_FT_MAC_CMD   0x03

◆ IEEE_802154_FC_FT_MASK

#define IEEE_802154_FC_FT_MASK   0x0007 /* bits 0..2: Frame Type */

◆ IEEE_802154_FC_FT_MULTIPURPOSE

#define IEEE_802154_FC_FT_MULTIPURPOSE   0x05

◆ IEEE_802154_FC_FT_RESERVED

#define IEEE_802154_FC_FT_RESERVED   0x04

◆ IEEE_802154_FC_IE_PRESENT

#define IEEE_802154_FC_IE_PRESENT   0x0200 /* bit 9: IE Present */

◆ IEEE_802154_FC_PANID_COMPR

#define IEEE_802154_FC_PANID_COMPR   0x0040 /* bit 6: PAN ID Compression (src and dst are equal, src PAN ID omitted) */

◆ IEEE_802154_FC_RESERVED

#define IEEE_802154_FC_RESERVED   0x0080

◆ IEEE_802154_FC_SEC_EN

#define IEEE_802154_FC_SEC_EN   0x0008 /* bit 3: Security Enabled */

◆ IEEE_802154_FC_SEQNO_SUPPR

#define IEEE_802154_FC_SEQNO_SUPPR   0x0100 /* bit 8: Sequence Number Suppression */

◆ IEEE_802154_FC_SRC_ADDR_MODE_EXT

#define IEEE_802154_FC_SRC_ADDR_MODE_EXT   (IEEE_802154_ADDR_MODE_EXT << 14)

◆ IEEE_802154_FC_SRC_ADDR_MODE_MASK

#define IEEE_802154_FC_SRC_ADDR_MODE_MASK   0xc000 /* bits 14..15: Source Addressing Mode */

◆ IEEE_802154_FC_SRC_ADDR_MODE_SHORT

#define IEEE_802154_FC_SRC_ADDR_MODE_SHORT   (IEEE_802154_ADDR_MODE_SHORT << 14)

Variable Documentation

◆ PACK_STRUCT_STRUCT

PACK_STRUCT_BEGIN struct ieee_802154_hdr PACK_STRUCT_STRUCT