Google is committed to advancing racial equity for Black communities. See how.

Ping Sender

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

Summary

Typedefs

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

Functions

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

Structs

otPingSenderConfig

This structure represents a ping request configuration.

otPingSenderReply

This structure represents a ping reply.

otPingSenderStatistics

This structure represents statistics of a ping request.

Typedefs

otPingSenderConfig

struct otPingSenderConfig otPingSenderConfig

This structure represents a ping request configuration.

otPingSenderReply

struct otPingSenderReply otPingSenderReply

This structure represents a ping reply.

otPingSenderReplyCallback

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

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

Details
Parameters
[in] aReply
A pointer to a otPingSenderReply containing info about the received ping reply.
[in] aContext
A pointer to application-specific context.

otPingSenderStatistics

struct otPingSenderStatistics otPingSenderStatistics

This structure represents statistics of a ping request.

otPingSenderStatisticsCallback

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

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

Details
Parameters
[in] aStatistics
A pointer to a otPingSenderStatistics containing info about the received ping statistics.
[in] aContext
A pointer to application-specific context.

Functions

otPingSenderPing

otError otPingSenderPing(
  otInstance *aInstance,
  const otPingSenderConfig *aConfig
)

This function starts a ping.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.
[in] aConfig
The ping config to use.
Return Values
OT_ERROR_NONE
The ping started successfully.
OT_ERROR_BUSY
Could not start since busy with a previous ongoing ping request.
OT_ERROR_INVALID_ARGS
The aConfig contains invalid parameters (e.g., ping interval is too long).

otPingSenderStop

void otPingSenderStop(
  otInstance *aInstance
)

This function stops an ongoing ping.

Details
Parameters
[in] aInstance
A pointer to an OpenThread instance.