Mistake on this page?
Report an issue in GitHub or email us
ThreadInterface.h
1 /*
2  * Copyright (c) 2015 ARM Limited. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  * Licensed under the Apache License, Version 2.0 (the License); you may
5  * not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef THREADINTERFACE_H
18 #define THREADINTERFACE_H
19 
20 #include "MeshInterfaceNanostack.h"
21 
22 /** Thread mesh network interface class
23  *
24  * Configure Nanostack to use Thread protocol.
25  */
27 public:
28 
29  /** Inherit MeshInterfaceNanostack constructors */
30  using MeshInterfaceNanostack::MeshInterfaceNanostack;
31 
32  /**
33  * \brief Sets the eui64 for the device configuration.
34  * By default this value is read from the radio driver.
35  * The value must be set before calling the connect function.
36  * */
37  void device_eui64_set(const uint8_t *eui64);
38 
39  /**
40  * \brief Reads the eui64 from the device configuration.
41  * By default this value is read from the radio driver, but it may have
42  * been set by device_eui64_set().
43  * */
44  void device_eui64_get(uint8_t *eui64);
45 
46  /**
47  * \brief sets the PSKd for the device configuration.
48  * The default value is overwritten, which is defined in the mbed_lib.json file in the mesh-api
49  * The value must be set before calling the connect function.
50  * \return MESH_ERROR_NONE on success.
51  * \return MESH_ERROR_PARAM in case of illegal parameters.
52  * \return MESH_ERROR_MEMORY in case of memory error.
53  * */
54 
55  mesh_error_t device_pskd_set(const char *pskd);
56 
57 protected:
58  Nanostack::ThreadInterface *get_interface() const;
59  nsapi_error_t do_initialize() override;
60 };
61 
62 #endif // THREADINTERFACE_H
void device_eui64_get(uint8_t *eui64)
Reads the eui64 from the device configuration.
signed int nsapi_error_t
Type used to represent error codes.
Definition: nsapi_types.h:140
Thread mesh network interface class.
void device_eui64_set(const uint8_t *eui64)
Sets the eui64 for the device configuration.
mesh_error_t device_pskd_set(const char *pskd)
sets the PSKd for the device configuration.
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.