openthread / ot-commissioner

@@ -1153,6 +1153,7 @@
Loading
1153 1153
1154 1154
    BUILD_STRING(Addr, aBorderAgent.mAddr);
1155 1155
    BUILD_STRING(Port, std::to_string(aBorderAgent.mPort));
1156 +
    BUILD_STRING(Discriminator, utils::Hex(aBorderAgent.mDiscriminator));
1156 1157
    BUILD_STRING(ThreadVersion, aBorderAgent.mThreadVersion);
1157 1158
    if (aBorderAgent.mPresentFlags & BorderAgent::kStateBit)
1158 1159
    {

@@ -228,6 +228,21 @@
Loading
228 228
            {
229 229
                VerifyOrExit(value == "1", error = ERROR_BAD_FORMAT("value of TXT Key 'rv' is {} but not 1", value));
230 230
            }
231 +
            else if (key == "dd")
232 +
            {
233 +
                auto &discriminator = binaryValue;
234 +
235 +
                if (discriminator.size() != kExtendedAddrLength)
236 +
                {
237 +
                    ExitNow(error = ERROR_BAD_FORMAT("value of TXT Key 'dd' is invalid: value={}",
238 +
                                                     utils::Hex(discriminator)));
239 +
                }
240 +
                else
241 +
                {
242 +
                    borderAgent.mDiscriminator = discriminator;
243 +
                    borderAgent.mPresentFlags |= BorderAgent::kDiscriminatorBit;
244 +
                }
245 +
            }
231 246
            else if (key == "tv")
232 247
            {
233 248
                borderAgent.mThreadVersion = value;
@@ -256,7 +271,7 @@
Loading
256 271
            else if (key == "xp")
257 272
            {
258 273
                auto &extendPanId = binaryValue;
259 -
                if (extendPanId.size() != 8)
274 +
                if (extendPanId.size() != kExtendedPanIdLength)
260 275
                {
261 276
                    ExitNow(error = ERROR_BAD_FORMAT("value of TXT Key 'xp' is invalid: value={}",
262 277
                                                     utils::Hex(extendPanId)));

@@ -62,6 +62,12 @@
Loading
62 62
     */
63 63
    uint16_t mPort;
64 64
65 +
    /**
66 +
     * The discriminator which uniquely identifies the Border Agent.
67 +
     * Required by only Version>=1.2.0.
68 +
     */
69 +
    ByteArray mDiscriminator;
70 +
65 71
    /**
66 72
     * Version of Thread Specification implemented by the Thread
67 73
     * Interface specified as a UTF-8 encoded decimal. Mandatory.
@@ -155,6 +161,7 @@
Loading
155 161
    static constexpr uint16_t kDomainNameBit      = 1 << 12;
156 162
    static constexpr uint16_t kBbrSeqNumberBit    = 1 << 13;
157 163
    static constexpr uint16_t kBbrPortBit         = 1 << 14;
164 +
    static constexpr uint16_t kDiscriminatorBit   = 1 << 15;
158 165
};
159 166
160 167
/**
Files Coverage
include/commissioner 83.93%
src 69.77%
Project Totals (52 files) 69.94%
Notifications are pending CI completion. Waiting for GitHub's status webhook to queue notifications. Push notifications now.

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading