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.
AbstractNetworkInterface.h
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 #ifndef __ABSTRACTNETWORKINTERFACE_H__ 00018 #define __ABSTRACTNETWORKINTERFACE_H__ 00019 00020 #include <stdint.h> 00021 #include "mesh_interface_types.h" 00022 00023 /** 00024 * \brief Abstract base class for network interfaces. 00025 * This is a pure virtual class; it can't instantiated directly, but 00026 * it provides common functionality for derived classes. 00027 * 00028 * Note! This class will be replaced by connection manager when it is available. 00029 */ 00030 00031 class AbstractNetworkInterface 00032 { 00033 00034 public: 00035 /** 00036 * Virtual destructor. 00037 */ 00038 virtual ~AbstractNetworkInterface(); 00039 00040 /** 00041 * Connect the interface to the network. 00042 */ 00043 virtual mesh_error_t connect() = 0; 00044 00045 /** 00046 * Disconnect the interface from the network. 00047 */ 00048 virtual mesh_error_t disconnect() = 0; 00049 00050 /** 00051 * \brief Read own global IP address 00052 * 00053 * \param address is where the IP address will be copied 00054 * \param len is the length of the address buffer, must be at least 40 bytes 00055 * \return true if address is read successfully, false otherwise 00056 */ 00057 virtual bool getOwnIpAddress(char *address, int8_t len) = 0; 00058 }; 00059 00060 #endif /* __ABSTRACTNETWORKINTERFACE_H__ */
Generated on Tue Jul 12 2022 18:19:26 by
1.7.2