Mistake on this page?
Report an issue in GitHub or email us
NanostackPhy.h
1 /*
2  * Copyright (c) 2016, Arm Limited and affiliates.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef NANOSTACK_PHY_H_
19 #define NANOSTACK_PHY_H_
20 
21 class NanostackMACPhy;
22 class NanostackPPPPhy;
23 
24 /** PHY driver class for Nanostack */
25 class NanostackPhy {
26 public:
27 
28  /** Register this physical interface with Nanostack
29  *
30  * @return Device driver ID or a negative error
31  * code on failure
32  */
33  virtual int8_t phy_register() = 0;
34 
35  /** Return pointer to a NanostackMACPhy.
36  *
37  * @return Pointer to requested phy type or NULL if this
38  * class doesn't implement the phy.
39  */
41  {
42  return nullptr;
43  }
44 
45  /** Return pointer to a NanostackPPPPhy.
46  *
47  * @return Pointer to requested phy type or NULL if this
48  * class doesn't implement the phy.
49  */
51  {
52  return nullptr;
53  }
54 
55 protected:
56  NanostackPhy() = default;
57  virtual ~NanostackPhy() = default;
58 };
59 
60 #endif /* NANOSTACK_INTERFACE_H_ */
PPP PHY driver class for Nanostack.
virtual int8_t phy_register()=0
Register this physical interface with Nanostack.
virtual NanostackPPPPhy * nanostack_ppp_phy()
Return pointer to a NanostackPPPPhy.
Definition: NanostackPhy.h:50
PHY driver class for Nanostack.
Definition: NanostackPhy.h:25
MAC PHY driver class for Nanostack.
virtual NanostackMACPhy * nanostack_mac_phy()
Return pointer to a NanostackMACPhy.
Definition: NanostackPhy.h:40
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.