9 #ifndef __ewf_adapter_simcom_sim900__h__included__
10 #define __ewf_adapter_simcom_sim900__h__included__
28 #define EWF_ADAPTER_SIMCOM_SIM900_TLS_BASIC_ENABLED (0)
29 #define EWF_ADAPTER_SIMCOM_SIM900_TCP_ENABLED (0)
30 #define EWF_ADAPTER_SIMCOM_SIM900_UDP_ENABLED (0)
31 #define EWF_ADAPTER_SIMCOM_SIM900_MQTT_BASIC_ENABLED (0)
33 #if !defined(EWF_ADAPTER_SIMCOM_SIM900_TLS_ENABLED) && !defined(EWF_ADAPTER_SIMCOM_SIM900_TLS_BASIC_ENABLED)
35 #define EWF_ADAPTER_SIMCOM_SIM900_TLS_BASIC_ENABLED (1)
36 #define EWF_ADAPTER_SIMCOM_SIM900_TLS_ENABLED (0)
38 #define EWF_ADAPTER_SIMCOM_SIM900_TLS_BASIC_ENABLED (0)
39 #define EWF_ADAPTER_SIMCOM_SIM900_TLS_ENABLED (1)
43 #ifndef EWF_ADAPTER_SIMCOM_SIM900_TCP_ENABLED
44 #define EWF_ADAPTER_SIMCOM_SIM900_TCP_ENABLED (1)
47 #ifndef EWF_ADAPTER_SIMCOM_SIM900_UDP_ENABLED
48 #define EWF_ADAPTER_SIMCOM_SIM900_UDP_ENABLED (1)
51 #if !defined(EWF_ADAPTER_SIMCOM_SIM900_MQTT_ENABLED) && !defined(EWF_ADAPTER_SIMCOM_SIM900_MQTT_BASIC_ENABLED)
53 #define EWF_ADAPTER_SIMCOM_SIM900_MQTT_BASIC_ENABLED (1)
54 #define EWF_ADAPTER_SIMCOM_SIM900_MQTT_ENABLED (0)
56 #define EWF_ADAPTER_SIMCOM_SIM900_MQTT_BASIC_ENABLED (0)
57 #define EWF_ADAPTER_SIMCOM_SIM900_MQTT_ENABLED (1)
92 ewf_result ewf_adapter_simcom_sim900_urc_callback(
ewf_interface* interface_ptr, uint8_t* buffer_ptr, uint32_t buffer_length);
102 #define ewf_adapter_simcom_sim900_info ewf_adapter_simcom_common_info
103 #define ewf_adapter_simcom_sim900_get_ipv4_address ewf_adapter_simcom_common_get_ipv4_address
104 #define ewf_adapter_simcom_sim900_get_ipv4_netmask ewf_adapter_simcom_common_get_ipv4_netmask
105 #define ewf_adapter_simcom_sim900_get_ipv4_gateway ewf_adapter_simcom_common_get_ipv4_gateway
106 #define ewf_adapter_simcom_sim900_get_ipv4_dns ewf_adapter_simcom_common_get_ipv4_dns
138 #ifdef EWF_PARAMETER_CHECKING
139 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_HEADER(adapter_ptr) \
141 (adapter_ptr)->struct_magic = EWF_ADAPTER_STRUCT_MAGIC; \
142 (adapter_ptr)->struct_size = EWF_ADAPTER_STRUCT_SIZE; \
143 (adapter_ptr)->struct_version = EWF_ADAPTER_VERSION; \
144 (adapter_ptr)->struct_type = EWF_ADAPTER_TYPE_SIMCOM_SIM900; \
147 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_HEADER(adapter_ptr)
150 #if EWF_ADAPTER_SIMCOM_SIM900_TCP_ENABLED
151 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_TCP_API(adapter_ptr) \
153 adapter_ptr->tcp_api_ptr = &ewf_adapter_simcom_common_api_tcp; \
156 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_TCP_API(adapter_ptr)
159 #if EWF_ADAPTER_SIMCOM_SIM900_UDP_ENABLED
160 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_UDP_API(adapter_ptr) \
162 adapter_ptr->udp_api_ptr = &ewf_adapter_simcom_common_api_udp; \
165 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_UDP_API(adapter_ptr)
168 #if EWF_ADAPTER_SIMCOM_SIM900_TLS_BASIC_ENABLED
169 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_TLS_BASIC_API(adapter_ptr) \
171 adapter_ptr->tls_basic_api_ptr = &ewf_adapter_simcom_common_api_tls_basic; \
174 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_TLS_BASIC_API(adapter_ptr)
177 #if EWF_ADAPTER_SIMCOM_SIM900_MQTT_BASIC_ENABLED
178 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_MQTT_BASIC_API(adapter_ptr) \
180 adapter_ptr->mqtt_basic_api_ptr = &ewf_adapter_simcom_common_api_mqtt_basic; \
183 #define EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_MQTT_BASIC_API(adapter_ptr)
194 #define EWF_ADAPTER_SIMCOM_SIM900_STATIC_DECLARE(adapter_ptr, adapter_name_symb, message_allocator_ptr_param, data_allocator_ptr_param, interface_ptr_param) \
196 static ewf_adapter_simcom_sim900 ewf_adapter_simcom_sim900__implementation__##adapter_name_symb = {0}; \
197 static ewf_adapter ewf_adapter_simcom_sim900__##adapter_name_symb = {0}; \
198 interface_ptr_param->message_allocator_ptr = message_allocator_ptr_param; \
199 interface_ptr_param->data_allocator_ptr = data_allocator_ptr_param; \
200 interface_ptr_param->urc_callback = ewf_adapter_simcom_sim900_urc_callback; \
201 ewf_adapter_simcom_sim900__##adapter_name_symb.interface_ptr = interface_ptr_param; \
202 ewf_adapter_simcom_sim900__##adapter_name_symb.implementation_ptr = &(ewf_adapter_simcom_sim900__implementation__##adapter_name_symb); \
203 adapter_ptr = &(ewf_adapter_simcom_sim900__##adapter_name_symb); \
204 interface_ptr_param->adapter_ptr = adapter_ptr; \
205 EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_HEADER(adapter_ptr); \
206 ewf_adapter_simcom_sim900__##adapter_name_symb.control_api_ptr = &ewf_adapter_simcom_sim900_api_control; \
207 ewf_adapter_simcom_sim900__##adapter_name_symb.info_api_ptr = &ewf_adapter_simcom_common_api_info; \
208 EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_TCP_API(adapter_ptr); \
209 EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_UDP_API(adapter_ptr); \
210 EWF_ADAPTER_SIMCOM_SIM900_INITIALIZE_TLS_BASIC_API(adapter_ptr); \
211 EWF_ADAPTER_SIMCOM_SIM900_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_sim900 ewf_adapter_simcom_sim900
The SIMCom SIM900 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 SIM900 adapter data structure.
Definition: ewf_adapter_simcom_sim900.h:124
ewf_adapter_simcom_common common_implementation_data
Definition: ewf_adapter_simcom_sim900.h:126
The EWF network adapter control structure definition.
Definition: ewf_adapter.h:50
The interface structure definition.
Definition: ewf_interface.h:66