Skip to content

Commit dc5cfac

Browse files
Add client type to debug print out
1 parent c5023fa commit dc5cfac

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

examples/chip-tool/commands/icd/ICDCommand.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <app/icd/client/DefaultICDClientStorage.h>
2222
#include <crypto/DefaultSessionKeystore.h>
2323
#include <crypto/RawKeySessionKeystore.h>
24+
#include <string>
2425

2526
using namespace ::chip;
2627
using namespace ::chip::app;
@@ -39,15 +40,16 @@ CHIP_ERROR ICDListCommand::RunCommand()
3940
fprintf(stderr, " +-----------------------------------------------------------------------------+\n");
4041
fprintf(stderr, " | %-75s |\n", "Known ICDs:");
4142
fprintf(stderr, " +-----------------------------------------------------------------------------+\n");
42-
fprintf(stderr, " | %20s | %15s | %15s | %16s |\n", "Fabric Index:Node ID", "Start Counter", "Counter Offset",
43-
"MonitoredSubject");
43+
fprintf(stderr, " | %20s | %15s | %15s | %16s | %10s |\n", "Fabric Index:Node ID", "Start Counter", "Counter Offset",
44+
"MonitoredSubject", "ClientType");
4445

4546
while (iter->Next(info))
4647
{
4748
fprintf(stderr, " +-----------------------------------------------------------------------------+\n");
48-
fprintf(stderr, " | %3" PRIu32 ":" ChipLogFormatX64 " | %15" PRIu32 " | %15" PRIu32 " | " ChipLogFormatX64 " |\n",
49+
fprintf(stderr, " | %3" PRIu32 ":" ChipLogFormatX64 " | %15" PRIu32 " | %15" PRIu32 " | " ChipLogFormatX64 " | %u |\n",
4950
static_cast<uint32_t>(info.peer_node.GetFabricIndex()), ChipLogValueX64(info.peer_node.GetNodeId()),
50-
info.start_icd_counter, info.offset, ChipLogValueX64(info.monitored_subject));
51+
info.start_icd_counter, info.offset, ChipLogValueX64(info.monitored_subject),
52+
static_cast<uint8_t>(info.client_type));
5153

5254
static_assert(std::is_same<decltype(CHIPCommand::sSessionKeystore), Crypto::RawKeySessionKeystore>::value,
5355
"The following BytesToHex can copy/encode the key bytes from sharedKey to hexadecimal format, which only "

0 commit comments

Comments
 (0)