WE310F5  39.00.000
m2mb_ping.h File Reference

Public APIs and structures of PING feature. More...

#include <stdint.h>
#include <string.h>
#include "m2mb_types.h"

Go to the source code of this file.

Data Structures

struct  M2MB_PING_REQ_STATUS
 M2MB_PING_REQ_STATUS_T defines the data type of M2MB_PING_REQ_RESULT event. More...
 
struct  M2MB_PING_COMPLETE_STATUS
 M2MB_PING_COMPLETE_STATUS_T defines the data type of M2MB_PING_COMPLETE event. More...
 
union  M2MB_PING_CONF_PARAMS
 M2MB_PING_CONF_PARAMS_T defines configuration data structure for ping. More...
 
struct  M2MB_PING_INIT_PARAMS
 PING initialization parameters. More...
 
#define M2MB_PING_PACKET_SIZE_MAX_TX   (1576)
 
#define M2MB_PING_PACKET_SIZE_MAX_RX   (1556)
 
#define M2MB_NETWORK_PING_SUCCESS   0
 
#define M2MB_NETWORK_PING_INVALID_IP_ADDRESS   M2MB_NET_ERR_INVALID_IPADDR
 
#define M2MB_NETWORK_PING_REQUEST_TIMED_OUT   2
 
enum  M2MB_PING_CFGID {
  M2MB_PING_CFGID_ADDRESS,
  M2MB_PING_CFGID_DATA_SIZE,
  M2MB_PING_CFGID_COUNT,
  M2MB_PING_CFGID_STAT
}
 M2MB_PING_CFGID_E defines configuration IDs for ping. More...
 
enum  M2MB_PING_EVENT {
  M2MB_PING_REQ_RESULT,
  M2MB_PING_COMPLETE
}
 M2MB_PING_EVENT_E defines events passed in the ping callback. More...
 
typedef enum M2MB_PING_CFGID M2MB_PING_CFGID_E
 M2MB_PING_CFGID_E defines configuration IDs for ping. More...
 
typedef enum M2MB_PING_EVENT M2MB_PING_EVENT_E
 M2MB_PING_EVENT_E defines events passed in the ping callback. More...
 
typedef struct M2MB_PING_REQ_STATUS M2MB_PING_REQ_STATUS_T
 M2MB_PING_REQ_STATUS_T defines the data type of M2MB_PING_REQ_RESULT event. More...
 
typedef struct M2MB_PING_COMPLETE_STATUS M2MB_PING_COMPLETE_STATUS_T
 M2MB_PING_COMPLETE_STATUS_T defines the data type of M2MB_PING_COMPLETE event. More...
 
typedef INT32(* M2MB_PING_CB_T) (void *user_ctx, M2MB_PING_EVENT_E ev, VOID *data)
 M2MB_PING_CB_T defines callback for ping request. More...
 
typedef union M2MB_PING_CONF_PARAMS M2MB_PING_CONF_PARAMS_T
 M2MB_PING_CONF_PARAMS_T defines configuration data structure for ping. More...
 
typedef struct M2MB_PING_INIT_PARAMS M2MB_PING_INIT_PARAMS_T
 PING initialization parameters. More...
 
M2MB_STATUS_T m2mb_ping_init (HANDLE *handle, M2MB_PING_INIT_PARAMS_T init_params)
 m2mb_ping_init is called to initialize the PING user callback and continuous interval. More...
 
M2MB_STATUS_T m2mb_ping_deinit (HANDLE handle)
 m2mb_ping_deinit is called to de-initialize PING module. More...
 
INT32 m2mb_ping_start (HANDLE handle)
 m2mb_ping_start is called to initiate Ping. More...
 
INT32 m2mb_ping_stop (HANDLE handle)
 m2mb_ping_stop is called to stop ping procedure. More...
 
INT32 m2mb_ping_set_cfg (HANDLE handle, M2MB_PING_CFGID_E cfgID, M2MB_PING_CONF_PARAMS_T *conf_params)
 m2mb_ping_set_cfg is called to set the ping configuration. More...
 
INT32 m2mb_ping_get_cfg (HANDLE handle, M2MB_PING_CFGID_E cfgID, M2MB_PING_CONF_PARAMS_T *conf_params)
 m2mb_ping_get_cfg is called to set the ping configuration. More...
 

Detailed Description

Public APIs and structures of PING feature.

we866e4/epl/inc/nwk/m2mb_ping.h

PING provides APIs to ping a particular device in the network.

The user can specify the number of times it wants to ping in the foreground or background. When done in foreground, calling thread is held till the ping operation is complete. In case of background ping, a new thread is created and ping operation is done in it. The user can use the background ping for a continuous ping operation and this can be stop by calling stop API.

Note
Dependencies:
"#include <m2mb_types.h>"
Author
Prasad Reddy
Date
25/11/2017

Definition in file m2mb_ping.h.