Ping Sender

This file includes the OpenThread API for the ping sender module.

Classes

struct  otPingSenderReply
 This structure represents a ping reply.
 
struct  otPingSenderStatistics
 This structure represents statistics of a ping request.
 
struct  otPingSenderConfig
 This structure represents a ping request configuration.

Typedefs

typedef struct otPingSenderReply otPingSenderReply
 This structure represents a ping reply.
 
typedef struct otPingSenderStatistics otPingSenderStatistics
 This structure represents statistics of a ping request.
 
typedef void(* otPingSenderReplyCallback) (const otPingSenderReply *aReply, void *aContext)
 This function pointer type specifies the callback to notify receipt of a ping reply.
 
typedef void(* otPingSenderStatisticsCallback) (const otPingSenderStatistics *aStatistics, void *aContext)
 This function pointer type specifies the callback to report the ping statistics.
 
typedef struct otPingSenderConfig otPingSenderConfig
 This structure represents a ping request configuration.

Functions

otError otPingSenderPing (otInstance *aInstance, const otPingSenderConfig *aConfig)
 This function starts a ping.
 
void otPingSenderStop (otInstance *aInstance)
 This function stops an ongoing ping.

Detailed Description

This file includes the OpenThread API for the ping sender module.

Typedef Documentation

◆ otPingSenderReplyCallback

typedef void(* otPingSenderReplyCallback) (const otPingSenderReply *aReply, void *aContext)

This function pointer type specifies the callback to notify receipt of a ping reply.

Parameters
[in]aReplyA pointer to a otPingSenderReply containing info about the received ping reply.
[in]aContextA pointer to application-specific context.

◆ otPingSenderStatisticsCallback

typedef void(* otPingSenderStatisticsCallback) (const otPingSenderStatistics *aStatistics, void *aContext)

This function pointer type specifies the callback to report the ping statistics.

Parameters
[in]aStatisticsA pointer to a otPingSenderStatistics containing info about the received ping statistics.
[in]aContextA pointer to application-specific context.

Function Documentation

◆ otPingSenderPing()

otError otPingSenderPing ( otInstance aInstance,
const otPingSenderConfig aConfig 
)

This function starts a ping.

Parameters
[in]aInstanceA pointer to an OpenThread instance.
[in]aConfigThe ping config to use.
Return values
OT_ERROR_NONEThe ping started successfully.
OT_ERROR_BUSYCould not start since busy with a previous ongoing ping request.
OT_ERROR_INVALID_ARGSThe aConfig contains invalid parameters (e.g., ping interval is too long).

◆ otPingSenderStop()

void otPingSenderStop ( otInstance aInstance)

This function stops an ongoing ping.

Parameters
[in]aInstanceA pointer to an OpenThread instance.