ESP-IDF
ot::Mle::DeviceProperties
is only used within ESP-IDF.
Symbol previews are coming soon...
Symbols
loading...
Files
loading...
Summary
Syntax
Methods
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
ot::Mle::DeviceProperties
ot::Mle::DeviceProperties class
Represents device properties. The device properties are used for calculating the local leader weight on the device.
Syntax
Show:
Summary
Declaration
from
mle_types.hpp:305
class
DeviceProperties
:
public
otDeviceProperties
,
public
Clearable
<
DeviceProperties
>
{
public
:
enum
PowerSupply
:
uint8_t
{
kPowerSupplyBattery
=
OT_POWER_SUPPLY_BATTERY
,
kPowerSupplyExternal
=
OT_POWER_SUPPLY_EXTERNAL
,
kPowerSupplyExternalStable
=
OT_POWER_SUPPLY_EXTERNAL_STABLE
,
kPowerSupplyExternalUnstable
=
OT_POWER_SUPPLY_EXTERNAL_UNSTABLE
,
}
;
DeviceProperties
(
void
)
;
void
ClampWeightAdjustment
(
void
)
;
uint8_t
CalculateLeaderWeight
(
void
)
const
;
private
:
static
constexpr
int8_t
kDefaultAdjustment
=
OPENTHREAD_CONFIG_MLE_DEFAULT_LEADER_WEIGHT_ADJUSTMENT
;
static
constexpr
uint8_t
kBaseWeight
=
64
;
static
constexpr
int8_t
kBorderRouterInc
=
+
1
;
static
constexpr
int8_t
kCcmBorderRouterInc
=
+
8
;
static
constexpr
int8_t
kIsUnstableInc
=
-
4
;
static
constexpr
int8_t
kPowerBatteryInc
=
-
8
;
static
constexpr
int8_t
kPowerExternalInc
=
0
;
static
constexpr
int8_t
kPowerExternalStableInc
=
+
4
;
static
constexpr
int8_t
kPowerExternalUnstableInc
=
-
4
;
static
constexpr
int8_t
kMinAdjustment
=
-
16
;
static
constexpr
int8_t
kMaxAdjustment
=
+
16
;
static_assert
(
kDefaultAdjustment
>=
kMinAdjustment
,
"Invalid default weight adjustment"
)
;
static_assert
(
kDefaultAdjustment
<=
kMaxAdjustment
,
"Invalid default weight adjustment"
)
;
}
;
Fields
Field
ot::Mle::DeviceProperties::kDefaultAdjustment
ot::Mle::DeviceProperties::kBaseWeight
ot::Mle::DeviceProperties::kBorderRouterInc
ot::Mle::DeviceProperties::kCcmBorderRouterInc
ot::Mle::DeviceProperties::kIsUnstableInc
ot::Mle::DeviceProperties::kPowerBatteryInc
ot::Mle::DeviceProperties::kPowerExternalInc
ot::Mle::DeviceProperties::kPowerExternalStableInc
ot::Mle::DeviceProperties::kPowerExternalUnstableInc
ot::Mle::DeviceProperties::kMinAdjustment
ot::Mle::DeviceProperties::kMaxAdjustment
Methods
ClampWeightAdjustment()
Clamps the `mLeaderWeightAdjustment` value to the valid range.
CalculateLeaderWeight() const
Calculates the leader weight based on the device properties.
Examples
References
from
examples
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
All items filtered out
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Lifecycle
from
examples
All items filtered out
All items filtered out