WORKS
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
m2mobject_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 "m2mobject_stub.h" 00017 00018 u_int16_t m2mobject_stub::int_value; 00019 bool m2mobject_stub::bool_value; 00020 M2MObjectInstance* m2mobject_stub::inst; 00021 M2MObjectInstanceList m2mobject_stub::instance_list; 00022 M2MBase::BaseType m2mobject_stub::base_type; 00023 sn_coap_hdr_s *m2mobject_stub::header; 00024 00025 void m2mobject_stub::clear() 00026 { 00027 int_value = 0; 00028 bool_value = false; 00029 m2mobject_stub::base_type = M2MBase::Object; 00030 instance_list.clear(); 00031 header = NULL; 00032 } 00033 00034 M2MObject::M2MObject(const String &object_name) 00035 : M2MBase(object_name,M2MBase::Dynamic) 00036 { 00037 } 00038 00039 M2MObject::~M2MObject() 00040 { 00041 } 00042 00043 M2MObject& M2MObject::operator=(const M2MObject& ) 00044 { 00045 return *this; 00046 } 00047 00048 M2MObject::M2MObject(const M2MObject& other) 00049 : M2MBase(other) 00050 { 00051 *this = other; 00052 } 00053 00054 M2MObjectInstance* M2MObject::create_object_instance(uint16_t instance_id) 00055 { 00056 return m2mobject_stub::inst; 00057 } 00058 00059 bool M2MObject::remove_object_instance(uint16_t) 00060 { 00061 return m2mobject_stub::bool_value; 00062 } 00063 00064 M2MObjectInstance* M2MObject::object_instance(uint16_t) const 00065 { 00066 return m2mobject_stub::inst; 00067 } 00068 00069 const M2MObjectInstanceList& M2MObject::instances() const 00070 { 00071 return m2mobject_stub::instance_list; 00072 } 00073 00074 uint16_t M2MObject::instance_count() const 00075 { 00076 return m2mobject_stub::int_value; 00077 } 00078 00079 M2MBase::BaseType M2MObject::base_type() const 00080 { 00081 return m2mobject_stub::base_type; 00082 } 00083 00084 void M2MObject::add_observation_level(M2MBase::Observation) 00085 { 00086 00087 } 00088 00089 void M2MObject::remove_observation_level(M2MBase::Observation) 00090 { 00091 00092 } 00093 00094 sn_coap_hdr_s* M2MObject::handle_get_request(nsdl_s *, 00095 sn_coap_hdr_s *, 00096 M2MObservationHandler *) 00097 { 00098 return m2mobject_stub::header; 00099 } 00100 00101 sn_coap_hdr_s* M2MObject::handle_put_request(nsdl_s *, 00102 sn_coap_hdr_s *, 00103 M2MObservationHandler *, 00104 bool &execute) 00105 { 00106 execute = m2mobject_stub::bool_value; 00107 return m2mobject_stub::header; 00108 } 00109 00110 sn_coap_hdr_s* M2MObject::handle_post_request(nsdl_s *, 00111 sn_coap_hdr_s *, 00112 M2MObservationHandler *, 00113 bool &) 00114 { 00115 return m2mobject_stub::header; 00116 } 00117 00118 void M2MObject::notification_update(uint16_t obj_instance_id) 00119 { 00120 }
Generated on Tue Jul 12 2022 12:28:38 by
1.7.2
