Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
m2mnsdlinterface_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 "m2mnsdlinterface_stub.h" 00017 00018 00019 bool m2mnsdlinterface_stub::bool_value; 00020 uint32_t m2mnsdlinterface_stub::int_value; 00021 void * m2mnsdlinterface_stub::void_value; 00022 String m2mnsdlinterface_stub::string_value; 00023 void m2mnsdlinterface_stub::clear() 00024 { 00025 bool_value = false; 00026 int_value = 0; 00027 string_value = ""; 00028 void_value = NULL; 00029 } 00030 00031 M2MNsdlInterface::M2MNsdlInterface(M2MNsdlObserver &observer) 00032 : _observer(observer) 00033 { 00034 } 00035 00036 M2MNsdlInterface::~M2MNsdlInterface() 00037 { 00038 } 00039 00040 bool M2MNsdlInterface::initialize() 00041 { 00042 return m2mnsdlinterface_stub::bool_value; 00043 } 00044 00045 void M2MNsdlInterface::create_endpoint(const String &, 00046 const String &, 00047 const int32_t, 00048 const String &, 00049 const uint8_t, 00050 const String &) 00051 { 00052 } 00053 00054 void M2MNsdlInterface::delete_endpoint() 00055 { 00056 } 00057 00058 bool M2MNsdlInterface::create_nsdl_list_structure(const M2MObjectList &) 00059 { 00060 return m2mnsdlinterface_stub::bool_value; 00061 } 00062 00063 bool M2MNsdlInterface::delete_nsdl_resource(const String &) 00064 { 00065 return m2mnsdlinterface_stub::bool_value; 00066 } 00067 00068 bool M2MNsdlInterface::create_bootstrap_resource(sn_nsdl_addr_s *, const String& name) 00069 { 00070 return m2mnsdlinterface_stub::bool_value; 00071 } 00072 00073 bool M2MNsdlInterface::send_register_message(uint8_t*, 00074 const uint16_t, 00075 sn_nsdl_addr_type_e) 00076 { 00077 return m2mnsdlinterface_stub::bool_value; 00078 } 00079 00080 bool M2MNsdlInterface::send_update_registration(const uint32_t) 00081 { 00082 return m2mnsdlinterface_stub::bool_value; 00083 } 00084 00085 bool M2MNsdlInterface::send_unregister_message() 00086 { 00087 return m2mnsdlinterface_stub::bool_value; 00088 } 00089 00090 void *M2MNsdlInterface::memory_alloc(uint16_t size) 00091 { 00092 return malloc(size); 00093 } 00094 00095 void M2MNsdlInterface::memory_free(void *ptr) 00096 { 00097 free(ptr); 00098 ptr = NULL; 00099 } 00100 00101 uint8_t M2MNsdlInterface::send_to_server_callback(struct nsdl_s *, 00102 sn_nsdl_capab_e, 00103 uint8_t *, 00104 uint16_t, 00105 sn_nsdl_addr_s *) 00106 { 00107 return (uint8_t)m2mnsdlinterface_stub::int_value; 00108 } 00109 00110 uint8_t M2MNsdlInterface::received_from_server_callback(struct nsdl_s *, 00111 sn_coap_hdr_s *, 00112 sn_nsdl_addr_s *) 00113 { 00114 return (uint8_t)m2mnsdlinterface_stub::int_value; 00115 } 00116 00117 uint8_t M2MNsdlInterface::resource_callback(struct nsdl_s *, 00118 sn_coap_hdr_s *, 00119 sn_nsdl_addr_s *, 00120 sn_nsdl_capab_e) 00121 { 00122 return (uint8_t)m2mnsdlinterface_stub::int_value; 00123 } 00124 00125 00126 bool M2MNsdlInterface::process_received_data(uint8_t *, 00127 uint16_t , 00128 sn_nsdl_addr_s *) 00129 { 00130 return m2mnsdlinterface_stub::bool_value; 00131 } 00132 00133 void M2MNsdlInterface::stop_timers() 00134 { 00135 00136 } 00137 00138 void M2MNsdlInterface::timer_expired(M2MTimerObserver::Type) 00139 { 00140 } 00141 00142 void M2MNsdlInterface::observation_to_be_sent(M2MBase *, uint16_t, Vector<uint16_t>, bool) 00143 { 00144 } 00145 00146 void M2MNsdlInterface::send_delayed_response(M2MBase *) 00147 { 00148 } 00149 00150 void M2MNsdlInterface::resource_to_be_deleted(const String &) 00151 { 00152 } 00153 00154 void M2MNsdlInterface::value_updated(M2MBase *, const String&) 00155 { 00156 } 00157 00158 void M2MNsdlInterface::remove_object(M2MBase *) 00159 { 00160 } 00161 00162 nsdl_s* M2MNsdlInterface::get_nsdl_handle() 00163 { 00164 return (nsdl_s*) m2mnsdlinterface_stub::void_value; 00165 } 00166 00167 void M2MNsdlInterface::handle_bootstrap_put_message(sn_coap_hdr_s *coap_header, sn_nsdl_addr_s *address) 00168 { 00169 00170 } 00171 00172 void M2MNsdlInterface::handle_bootstrap_finished(sn_coap_hdr_s *coap_header,sn_nsdl_addr_s *address) 00173 { 00174 00175 } 00176 00177 void M2MNsdlInterface::handle_bootstrap_delete(sn_coap_hdr_s *coap_header,sn_nsdl_addr_s *address) 00178 { 00179 00180 } 00181 00182 bool M2MNsdlInterface::parse_bootstrap_message(sn_coap_hdr_s *coap_header, bool is_security_object) 00183 { 00184 00185 } 00186 00187 bool M2MNsdlInterface::validate_security_object() 00188 { 00189 00190 } 00191 00192 void M2MNsdlInterface::handle_bootstrap_error() 00193 { 00194 00195 } 00196 00197 const String& M2MNsdlInterface::endpoint_name() const 00198 { 00199 return m2mnsdlinterface_stub::string_value; 00200 }
Generated on Tue Jul 12 2022 12:28:38 by
1.7.2
