9 #ifndef __ewf_adapter_quectel_bg95__h__included__
10 #define __ewf_adapter_quectel_bg95__h__included__
29 #ifndef EWF_ADAPTER_QUECTEL_BG95_UFS_ENABLED
30 #define EWF_ADAPTER_QUECTEL_BG95_UFS_ENABLED (1)
31 #define EWF_ADAPTER_QUECTEL_COMMON_ENABLED (1)
34 #if !defined(EWF_ADAPTER_QUECTEL_BG95_TLS_ENABLED) && !defined(EWF_ADAPTER_QUECTEL_BG95_TLS_BASIC_ENABLED)
36 #define EWF_ADAPTER_QUECTEL_BG95_TLS_BASIC_ENABLED (1)
37 #define EWF_ADAPTER_QUECTEL_COMMON_TLS_BASIC_ENABLED (1)
38 #define EWF_ADAPTER_QUECTEL_BG95_TLS_ENABLED (0)
39 #define EWF_ADAPTER_QUECTEL_COMMON_TLS_ENABLED (0)
41 #define EWF_ADAPTER_QUECTEL_BG95_TLS_BASIC_ENABLED (0)
42 #define EWF_ADAPTER_QUECTEL_COMMON_TLS_BASIC_ENABLED (0)
43 #define EWF_ADAPTER_QUECTEL_BG95_TLS_ENABLED (1)
44 #define EWF_ADAPTER_QUECTEL_COMMON_TLS_ENABLED (1)
48 #ifndef EWF_ADAPTER_QUECTEL_BG95_TCP_ENABLED
49 #define EWF_ADAPTER_QUECTEL_BG95_TCP_ENABLED (1)
50 #define EWF_ADAPTER_QUECTEL_COMMON_TCP_ENABLED (1)
53 #ifndef EWF_ADAPTER_QUECTEL_BG95_UDP_ENABLED
54 #define EWF_ADAPTER_QUECTEL_BG95_UDP_ENABLED (1)
55 #define EWF_ADAPTER_QUECTEL_COMMON_UDP_ENABLED (1)
58 #if !defined(EWF_ADAPTER_QUECTEL_BG95_MQTT_ENABLED) && !defined(EWF_ADAPTER_QUECTEL_BG95_MQTT_BASIC_ENABLED)
60 #define EWF_ADAPTER_QUECTEL_BG95_MQTT_BASIC_ENABLED (1)
61 #define EWF_ADAPTER_QUECTEL_COMMON_MQTT_BASIC_ENABLED (1)
62 #define EWF_ADAPTER_QUECTEL_BG95_MQTT_ENABLED (0)
63 #define EWF_ADAPTER_QUECTEL_COMMON_MQTT_ENABLED (0)
65 #define EWF_ADAPTER_QUECTEL_BG95_MQTT_BASIC_ENABLED (0)
66 #define EWF_ADAPTER_QUECTEL_COMMON_MQTT_BASIC_ENABLED (0)
67 #define EWF_ADAPTER_QUECTEL_BG95_MQTT_ENABLED (1)
68 #define EWF_ADAPTER_QUECTEL_COMMON_MQTT_ENABLED (1)
73 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_ROOT_CA_CERTIFICATE_FILE_NAME
74 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_ROOT_CA_CERTIFICATE_FILE_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_ROOT_CA_CERTIFICATE_FILE_NAME
78 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_USER_CA_CERTIFICATE_FILE_NAME
79 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_USER_CA_CERTIFICATE_FILE_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_USER_CA_CERTIFICATE_FILE_NAME
87 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_CERTIFICATE_CA_FILE_NAME
88 #define EWF_CONFIG_ADAPTER_RENESAS_COMMON_CA_CERTIFICATE_FILE_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_CA_CERTIFICATE_FILE_NAME
92 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_CERTIFICATE_FILE_NAME
93 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_CLIENT_CERTIFICATE_FILE_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_CERTIFICATE_FILE_NAME
97 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_PRIVATE_KEY_FILE_NAME
98 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_CLIENT_PRIVATE_KEY_FILE_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_PRIVATE_KEY_FILE_NAME
102 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_ROOT_CA_CERTIFICATE_BUFFER_NAME
103 #undef EWF_CONFIG_ADAPTER_QUECTEL_COMMON_ROOT_CA_CERTIFICATE_BUFFER_NAME
104 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_ROOT_CA_CERTIFICATE_BUFFER_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_ROOT_CA_CERTIFICATE_BUFFER_NAME
108 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_USER_CA_CERTIFICATE_BUFFER_NAME
109 #undef EWF_CONFIG_ADAPTER_QUECTEL_COMMON_USER_CA_CERTIFICATE_BUFFER_NAME
110 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_USER_CA_CERTIFICATE_BUFFER_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_USER_CA_CERTIFICATE_BUFFER_NAME
114 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_CERTIFICATE_BUFFER_NAME
115 #undef EWF_CONFIG_ADAPTER_QUECTEL_COMMON_CLIENT_CERTIFICATE_BUFFER_NAME
116 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_CLIENT_CERTIFICATE_BUFFER_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_CERTIFICATE_BUFFER_NAME
120 #ifdef EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_PRIVATE_KEY_BUFFER_NAME
121 #undef EWF_CONFIG_ADAPTER_QUECTEL_COMMON_CLIENT_PRIVATE_KEY_BUFFER_NAME
122 #define EWF_CONFIG_ADAPTER_QUECTEL_COMMON_CLIENT_PRIVATE_KEY_BUFFER_NAME EWF_CONFIG_ADAPTER_QUECTEL_BG95_CLIENT_PRIVATE_KEY_BUFFER_NAME
157 ewf_result ewf_adapter_quectel_bg95_urc_callback(
ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
167 #define ewf_adapter_quectel_bg95_info ewf_adapter_quectel_common_info
168 #define ewf_adapter_quectel_bg95_get_ipv4_address ewf_adapter_quectel_common_get_ipv4_address
169 #define ewf_adapter_quectel_bg95_get_ipv4_netmask ewf_adapter_quectel_common_get_ipv4_netmask
170 #define ewf_adapter_quectel_bg95_get_ipv4_gateway ewf_adapter_quectel_common_get_ipv4_gateway
171 #define ewf_adapter_quectel_bg95_get_ipv4_dns ewf_adapter_quectel_common_get_ipv4_dns
181 #define ewf_adapter_quectel_bg95_context_start ewf_adapter_quectel_common_context_start
182 #define ewf_adapter_quectel_bg95_context_stop ewf_adapter_quectel_common_context_stop
184 #define ewf_adapter_quectel_bg95_context_urc_callback ewf_adapter_quectel_common_context_urc_callback
186 #define ewf_adapter_quectel_bg95_context_activate ewf_adapter_quectel_common_context_activate
187 #define ewf_adapter_quectel_bg95_context_deactivate ewf_adapter_quectel_common_context_deactivate
188 #define ewf_adapter_quectel_bg95_context_configure ewf_adapter_quectel_common_context_configure
189 #define ewf_adapter_quectel_bg95_context_configure_dns ewf_adapter_quectel_common_context_configure_dns
199 #if EWF_ADAPTER_QUECTEL_BG95_UFS_ENABLED
201 #define ewf_adapter_quectel_bg95_ufs_start ewf_adapter_quectel_common_ufs_start
202 #define ewf_adapter_quectel_bg95_ufs_stop ewf_adapter_quectel_common_ufs_stop
204 #define ewf_adapter_quectel_bg95_ufs_urc_callback ewf_adapter_quectel_common_ufs_urc_callback
206 #define ewf_adapter_quectel_bg95_ufs_list ewf_adapter_quectel_common_ufs_list
207 #define ewf_adapter_quectel_bg95_ufs_delete ewf_adapter_quectel_common_ufs_delete
208 #define ewf_adapter_quectel_bg95_ufs_upload ewf_adapter_quectel_common_ufs_upload
220 #if EWF_ADAPTER_QUECTEL_BG95_TLS_BASIC_ENABLED
222 #define ewf_adapter_quectel_bg95_tls_basic_start ewf_adapter_quectel_common_tls_basic_start
223 #define ewf_adapter_quectel_bg95_tls_basic_stop ewf_adapter_quectel_common_tls_basic_stop
225 #define ewf_adapter_quectel_bg95_tls_basic_urc_callback ewf_adapter_quectel_common_tls_basic_urc_callback
227 #define ewf_adapter_quectel_bg95_tls_basic_init ewf_adapter_quectel_common_tls_basic_init
228 #define ewf_adapter_quectel_bg95_tls_basic_clean ewf_adapter_quectel_common_tls_basic_clean
240 #define ewf_adapter_quectel_bg95_internet_start ewf_adapter_quectel_common_internet_start
241 #define ewf_adapter_quectel_bg95_internet_stop ewf_adapter_quectel_common_internet_stop
243 #define ewf_adapter_quectel_bg95_internet_urc_callback ewf_adapter_quectel_common_internet_urc_callback
253 #if EWF_ADAPTER_QUECTEL_BG95_TCP_ENABLED
255 #define ewf_adapter_quectel_bg95_tcp_open ewf_adapter_quectel_common_tcp_open
256 #define ewf_adapter_quectel_bg95_tcp_close ewf_adapter_quectel_common_tcp_close
257 #define ewf_adapter_quectel_bg95_tcp_control ewf_adapter_quectel_common_tcp_control
258 #define ewf_adapter_quectel_bg95_tcp_set_tls_configuration ewf_adapter_quectel_common_tcp_set_tls_configuration
259 #define ewf_adapter_quectel_bg95_tcp_bind ewf_adapter_quectel_common_tcp_bind
260 #define ewf_adapter_quectel_bg95_tcp_listen ewf_adapter_quectel_common_tcp_listen
261 #define ewf_adapter_quectel_bg95_tcp_accept ewf_adapter_quectel_common_tcp_accept
262 #define ewf_adapter_quectel_bg95_tcp_connect ewf_adapter_quectel_common_tcp_connect
263 #define ewf_adapter_quectel_bg95_tcp_shutdown ewf_adapter_quectel_common_tcp_shutdown
264 #define ewf_adapter_quectel_bg95_tcp_send ewf_adapter_quectel_common_tcp_send
265 #define ewf_adapter_quectel_bg95_tcp_receive ewf_adapter_quectel_common_tcp_receive
277 #if EWF_ADAPTER_QUECTEL_BG95_UDP_ENABLED
279 #define ewf_adapter_quectel_bg95_udp_open ewf_adapter_quectel_common_udp_open
280 #define ewf_adapter_quectel_bg95_udp_close ewf_adapter_quectel_common_udp_close
281 #define ewf_adapter_quectel_bg95_udp_control ewf_adapter_quectel_common_udp_control
282 #define ewf_adapter_quectel_bg95_udp_set_dtls_configuration ewf_adapter_quectel_common_udp_set_dtls_configuration
283 #define ewf_adapter_quectel_bg95_udp_bind ewf_adapter_quectel_common_udp_bind
284 #define ewf_adapter_quectel_bg95_udp_send_to ewf_adapter_quectel_common_udp_send_to
285 #define ewf_adapter_quectel_bg95_udp_receive_from ewf_adapter_quectel_common_udp_receive_from
297 #if EWF_ADAPTER_QUECTEL_BG95_MQTT_ENABLED
302 ewf_result ewf_adapter_quectel_bg95_mqtt_urc_callback(
ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
314 #if EWF_ADAPTER_QUECTEL_BG95_MQTT_BASIC_ENABLED
316 #define ewf_adapter_quectel_bg95_mqtt_basic_start ewf_adapter_quectel_common_mqtt_basic_start
317 #define ewf_adapter_quectel_bg95_mqtt_basic_stop ewf_adapter_quectel_common_mqtt_basic_stop
319 #define ewf_adapter_quectel_bg95_mqtt_basic_urc_callback ewf_adapter_quectel_common_mqtt_basic_urc_callback
321 #define ewf_adapter_quectel_bg95_mqtt_basic_default_state_callback ewf_adapter_quectel_common_mqtt_basic_default_state_callback
322 #define ewf_adapter_quectel_bg95_mqtt_basic_default_message_callback ewf_adapter_quectel_common_mqtt_basic_default_message_callback
324 #define ewf_adapter_quectel_bg95_mqtt_basic_connect ewf_adapter_quectel_common_mqtt_basic_connect
325 #define ewf_adapter_quectel_bg95_mqtt_basic_disconnect ewf_adapter_quectel_common_mqtt_basic_disconnect
326 #define ewf_adapter_quectel_bg95_mqtt_basic_subscribe ewf_adapter_quectel_common_mqtt_basic_subscribe
327 #define ewf_adapter_quectel_bg95_mqtt_basic_unsubscribe ewf_adapter_quectel_common_mqtt_basic_unsubscribe
328 #define ewf_adapter_quectel_bg95_mqtt_basic_publish ewf_adapter_quectel_common_mqtt_basic_publish
362 #ifdef EWF_PARAMETER_CHECKING
363 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_HEADER(adapter_ptr) \
365 (adapter_ptr)->struct_magic = EWF_ADAPTER_STRUCT_MAGIC; \
366 (adapter_ptr)->struct_size = EWF_ADAPTER_STRUCT_SIZE; \
367 (adapter_ptr)->struct_version = EWF_ADAPTER_VERSION; \
368 (adapter_ptr)->struct_type = EWF_ADAPTER_TYPE_QUECTEL_BG95; \
371 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_HEADER(adapter_ptr)
374 #if EWF_ADAPTER_QUECTEL_BG95_TCP_ENABLED
375 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_TCP_API(adapter_ptr) \
377 adapter_ptr->tcp_api_ptr = &ewf_adapter_quectel_common_api_tcp; \
380 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_TCP_API(adapter_ptr)
383 #if EWF_ADAPTER_QUECTEL_BG95_UDP_ENABLED
384 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_UDP_API(adapter_ptr) \
386 adapter_ptr->udp_api_ptr = &ewf_adapter_quectel_common_api_udp; \
389 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_UDP_API(adapter_ptr)
392 #if EWF_ADAPTER_QUECTEL_BG95_TLS_BASIC_ENABLED
393 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_TLS_BASIC_API(adapter_ptr) \
395 adapter_ptr->tls_basic_api_ptr = &ewf_adapter_quectel_common_api_tls_basic; \
398 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_TLS_BASIC_API(adapter_ptr)
401 #if EWF_ADAPTER_QUECTEL_BG95_MQTT_BASIC_ENABLED
402 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_MQTT_BASIC_API(adapter_ptr) \
404 adapter_ptr->mqtt_basic_api_ptr = &ewf_adapter_quectel_common_api_mqtt_basic; \
407 #define EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_MQTT_BASIC_API(adapter_ptr)
418 #define EWF_ADAPTER_QUECTEL_BG95_STATIC_DECLARE(adapter_ptr, adapter_name_symb, message_allocator_ptr_param, data_allocator_ptr_param, interface_ptr_param) \
420 static ewf_adapter_quectel_bg95 ewf_adapter_quectel_bg95__implementation__##adapter_name_symb = {0}; \
421 static ewf_adapter ewf_adapter_quectel_bg95__##adapter_name_symb = {0}; \
422 interface_ptr_param->message_allocator_ptr = message_allocator_ptr_param; \
423 interface_ptr_param->data_allocator_ptr = data_allocator_ptr_param; \
424 interface_ptr_param->urc_callback = ewf_adapter_quectel_bg95_urc_callback; \
425 ewf_adapter_quectel_bg95__##adapter_name_symb.interface_ptr = interface_ptr_param; \
426 ewf_adapter_quectel_bg95__##adapter_name_symb.implementation_ptr = &(ewf_adapter_quectel_bg95__implementation__##adapter_name_symb); \
427 adapter_ptr = &(ewf_adapter_quectel_bg95__##adapter_name_symb); \
428 interface_ptr_param->adapter_ptr = adapter_ptr; \
429 EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_HEADER(adapter_ptr); \
430 ewf_adapter_quectel_bg95__##adapter_name_symb.control_api_ptr = &ewf_adapter_quectel_bg95_api_control; \
431 ewf_adapter_quectel_bg95__##adapter_name_symb.info_api_ptr = &ewf_adapter_quectel_common_api_info; \
432 EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_TCP_API(adapter_ptr); \
433 EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_UDP_API(adapter_ptr); \
434 EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_TLS_BASIC_API(adapter_ptr); \
435 EWF_ADAPTER_QUECTEL_BG95_INITIALIZE_MQTT_BASIC_API(adapter_ptr); \
The Embedded Wireless Framework adapter API implementation.
The Embedded Wireless Framework modem adapter API.
The Embedded Wireless Framework generic Quectel adapter functionality.
The Embedded Wireless Framework host interface API.
struct _ewf_adapter_quectel_bg95 ewf_adapter_quectel_bg95
The Quectel BG95 adapter data structure.
enum _ewf_result ewf_result
Success and error result codes specific to the EWF API.
The adapter control API type.
Definition: ewf_adapter_api_control.h:28
The Quectel BG95 adapter data structure.
Definition: ewf_adapter_quectel_bg95.h:348
ewf_adapter_quectel_common common_implementation_data
Definition: ewf_adapter_quectel_bg95.h:350
The Quectel common adapter data structure.
Definition: ewf_adapter_quectel_common.h:187
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
The interface structure definition.
Definition: ewf_interface.h:66