Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ns_virtual_rf_api.h Source File

ns_virtual_rf_api.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2016-2017, 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 /** \file ns_virtual_rf_api.h
00019  * \brief Virtual RF interface API.
00020  */
00021 
00022 #ifndef NS_VIRTUAL_RF_API_H_
00023 #define NS_VIRTUAL_RF_API_H_
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 #include "platform/arm_hal_phy.h"
00029 
00030 
00031 /**
00032  * @brief virtual_rf_device_register Creates virtual RF device
00033  * Emulates "radio" link like the real RF driver would do it. MAC does not know the difference.
00034  * Sends and listens data to/from serial MAC.
00035  * @param link_type Link type behind virtual device
00036  * @param mtu_size Maximum transmission unit size
00037  * @return Rf driver id
00038  */
00039 int8_t virtual_rf_device_register(phy_link_type_e link_type, uint16_t mtu_size);
00040 
00041 /**
00042  * @brief virtual_rf_client_register Creates virtual RF client
00043  * "Acts" in a role of upper layer for MAC (802.15.4 or ethernet) and in a role of RF driver for serial MAC.
00044  * Forwards data between serial MAC and either 802.15.4 or ethernet MAC.
00045  * @return Rf driver id
00046  */
00047 int8_t virtual_rf_client_register(void);
00048 
00049 
00050 #ifdef __cplusplus
00051 }
00052 #endif
00053 #endif /* NS_VIRTUAL_RF_API_H_ */