This interface allows code from layer 2 (MAC) or higher to send packets with CSMA/CA, whatever the abilities and/or configuration of a given radio transceiver device are.  
More...
This interface allows code from layer 2 (MAC) or higher to send packets with CSMA/CA, whatever the abilities and/or configuration of a given radio transceiver device are. 
◆ csma_sender_cca_send()
Sends a 802.15.4 frame when medium is available. 
- Precondition
- dev != NULL
This function is useful for sending packets without the whole CSMA/CA procedure, but after ensuring medium is available, that is after a successful CCA.
It is especially useful for broadcasting specific packets, like beacons; or for many sending packets in burst.
- Warning
- ATTENTION: It only tries to send the given data once. If you want the complete CSMA/CA procedure with retries, use csma_sender_csma_ca_send().
- Parameters
- 
  
    | [in] | dev | netdev device, needs to be already initialized |  | [in] | iolist | pointer to the data |  
 
- Returns
- number of bytes that were actually send out 
- 
-ENODEV if devis invalid
- 
-ENOMSG if pktis invalid
- 
-EOVERFLOW if the payload size of pktexceeds the payload size that can be handled by the device
- 
-ECANCELED if an internal driver error occurred 
- 
-EBUSY if radio medium was not available to send the given data 
 
 
◆ csma_sender_csma_ca_send()
Sends a 802.15.4 frame using the CSMA/CA method. 
- Precondition
- dev != NULL
If the transceiver can (and is configured to) do hardware-assisted CSMA/CA, this feature is used. Otherwise, a software procedure is used.
- Parameters
- 
  
    | [in] | dev | netdev device, needs to be already initialized |  | [in] | iolist | pointer to the data |  | [in] | conf | configuration for the backoff; will be set to CSMA_SENDER_CONF_DEFAULT if NULL. |  
 
- Returns
- number of bytes that were actually send out 
- 
-ENODEV if devis invalid
- 
-ENOMSG if pktis invalid
- 
-EOVERFLOW if the payload size of pktexceeds the payload size that can be handled by the device
- 
-ECANCELED if an internal driver error occurred 
- 
-EBUSY if radio medium never was available to send the given data