Interface
Functions for starting/stop WLAN & SoftAP interfaces. More...
Modules | |
Types | |
Network Interface Types. | |
Macros | |
Network interface specific macros. | |
Detailed Description
Functions for starting/stop WLAN & SoftAP interfaces.
Function Documentation
zos_result_t zn_network_close_all_streams | ( | zos_interface_t | interface | ) |
Close all data streams on specified network interface.
- Parameters
-
[in] interface
zos_interface_t the interface to close all streams on
- Returns
- zos_result_t result of api call
zos_result_t zn_network_down | ( | zos_interface_t | interface | ) |
Bring network interface down.
See ZentriOS Command API documentation: network_down.
- Parameters
-
[in] interface
zos_interface_t the interface to bring down
- Returns
- zos_result_t result of api call
- Examples:
- demo/pong/link_client.c, and demo/pong/link_server.c.
zos_bool_t zn_network_is_up | ( | zos_interface_t | interface | ) |
Return status of network interface.
- Parameters
-
[in] interface
zos_interface_t the interface to check status of
- Returns
- ZOS_TRUE is network interface is up, ZOS_FALSE else
zos_result_t zn_network_register_event_handler | ( | zos_interface_t | interface, |
zos_network_event_handler_t | handler |
||
) |
Register network event handler.
- Note
- The event handler executes in the Zap thread context
- Parameters
-
[in] interface
zos_interface_t the interface to register handler with [in] handler
zos_network_event_handler_t to be called on network interface event
- Returns
- zos_result_t result of api call
zos_result_t zn_network_register_softap_event_handler | ( | zos_softap_event_handler_t | handler | ) |
Register SoftAP client event handler.
- Note
- The event handler executes in the Zap thread context
- Parameters
-
[in] handler
zos_softap_event_handler_t to be called on softap client event
- Returns
- zos_result_t result of api call
- Examples:
- basic/softap_tcp_server/softap_tcp_server.c, and nxp/nfc3d/local.c.
zos_result_t zn_network_restart | ( | zos_interface_t | interface | ) |
Restart network interface.
See ZentriOS Command API documentation: network_restart.
- Parameters
-
[in] interface
zos_interface_t the interface to restart
- Returns
- zos_result_t result of api call
- Examples:
- basic/display_stream/display_stream.c, basic/ftp_upload/ftp_upload.c, basic/http_server/http_server.c, basic/http_stream/http_stream.c, basic/tcp_client/tcp_client.c, basic/udp_client/udp_client.c, basic/udp_hello_gpio/udp_hello_gpio.c, basic/websocket_server/websocket_server.c, cloud/mqttdemo/main.c, demo/accelerometer_stream/accelerometer_stream.c, demo/led_matrix/led_matrix.c, demo/moray3d/moray3d.c, nxp/nfc3d/local.c, nxp/nxp3d/nxp3d.c, and sensors/accel_interrupt/main.c.
zos_result_t zn_network_softap_client_list | ( | zos_softap_client_t * | client_list, |
uint32_t * | client_count |
||
) |
Return list of SoftAP clients.
The supplied client_list argument should be a buffer large enough to hold all associated clients. e.g.
zos_softap_client_t client_list[ZOS_MAX_SOFTAP_CLIENTS];
- Parameters
-
[out] client_list
Buffer containing list of associated client's information [out] client_count
Pointer to hold number of client's associated, leave NULL if unused
- Returns
- zos_result_t result of api call
- Examples:
- nxp/nfc3d/cloud_rest.c, and nxp/nfc3d/cloud_websocket.c.
zos_result_t zn_network_softap_deauth_client | ( | zos_mac_t * | mac, |
zos_deauth_reason_t | reason |
||
) |
Deauthenticate SoftAP client.
This boots a softap client of the softap network.
- Parameters
-
[in] mac
MAC address of SoftAP client [in] reason
Reason for deauthenticating client, see zos_deauth_reason_t
- Returns
- zos_result_t result of api call
zos_result_t zn_network_up | ( | zos_interface_t | interface, |
zos_bool_t | block |
||
) |
Bring network interface up.
See ZentriOS Command API documentation: network_up.
- Parameters
-
[in] interface
zos_interface_t the interface to bring up [in] block
ZOS_TRUE if API call should block until interface is brought up, ZOS_FALSE if it should return immediately
- Returns
- zos_result_t result of api call