Simulated product dispenser

Dependencies:   HTS221

Fork of mbed-cloud-workshop-connect-HTS221 by Jim Carver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers nsdlaccesshelper.h Source File

nsdlaccesshelper.h

00001 /*
00002  * Copyright (c) 2015 ARM Limited. All rights reserved.
00003  * SPDX-License-Identifier: Apache-2.0
00004  * Licensed under the Apache License, Version 2.0 (the License); you may
00005  * not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
00012  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 #ifndef NSDL_ACCESS_HELPER_H
00017 #define NSDL_ACCESS_HELPER_H
00018 #include "mbed-client/m2mconnectionhandler.h"
00019 #include "include/m2mnsdlinterface.h"
00020 
00021 typedef Vector<M2MNsdlInterface  *> M2MNsdlInterfaceList;
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027 uint8_t __nsdl_c_callback(struct nsdl_s * nsdl_handle,
00028                           sn_coap_hdr_s *received_coap_ptr,
00029                           sn_nsdl_addr_s *address,
00030                           sn_nsdl_capab_e nsdl_capab);
00031 
00032 void *__nsdl_c_memory_alloc(uint16_t size);
00033 
00034 void __nsdl_c_memory_free(void *ptr);
00035 
00036 uint8_t __nsdl_c_send_to_server(struct nsdl_s * nsdl_handle,
00037                                 sn_nsdl_capab_e protocol,
00038                                 uint8_t *data_ptr,
00039                                 uint16_t data_len,
00040                                 sn_nsdl_addr_s *address_ptr);
00041 
00042 uint8_t __nsdl_c_received_from_server(struct nsdl_s * nsdl_handle,
00043                                       sn_coap_hdr_s *coap_header,
00044                                       sn_nsdl_addr_s *address_ptr);
00045 
00046 uint8_t __nsdl_c_auto_obs_token(struct nsdl_s *nsdl_handle, const char *path, uint8_t *token);
00047 
00048 void *__socket_malloc( void * context, size_t size);
00049 
00050 void __socket_free(void * context, void * ptr);
00051 
00052 M2MNsdlInterface* get_interface(struct nsdl_s* nsdl_handle);
00053 
00054 #ifdef __cplusplus
00055 }
00056 #endif
00057 
00058 #endif // NSDL_ACCESS_HELPER_H