diff --git a/examples/chip-tool/commands/clusters/ModelCommand.cpp b/examples/chip-tool/commands/clusters/ModelCommand.cpp index 286dd7f1533090..9eae919dd6a771 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.cpp +++ b/examples/chip-tool/commands/clusters/ModelCommand.cpp @@ -26,24 +26,25 @@ using namespace ::chip; CHIP_ERROR ModelCommand::RunCommand() { - if (IsGroupId(mNodeId)) + if (IsGroupId(mDestinationId)) { FabricIndex fabricIndex; ReturnErrorOnFailure(CurrentCommissioner().GetFabricIndex(&fabricIndex)); - ChipLogProgress(chipTool, "Sending command to group 0x%x", GroupIdFromNodeId(mNodeId)); + ChipLogProgress(chipTool, "Sending command to group 0x%x", GroupIdFromNodeId(mDestinationId)); - return SendGroupCommand(GroupIdFromNodeId(mNodeId), fabricIndex); + return SendGroupCommand(GroupIdFromNodeId(mDestinationId), fabricIndex); } - ChipLogProgress(chipTool, "Sending command to node 0x%" PRIx64, mNodeId); + ChipLogProgress(chipTool, "Sending command to node 0x%" PRIx64, mDestinationId); CommissioneeDeviceProxy * commissioneeDeviceProxy = nullptr; - if (CHIP_NO_ERROR == CurrentCommissioner().GetDeviceBeingCommissioned(mNodeId, &commissioneeDeviceProxy)) + if (CHIP_NO_ERROR == CurrentCommissioner().GetDeviceBeingCommissioned(mDestinationId, &commissioneeDeviceProxy)) { return SendCommand(commissioneeDeviceProxy, mEndPointId); } - return CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + return CurrentCommissioner().GetConnectedDevice(mDestinationId, &mOnDeviceConnectedCallback, + &mOnDeviceConnectionFailureCallback); } void ModelCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device) diff --git a/examples/chip-tool/commands/clusters/ModelCommand.h b/examples/chip-tool/commands/clusters/ModelCommand.h index ae31d2841e76e7..e6fd091b60ab9d 100644 --- a/examples/chip-tool/commands/clusters/ModelCommand.h +++ b/examples/chip-tool/commands/clusters/ModelCommand.h @@ -32,7 +32,9 @@ class ModelCommand : public CHIPCommand void AddArguments() { - AddArgument("node-id/group-id", 0, UINT64_MAX, &mNodeId); + AddArgument( + "destination-id", 0, UINT64_MAX, &mDestinationId, + "64-bit node or group identifier.\n Group identifiers are detected by being in the 0xFFFF'FFFF'FFFF'xxxx range."); AddArgument("endpoint-id-ignored-for-group-commands", 0, UINT16_MAX, &mEndPointId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -51,7 +53,7 @@ class ModelCommand : public CHIPCommand chip::Optional mTimeout; private: - chip::NodeId mNodeId; + chip::NodeId mDestinationId; std::vector mEndPointId; static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device);