diff --git a/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.h b/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.h index 6543d9b9ede86f..ae37aa90d2c6f5 100644 --- a/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.h +++ b/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.h @@ -53,7 +53,7 @@ extern size_t const CHIPSizeThreadPSKc; */ @property (nonatomic, readwrite) uint16_t channel; /** - * The Thread PAN ID + * A uint16_t stored as 2-bytes in host order representing the Thread PAN ID */ @property (nonatomic, nullable, readwrite) NSData * panID; @@ -62,7 +62,9 @@ extern size_t const CHIPSizeThreadPSKc; /** * Create a Thread Operational Dataset object with the individual network fields. - * This initializer will return nil if any of the NSData fields are smaller than expected. + * This initializer will return nil if any of the NSData fields don't match the expected size. + * + * Note: The panID is expected to be a uint16_t stored as 2-bytes in host order */ - (nullable instancetype)initWithNetworkName:(NSString *)networkName extendedPANID:(NSData *)extendedPANID diff --git a/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.mm b/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.mm index 461af9ea113af4..b48dcb0dc647bb 100644 --- a/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.mm +++ b/src/darwin/Framework/CHIP/CHIPThreadOperationalDataset.mm @@ -104,7 +104,7 @@ - (BOOL)_populateCppOperationalDataset - (BOOL)_checkDataLength:(NSData *)data expectedLength:(size_t)expectedLength { if (data.length != expectedLength) { - CHIP_LOG_ERROR("Length Check Failed. Length:%tu is too short, must be at least %tu", data.length, expectedLength); + CHIP_LOG_ERROR("Length Check Failed. Length:%tu is incorrect, must be %tu", data.length, expectedLength); return NO; } return YES;