9 #ifndef __ewf_adapter_simcom_sim7000__h__included__
10 #define __ewf_adapter_simcom_sim7000__h__included__
28 #define EWF_ADAPTER_SIMCOM_SIM7000_TLS_BASIC_ENABLED (0)
29 #define EWF_ADAPTER_SIMCOM_SIM7000_TCP_ENABLED (0)
30 #define EWF_ADAPTER_SIMCOM_SIM7000_UDP_ENABLED (0)
31 #define EWF_ADAPTER_SIMCOM_SIM7000_MQTT_BASIC_ENABLED (0)
33 #if !defined(EWF_ADAPTER_SIMCOM_SIM7000_TLS_ENABLED) && !defined(EWF_ADAPTER_SIMCOM_SIM7000_TLS_BASIC_ENABLED)
35 #define EWF_ADAPTER_SIMCOM_SIM7000_TLS_BASIC_ENABLED (1)
36 #define EWF_ADAPTER_SIMCOM_SIM7000_TLS_ENABLED (0)
38 #define EWF_ADAPTER_SIMCOM_SIM7000_TLS_BASIC_ENABLED (0)
39 #define EWF_ADAPTER_SIMCOM_SIM7000_TLS_ENABLED (1)
43 #ifndef EWF_ADAPTER_SIMCOM_SIM7000_TCP_ENABLED
44 #define EWF_ADAPTER_SIMCOM_SIM7000_TCP_ENABLED (1)
47 #ifndef EWF_ADAPTER_SIMCOM_SIM7000_UDP_ENABLED
48 #define EWF_ADAPTER_SIMCOM_SIM7000_UDP_ENABLED (1)
51 #if !defined(EWF_ADAPTER_SIMCOM_SIM7000_MQTT_ENABLED) && !defined(EWF_ADAPTER_SIMCOM_SIM7000_MQTT_BASIC_ENABLED)
53 #define EWF_ADAPTER_SIMCOM_SIM7000_MQTT_BASIC_ENABLED (1)
54 #define EWF_ADAPTER_SIMCOM_SIM7000_MQTT_ENABLED (0)
56 #define EWF_ADAPTER_SIMCOM_SIM7000_MQTT_BASIC_ENABLED (0)
57 #define EWF_ADAPTER_SIMCOM_SIM7000_MQTT_ENABLED (1)
92 ewf_result ewf_adapter_simcom_sim7000_urc_callback(
ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
103 #define ewf_adapter_simcom_sim7000_info ewf_adapter_simcom_common_info
104 #define ewf_adapter_simcom_sim7000_get_ipv4_address ewf_adapter_simcom_common_get_ipv4_address
105 #define ewf_adapter_simcom_sim7000_get_ipv4_netmask ewf_adapter_simcom_common_get_ipv4_netmask
106 #define ewf_adapter_simcom_sim7000_get_ipv4_gateway ewf_adapter_simcom_common_get_ipv4_gateway
107 #define ewf_adapter_simcom_sim7000_get_ipv4_dns ewf_adapter_simcom_common_get_ipv4_dns
140 #ifdef EWF_PARAMETER_CHECKING
141 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_HEADER(adapter_ptr) \
143 (adapter_ptr)->struct_magic = EWF_ADAPTER_STRUCT_MAGIC; \
144 (adapter_ptr)->struct_size = EWF_ADAPTER_STRUCT_SIZE; \
145 (adapter_ptr)->struct_version = EWF_ADAPTER_VERSION; \
146 (adapter_ptr)->struct_type = EWF_ADAPTER_TYPE_SIMCOM_SIM7000; \
149 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_HEADER(adapter_ptr)
152 #if EWF_ADAPTER_SIMCOM_SIM7000_TCP_ENABLED
153 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_TCP_API(adapter_ptr) \
155 adapter_ptr->tcp_api_ptr = &ewf_adapter_simcom_common_api_tcp; \
158 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_TCP_API(adapter_ptr)
161 #if EWF_ADAPTER_SIMCOM_SIM7000_UDP_ENABLED
162 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_UDP_API(adapter_ptr) \
164 adapter_ptr->udp_api_ptr = &ewf_adapter_simcom_common_api_udp; \
167 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_UDP_API(adapter_ptr)
170 #if EWF_ADAPTER_SIMCOM_SIM7000_TLS_BASIC_ENABLED
171 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_TLS_BASIC_API(adapter_ptr) \
173 adapter_ptr->tls_basic_api_ptr = &ewf_adapter_simcom_common_api_tls_basic; \
176 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_TLS_BASIC_API(adapter_ptr)
179 #if EWF_ADAPTER_SIMCOM_SIM7000_MQTT_BASIC_ENABLED
180 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_MQTT_BASIC_API(adapter_ptr) \
182 adapter_ptr->mqtt_basic_api_ptr = &ewf_adapter_simcom_common_api_mqtt_basic; \
185 #define EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_MQTT_BASIC_API(adapter_ptr)
196 #define EWF_ADAPTER_SIMCOM_SIM7000_STATIC_DECLARE(adapter_ptr, adapter_name_symb, message_allocator_ptr_param, data_allocator_ptr_param, interface_ptr_param) \
198 static ewf_adapter_simcom_sim7000 ewf_adapter_simcom_sim7000__implementation__##adapter_name_symb = {0}; \
199 static ewf_adapter ewf_adapter_simcom_sim7000__##adapter_name_symb = {0}; \
200 interface_ptr_param->message_allocator_ptr = message_allocator_ptr_param; \
201 interface_ptr_param->data_allocator_ptr = data_allocator_ptr_param; \
202 interface_ptr_param->urc_callback = ewf_adapter_simcom_sim7000_urc_callback; \
203 ewf_adapter_simcom_sim7000__##adapter_name_symb.interface_ptr = interface_ptr_param; \
204 ewf_adapter_simcom_sim7000__##adapter_name_symb.implementation_ptr = &(ewf_adapter_simcom_sim7000__implementation__##adapter_name_symb); \
205 adapter_ptr = &(ewf_adapter_simcom_sim7000__##adapter_name_symb); \
206 interface_ptr_param->adapter_ptr = adapter_ptr; \
207 EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_HEADER(adapter_ptr); \
208 ewf_adapter_simcom_sim7000__##adapter_name_symb.control_api_ptr = &ewf_adapter_simcom_sim7000_api_control; \
209 ewf_adapter_simcom_sim7000__##adapter_name_symb.info_api_ptr = &ewf_adapter_simcom_common_api_info; \
210 EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_TCP_API(adapter_ptr); \
211 EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_UDP_API(adapter_ptr); \
212 EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_TLS_BASIC_API(adapter_ptr); \
213 EWF_ADAPTER_SIMCOM_SIM7000_INITIALIZE_MQTT_BASIC_API(adapter_ptr); \
The Embedded Wireless Framework adapter API implementation.
The Embedded Wireless Framework modem adapter API.
The Embedded Wireless Framework SIMCom common adapter API.
The Embedded Wireless Framework host interface API.
struct _ewf_adapter_simcom_sim7000 ewf_adapter_simcom_sim7000
The SIMCom SIM7000 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 SIMCom common adapter data structure.
Definition: ewf_adapter_simcom_common.h:33
The SIMCom SIM7000 adapter data structure.
Definition: ewf_adapter_simcom_sim7000.h:126
ewf_adapter_simcom_common common_implementation_data
Definition: ewf_adapter_simcom_sim7000.h:128
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
The interface structure definition.
Definition: ewf_interface.h:66