[dataset] use full Timestamp TLV value in otOperationalDataset (#7739)

The `otOperationalDataset#mActiveTimestamp` should represent the full
Active Timestamp TLV value but not only the seconds. The same for
`otOperationalDataset#mPendingTimestamp`.
This commit is contained in:
Kangping
2022-06-03 10:59:16 -07:00
committed by GitHub
parent c8556dfd66
commit 5daca7c684
12 changed files with 150 additions and 52 deletions
+13 -2
View File
@@ -213,6 +213,17 @@ typedef struct otOperationalDatasetComponents
bool mIsChannelMaskPresent : 1; ///< TRUE if Channel Mask is present, FALSE otherwise.
} otOperationalDatasetComponents;
/**
* This structure represents a Thread Dataset timestamp component.
*
*/
typedef struct otTimestamp
{
uint64_t mSeconds;
uint16_t mTicks;
bool mAuthoritative;
} otTimestamp;
/**
* This structure represents an Active or Pending Operational Dataset.
*
@@ -221,8 +232,8 @@ typedef struct otOperationalDatasetComponents
*/
typedef struct otOperationalDataset
{
uint64_t mActiveTimestamp; ///< Active Timestamp
uint64_t mPendingTimestamp; ///< Pending Timestamp
otTimestamp mActiveTimestamp; ///< Active Timestamp
otTimestamp mPendingTimestamp; ///< Pending Timestamp
otNetworkKey mNetworkKey; ///< Network Key
otNetworkName mNetworkName; ///< Network Name
otExtendedPanId mExtendedPanId; ///< Extended PAN ID
+1 -1
View File
@@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (218)
#define OPENTHREAD_API_VERSION (219)
/**
* @addtogroup api-instance