WL865E4-P  36.07.001
m2mb_app_framework.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
24 #ifndef __M2MB_APP_FRAMEWORK_H
25 #define __M2MB_APP_FRAMEWORK_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
55 /*-----------------------------------------------------------------------------------------------*/
56 
63 /* Global typedefs ==============================================================================*/
64 
65 #define M2MB_AF_MAX_USER_THREAD_SUPPORTED 10
66 #define TEST_START "\r\nEXAMPLE APPLICATION TEST START\r\n"
67 #define TEST_COMPLETE "\r\nEXAMPLE APPLICATION TEST COMPLETE\r\n"
68 #define TEST_COMPLETE_COUNT 5
69 
77 typedef enum M2MB_AF_NWK_EVENT
78 {
90 typedef enum M2MB_AF_DRV_TYPE
91 {
95 
96 
107 typedef VOID (*M2MB_AF_INIT_CB_T)( VOID *user_ctx,
108  M2MB_PROFILE_EVENT_T event, M2MB_STATUS_T status, void* pData);
109 
121 typedef VOID (*M2MB_AF_DRV_RD_CB_T)( VOID *user_ctx, M2MB_AF_DRV_TYPE_E module_type,
122  void* pData, UINT32 len);
123 
131 typedef struct M2MB_AF_NWK_DATA_RECV
132 {
137 
147 typedef VOID (*M2MB_AF_NWK_EV_CB_T)( VOID *user_ctx, UINT32 sd,
148  M2MB_AF_NWK_EVENT_E ev, VOID* pData );
149 
159 typedef struct M2MB_AF_APP_THREAD_S
160 {
166 
174 typedef VOID (*M2MB_AF_THREAD_PROCESS_T)( VOID *user_ctx,
175  M2MB_AF_APP_THREAD_T *pTCtx, VOID* pMsg );
176 
185 {
204 
213 {
217 
218 
226 typedef struct M2MB_AF_USER_CFG_S
227 {
234 
235 /* Global functions =============================================================================*/
236 /*---------------------------------------------------------------------------*/
291 /*---------------------------------------------------------------------------*/
293 
294 /*---------------------------------------------------------------------------*/
322 /*---------------------------------------------------------------------------*/
323 
325 /*---------------------------------------------------------------------------*/
356 /*---------------------------------------------------------------------------*/
357 
359 
360 
361 /*---------------------------------------------------------------------------*/
450 /*---------------------------------------------------------------------------*/
451 INT32 m2mb_af_start( M2MB_AF_USER_CFG_T *pApp_cfg, const M2MB_SYSTEM_CFG_T *pSystem_cfg );
452 
456 /*-----------------------------------------------------------------------------------------------*/
457 
458 
459 #ifdef __cplusplus
460 }
461 #endif
462 #endif /* __M2MB_APP_FRAMEWORK_H */
unsigned char UINT8
Definition: m2mb_types.h:83
Application framework user thread system configuration.
enum M2MB_AF_NWK_EVENT M2MB_AF_NWK_EVENT_E
Application framework network event.
struct M2MB_AF_USER_CFG_S M2MB_AF_USER_CFG_T
Application framework User configuration detail structure.
struct M2M_AF_USER_THREAD_DETAILS_S M2M_AF_USER_THREAD_DETAILS_T
Application framework thread details structure.
M2MB_OS_TASK_HANDLE thrHandle
M2MB_AF_NWK_EV_CB_T nwk_cb
M2MB_AF_DRV_RD_CB_T drv_rd
INT32 M2MB_STATUS_T
Definition: m2mb_status.h:95
M2MB_SOCKET_BSD_SOCKADDR_IN_T * from
HANDLE M2MB_OS_TASK_HANDLE
Definition: m2mb_os.h:96
INT32 m2mb_af_start(M2MB_AF_USER_CFG_T *pApp_cfg, const M2MB_SYSTEM_CFG_T *pSystem_cfg)
m2mb_af_start is called to start the application framework.
M2MB_AF_DRV_TYPE
Application framework driver type.
VOID(* M2MB_AF_INIT_CB_T)(VOID *user_ctx, M2MB_PROFILE_EVENT_T event, M2MB_STATUS_T status, void *pData)
Application framework user init callback function prototype.
M2MB_OS_Q_HANDLE pQHandle
VOID m2mb_af_dbg_print(M2MB_SYSTEM_CFG_T *pSystemCfg)
m2mb_af_dbg_print is called to print the Access point SSID and channel information based on WLAN runn...
INT32 m2mb_af_udp_soc_init(M2MB_UDP_CFG_T *udp_cfg)
m2mb_af_udp_soc_init is called to initialize UDP socket creation.
M2MB_AF_THREAD_PROCESS_T process_api
VOID(* M2MB_AF_DRV_RD_CB_T)(VOID *user_ctx, M2MB_AF_DRV_TYPE_E module_type, void *pData, UINT32 len)
Application framework Driver read callback function prototype.
unsigned long int UINT32
Definition: m2mb_types.h:85
enum M2MB_PROFILE_EVENT M2MB_PROFILE_EVENT_T
Profile event enumeration.
Application framework Network data receive structure.
VOID(* M2MB_AF_NWK_EV_CB_T)(VOID *user_ctx, UINT32 sd, M2MB_AF_NWK_EVENT_E ev, VOID *pData)
Application framework Network event callback function prototype.
M2MB_AF_NWK_EVENT
Application framework network event.
TCP cfg structure.
Definition: m2mb_profile.h:599
VOID(* M2MB_AF_THREAD_PROCESS_T)(VOID *user_ctx, M2MB_AF_APP_THREAD_T *pTCtx, VOID *pMsg)
Application framework thread message processing function prototype.
UDP cfg structure.
Definition: m2mb_profile.h:548
void VOID
Definition: m2mb_types.h:72
M2M_AF_USER_THREAD_CFG_T thread
signed int INT32
Definition: m2mb_types.h:80
enum M2MB_AF_DRV_TYPE M2MB_AF_DRV_TYPE_E
Application framework driver type.
struct M2MB_AF_NWK_DATA_RECV M2MB_AF_NWK_DATA_RECV_T
Application framework Network data receive structure.
System cfg structure.
Definition: m2mb_profile.h:877
M2MB_AF_INIT_CB_T init
M2M_AF_USER_THREAD_DETAILS_T cfg[1]
Application framework thread details structure.
HANDLE M2MB_OS_Q_HANDLE
Definition: m2mb_os_q.h:77
struct M2MB_AF_APP_THREAD_S M2MB_AF_APP_THREAD_T
APP thread information.
Application framework User configuration detail structure.
APP thread information.
struct M2M_AF_USER_THREAD_CFG_S M2M_AF_USER_THREAD_CFG_T
Application framework user thread system configuration.
INT32 m2mb_af_tcp_soc_init(M2MB_T_CFG_T *tcp_cfg)
m2mb_af_tcp_soc_init is called to initialize TCP socket creation.