Chapter 2. API Reference
esp_err_t esp_ping_delete_session(esp_ping_handle_t
Delete a ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_OK: delete ping session successfully
Parameters
• hdl: handle of ping session
esp_err_t esp_ping_start(esp_ping_handle_t
Start the ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_OK: start ping session successfully
Parameters
• hdl: handle of ping session
esp_err_t esp_ping_stop(esp_ping_handle_t
Stop the ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_OK: stop ping session successfully
Parameters
• hdl: handle of ping session
esp_err_t esp_ping_get_profile(esp_ping_handle_t
Get runtime profile of ping session.
Return
• ESP_ERR_INVALID_ARG: invalid parameters (e.g. ping handle is null, etc)
• ESP_ERR_INVALID_SIZE: the actual profile data size doesn't match the "size"parameter
• ESP_OK: get profile successfully
Parameters
• hdl: handle of ping session
• profile: type of profile
• data: profile data
• size: profile data size
Structures
struct esp_ping_callbacks_t
Type of "ping"callback functions.
Public Members
void *cb_args
arguments for callback functions
void
(*on_ping_success)(esp_ping_handle_t
Invoked by internal ping thread when received ICMP echo reply packet.
void
(*on_ping_timeout)(esp_ping_handle_t
Invoked by internal ping thread when receive ICMP echo reply packet timeout.
void
(*on_ping_end)(esp_ping_handle_t
Invoked by internal ping thread when a ping session is finished.
struct esp_ping_config_t
Type of "ping"configuration.
Espressif Systems
hdl)
hdl)
hdl)
hdl,
uint32_t size)
hdl, void *args)
hdl, void *args)
hdl, void *args)
598
Submit Document Feedback
esp_ping_profile_t
profile, void *data,
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?