OpenWSN Firmware
openqueue.h
Go to the documentation of this file.
1 #ifndef __OPENQUEUE_H
2 #define __OPENQUEUE_H
3 
11 #include "openwsn.h"
12 #include "IEEE802154.h"
13 
14 //=========================== define ==========================================
15 
16 #define QUEUELENGTH 10
17 
18 //=========================== typedef =========================================
19 
20 typedef struct {
21  uint8_t creator;
22  uint8_t owner;
24 
25 //=========================== module variables ================================
26 
27 typedef struct {
30 
31 //=========================== prototypes ======================================
32 
33 // admin
34 void openqueue_init(void);
35 bool debugPrint_queue(void);
36 // called by any component
39 void openqueue_removeAllCreatedBy(uint8_t creator);
40 void openqueue_removeAllOwnedBy(uint8_t owner);
41 // called by res
44 // called by IEEE80215E
47 
53 #endif
uint8_t creator
Definition: openqueue.h:21
void openqueue_removeAllCreatedBy(uint8_t creator)
Free all the packet buffers created by a specific module.
Definition: openqueue.c:127
OpenQueueEntry_t * openqueue_macGetDataPacket(open_addr_t *toNeighbor)
Definition: openqueue.c:190
#define QUEUELENGTH
Definition: openqueue.h:16
void openqueue_removeAllOwnedBy(uint8_t owner)
Free all the packet buffers owned by a specific module.
Definition: openqueue.c:144
OpenQueueEntry_t * openqueue_sixtopGetReceivedPacket()
Definition: openqueue.c:173
uint8_t owerror_t
Definition: openwsn.h:265
OpenQueueEntry_t * openqueue_getFreePacketBuffer(uint8_t creator)
Request a new (free) packet buffer.
Definition: openqueue.c:62
Definition: openqueue.h:27
uint8_t owner
Definition: openqueue.h:22
Definition: openqueue.h:20
owerror_t openqueue_freePacketBuffer(OpenQueueEntry_t *pkt)
Free a previously-allocated packet buffer.
Definition: openqueue.c:97
OpenQueueEntry_t * openqueue_macGetAdvPacket()
Definition: openqueue.c:224
Definition: openwsn.h:276
void openqueue_init()
Initialize this module.
Definition: openqueue.c:22
Definition: openwsn.h:288
OpenQueueEntry_t * openqueue_sixtopGetSentPacket()
Definition: openqueue.c:158
bool debugPrint_queue()
Trigger this module to print status information, over serial.
Definition: openqueue.c:37