OpenWSN Firmware
IEEE802154.h
Go to the documentation of this file.
1 #ifndef __IEEE802154_H
2 #define __IEEE802154_H
3 
11 #include "openwsn.h"
12 
13 //=========================== define ==========================================
14 
25 };
26 
27 
29  IEEE154_FRAMEVERSION_2003 = 0, //ieee154-2003
30  IEEE154_FRAMEVERSION_2006 = 1, //ieee154-2006
31  IEEE154_FRAMEVERSION = 2, //ieee154
32 };
33 
40 };
41 
45 };
46 
50 };
51 
55 };
56 
60 };
61 
65 };
66 
71 };
72 
73 //=========================== typedef =========================================
74 
75 typedef struct {
76  bool valid;
77  uint8_t headerLength; //including the length field
78  uint8_t frameType;
84  uint8_t frameVersion;
85  uint8_t dsn;
89 } ieee802154_header_iht; //iht for "internal header type"
90 
91 //=========================== variables =======================================
92 
93 //=========================== prototypes ======================================
94 
95 //=========================== prototypes ======================================
96 
98  uint8_t frameType,
99  uint8_t ielistpresent,
100  uint8_t frameversion,
101  bool securityEnabled,
102  uint8_t sequenceNumber,
103  open_addr_t* nextHop);
104 
106  ieee802154_header_iht* ieee802514_header);
107 
113 #endif
Definition: IEEE802154.h:48
Definition: IEEE802154.h:44
Definition: IEEE802154.h:68
Definition: IEEE802154.h:59
Definition: IEEE802154.h:24
open_addr_t src
Definition: IEEE802154.h:88
Definition: IEEE802154.h:19
open_addr_t panid
Definition: IEEE802154.h:86
uint8_t headerLength
Definition: IEEE802154.h:77
IEEE802154_fcf_enums
Definition: IEEE802154.h:15
bool panIDCompression
Definition: IEEE802154.h:82
uint8_t frameVersion
Definition: IEEE802154.h:84
Definition: IEEE802154.h:39
Definition: IEEE802154.h:70
Definition: IEEE802154.h:22
Definition: IEEE802154.h:36
Definition: IEEE802154.h:37
Definition: IEEE802154.h:38
bool ackRequested
Definition: IEEE802154.h:81
Definition: IEEE802154.h:31
Definition: IEEE802154.h:53
bool ieListPresent
Definition: IEEE802154.h:83
IEEE802154_fcf_frameversion_enums
Definition: IEEE802154.h:28
IEEE802154_fcf_ielist_enums
Definition: IEEE802154.h:47
Definition: IEEE802154.h:35
void ieee802154_prependHeader(OpenQueueEntry_t *msg, uint8_t frameType, uint8_t ielistpresent, uint8_t frameVersion, bool securityEnabled, uint8_t sequenceNumber, open_addr_t *nextHop)
Prepend the IEEE802.15.4 MAC header to a (to be transmitted) packet.
Definition: IEEE802154.c:27
Definition: IEEE802154.h:54
Definition: IEEE802154.h:16
uint8_t dsn
Definition: IEEE802154.h:85
open_addr_t dest
Definition: IEEE802154.h:87
bool securityEnabled
Definition: IEEE802154.h:79
bool framePending
Definition: IEEE802154.h:80
void ieee802154_retrieveHeader(OpenQueueEntry_t *msg, ieee802154_header_iht *ieee802514_header)
Retreieve the IEEE802.15.4 MAC header from a (just received) packet.
Definition: IEEE802154.c:110
IEEE802154_fcf_addr_mode_enums
Definition: IEEE802154.h:67
Definition: IEEE802154.h:69
uint8_t frameType
Definition: IEEE802154.h:78
Definition: IEEE802154.h:29
IEEE802154_fcf_sec_enums
Definition: IEEE802154.h:42
bool valid
Definition: IEEE802154.h:76
Definition: openwsn.h:276
Definition: IEEE802154.h:43
Definition: IEEE802154.h:23
IEEE802154_fcf_panid_enums
Definition: IEEE802154.h:62
Definition: IEEE802154.h:30
Definition: IEEE802154.h:49
IEEE802154_fcf_ack_enums
Definition: IEEE802154.h:57
Definition: openwsn.h:288
IEEE802154_fcf_type_enums
Definition: IEEE802154.h:34
Definition: IEEE802154.h:17
Definition: IEEE802154.h:75
Definition: IEEE802154.h:18
IEEE802154_fcf_pending_enums
Definition: IEEE802154.h:52
Definition: IEEE802154.h:21
Definition: IEEE802154.h:20
Definition: IEEE802154.h:64
Definition: IEEE802154.h:58
Definition: IEEE802154.h:63