Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Callbacks

Typedefs

typedef void(* tpfAppResolveCb )(uint8 *pu8DomainName, uint32 u32ServerIP)
 
DNS resolution callback function.

Applications requiring DNS resolution should register their callback through this function by calling registerSocketCallback. The following callback is triggered in response to an asynchronous call to the gethostbyname function (DNS Resolution callback). More...

 
typedef void(* tpfAppResolveCb )(uint8 *pu8DomainName, uint32 u32ServerIP)
 
typedef void(* tpfAppSocketCb )(SOCKET sock, uint8 u8Msg, void *pvMsg)
 The main socket application callback function. Applications register their main socket application callback through this function by calling registerSocketCallback. In response to events received, the following callback function is called to handle the corresponding asynchronous function called. Example: bind, connect,...etc. More...
 
typedef void(* tpfAppSocketCb )(SOCKET sock, uint8 u8Msg, void *pvMsg)
 
typedef void(* tpfPingCb )(uint32 u32IPAddr, uint32 u32RTT, uint8 u8ErrorCode)
 PING Callback. More...
 
typedef void(* tpfPingCb )(uint32 u32IPAddr, uint32 u32RTT, uint8 u8ErrorCode)
 

tpfAppResolveCb

DNS resolution callback function.

Applications requiring DNS resolution should register their callback through this function by calling registerSocketCallback. The following callback is triggered in response to an asynchronous call to the gethostbyname function (DNS Resolution callback).

Parameters
[in]pu8DomainNameDomain name of the host.
[in]u32ServerIPServer IPv4 address encoded in Network byte order format. If it is Zero, then the DNS resolution failed.
[in]pu8DomainNameDomain name of the host.
[in]u32ServerIPServer IPv4 address encoded in Network byte order format. If it is Zero, then the DNS resolution failed.
typedef void(* tpfAppResolveCb)(uint8 *pu8DomainName, uint32 u32ServerIP)
tpfAppSocketCb

The main socket application callback function. Applications register their main socket application callback through this function by calling registerSocketCallback. In response to events received, the following callback function is called to handle the corresponding asynchronous function called. Example: bind, connect,...etc.

Parameters
[in]sockSocket ID for the callback.

The socket callback function is called whenever a new event is received in response to socket operations.

Parameters
[in]u8MsgSocket event type. Possible values are:
[in]pvMsgPointer to message structure. Existing types are:
See Also
tenuSocketCallbackMsgType tstrSocketRecvMsg tstrSocketConnectMsg tstrSocketAcceptMsg tstrSocketListenMsg tstrSocketBindMsg
typedef void(* tpfAppSocketCb)(SOCKET sock, uint8 u8Msg, void *pvMsg)
tpfPingCb

PING Callback.

The function delivers the ping statistics for the sent ping triggered by calling
@ref m2m_ping_req.
Parameters
[in]u32IPAddrDestination IP.
[in]u32RTTRound Trip Time.
[in]u8ErrorCodePing error code. It may be one of:
  • PING_ERR_SUCCESS
  • PING_ERR_DEST_UNREACH
  • PING_ERR_TIMEOUT
typedef void(* tpfPingCb)(uint32 u32IPAddr, uint32 u32RTT, uint8 u8ErrorCode)