0.01.00
settings.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, The OpenThread Authors.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * 1. Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * 3. Neither the name of the copyright holder nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
28 
34 #ifndef SETTINGS_HPP_
35 #define SETTINGS_HPP_
36 
37 #include "openthread-core-config.h"
38 
39 #include "thread/mle.hpp"
40 
41 namespace ot {
42 namespace Settings {
43 
70 enum
71 {
72  kKeyActiveDataset = 0x0001,
73  kKeyPendingDataset = 0x0002,
74  kKeyNetworkInfo = 0x0003,
75  kKeyParentInfo = 0x0004,
76  kKeyChildInfo = 0x0005,
78 };
79 
85 {
86  uint8_t mRole;
87  uint8_t mDeviceMode;
88  uint16_t mRloc16;
89  uint32_t mKeySequence;
90  uint32_t mMleFrameCounter;
91  uint32_t mMacFrameCounter;
95 };
96 
102 {
104 };
105 
110 struct ChildInfo
111 {
113  uint32_t mTimeout;
114  uint16_t mRloc16;
115  uint8_t mMode;
116 };
117 
118 } // namespace Settings
119 } // namespace ot
120 
121 #endif // SETTINGS_HPP_
Definition: cli.cpp:90
This file includes definitions for MLE functionality required by the Thread Child, Router, and Leader roles.
uint32_t mTimeout
Timeout.
Definition: settings.hpp:113
Active Operational Dataset.
Definition: settings.hpp:72
uint32_t mPreviousPartitionId
PartitionId.
Definition: settings.hpp:92
uint8_t mRole
Current Thread role.
Definition: settings.hpp:86
uint32_t mMleFrameCounter
MLE Frame Counter.
Definition: settings.hpp:90
uint32_t mKeySequence
Key Sequence.
Definition: settings.hpp:89
uint8_t mMode
The MLE device mode.
Definition: settings.hpp:115
Child information.
Definition: settings.hpp:76
uint16_t mRloc16
RLOC16.
Definition: settings.hpp:88
Auto-start information.
Definition: settings.hpp:77
This structure represents the device's own network information for settings storage.
Definition: settings.hpp:84
This structure represents an IEEE 802.15.4 Extended Address.
Definition: mac_frame.hpp:84
#define OT_IP6_IID_SIZE
Size of an IPv6 Interface Identifier (bytes)
Definition: types.h:281
Mac::ExtAddress mExtAddress
Extended Address.
Definition: settings.hpp:93
This structure represents the child information for settings storage.
Definition: settings.hpp:110
Parent information.
Definition: settings.hpp:75
uint16_t mRloc16
RLOC16.
Definition: settings.hpp:114
Thread network information.
Definition: settings.hpp:74
uint32_t mMacFrameCounter
MAC Frame Counter.
Definition: settings.hpp:91
uint8_t mDeviceMode
Device mode setting.
Definition: settings.hpp:87
Mac::ExtAddress mExtAddress
Extended Address.
Definition: settings.hpp:112
Mac::ExtAddress mExtAddress
Extended Address.
Definition: settings.hpp:103
Pending Operational Dataset.
Definition: settings.hpp:73
This structure represents the parent information for settings storage.
Definition: settings.hpp:101
This file includes compile-time configuration constants for OpenThread.
uint8_t mMlIid[OT_IP6_IID_SIZE]
IID from ML-EID.
Definition: settings.hpp:94