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.
CellularUtil_stub.cpp
00001 /* 00002 * Copyright (c) , Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #include "CellularUtil.h" 00019 #include <string.h> 00020 #include <stdlib.h> 00021 #include <stdint.h> 00022 00023 namespace mbed_cellular_util { 00024 00025 #define MAX_STRING_LEN 200 00026 00027 void str_copy_skip_char(char *dest, uint16_t dest_size, const char *src, char c) 00028 { 00029 } 00030 00031 void str_remove_char(char *src, char c) 00032 { 00033 } 00034 00035 void uint_to_binary_str(uint32_t num, char *str, uint8_t str_size, uint8_t bit_cnt) 00036 { 00037 } 00038 00039 // converts the given str to hex string to buf 00040 uint16_t char_str_to_hex(const char *str, uint16_t len, char *buf, bool omit_leading_zero) 00041 { 00042 return 0; 00043 } 00044 00045 void convert_ipv6(char *ip) 00046 { 00047 00048 } 00049 00050 char *find_dot_number(char *str, int dot_number) 00051 { 00052 return NULL; 00053 } 00054 00055 void separate_ip4like_addresses(char *orig, char *ip, size_t ip_size, char *ip2, size_t ip2_size) 00056 { 00057 } 00058 00059 void separate_ip_addresses(char *orig, char *ip, size_t ip_size, char *ip2, size_t ip2_size) 00060 { 00061 } 00062 00063 void prefer_ipv6(char *ip, size_t ip_size, char *ip2, size_t ip2_size) 00064 { 00065 } 00066 00067 void int_to_hex_str(uint8_t num, char *buf) 00068 { 00069 buf[0] = '0'; 00070 buf[1] = '2'; 00071 } 00072 00073 int hex_str_to_int(const char *hex_string, int hex_string_length) 00074 { 00075 return 0; 00076 } 00077 00078 int hex_str_to_char_str(const char *str, uint16_t len, char *buf) 00079 { 00080 return 0; 00081 } 00082 00083 void uint_to_binary_str(uint32_t num, char *str, int str_size, int bit_cnt) 00084 { 00085 00086 } 00087 00088 int char_str_to_hex_str(const char *str, uint16_t len, char *buf, bool omit_leading_zero) 00089 { 00090 //The code is dependent on this, so this is easiest just to put here 00091 if (!str || !buf) { 00092 return 0; 00093 } 00094 00095 char *ptr = buf; 00096 int i = 0; 00097 while (i < len) { 00098 if (omit_leading_zero == true && i == 0 && !(str[i] >> 4 & 0x0F)) { 00099 *ptr++ = hex_values[(str[i]) & 0x0F]; 00100 } else { 00101 *ptr++ = hex_values[((str[i]) >> 4) & 0x0F]; 00102 *ptr++ = hex_values[(str[i]) & 0x0F]; 00103 } 00104 i++; 00105 } 00106 return ptr - buf; 00107 } 00108 00109 uint16_t get_dynamic_ip_port() 00110 { 00111 return 0; 00112 } 00113 00114 } // namespace mbed_cellular_util
Generated on Tue Aug 9 2022 00:37:04 by
1.7.2