Kenji Arai / TYBLE16_mbedlized_os5_several_examples_1st

Dependencies:   nRF51_Vdd TextLCD BME280

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers EthInterface.h Source File

EthInterface.h

00001 
00002 /** \addtogroup netsocket */
00003 /** @{*/
00004 /* EthInterface
00005  * Copyright (c) 2015 ARM Limited
00006  *
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  *
00011  *     http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  */
00019 
00020 #ifndef ETH_INTERFACE_H
00021 #define ETH_INTERFACE_H
00022 
00023 #include "netsocket/NetworkInterface.h"
00024 
00025 
00026 /** Common interface that is shared between Ethernet hardware.
00027  */
00028 class EthInterface : public virtual NetworkInterface {
00029 public:
00030 
00031     /** @copydoc NetworkInterface::ethInterface
00032      */
00033     virtual EthInterface *ethInterface ()
00034     {
00035         return this;
00036     }
00037 
00038     /** Get the default Ethernet interface.
00039      *
00040      * This is provided as a weak method so applications can override.
00041      * Default behaviour is to get the target's default interface, if
00042      * any.
00043      *
00044      * @return Pointer to interface, if one exists.
00045      */
00046     static EthInterface *get_default_instance();
00047 
00048 #if !defined(DOXYGEN_ONLY)
00049 protected:
00050 
00051     /** Get the target's default Ethernet interface.
00052      *
00053      * This is provided as a weak method so targets can override. The
00054      * default implementation will invoke EthernetInterface with the
00055      * default EMAC and default network stack, if DEVICE_EMAC is set.
00056      *
00057      * @return Pointer to interface, if one exists.
00058      */
00059     static EthInterface *get_target_default_instance();
00060 #endif //!defined(DOXYGEN_ONLY)
00061 };
00062 
00063 
00064 #endif
00065 
00066 /** @}*/