This is the sample program that can see the decode result of barcode data on Watson IoT.
Dependencies: AsciiFont DisplayApp GR-PEACH_video LCD_shield_config LWIPBP3595Interface_STA_for_mbed-os USBDevice
Location.cpp
00001 /** 00002 * @file Location.cpp 00003 * @brief mbed CoAP Endpoint Location base class 00004 * @author Doug Anson/Chris Paola 00005 * @version 1.0 00006 * @see 00007 * 00008 * Copyright (c) 2014 00009 * 00010 * Licensed under the Apache License, Version 2.0 (the "License"); 00011 * you may not use this file except in compliance with the License. 00012 * You may obtain a copy of the License at 00013 * 00014 * http://www.apache.org/licenses/LICENSE-2.0 00015 * 00016 * Unless required by applicable law or agreed to in writing, software 00017 * distributed under the License is distributed on an "AS IS" BASIS, 00018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 * See the License for the specific language governing permissions and 00020 * limitations under the License. 00021 */ 00022 00023 // Class support 00024 #include "mbed-connector-interface/Location.h" 00025 00026 namespace Connector { 00027 00028 // Constructor 00029 Location::Location() { 00030 memset(this->m_latitude,0,LOCATION_COORDINATE_LENGTH+1); 00031 memset(this->m_longitude,0,LOCATION_COORDINATE_LENGTH+1); 00032 memset(this->m_msl_altitude_m,0,LOCATION_MSL_ALT_LENGTH+1); 00033 memset(this->m_speed,0,LOCATION_SPEED_LENGTH+1); 00034 } 00035 00036 // Copy Constructor 00037 Location::Location(const Location &location) { 00038 memcpy(this->m_latitude,location.m_latitude,LOCATION_COORDINATE_LENGTH+1); 00039 memcpy(this->m_longitude,location.m_longitude,LOCATION_COORDINATE_LENGTH+1); 00040 memcpy(this->m_msl_altitude_m,location.m_msl_altitude_m,LOCATION_MSL_ALT_LENGTH+1); 00041 memcpy(this->m_speed,location.m_speed,LOCATION_SPEED_LENGTH+1); 00042 } 00043 00044 // Destructor 00045 Location::~Location() { 00046 } 00047 00048 // get the latitude 00049 char *Location::getLatitude() { 00050 return this->m_latitude; 00051 } 00052 00053 // get the longitude 00054 char *Location::getLongitude() { 00055 return this->m_longitude; 00056 } 00057 00058 // get the MSL Altitude 00059 char *Location::getMSLAltitude() { 00060 return this->m_msl_altitude_m; 00061 } 00062 00063 // get the Speed 00064 char *Location::getSpeed() { 00065 return this->m_speed; 00066 } 00067 00068 }; 00069
Generated on Tue Jul 12 2022 18:38:05 by 1.7.2