Loading...
Searching...
No Matches
Minimal netdev IEEE 802.15.4 device processing

Detailed Description

Files

file  netdev_ieee802154_minimal.h
 Provides basic functionalities to interact with an IEEE 802.15.4 networking device which implements the Netdev - Network Device Driver API.
 
file  netdev_ieee802154_minimal_internal.h
 Internal definitions for the netdev_ieee802154_minimal module.
 

Macros

#define NETDEV_IEEE802154_MINIMAL_NUMOF
 Maximum number of devices to handle.
 

Functions

int netdev_ieee802154_minimal_init_devs (netdev_event_cb_t cb)
 Device-under-test initialization function.
 
int netdev_ieee802154_minimal_init (void)
 Initialize the module.
 
int netdev_ieee802154_minimal_send (struct netdev *dev, iolist_t *pkt)
 Send a IEEE 802.15.4 frame This is wrapper for the internal netdev send function, that ensures all netdev functions are called from the same thread.
 
int netdev_ieee802154_minimal_get (struct netdev *dev, netopt_t opt, void *data, size_t max_len)
 Get an option from netdev minimal.
 
int netdev_ieee802154_minimal_set (struct netdev *dev, netopt_t opt, void *data, size_t len)
 Set an option to netdev minimal.
 

Macro Definition Documentation

◆ NETDEV_IEEE802154_MINIMAL_NUMOF

#define NETDEV_IEEE802154_MINIMAL_NUMOF

Maximum number of devices to handle.

Note
Should be provided by the application via init_dev.h.

Definition at line 43 of file netdev_ieee802154_minimal.h.

Function Documentation

◆ netdev_ieee802154_minimal_get()

int netdev_ieee802154_minimal_get ( struct netdev dev,
netopt_t  opt,
void *  data,
size_t  max_len 
)

Get an option from netdev minimal.

This is wrapper for the internal netdev get function, that ensures all netdev functions are called from the same thread. It is safe to call this function from anywhere.

Parameters
[in]devPointer to the netdev descriptor.
[in]optThe netopt option
[out]dataBuffer to store the option
[in]max_lenMaximum length of the buffer
Return values
0on success
!=0 on error

◆ netdev_ieee802154_minimal_init()

int netdev_ieee802154_minimal_init ( void  )

Initialize the module.

Return values
0on success
!=0 on error

◆ netdev_ieee802154_minimal_init_devs()

int netdev_ieee802154_minimal_init_devs ( netdev_event_cb_t  cb)

Device-under-test initialization function.

Note
Should be implemented by the test application
Parameters
[in]cbCallback to be set to netdev::event_callback
Return values
0on success
!=0 on error

◆ netdev_ieee802154_minimal_send()

int netdev_ieee802154_minimal_send ( struct netdev dev,
iolist_t pkt 
)

Send a IEEE 802.15.4 frame This is wrapper for the internal netdev send function, that ensures all netdev functions are called from the same thread.

It is safe to call this function from anywhere.

Parameters
[in]devPointer to the netdev descriptor.
[in]pktPacket to be sent.
Return values
0on success
!=0 on error

◆ netdev_ieee802154_minimal_set()

int netdev_ieee802154_minimal_set ( struct netdev dev,
netopt_t  opt,
void *  data,
size_t  len 
)

Set an option to netdev minimal.

This is wrapper for the internal netdev set function, that ensures all netdev functions are called from the same thread. It is safe to call this function from anywhere.

Parameters
[in]devPointer to the netdev descriptor.
[in]optThe netopt option
[in]dataPointer to the data to be set
[in]lenLength of the data
Return values
0on success
!=0 on error