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
m2mserver_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 "m2mserver_stub.h" 00017 00018 uint32_t m2mserver_stub::int_value; 00019 bool m2mserver_stub::bool_value; 00020 String m2mserver_stub::string_value; 00021 M2MResource* m2mserver_stub::resource; 00022 00023 void m2mserver_stub::clear() 00024 { 00025 int_value = 0; 00026 bool_value = false; 00027 string_value = ""; 00028 resource = NULL; 00029 } 00030 00031 M2MServer::M2MServer() 00032 : M2MObject("2") 00033 { 00034 } 00035 00036 M2MServer::~M2MServer() 00037 { 00038 } 00039 00040 M2MResource* M2MServer::create_resource(ServerResource, uint32_t) 00041 { 00042 return m2mserver_stub::resource; 00043 } 00044 00045 M2MResource* M2MServer::create_resource(ServerResource) 00046 { 00047 return m2mserver_stub::resource; 00048 } 00049 00050 bool M2MServer::delete_resource(ServerResource) 00051 { 00052 return m2mserver_stub::bool_value; 00053 } 00054 00055 bool M2MServer::set_resource_value(ServerResource, 00056 const String &) 00057 { 00058 return m2mserver_stub::bool_value; 00059 } 00060 00061 bool M2MServer::set_resource_value(ServerResource, 00062 uint32_t) 00063 { 00064 return m2mserver_stub::bool_value; 00065 } 00066 00067 String M2MServer::resource_value_string(ServerResource) const 00068 { 00069 return m2mserver_stub::string_value; 00070 } 00071 00072 00073 uint32_t M2MServer::resource_value_int(ServerResource) const 00074 { 00075 return m2mserver_stub::int_value; 00076 } 00077 00078 bool M2MServer::is_resource_present(ServerResource) const 00079 { 00080 return m2mserver_stub::bool_value; 00081 } 00082 00083 uint16_t M2MServer::total_resource_count() const 00084 { 00085 return (uint16_t)m2mserver_stub::int_value; 00086 }
Generated on Tue Jul 12 2022 12:28:39 by
