Modules#

Ping API type definitions

Ping#

The Ping component implements a ping service based on the ICMPv6 protocol. The component is able to send ICMPv6 packets, receive the associated responses and compute the round-trip latency. Using the sl_wisun_ping_request() API, an application emits a single ping packet. To receive the pong response, the application can then call the sl_wisun_ping_response() API.

sl_wisun_ping() function provides a simple solution to periodically send and receive ping packets. To stop the process, call the sl_wisun_ping_stop() function. A ping test is configuratble in size, number of pings sent, and timeout if a response is not received.

To initialize the component, call sl_wisun_ping_init() function.

Functions#

void

Ping service module initialization.

void
sl_wisun_ping_request(const sl_wisun_ping_info_t *const ping_request)

Ping request.

void
sl_wisun_ping_response(sl_wisun_ping_info_t *const ping_response)

Ping response.

bool
sl_wisun_ping(const wisun_addr_t *const remote_addr, const uint16_t packet_count, const uint16_t packet_length, sl_wisun_ping_stat_hnd_t stat_hnd, sl_wisun_ping_req_resp_done_hnd_t req_resp_sent_hnd)

High level ping API.

void

Stop the current Ping process.

Function Documentation#

sl_wisun_ping_init#

void sl_wisun_ping_init (void )

Ping service module initialization.

Parameters
N/A

This function initializes the service thread, mutex and message queues


Definition at line 179 of file C:/silabs/wisun_gsdk/app/wisun/component/ping/sl_wisun_ping.h

sl_wisun_ping_request#

void sl_wisun_ping_request (const sl_wisun_ping_info_t *const ping_request)

Ping request.

Parameters
[in]ping_request

Ping Request Information

The function sends a single ICMPv6 request.


Definition at line 186 of file C:/silabs/wisun_gsdk/app/wisun/component/ping/sl_wisun_ping.h

sl_wisun_ping_response#

void sl_wisun_ping_response (sl_wisun_ping_info_t *const ping_response)

Ping response.

Parameters
[out]ping_response

Ping Response Information

The function retrieves a ping response information.


Definition at line 193 of file C:/silabs/wisun_gsdk/app/wisun/component/ping/sl_wisun_ping.h

sl_wisun_ping#

bool sl_wisun_ping (const wisun_addr_t *const remote_addr, const uint16_t packet_count, const uint16_t packet_length, sl_wisun_ping_stat_hnd_t stat_hnd, sl_wisun_ping_req_resp_done_hnd_t req_resp_sent_hnd)

High level ping API.

Parameters
[in]remote_addr

Remote destination address

[in]packet_count

Count of packets

[in]packet_length

ICMPv6 packet length including header

[in]stat_hnd

Custom statistic handler function

[in]req_resp_sent_hnd

Request/Response sent handler function

The function provides an interface for sending and receiving periodically ping ICMPv6 packets, and collecting statistic data Returns

  • true 0% packet lost

  • false Higher than 0% packet lost


Definition at line 207 of file C:/silabs/wisun_gsdk/app/wisun/component/ping/sl_wisun_ping.h

sl_wisun_ping_stop#

void sl_wisun_ping_stop (void )

Stop the current Ping process.

Parameters
N/A

Reset request and response queues and send a special ping request with interrupt ping status


Definition at line 218 of file C:/silabs/wisun_gsdk/app/wisun/component/ping/sl_wisun_ping.h