-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ng_netdev: TX feedback #3125
Copy link
Copy link
Closed
Labels
Area: networkArea: NetworkingArea: NetworkingType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationType: new featureThe issue requests / The PR implemements a new feature for RIOTThe issue requests / The PR implemements a new feature for RIOT
Milestone
Description
The new netdev API seems to lack any kind of transmission feedback. In the former days when transmitting data over a 802.15.4 transceiver by
netdev_802154_tx_status_t (* transmit)(netdev_t *dev);directly returned the result of a transmission. The current implementation in ng_netdev.h only provides:
/* [...]
* @return number of bytes that were actually send out
* @return -ENODEV if @p dev is invalid
* @return -ENOMSG if pkt is invalid
* @return -EOVERFLOW if the payload size of @p pkt exceeds the
* payload size that can be handled by the device
*/
int (*send_data)(ng_netdev_t *dev, ng_pktsnip_t *pkt);I see that netdev shall be a generic API not only for radio transceivers, but is there already a replacement for TX feedback? Maybe I didn't search carefully enough?
Still the old implementation has some drawbacks: e.g. when waiting for an ACK the transmit function needs to be blocking in order to return the TX feedback.
With ng_netdev this could be implemented (non-blocking) by adding new events to ng_netdev_event_t I guess.
typedef enum {
NETDEV_EVENT_RX_STARTED = 0x0001, /**< started to receive a packet */
NETDEV_EVENT_RX_COMPLETE = 0x0002, /**< finished receiving a packet */
NETDEV_EVENT_TX_STARTED = 0x0004, /**< started to transfer a packet */
NETDEV_EVENT_TX_COMPLETE = 0x0008, /**< finished transferring packet */
/* expand this list if needed */
NETDEV_EVENT_TX_NOACK = 0x4242; /**< TX successful, but no ACK received */
} ng_netdev_event_t;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: networkArea: NetworkingArea: NetworkingType: enhancementThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationThe issue suggests enhanceable parts / The PR enhances parts of the codebase / documentationType: new featureThe issue requests / The PR implemements a new feature for RIOTThe issue requests / The PR implemements a new feature for RIOT