@@ -2168,7 +2168,7 @@ void Mle::SendAnnounce(uint8_t aChannel, AnnounceMode aMode)
2168
2168
void Mle::SendAnnounce (uint8_t aChannel, const Ip6::Address &aDestination, AnnounceMode aMode)
2169
2169
{
2170
2170
Error error = kErrorNone ;
2171
- ChannelTlv channel ;
2171
+ ChannelTlv channelTlv ;
2172
2172
MeshCoP::Timestamp activeTimestamp;
2173
2173
TxMessage * message = nullptr ;
2174
2174
@@ -2177,10 +2177,10 @@ void Mle::SendAnnounce(uint8_t aChannel, const Ip6::Address &aDestination, Annou
2177
2177
message->SetLinkSecurityEnabled (true );
2178
2178
message->SetChannel (aChannel);
2179
2179
2180
- channel .Init ();
2181
- channel .SetChannelPage (0 );
2182
- channel .SetChannel (Get<Mac::Mac>().GetPanChannel ());
2183
- SuccessOrExit (error = channel .AppendTo (*message));
2180
+ channelTlv .Init ();
2181
+ channelTlv .SetChannelPage (0 );
2182
+ channelTlv .SetChannel (Get<Mac::Mac>().GetPanChannel ());
2183
+ SuccessOrExit (error = channelTlv .AppendTo (*message));
2184
2184
2185
2185
switch (aMode)
2186
2186
{
@@ -3077,13 +3077,13 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3077
3077
uint8_t linkMarginFromTlv;
3078
3078
uint8_t linkMargin;
3079
3079
LinkQuality linkQuality;
3080
- ConnectivityTlv connectivity ;
3080
+ ConnectivityTlv connectivityTlv ;
3081
3081
uint32_t linkFrameCounter;
3082
3082
uint32_t mleFrameCounter;
3083
3083
Mac::ExtAddress extAddress;
3084
3084
Mac::CslAccuracy cslAccuracy;
3085
3085
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
3086
- TimeParameterTlv timeParameter ;
3086
+ TimeParameterTlv timeParameterTlv ;
3087
3087
#endif
3088
3088
3089
3089
// Source Address
@@ -3122,8 +3122,8 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3122
3122
linkQuality = LinkQualityForLinkMargin (linkMargin);
3123
3123
3124
3124
// Connectivity
3125
- SuccessOrExit (error = Tlv::FindTlv (aRxInfo.mMessage , connectivity ));
3126
- VerifyOrExit (connectivity .IsValid (), error = kErrorParse );
3125
+ SuccessOrExit (error = Tlv::FindTlv (aRxInfo.mMessage , connectivityTlv ));
3126
+ VerifyOrExit (connectivityTlv .IsValid (), error = kErrorParse );
3127
3127
3128
3128
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
3129
3129
// CSL Accuracy
@@ -3149,10 +3149,10 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3149
3149
parentinfo.mExtAddr = extAddress;
3150
3150
parentinfo.mRloc16 = sourceAddress;
3151
3151
parentinfo.mRssi = linkInfo->GetRss ();
3152
- parentinfo.mPriority = connectivity .GetParentPriority ();
3153
- parentinfo.mLinkQuality3 = connectivity .GetLinkQuality3 ();
3154
- parentinfo.mLinkQuality2 = connectivity .GetLinkQuality2 ();
3155
- parentinfo.mLinkQuality1 = connectivity .GetLinkQuality1 ();
3152
+ parentinfo.mPriority = connectivityTlv .GetParentPriority ();
3153
+ parentinfo.mLinkQuality3 = connectivityTlv .GetLinkQuality3 ();
3154
+ parentinfo.mLinkQuality2 = connectivityTlv .GetLinkQuality2 ();
3155
+ parentinfo.mLinkQuality1 = connectivityTlv .GetLinkQuality1 ();
3156
3156
parentinfo.mIsAttached = IsAttached ();
3157
3157
3158
3158
mParentResponseCb (&parentinfo, mParentResponseCbContext );
@@ -3164,9 +3164,9 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3164
3164
if (IsFullThreadDevice () && !IsDetached ())
3165
3165
{
3166
3166
bool isPartitionIdSame = (leaderData.GetPartitionId () == mLeaderData .GetPartitionId ());
3167
- bool isIdSequenceSame = (connectivity .GetIdSequence () == Get<RouterTable>().GetRouterIdSequence ());
3167
+ bool isIdSequenceSame = (connectivityTlv .GetIdSequence () == Get<RouterTable>().GetRouterIdSequence ());
3168
3168
bool isIdSequenceGreater =
3169
- SerialNumber::IsGreater (connectivity .GetIdSequence (), Get<RouterTable>().GetRouterIdSequence ());
3169
+ SerialNumber::IsGreater (connectivityTlv .GetIdSequence (), Get<RouterTable>().GetRouterIdSequence ());
3170
3170
3171
3171
switch (mAttachMode )
3172
3172
{
@@ -3187,7 +3187,7 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3187
3187
case kBetterPartition :
3188
3188
VerifyOrExit (!isPartitionIdSame);
3189
3189
3190
- VerifyOrExit (MleRouter::ComparePartitions (connectivity .GetActiveRouters () <= 1 , leaderData,
3190
+ VerifyOrExit (MleRouter::ComparePartitions (connectivityTlv .GetActiveRouters () <= 1 , leaderData,
3191
3191
Get<MleRouter>().IsSingleton (), mLeaderData ) > 0 );
3192
3192
break ;
3193
3193
}
@@ -3206,7 +3206,7 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3206
3206
#if OPENTHREAD_FTD
3207
3207
if (IsFullThreadDevice ())
3208
3208
{
3209
- compare = MleRouter::ComparePartitions (connectivity .GetActiveRouters () <= 1 , leaderData,
3209
+ compare = MleRouter::ComparePartitions (connectivityTlv .GetActiveRouters () <= 1 , leaderData,
3210
3210
mParentCandidate .mIsSingleton , mParentCandidate .mLeaderData );
3211
3211
}
3212
3212
@@ -3217,7 +3217,7 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3217
3217
// only consider better parents if the partitions are the same
3218
3218
if (compare == 0 )
3219
3219
{
3220
- VerifyOrExit (IsBetterParent (sourceAddress, linkQuality, linkMargin, connectivity , version, cslAccuracy));
3220
+ VerifyOrExit (IsBetterParent (sourceAddress, linkQuality, linkMargin, connectivityTlv , version, cslAccuracy));
3221
3221
}
3222
3222
}
3223
3223
@@ -3227,12 +3227,12 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3227
3227
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
3228
3228
3229
3229
// Time Parameter
3230
- if (Tlv::FindTlv (aRxInfo.mMessage , timeParameter ) == kErrorNone )
3230
+ if (Tlv::FindTlv (aRxInfo.mMessage , timeParameterTlv ) == kErrorNone )
3231
3231
{
3232
- VerifyOrExit (timeParameter .IsValid ());
3232
+ VerifyOrExit (timeParameterTlv .IsValid ());
3233
3233
3234
- Get<TimeSync>().SetTimeSyncPeriod (timeParameter .GetTimeSyncPeriod ());
3235
- Get<TimeSync>().SetXtalThreshold (timeParameter .GetXtalThreshold ());
3234
+ Get<TimeSync>().SetTimeSyncPeriod (timeParameterTlv .GetTimeSyncPeriod ());
3235
+ Get<TimeSync>().SetXtalThreshold (timeParameterTlv .GetXtalThreshold ());
3236
3236
}
3237
3237
3238
3238
#if OPENTHREAD_CONFIG_TIME_SYNC_REQUIRED
@@ -3262,19 +3262,19 @@ void Mle::HandleParentResponse(RxInfo &aRxInfo)
3262
3262
mParentCandidate .SetLinkQualityOut (LinkQualityForLinkMargin (linkMarginFromTlv));
3263
3263
mParentCandidate .SetState (Neighbor::kStateParentResponse );
3264
3264
mParentCandidate .SetKeySequence (aRxInfo.mKeySequence );
3265
- mParentCandidate .SetLeaderCost (connectivity .GetLeaderCost ());
3265
+ mParentCandidate .SetLeaderCost (connectivityTlv .GetLeaderCost ());
3266
3266
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
3267
3267
mParentCandidate .SetCslAccuracy (cslAccuracy);
3268
3268
#endif
3269
3269
3270
- mParentCandidate .mPriority = connectivity .GetParentPriority ();
3271
- mParentCandidate .mLinkQuality3 = connectivity .GetLinkQuality3 ();
3272
- mParentCandidate .mLinkQuality2 = connectivity .GetLinkQuality2 ();
3273
- mParentCandidate .mLinkQuality1 = connectivity .GetLinkQuality1 ();
3274
- mParentCandidate .mSedBufferSize = connectivity .GetSedBufferSize ();
3275
- mParentCandidate .mSedDatagramCount = connectivity .GetSedDatagramCount ();
3270
+ mParentCandidate .mPriority = connectivityTlv .GetParentPriority ();
3271
+ mParentCandidate .mLinkQuality3 = connectivityTlv .GetLinkQuality3 ();
3272
+ mParentCandidate .mLinkQuality2 = connectivityTlv .GetLinkQuality2 ();
3273
+ mParentCandidate .mLinkQuality1 = connectivityTlv .GetLinkQuality1 ();
3274
+ mParentCandidate .mSedBufferSize = connectivityTlv .GetSedBufferSize ();
3275
+ mParentCandidate .mSedDatagramCount = connectivityTlv .GetSedDatagramCount ();
3276
3276
mParentCandidate .mLeaderData = leaderData;
3277
- mParentCandidate .mIsSingleton = connectivity .GetActiveRouters () <= 1 ;
3277
+ mParentCandidate .mIsSingleton = connectivityTlv .GetActiveRouters () <= 1 ;
3278
3278
mParentCandidate .mLinkMargin = linkMargin;
3279
3279
3280
3280
exit :
@@ -4812,13 +4812,13 @@ Error Mle::TxMessage::AppendCslTimeoutTlv(void)
4812
4812
#if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE
4813
4813
Error Mle::TxMessage::AppendCslClockAccuracyTlv (void )
4814
4814
{
4815
- CslClockAccuracyTlv cslClockAccuracy ;
4815
+ CslClockAccuracyTlv cslClockAccuracyTlv ;
4816
4816
4817
- cslClockAccuracy .Init ();
4818
- cslClockAccuracy .SetCslClockAccuracy (Get<Radio>().GetCslAccuracy ());
4819
- cslClockAccuracy .SetCslUncertainty (Get<Radio>().GetCslUncertainty ());
4817
+ cslClockAccuracyTlv .Init ();
4818
+ cslClockAccuracyTlv .SetCslClockAccuracy (Get<Radio>().GetCslAccuracy ());
4819
+ cslClockAccuracyTlv .SetCslUncertainty (Get<Radio>().GetCslUncertainty ());
4820
4820
4821
- return Append (cslClockAccuracy );
4821
+ return Append (cslClockAccuracyTlv );
4822
4822
}
4823
4823
#endif
4824
4824
0 commit comments