[dataset] use Read/Save method names instead of Get/Set (#3723)

This commit renames methods in `DatasetLocal`, `DatasetManager`,
'ActiveDataset' and `PendingDataset` to use `Read()` and `Save()`
in place of `Get()` and `Set()` respectively. This aligns the
names with `Setting` class indicating that these method do
read/save Dataset info in non-volatile memory.
This commit is contained in:
Abtin Keshavarzian
2019-04-01 09:05:58 -07:00
committed by Jonathan Hui
parent 88912d23ae
commit 2daa892f56
9 changed files with 72 additions and 86 deletions
+4 -4
View File
@@ -57,7 +57,7 @@ otError otDatasetGetActive(otInstance *aInstance, otOperationalDataset *aDataset
VerifyOrExit(aDataset != NULL, error = OT_ERROR_INVALID_ARGS);
error = instance.GetThreadNetif().GetActiveDataset().Get(*aDataset);
error = instance.GetThreadNetif().GetActiveDataset().Read(*aDataset);
exit:
return error;
@@ -70,7 +70,7 @@ otError otDatasetSetActive(otInstance *aInstance, const otOperationalDataset *aD
VerifyOrExit(aDataset != NULL, error = OT_ERROR_INVALID_ARGS);
error = instance.GetThreadNetif().GetActiveDataset().Set(*aDataset);
error = instance.GetThreadNetif().GetActiveDataset().Save(*aDataset);
exit:
return error;
@@ -83,7 +83,7 @@ otError otDatasetGetPending(otInstance *aInstance, otOperationalDataset *aDatase
VerifyOrExit(aDataset != NULL, error = OT_ERROR_INVALID_ARGS);
error = instance.GetThreadNetif().GetPendingDataset().Get(*aDataset);
error = instance.GetThreadNetif().GetPendingDataset().Read(*aDataset);
exit:
return error;
@@ -96,7 +96,7 @@ otError otDatasetSetPending(otInstance *aInstance, const otOperationalDataset *a
VerifyOrExit(aDataset != NULL, error = OT_ERROR_INVALID_ARGS);
error = instance.GetThreadNetif().GetPendingDataset().Set(*aDataset);
error = instance.GetThreadNetif().GetPendingDataset().Save(*aDataset);
exit:
return error;
+7 -7
View File
@@ -70,7 +70,7 @@ otError DatasetLocal::Restore(Dataset &aDataset)
const Timestamp *timestamp;
otError error;
error = Get(aDataset);
error = Read(aDataset);
SuccessOrExit(error);
timestamp = aDataset.GetTimestamp();
@@ -89,7 +89,7 @@ exit:
return error;
}
otError DatasetLocal::Get(Dataset &aDataset) const
otError DatasetLocal::Read(Dataset &aDataset) const
{
DelayTimerTlv *delayTimer;
uint32_t elapsed;
@@ -126,14 +126,14 @@ exit:
return error;
}
otError DatasetLocal::Get(otOperationalDataset &aDataset) const
otError DatasetLocal::Read(otOperationalDataset &aDataset) const
{
Dataset dataset(mType);
otError error;
memset(&aDataset, 0, sizeof(aDataset));
error = Get(dataset);
error = Read(dataset);
SuccessOrExit(error);
dataset.Get(aDataset);
@@ -142,7 +142,7 @@ exit:
return error;
}
otError DatasetLocal::Set(const otOperationalDataset &aDataset)
otError DatasetLocal::Save(const otOperationalDataset &aDataset)
{
otError error = OT_ERROR_NONE;
Dataset dataset(mType);
@@ -150,14 +150,14 @@ otError DatasetLocal::Set(const otOperationalDataset &aDataset)
error = dataset.Set(aDataset);
SuccessOrExit(error);
error = Set(dataset);
error = Save(dataset);
SuccessOrExit(error);
exit:
return error;
}
otError DatasetLocal::Set(const Dataset &aDataset)
otError DatasetLocal::Save(const Dataset &aDataset)
{
const Timestamp *timestamp;
otError error;
+4 -4
View File
@@ -93,7 +93,7 @@ public:
* @retval OT_ERROR_NOT_FOUND There is no corresponding dataset stored in non-volatile memory.
*
*/
otError Get(Dataset &aDataset) const;
otError Read(Dataset &aDataset) const;
/**
* This method retrieves the dataset from non-volatile memory.
@@ -104,7 +104,7 @@ public:
* @retval OT_ERROR_NOT_FOUND There is no corresponding dataset stored in non-volatile memory.
*
*/
otError Get(otOperationalDataset &aDataset) const;
otError Read(otOperationalDataset &aDataset) const;
/**
* This method returns the local time this dataset was last updated or restored.
@@ -120,7 +120,7 @@ public:
* @retval OT_ERROR_NONE Successfully stored the dataset.
*
*/
otError Set(const otOperationalDataset &aDataset);
otError Save(const otOperationalDataset &aDataset);
/**
* This method stores the dataset into non-volatile memory.
@@ -128,7 +128,7 @@ public:
* @retval OT_ERROR_NONE Successfully stored the dataset.
*
*/
otError Set(const Dataset &aDataset);
otError Save(const Dataset &aDataset);
/**
* This method compares this dataset to another based on the timestamp.
+22 -37
View File
@@ -116,7 +116,7 @@ otError DatasetManager::ApplyConfiguration(void) const
otError error;
Dataset dataset(mLocal.GetType());
SuccessOrExit(error = mLocal.Get(dataset));
SuccessOrExit(error = mLocal.Read(dataset));
SuccessOrExit(error = dataset.ApplyConfiguration(GetInstance()));
exit:
@@ -136,7 +136,7 @@ void DatasetManager::HandleDetach(void)
Restore();
}
otError DatasetManager::Set(const Dataset &aDataset)
otError DatasetManager::Save(const Dataset &aDataset)
{
otError error = OT_ERROR_NONE;
const Timestamp *timestamp;
@@ -160,7 +160,7 @@ otError DatasetManager::Set(const Dataset &aDataset)
if (isMasterkeyUpdated || compare > 0)
{
mLocal.Set(aDataset);
mLocal.Save(aDataset);
#if OPENTHREAD_FTD
if (GetNetif().GetMle().GetRole() == OT_DEVICE_ROLE_LEADER)
@@ -179,12 +179,12 @@ exit:
return error;
}
otError DatasetManager::Set(const otOperationalDataset &aDataset)
otError DatasetManager::Save(const otOperationalDataset &aDataset)
{
ThreadNetif &netif = GetNetif();
otError error = OT_ERROR_NONE;
SuccessOrExit(error = mLocal.Set(aDataset));
SuccessOrExit(error = mLocal.Save(aDataset));
switch (netif.GetMle().GetRole())
{
@@ -222,7 +222,7 @@ otError DatasetManager::GetChannelMask(Mac::ChannelMask &aChannelMask) const
uint32_t mask;
Dataset dataset(mLocal.GetType());
SuccessOrExit(error = mLocal.Get(dataset));
SuccessOrExit(error = mLocal.Read(dataset));
channelMaskTlv = static_cast<const MeshCoP::ChannelMaskTlv *>(dataset.Get(MeshCoP::Tlv::kChannelMask));
VerifyOrExit(channelMaskTlv != NULL, error = OT_ERROR_NOT_FOUND);
@@ -247,7 +247,7 @@ void DatasetManager::HandleTimer(void)
if (mLocal.GetType() == Tlv::kActiveTimestamp)
{
Dataset dataset(Tlv::kPendingTimestamp);
netif.GetPendingDataset().Get(dataset);
netif.GetPendingDataset().Read(dataset);
const ActiveTimestampTlv *tlv = static_cast<const ActiveTimestampTlv *>(dataset.Get(Tlv::kActiveTimestamp));
const Timestamp * pendingActiveTimestamp = static_cast<const Timestamp *>(tlv);
@@ -281,7 +281,7 @@ otError DatasetManager::Register(void)
message->AppendUriPathOptions(mUriSet);
message->SetPayloadMarker();
mLocal.Get(dataset);
mLocal.Read(dataset);
SuccessOrExit(error = message->Append(dataset.GetBytes(), dataset.GetSize()));
messageInfo.SetSockAddr(netif.GetMle().GetMeshLocal16());
@@ -301,7 +301,7 @@ exit:
return error;
}
void DatasetManager::Get(const Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) const
void DatasetManager::HandleGet(const Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) const
{
Tlv tlv;
uint16_t offset = aMessage.GetOffset();
@@ -354,7 +354,7 @@ void DatasetManager::SendGetResponse(const Coap::Message & aRequest,
Coap::Message *message;
Dataset dataset(mLocal.GetType());
mLocal.Get(dataset);
mLocal.Read(dataset);
VerifyOrExit((message = NewMeshCoPMessage(netif.GetCoap())) != NULL, error = OT_ERROR_NO_BUFS);
@@ -710,29 +710,14 @@ ActiveDataset::ActiveDataset(Instance &aInstance)
GetNetif().GetCoap().AddResource(mResourceGet);
}
void ActiveDataset::Clear(void)
{
DatasetManager::Clear();
}
void ActiveDataset::Set(const Dataset &aDataset)
{
DatasetManager::Set(aDataset);
}
otError ActiveDataset::Set(const otOperationalDataset &aDataset)
{
return DatasetManager::Set(aDataset);
}
otError ActiveDataset::Set(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength)
otError ActiveDataset::Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength)
{
otError error = OT_ERROR_NONE;
Dataset dataset(mLocal.GetType());
SuccessOrExit(error = dataset.Set(aMessage, aOffset, aLength));
dataset.SetTimestamp(aTimestamp);
DatasetManager::Set(dataset);
DatasetManager::Save(dataset);
exit:
return error;
@@ -746,7 +731,7 @@ void ActiveDataset::HandleGet(void *aContext, otMessage *aMessage, const otMessa
void ActiveDataset::HandleGet(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) const
{
DatasetManager::Get(aMessage, aMessageInfo);
DatasetManager::HandleGet(aMessage, aMessageInfo);
}
void ActiveDataset::HandleTimer(Timer &aTimer)
@@ -781,28 +766,28 @@ void PendingDataset::ClearNetwork(void)
mTimestamp.Init();
mTimestampValid = false;
DatasetManager::Set(dataset);
DatasetManager::Save(dataset);
}
otError PendingDataset::Set(const otOperationalDataset &aDataset)
otError PendingDataset::Save(const otOperationalDataset &aDataset)
{
otError error = OT_ERROR_NONE;
SuccessOrExit(error = DatasetManager::Set(aDataset));
SuccessOrExit(error = DatasetManager::Save(aDataset));
StartDelayTimer();
exit:
return error;
}
otError PendingDataset::Set(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength)
otError PendingDataset::Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength)
{
otError error = OT_ERROR_NONE;
Dataset dataset(mLocal.GetType());
SuccessOrExit(error = dataset.Set(aMessage, aOffset, aLength));
dataset.SetTimestamp(aTimestamp);
DatasetManager::Set(dataset);
DatasetManager::Save(dataset);
StartDelayTimer();
exit:
@@ -814,7 +799,7 @@ void PendingDataset::StartDelayTimer(void)
DelayTimerTlv *delayTimer;
Dataset dataset(mLocal.GetType());
mLocal.Get(dataset);
mLocal.Read(dataset);
mDelayTimer.Stop();
@@ -843,7 +828,7 @@ void PendingDataset::HandleDelayTimer(void)
DelayTimerTlv *delayTimer;
Dataset dataset(mLocal.GetType());
mLocal.Get(dataset);
mLocal.Read(dataset);
// if the Delay Timer value is larger than what our Timer implementation can handle, we have to compute
// the remainder and wait some more.
@@ -862,7 +847,7 @@ void PendingDataset::HandleDelayTimer(void)
otLogInfoMeshCoP("pending delay timer expired");
dataset.ConvertToActive();
GetNetif().GetActiveDataset().Set(dataset);
GetNetif().GetActiveDataset().Save(dataset);
Clear();
@@ -878,7 +863,7 @@ void PendingDataset::HandleGet(void *aContext, otMessage *aMessage, const otMess
void PendingDataset::HandleGet(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) const
{
DatasetManager::Get(aMessage, aMessageInfo);
DatasetManager::HandleGet(aMessage, aMessageInfo);
}
void PendingDataset::HandleTimer(Timer &aTimer)
+17 -17
View File
@@ -90,7 +90,7 @@ public:
* @retval OT_ERROR_NOT_FOUND There is no corresponding dataset stored in non-volatile memory.
*
*/
otError Get(Dataset &aDataset) const { return mLocal.Get(aDataset); }
otError Read(Dataset &aDataset) const { return mLocal.Read(aDataset); }
/**
* This method retrieves the dataset from non-volatile memory.
@@ -101,7 +101,7 @@ public:
* @retval OT_ERROR_NOT_FOUND There is no corresponding dataset stored in non-volatile memory.
*
*/
otError Get(otOperationalDataset &aDataset) const { return mLocal.Get(aDataset); }
otError Read(otOperationalDataset &aDataset) const { return mLocal.Read(aDataset); }
/**
* This method retrieves the channel mask from local dataset.
@@ -185,7 +185,7 @@ protected:
void Clear(void);
/**
* This method sets the Operational Dataset in non-volatile memory.
* This method saves the Operational Dataset in non-volatile memory.
*
* @param[in] aDataset The Operational Dataset.
*
@@ -193,15 +193,15 @@ protected:
* @retval OT_ERROR_PARSE The dataset has at least one TLV with invalid format.
*
*/
otError Set(const Dataset &aDataset);
otError Save(const Dataset &aDataset);
/**
* This method sets the Operational Dataset in non-volatile memory.
* This method saves the Operational Dataset in non-volatile memory.
*
* @param[in] aDataset The Operational Dataset.
*
*/
otError Set(const otOperationalDataset &aDataset);
otError Save(const otOperationalDataset &aDataset);
/**
* This method sets the Operational Dataset for the partition.
@@ -214,7 +214,7 @@ protected:
* @param[in] aLength The length of the Operational Dataset.
*
*/
otError Set(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength);
otError Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength);
/**
* This method handles a MGMT_GET request message.
@@ -224,7 +224,7 @@ protected:
* @param[in] aMessageInfo The message info.
*
*/
void Get(const Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) const;
void HandleGet(const Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) const;
/**
* This method compares the partition's Operational Dataset with that stored in non-volatile memory.
@@ -288,7 +288,7 @@ protected:
* @retval OT_ERROR_DROP The MGMT_SET request message was dropped.
*
*/
otError Set(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo);
otError HandleSet(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo);
private:
void SendSetResponse(const Coap::Message &aRequest, const Ip6::MessageInfo &aMessageInfo, StateTlv::State aState);
@@ -310,17 +310,17 @@ public:
* This method clears the Active Operational Dataset.
*
*/
void Clear(void);
void Clear(void) { DatasetManager::Clear(); }
/**
* This method sets the Operational Dataset in non-volatile memory.
* This method saves the Operational Dataset in non-volatile memory.
*
* This method also reconfigures the Thread interface.
*
* @param[in] aDataset The Operational Dataset.
*
*/
void Set(const Dataset &aDataset);
void Save(const Dataset &aDataset) { DatasetManager::Save(aDataset); }
/**
* This method sets the Operational Dataset for the partition.
@@ -334,7 +334,7 @@ public:
* @param[in] aLength The length of the Operational Dataset.
*
*/
otError Set(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength);
otError Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength);
/**
* This method sets the Operational Dataset in non-volatile memory.
@@ -342,7 +342,7 @@ public:
* @param[in] aDataset The Operational Dataset.
*
*/
otError Set(const otOperationalDataset &aDataset);
otError Save(const otOperationalDataset &aDataset) { return DatasetManager::Save(aDataset); }
#if OPENTHREAD_FTD
@@ -417,14 +417,14 @@ public:
void ClearNetwork(void);
/**
* This method sets the Operational Dataset in non-volatile memory.
* This method saves the Operational Dataset in non-volatile memory.
*
* This method also starts the Delay Timer.
*
* @param[in] aDataset The Operational Dataset.
*
*/
otError Set(const otOperationalDataset &aDataset);
otError Save(const otOperationalDataset &aDataset);
/**
* This method sets the Operational Dataset for the partition.
@@ -439,7 +439,7 @@ public:
* @param[in] aLength The length of the Operational Dataset.
*
*/
otError Set(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength);
otError Save(const Timestamp &aTimestamp, const Message &aMessage, uint16_t aOffset, uint8_t aLength);
#if OPENTHREAD_FTD
+9 -9
View File
@@ -62,12 +62,12 @@ otError DatasetManager::AppendMleDatasetTlv(Message &aMessage) const
{
Dataset dataset(mLocal.GetType());
mLocal.Get(dataset);
mLocal.Read(dataset);
return dataset.AppendMleDatasetTlv(aMessage);
}
otError DatasetManager::Set(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo)
otError DatasetManager::HandleSet(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo)
{
ThreadNetif & netif = GetNetif();
Tlv tlv;
@@ -201,7 +201,7 @@ otError DatasetManager::Set(Coap::Message &aMessage, const Ip6::MessageInfo &aMe
{
// Thread specification allows partial dataset changes for MGMT_ACTIVE_SET.req/MGMT_PENDING_SET.req
// from Commissioner based on existing active dataset.
netif.GetActiveDataset().Get(dataset);
netif.GetActiveDataset().Read(dataset);
}
if (type == Tlv::kPendingTimestamp || !doesAffectConnectivity)
@@ -252,7 +252,7 @@ otError DatasetManager::Set(Coap::Message &aMessage, const Ip6::MessageInfo &aMe
offset += sizeof(Tlv) + data.tlv.GetLength();
}
VerifyOrExit(Set(dataset) == OT_ERROR_NONE, state = StateTlv::kReject);
VerifyOrExit(Save(dataset) == OT_ERROR_NONE, state = StateTlv::kReject);
netif.GetNetworkDataLeader().IncrementVersion();
netif.GetNetworkDataLeader().IncrementStableVersion();
}
@@ -326,7 +326,7 @@ otError ActiveDataset::GenerateLocal(void)
VerifyOrExit(netif.GetMle().IsAttached(), error = OT_ERROR_INVALID_STATE);
mLocal.Get(dataset);
mLocal.Read(dataset);
// Active Timestamp
if (dataset.Get(Tlv::kActiveTimestamp) == NULL)
@@ -420,7 +420,7 @@ otError ActiveDataset::GenerateLocal(void)
dataset.Set(tlv);
}
SuccessOrExit(error = mLocal.Set(dataset));
SuccessOrExit(error = mLocal.Save(dataset));
Restore();
otLogInfoMeshCoP("Generated local dataset");
@@ -448,7 +448,7 @@ void ActiveDataset::HandleSet(void *aContext, otMessage *aMessage, const otMessa
void ActiveDataset::HandleSet(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo)
{
SuccessOrExit(DatasetManager::Set(aMessage, aMessageInfo));
SuccessOrExit(DatasetManager::HandleSet(aMessage, aMessageInfo));
ApplyConfiguration();
exit:
@@ -474,7 +474,7 @@ void PendingDataset::HandleSet(void *aContext, otMessage *aMessage, const otMess
void PendingDataset::HandleSet(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo)
{
SuccessOrExit(DatasetManager::Set(aMessage, aMessageInfo));
SuccessOrExit(DatasetManager::HandleSet(aMessage, aMessageInfo));
StartDelayTimer();
exit:
@@ -512,7 +512,7 @@ void PendingDataset::ApplyActiveDataset(const Timestamp &aTimestamp, Coap::Messa
// add pending timestamp tlv
dataset.SetTimestamp(aTimestamp);
DatasetManager::Set(dataset);
DatasetManager::Save(dataset);
// reset delay timer
StartDelayTimer();
+1 -1
View File
@@ -307,7 +307,7 @@ otError JoinerRouter::DelaySendingJoinerEntrust(const Ip6::MessageInfo &aMessage
networkName.SetNetworkName(netif.GetMac().GetNetworkName());
SuccessOrExit(error = message->Append(&networkName, sizeof(Tlv) + networkName.GetLength()));
netif.GetActiveDataset().Get(dataset);
netif.GetActiveDataset().Read(dataset);
if ((tlv = dataset.Get(Tlv::kActiveTimestamp)) != NULL)
{
SuccessOrExit(error = message->Append(tlv, sizeof(Tlv) + tlv->GetLength()));
+6 -5
View File
@@ -2964,7 +2964,8 @@ otError Mle::HandleLeaderData(const Message &aMessage, const Ip6::MessageInfo &a
if (activeDatasetOffset > 0)
{
aMessage.Read(activeDatasetOffset, sizeof(tlv), &tlv);
netif.GetActiveDataset().Set(activeTimestamp, aMessage, activeDatasetOffset + sizeof(tlv), tlv.GetLength());
netif.GetActiveDataset().Save(activeTimestamp, aMessage, activeDatasetOffset + sizeof(tlv),
tlv.GetLength());
}
}
@@ -2974,8 +2975,8 @@ otError Mle::HandleLeaderData(const Message &aMessage, const Ip6::MessageInfo &a
if (pendingDatasetOffset > 0)
{
aMessage.Read(pendingDatasetOffset, sizeof(tlv), &tlv);
netif.GetPendingDataset().Set(pendingTimestamp, aMessage, pendingDatasetOffset + sizeof(tlv),
tlv.GetLength());
netif.GetPendingDataset().Save(pendingTimestamp, aMessage, pendingDatasetOffset + sizeof(tlv),
tlv.GetLength());
}
}
@@ -3316,7 +3317,7 @@ otError Mle::HandleChildIdResponse(const Message &aMessage, const Ip6::MessageIn
if (Tlv::GetOffset(aMessage, Tlv::kActiveDataset, offset) == OT_ERROR_NONE)
{
aMessage.Read(offset, sizeof(tlv), &tlv);
netif.GetActiveDataset().Set(activeTimestamp, aMessage, offset + sizeof(tlv), tlv.GetLength());
netif.GetActiveDataset().Save(activeTimestamp, aMessage, offset + sizeof(tlv), tlv.GetLength());
}
}
@@ -3335,7 +3336,7 @@ otError Mle::HandleChildIdResponse(const Message &aMessage, const Ip6::MessageIn
if (Tlv::GetOffset(aMessage, Tlv::kPendingDataset, offset) == OT_ERROR_NONE)
{
aMessage.Read(offset, sizeof(tlv), &tlv);
netif.GetPendingDataset().Set(pendingTimestamp, aMessage, offset + sizeof(tlv), tlv.GetLength());
netif.GetPendingDataset().Save(pendingTimestamp, aMessage, offset + sizeof(tlv), tlv.GetLength());
}
}
else
+2 -2
View File
@@ -109,7 +109,7 @@ void ChannelManager::PreparePendingDataset(void)
VerifyOrExit(mChannel != GetInstance().Get<Mac::Mac>().GetPanChannel());
if (netif.GetPendingDataset().Get(dataset) == OT_ERROR_NONE)
if (netif.GetPendingDataset().Read(dataset) == OT_ERROR_NONE)
{
if (dataset.mComponents.mIsPendingTimestampPresent)
{
@@ -134,7 +134,7 @@ void ChannelManager::PreparePendingDataset(void)
pendingTimestamp += 1 + Random::GetUint32InRange(0, kMaxTimestampIncrease);
error = netif.GetActiveDataset().Get(dataset);
error = netif.GetActiveDataset().Read(dataset);
if (error != OT_ERROR_NONE)
{