Ram Gandikota / Mbed OS ABCD
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers nsdlaccesshelper_stub.cpp Source File

nsdlaccesshelper_stub.cpp

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 #include "nsdlaccesshelper_stub.h"
00017 
00018 bool nsdlaccesshelper_stub::bool_value;
00019 void* nsdlaccesshelper_stub::void_value;
00020 uint8_t nsdlaccesshelper_stub::int_value;
00021 
00022 M2MNsdlInterfaceList __nsdl_interface_list;
00023 M2MConnectionHandler *__connection_handler = NULL;
00024 #ifdef USE_LINUX
00025 M2MTimerImpl  *__timer_impl = NULL;
00026 M2MConnectionHandler *__connection_impl = NULL;
00027 #endif
00028 void nsdlaccesshelper_stub::clear()
00029 {
00030     bool_value = false;
00031     void_value = NULL;
00032     int_value = 0;
00033 }
00034 
00035 uint8_t __nsdl_c_callback(struct nsdl_s * ,
00036                           sn_coap_hdr_s *,
00037                           sn_nsdl_addr_s *,
00038                           sn_nsdl_capab_e )
00039 {
00040     return nsdlaccesshelper_stub::int_value;
00041 }
00042 
00043 void *__nsdl_c_memory_alloc(uint16_t)
00044 {
00045     return nsdlaccesshelper_stub::void_value;
00046 }
00047 
00048 void __nsdl_c_memory_free(void *)
00049 {
00050 }
00051 
00052 uint8_t __nsdl_c_send_to_server(struct nsdl_s * ,
00053                                 sn_nsdl_capab_e ,
00054                                 uint8_t *,
00055                                 uint16_t ,
00056                                 sn_nsdl_addr_s *)
00057 {
00058     return nsdlaccesshelper_stub::int_value;
00059 }
00060 
00061 uint8_t __nsdl_c_received_from_server(struct nsdl_s * ,
00062                                       sn_coap_hdr_s *,
00063                                       sn_nsdl_addr_s *)
00064 {
00065     return nsdlaccesshelper_stub::int_value;
00066 }
00067 
00068 void *__socket_malloc( void *, size_t)
00069 {
00070 return nsdlaccesshelper_stub::void_value;
00071 }
00072 
00073 void __socket_free(void *, void *)
00074 {
00075 }
00076 
00077 void __mutex_claim()
00078 {
00079 }
00080 
00081 void __mutex_release()
00082 {
00083 }