Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStr
}

Collections.sort(nodeIds);
String tableHeader = String.format("%-7s %-4s %-16s %-12s %-10s %-3s %-25s %-35s %-20s %-15s",
String tableHeader = String.format("%-7s %-4s %-16s %-12s %-7s %3s %-25s %-35s %-25s %-15s",
"Network", "Addr", "IEEE Address", "Logical Type", "State", "EP", "Profile", "Device Type",
"Manufacturer", "Model");

Expand All @@ -73,9 +73,10 @@ public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStr
}

private void printNode(ZigBeeNode node, PrintStream out) {
String nodeInfo = String.format("%7d %04X %-16s %-12s %-10s", node.getNetworkAddress(),
node.getLinkQualityStatistics();
String nodeInfo = String.format("%7d %04X %-16s %-12s %-7s ", node.getNetworkAddress(),
node.getNetworkAddress(), node.getIeeeAddress(), node.getLogicalType(), node.getNodeState());
String nodeInfoPadding = String.format("%7s %4s %16s %12s %10s", "", "", "", "", "");
String nodeInfoPadding = String.format("%7s %4s %16s %12s %7s ", "", "", "", "", "");

List<ZigBeeEndpoint> endpoints = new ArrayList<>(node.getEndpoints());
Collections.sort(endpoints, (ep1, ep2) -> ep1.getEndpointId() - ep2.getEndpointId());
Expand All @@ -89,16 +90,16 @@ private void printNode(ZigBeeNode node, PrintStream out) {
profileType = ZigBeeProfileType.getByValue(endpoint.getProfileId()).toString();
}
String deviceType;
if (ZigBeeDeviceType.getByValue(endpoint.getDeviceId()) == null
|| ZigBeeProfileType.getByValue(endpoint.getProfileId()) == null) {
if (ZigBeeDeviceType.getByValue(ZigBeeProfileType.getByValue(endpoint.getProfileId()),
endpoint.getDeviceId()) == null) {
deviceType = String.format("%04X", endpoint.getDeviceId());
} else {
deviceType = ZigBeeDeviceType
.getByValue(ZigBeeProfileType.getByValue(endpoint.getProfileId()), endpoint.getDeviceId())
.toString();
}
boolean showManufacturerAndModel = endpoint.getParentNode().getNetworkAddress() != 0;
String endpointInfo = String.format("%3d %-25s %-35s %-20s %-15s", endpoint.getEndpointId(),
String endpointInfo = String.format("%3d %-25s %-35s %-25s %-15s", endpoint.getEndpointId(),
profileType, deviceType, showManufacturerAndModel ? getManufacturer(endpoint) : "",
showManufacturerAndModel ? getModel(endpoint) : "");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private void cmdDisplayAllNodes(ZigBeeNetworkManager networkManager, PrintStream
return;
}

out.println("Address Ieee Address State ");
out.println("Address IEEE Address State ");
for (ZigBeeEndpoint endpoint : applications.values()) {
ZclOtaUpgradeServer otaServer = (ZclOtaUpgradeServer) endpoint
.getApplication(ZclOtaUpgradeCluster.CLUSTER_ID);
Expand Down