Kenji Arai / TYBLE16_mbedlized_os5_several_examples_1st

Dependencies:   nRF51_Vdd TextLCD BME280

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MeshInterface.h Source File

MeshInterface.h

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