Skip to content

Commit

Permalink
[dnssd] remove constants for _A subtype and AP TXT field
Browse files Browse the repository at this point in the history
The _A subtype and AP TXT field were removed from the spec
long time ago but the constants describing the maximum
lengths are still present in the SDK.
  • Loading branch information
Damian-Nordic committed Jul 27, 2023
1 parent d7a7dee commit d0309e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/lib/dnssd/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ constexpr size_t kSubTypeShortDiscriminatorMaxLength = 4; // _S<dd>
constexpr size_t kSubTypeLongDiscriminatorMaxLength = 6; // _L<dddd>
constexpr size_t kSubTypeVendorIdMaxLength = 7; // _V<ddddd>
constexpr size_t kSubTypeDeviceTypeMaxLength = 12; // _T<dddddddddd>
constexpr size_t kSubTypeCommissioningModeMaxLength = 3; // _C<d>
constexpr size_t kSubTypeAdditionalCommissioningMaxLength = 3; // _A<d>
constexpr size_t kSubTypeCommissioningModeMaxLength = 3; // _CM
constexpr size_t kSubTypeCompressedFabricIdMaxLength = 18; // _I<16-hex-digits>

/*
Expand Down Expand Up @@ -68,8 +67,7 @@ namespace Commission {

#define SUBTYPES \
(std::initializer_list<size_t>{ kSubTypeShortDiscriminatorMaxLength, kSubTypeLongDiscriminatorMaxLength, \
kSubTypeVendorIdMaxLength, kSubTypeDeviceTypeMaxLength, kSubTypeCommissioningModeMaxLength, \
kSubTypeAdditionalCommissioningMaxLength })
kSubTypeVendorIdMaxLength, kSubTypeDeviceTypeMaxLength, kSubTypeCommissioningModeMaxLength })

constexpr size_t kInstanceNameMaxLength = 16; // 64-bit random number in hex
constexpr size_t kSubTypeMaxNumber = SUBTYPES.size();
Expand Down
2 changes: 0 additions & 2 deletions src/lib/dnssd/TxtFields.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ static constexpr size_t kKeyTcpSupportedMaxLength = 1;
// Commissionable/commissioner node TXT entries
static constexpr size_t kKeyLongDiscriminatorMaxLength = 5;
static constexpr size_t kKeyVendorProductMaxLength = 11;
static constexpr size_t kKeyAdditionalCommissioningMaxLength = 1;
static constexpr size_t kKeyCommissioningModeMaxLength = 1;
static constexpr size_t kKeyDeviceTypeMaxLength = 10;
static constexpr size_t kKeyDeviceNameMaxLength = 32;
Expand Down Expand Up @@ -87,7 +86,6 @@ constexpr const TxtFieldInfo txtFieldInfo[static_cast<size_t>(TxtFieldKey::kCoun
{ TxtFieldKey::kUnknown, 0, "", TxtKeyUse::kNone },
{ TxtFieldKey::kLongDiscriminator, kKeyLongDiscriminatorMaxLength, "D", TxtKeyUse::kCommission },
{ TxtFieldKey::kVendorProduct, kKeyVendorProductMaxLength, "VP", TxtKeyUse::kCommission },
{ TxtFieldKey::kAdditionalPairing, kKeyAdditionalCommissioningMaxLength, "AP", TxtKeyUse::kCommission },
{ TxtFieldKey::kCommissioningMode, kKeyCommissioningModeMaxLength, "CM", TxtKeyUse::kCommission },
{ TxtFieldKey::kDeviceType, kKeyDeviceTypeMaxLength, "DT", TxtKeyUse::kCommission },
{ TxtFieldKey::kDeviceName, kKeyDeviceNameMaxLength, "DN", TxtKeyUse::kCommission },
Expand Down

0 comments on commit d0309e1

Please sign in to comment.