Mistake on this page?
Report an issue in GitHub or email us
mesh_interface_types.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 __MESH_INTERFACE_TYPES_H__
18 #define __MESH_INTERFACE_TYPES_H__
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /**
25  * Mesh network types
26  */
27 typedef enum {
28  MESH_TYPE_6LOWPAN_ND = 0,
29  MESH_TYPE_THREAD
30 } mesh_network_type_t;
31 
32 /**
33  * Error status values returned by Mesh network API.
34  */
35 typedef enum {
36  MESH_ERROR_NONE = 0, /*<! No error */
37  MESH_ERROR_UNKNOWN, /*<! Unspecified error */
38  MESH_ERROR_MEMORY, /*<! Memory error */
39  MESH_ERROR_STATE, /*<! Illegal state */
40  MESH_ERROR_PARAM, /*<! Illegal parameter */
41 } mesh_error_t;
42 
43 /**
44  * Mesh network connection status codes returned in callback.
45  */
46 typedef enum {
47  MESH_CONNECTED = 0, /*<! connected to network */
48  MESH_CONNECTED_LOCAL, /*<! connected to network, got local IP */
49  MESH_CONNECTED_GLOBAL, /*<! connected to network, got global IP */
50  MESH_DISCONNECTED, /*<! disconnected from network */
51  MESH_BOOTSTRAP_START_FAILED, /*<! error during bootstrap start */
52  MESH_BOOTSTRAP_FAILED, /*<! error in bootstrap */
53  MESH_BOOTSTRAP_STARTED /*<! bootstrap started */
54 } mesh_connection_status_t;
55 
56 /**
57  * Mesh device types
58  */
59 typedef enum {
60  MESH_DEVICE_TYPE_THREAD_ROUTER = 0, /*<! Thread router */
61  MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE, /*<! Thread Sleepy end device */
62  MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE /*<! Thread minimal end device */
63 } mesh_device_type_t;
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif /* __MESH_INTERFACE_TYPES_H__ */
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.