1.5.3.9 SYS_WIFIPROV_CALLBACK Typedef

C

typedef void (*SYS_WIFIPROV_CALLBACK )(uint32_t event, void * data,void *cookie );

Summary

Pointer to a Wi-Fi Provisioning system service callback function.

Description

This data type defines a pointer to a Wi-Fi Provisioning service callback function. Callback functions can be registered by client at initializing.

Precondition

None

Parameters

ParamDescription
eventA event value, event can be any of SYS_WIFIPROV_CTRLMSG types.
dataWi-Fi Provisioning service Data.
cookieClient register cookie.

Returns

None.

Example

void WiFiProvServCallback (uint32_t event, void * data,void *cookie )
{
switch(event)
{
case SYS_WIFIPROV_SETCONFIG:
{
SYS_WIFIPROV_CONFIG* wifiProvConfig = (SYS_WIFIPROV_CONFIG *) data;
// Provisioning service updated data
SYS_CONSOLE_PRINT("%s:%d Device mode=%d\\r\\n",__func__,__LINE__,wifiProvConfig->mode);
break;
}

case SYS_WIFIPROV_GETCONFIG:
{
SYS_WIFIPROV_CONFIG* wifiProvConfig = (SYS_WIFIPROV_CONFIG *) data;
// client requested get Wi-Fi Configuration
SYS_CONSOLE_PRINT("%s:%d Device mode=%d\\r\\n",__func__,__LINE__,wifiProvConfig->mode);
break;
}
}
}

Remarks

None.