mirror of https://github.com/ARMmbed/mbed-os.git
Update dependencies and remove compiler warnings
-Updated dependencies -Removed compiler warningspull/3240/head
parent
1b5c9d1a8d
commit
686fc7dea5
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
static int8_t coap_service_tasklet = -1;
|
static int8_t coap_service_tasklet = -1;
|
||||||
|
|
||||||
|
static int8_t coap_server_service_tasklet_generated(void);
|
||||||
void coap_server_service_tasklet(arm_event_s * event);
|
void coap_server_service_tasklet(arm_event_s * event);
|
||||||
|
|
||||||
int8_t coap_server_start(void)
|
int8_t coap_server_start(void)
|
||||||
|
|
10
module.json
10
module.json
|
@ -19,10 +19,10 @@
|
||||||
"source/include"
|
"source/include"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nanostack-libservice": "~3.0.0",
|
"nanostack-libservice": "^3.0.0",
|
||||||
"mbed-client-c": "~0.1.6",
|
"mbed-client-c": "^1.1.0",
|
||||||
"sal-stack-nanostack-eventloop": "~0.0.8",
|
"sal-stack-nanostack-eventloop": "^1.0.0",
|
||||||
"sal-stack-nanostack": "^2.1.0"
|
"sal-stack-nanostack": "^3.0.0"
|
||||||
},
|
},
|
||||||
"targetDependencies": {}
|
"targetDependencies": {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
//typedef struct sn_coap_hdr_s sn_coap_hdr_s;
|
//typedef struct sn_coap_hdr_s sn_coap_hdr_s;
|
||||||
|
|
||||||
|
static coap_service_session_t *coap_service_find_by_service(int8_t service_id);
|
||||||
|
|
||||||
/* Coap service class handlers*/
|
/* Coap service class handlers*/
|
||||||
|
|
||||||
void coap_server_delete_session(int8_t service_id)
|
void coap_server_delete_session(int8_t service_id)
|
||||||
|
@ -43,27 +45,9 @@ void coap_server_delete_session(int8_t service_id)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static coap_service_session_t *coap_service_search_from_list(int8_t interface_id)
|
|
||||||
{
|
|
||||||
coap_service_session_t *this = NULL;
|
|
||||||
|
|
||||||
/*
|
|
||||||
ns_list_foreach(coap_service_session_t,cur_ptr, &instance_list)
|
|
||||||
{
|
|
||||||
if(cur_ptr->interface_id == interface_id)
|
|
||||||
{
|
|
||||||
this = cur_ptr;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static coap_service_session_t *coap_service_find_by_service(int8_t service_id)
|
static coap_service_session_t *coap_service_find_by_service(int8_t service_id)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
coap_service_session_t *this = NULL;
|
coap_service_session_t *this = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -90,6 +74,8 @@ static coap_service_session_t *coap_service_find_by_service(int8_t service_id)
|
||||||
*/
|
*/
|
||||||
int8_t coap_server_service_init(int8_t interface_id, uint16_t listen_port, uint8_t service_options)
|
int8_t coap_server_service_init(int8_t interface_id, uint16_t listen_port, uint8_t service_options)
|
||||||
{
|
{
|
||||||
|
(void)listen_port;
|
||||||
|
(void)service_options;
|
||||||
int retVal = -1;
|
int retVal = -1;
|
||||||
int8_t socketInstance;
|
int8_t socketInstance;
|
||||||
|
|
||||||
|
|
|
@ -41,80 +41,137 @@ int8_t coap_service_initialize(int8_t interface_id, uint16_t listen_port, uint8_
|
||||||
|
|
||||||
int8_t coap_service_register_uri(int8_t service_id, const char *uri, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb)
|
int8_t coap_service_register_uri(int8_t service_id, const char *uri, uint8_t allowed_method, coap_service_request_recv_cb *request_recv_cb)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)uri;
|
||||||
|
(void)allowed_method;
|
||||||
|
(void)request_recv_cb;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t coap_service_unregister_uri(int8_t service_id, const char *uri)
|
int8_t coap_service_unregister_uri(int8_t service_id, const char *uri)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)uri;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t coap_service_send(int8_t service_id, uint8_t options, const uint8_t addr[static 16], uint16_t destination_port, sn_coap_hdr_s *request_ptr, coap_service_response_recv *request_response_cb)
|
uint16_t coap_service_send(int8_t service_id, uint8_t options, const uint8_t addr[static 16], uint16_t destination_port, sn_coap_hdr_s *request_ptr, coap_service_response_recv *request_ptr2)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)options;
|
||||||
|
(void)destination_port;
|
||||||
|
(void)addr;
|
||||||
|
(void)request_ptr;
|
||||||
|
(void)request_ptr2;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void coap_service_delete( int8_t service_id )
|
void coap_service_delete( int8_t service_id )
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
int requst_recv_cb(int8_t service_id, uint8_t source_address[static 16], uint16_t source_port, sn_coap_hdr_s *request_ptr)
|
int requst_recv_cb(int8_t service_id, uint8_t source_address[static 16], uint16_t source_port, sn_coap_hdr_s *request_ptr)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)source_address;
|
||||||
|
(void)source_port;
|
||||||
|
(void)request_ptr;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int security_start_ptr(int8_t service_id, uint8_t EUI64[static 8])
|
int security_start_ptr(int8_t service_id, uint8_t EUI64[static 8])
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)EUI64;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int security_done_cb(int8_t service_id, uint8_t EUI64[static 8], uint8_t keyblock[static 40])
|
int security_done_cb(int8_t service_id, uint8_t EUI64[static 8], uint8_t keyblock[static 40])
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)EUI64;
|
||||||
|
(void)keyblock;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int coap_service_security_key_set(int8_t service_id, uint8_t EUI64[static 8], uint8_t *PSKd_ptr, uint8_t PSKd_len)
|
int coap_service_security_key_set(int8_t service_id, uint8_t EUI64[static 8], uint8_t *PSKd_ptr, uint8_t PSKd_len)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)EUI64;
|
||||||
|
(void)PSKd_ptr;
|
||||||
|
(void)PSKd_len;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int requst_response_cb(uint16_t msg_id, sn_coap_hdr_s *response_ptr)
|
int requst_response_cb(uint16_t msg_id, sn_coap_hdr_s *response_ptr)
|
||||||
{
|
{
|
||||||
|
(void)msg_id;
|
||||||
|
(void)response_ptr;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int virtual_socket_send(int8_t service_id, uint8_t destination_addr_ptr[static 16], uint16_t port, uint8_t *data_ptr, uint16_t data_len)
|
int virtual_socket_send(int8_t service_id, uint8_t destination_addr_ptr[static 16], uint16_t port, uint8_t *data_ptr, uint16_t data_len)
|
||||||
{
|
{
|
||||||
return -1;
|
(void)service_id;
|
||||||
|
(void)destination_addr_ptr;
|
||||||
|
(void)port;
|
||||||
|
(void)data_ptr;
|
||||||
|
(void)data_len;
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t coap_service_virtual_socket_recv(int8_t service_id, uint8_t source_addr_ptr[static 16], uint16_t port, uint8_t *data_ptr, uint16_t data_len)
|
int16_t coap_service_virtual_socket_recv(int8_t service_id, uint8_t source_addr_ptr[static 16], uint16_t port, uint8_t *data_ptr, uint16_t data_len)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)source_addr_ptr;
|
||||||
|
(void)port;
|
||||||
|
(void)data_ptr;
|
||||||
|
(void)data_len;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t coap_service_virtual_socket_set_cb(int8_t service_id, coap_service_virtual_socket_send_cb *virtual_socket_send)
|
int16_t coap_service_virtual_socket_set_cb(int8_t service_id, coap_service_virtual_socket_send_cb *virtual_socket_send)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)virtual_socket_send;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t coap_service_register_uri_secure_cb_set(int8_t service_id, coap_service_security_start_cb *security_start_ptr, coap_service_security_done_cb *security_done_cb)
|
int8_t coap_service_register_uri_secure_cb_set(int8_t service_id, coap_service_security_start_cb *security_start_ptr, coap_service_security_done_cb *security_done_cb)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)security_start_ptr;
|
||||||
|
(void)security_done_cb;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t coap_service_request_send(int8_t service_id, uint8_t options, const uint8_t destination_addr[static 16], uint16_t destination_port, uint8_t msg_type, uint8_t msg_code, const char *uri,
|
uint16_t coap_service_request_send(int8_t service_id, uint8_t options, const uint8_t destination_addr[static 16], uint16_t destination_port, uint8_t msg_type, uint8_t msg_code, const char *uri,
|
||||||
uint8_t cont_type, const uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb)
|
uint8_t cont_type, const uint8_t *payload_ptr, uint16_t payload_len, coap_service_response_recv *request_response_cb)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)options;
|
||||||
|
(void)destination_addr;
|
||||||
|
(void)destination_port;
|
||||||
|
(void)msg_type;
|
||||||
|
(void)msg_code;
|
||||||
|
(void)uri;
|
||||||
|
(void)cont_type;
|
||||||
|
(void)payload_ptr;
|
||||||
|
(void)payload_len;
|
||||||
|
(void)request_response_cb;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t coap_service_response_send(int8_t service_id, uint8_t options, sn_coap_hdr_s *request_ptr, sn_coap_msg_code_e message_code, int32_t content_type, const uint8_t *payload_ptr,uint16_t payload_len)
|
int8_t coap_service_response_send(int8_t service_id, uint8_t options, sn_coap_hdr_s *request_ptr, sn_coap_msg_code_e message_code, int32_t content_type, const uint8_t *payload_ptr,uint16_t payload_len)
|
||||||
{
|
{
|
||||||
|
(void)service_id;
|
||||||
|
(void)options;
|
||||||
|
(void)request_ptr;
|
||||||
|
(void)message_code;
|
||||||
|
(void)content_type;
|
||||||
|
(void)payload_ptr;
|
||||||
|
(void)payload_len;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,9 +49,4 @@ void coap_server_delete_session(int8_t service_id);
|
||||||
|
|
||||||
int8_t coap_server_service_init(int8_t interface_id, uint16_t listen_port, uint8_t service_options);
|
int8_t coap_server_service_init(int8_t interface_id, uint16_t listen_port, uint8_t service_options);
|
||||||
|
|
||||||
coap_service_session_t *coap_service_search_from_list(int8_t interface_id);
|
|
||||||
|
|
||||||
coap_service_session_t *coap_service_find_by_service(int8_t service_id);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* COAP_SERVER_H_ */
|
#endif /* COAP_SERVER_H_ */
|
||||||
|
|
|
@ -34,8 +34,6 @@ void *memory_allocation(uint16_t size);
|
||||||
|
|
||||||
void memory_free(void* ptr);
|
void memory_free(void* ptr);
|
||||||
|
|
||||||
static int8_t coap_server_service_tasklet_generated(void);
|
|
||||||
|
|
||||||
void coap_server_service_tasklet(arm_event_s * event);
|
void coap_server_service_tasklet(arm_event_s * event);
|
||||||
|
|
||||||
uint16_t socket_open(uint16_t listen_port, coap_service_request_recv_cb *requst_recv_cb);
|
uint16_t socket_open(uint16_t listen_port, coap_service_request_recv_cb *requst_recv_cb);
|
||||||
|
|
Loading…
Reference in New Issue