Ping Sender

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

Summary

Typedefs

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

Functions

otPingSenderPing(otInstance *aInstance, const otPingSenderConfig *aConfig)
Starts a ping.
otPingSenderStop(otInstance *aInstance)
void
Stops an ongoing ping.

Structs

otPingSenderConfig

Represents a ping request configuration.

otPingSenderReply

Represents a ping reply.

otPingSenderStatistics

Represents statistics of a ping request.

Typedefs

otPingSenderConfig

struct otPingSenderConfig otPingSenderConfig

Represents a ping request configuration.

otPingSenderReply

struct otPingSenderReply otPingSenderReply

Represents a ping reply.

otPingSenderReplyCallback

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

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

Represents statistics of a ping request.

otPingSenderStatisticsCallback

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

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
)

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
)

Stops an ongoing ping.

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

Resources

OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.