Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MeshInterface.h Source File

MeshInterface.h

00001 /*
00002  * Copyright (c) 2015 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may 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,
00012  * WITHOUT 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 /* @file MeshInterface.h Mesh network interface */
00018 /** \addtogroup netinterface */
00019 /** @{*/
00020 
00021 #ifndef MESH_INTERFACE_H
00022 #define MESH_INTERFACE_H
00023 
00024 #include "netsocket/NetworkInterface.h"
00025 
00026 
00027 /** Common interface that is shared between mesh hardware
00028  */
00029 class MeshInterface : public virtual NetworkInterface {
00030 public:
00031     /** @copydoc NetworkInterface::meshInterface
00032      */
00033     virtual MeshInterface *meshInterface ()
00034     {
00035         return this;
00036     }
00037 
00038     /** Get the default Mesh interface.
00039      *
00040      * This is provided as a weak method so applications can override.
00041      * Default behavior is to get the target's default interface, if
00042      * any.
00043      *
00044      * @return pointer to interface, if any.
00045      */
00046     static MeshInterface *get_default_instance();
00047 
00048 #if !defined(DOXYGEN_ONLY)
00049 protected:
00050 
00051     /** Get the target's default Mesh interface.
00052      *
00053      * This is provided as a weak method so targets can override. The
00054      * default implementation will invoke LoWPANNDInterface or ThreadInterface
00055      * with the default NanostackRfPhy.
00056      *
00057      * @return pointer to interface, if any.
00058      */
00059     static MeshInterface *get_target_default_instance();
00060 #endif //!defined(DOXYGEN_ONLY)
00061 };
00062 
00063 
00064 #endif
00065 
00066 /** @}*/