This allows upper layers to wait for a transmission to complete (or fail) and for passing up data about the transmission.
More...
This allows upper layers to wait for a transmission to complete (or fail) and for passing up data about the transmission.
◆ gnrc_tx_complete()
Signal TX completion via the given tx sync packet snip.
- Parameters
-
[in] | pkt | The tx sync packet snip of the packet that was transmitted |
- Precondition
- Module gnrc_netttype_tx_sync is sued
-
pkt->type == GNRC_NETTYPE_TX_SYNC
Definition at line 108 of file tx_sync.h.
◆ gnrc_tx_sync()
Block until transmission of the corresponding packet has completed or failed.
- Parameters
-
[in,out] | sync | TX sync structure used for synchronization |
- Precondition
sync
has been added to the packet to synchronize with, e.g. via gnrc_tx_sync_append
-
The packet linked to
sync
has been passed to the network stack for transmission. Otherwise this will block forever.
- Note
- If the transmission has already completed, this function will not block and return immediately instead.
Definition at line 129 of file tx_sync.h.
◆ gnrc_tx_sync_append()
Appends a newly allocated tx sync pktsnip to the end of the packet.
- Parameters
-
[in] | pkt | Packet to append TX sync pktsnip to |
[in,out] | tx_sync | TX sync structure to initialize and append |
- Return values
-
0 | Success |
-ENOMEM | Allocation failed |
- Note
- No need to initialize
tx_sync
, this function will do it for you.
Definition at line 81 of file tx_sync.h.
◆ gnrc_tx_sync_build()
Build a TX sync snip.
- Parameters
-
[in,out] | tx_sync | TX sync structure the snip should hold |
- Returns
- The TX sync snip holing
tx_sync
- Return values
-
- Note
- No need to initialize
tx_sync
, this function will do it for you.
Definition at line 59 of file tx_sync.h.
◆ gnrc_tx_sync_init()
◆ gnrc_tx_sync_split()
Split off the TX sync snip and return it.
- Parameters
-
[in,out] | pkt | Packet to split off the TX sync snip |
- Returns
- The TX sync snip that no longer is part of
pkt
- Return values
-
NULL | pkt contains no TX sync snip |