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
testconfig.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 00017 #include <stdio.h> 00018 #include "mbed-client/m2mstring.h" 00019 #include "testconfig.h" 00020 #include "security.h" 00021 00022 TestConfig::TestConfig() { } 00023 00024 TestConfig::~TestConfig() { } 00025 00026 /*void TestConfig::set_endpoint_name(const char *name) { 00027 _endpointName = m2m::String("lwm2mtest-"); 00028 _endpointName += name; 00029 00030 printf("MBED: endpoint=%s", _endpointName.c_str()); 00031 }*/ 00032 00033 void TestConfig::setup() { 00034 _bootstrapAddress = m2m::String("dummy"); 00035 _mdsAddress = m2m::String("coap://ds-test.dev.mbed.com:5683"); 00036 _endpointName = m2m::String(MBED_ENDPOINT_NAME); 00037 _endpointType = m2m::String("test2"); 00038 _domain = m2m::String(MBED_DOMAIN); 00039 _port = 5683; 00040 _lifetime = 2222; 00041 00042 printf("MBED: test configuration \n"); 00043 printf("mds_server=%s\n", _mdsAddress.c_str()); 00044 printf("endpoint name=%s\n", _endpointName.c_str()); 00045 printf("endpoint type=%s\n", _endpointType.c_str()); 00046 printf("domain=%s\n", _domain.c_str()); 00047 printf("port=%d\n", _port); 00048 printf("lifetime=%d\n\n", _lifetime); 00049 } 00050 00051 m2m::String& TestConfig::get_domain() { 00052 return _domain; 00053 } 00054 00055 m2m::String& TestConfig::get_bootstrap_server() { 00056 return _bootstrapAddress; 00057 } 00058 00059 m2m::String& TestConfig::get_mds_server() { 00060 return _mdsAddress; 00061 } 00062 00063 m2m::String& TestConfig::get_endpoint_name() { 00064 return _endpointName; 00065 } 00066 00067 m2m::String& TestConfig::get_endpoint_type() { 00068 return _endpointType; 00069 } 00070 00071 int TestConfig::get_port() { 00072 //return _port++; 00073 return _port; 00074 } 00075 00076 int TestConfig::get_lifetime() { 00077 return _lifetime; 00078 } 00079
Generated on Tue Jul 12 2022 12:28:55 by
1.7.2
