本文整理了Java中com.zsmartsystems.zigbee.ZigBeeEndpoint.getDeviceId()
方法的一些代码示例,展示了ZigBeeEndpoint.getDeviceId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeEndpoint.getDeviceId()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.ZigBeeEndpoint
类名称:ZigBeeEndpoint
方法名:getDeviceId
[英]Gets the device ID.
[中]获取设备ID。
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
private void outputEndpoint(PrintStream out, ZigBeeEndpoint endpoint) {
out.println("Profile " + String.format("%04X ", endpoint.getProfileId())
+ ZigBeeProfileType.getByValue(endpoint.getProfileId()));
out.println(" : Device Type " + String.format("%04X ", endpoint.getDeviceId())
+ com.zsmartsystems.zigbee.ZigBeeDeviceType.getByValue(endpoint.getDeviceId()).toString());
for (Integer clusterId : endpoint.getInputClusterIds()) {
out.println(" -> " + ZclClusterType.getValueById(clusterId));
}
for (Integer clusterId : endpoint.getOutputClusterIds()) {
out.println(" <- " + ZclClusterType.getValueById(clusterId));
}
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Override
public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStream out)
throws IllegalArgumentException {
if (args.length != 2) {
throw new IllegalArgumentException("Invalid number of arguments");
}
final ZigBeeEndpoint endpoint = getEndpoint(networkManager, args[1]);
ZigBeeProfileType profile = ZigBeeProfileType.getByValue(endpoint.getProfileId());
ZigBeeDeviceType device = ZigBeeDeviceType.getByValue(endpoint.getDeviceId());
out.println("IEEE Address : " + endpoint.getIeeeAddress());
out.println("Network Address : " + endpoint.getParentNode().getNetworkAddress());
out.println("Endpoint : " + endpoint.getEndpointId());
out.println("Device Profile : " + String.format("0x%04X, ", endpoint.getProfileId())
+ (profile == null ? "Unknown" : profile.toString()));
out.println("Device Type : " + String.format("0x%04X, ", endpoint.getDeviceId())
+ (device == null ? "Unknown" : device.toString()));
out.println("Device Version : " + endpoint.getDeviceVersion());
out.println("Input Clusters : (Server)");
printClusters(endpoint, true, out);
out.println("Output Clusters : (Client)");
printClusters(endpoint, false, out);
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
out.println(String.format("%-3d %-25s %s", endpoint.getEndpointId(),
ZigBeeProfileType.getByValue(endpoint.getProfileId()),
ZigBeeDeviceType.getByValue(endpoint.getDeviceId())));
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testGetDeviceId() {
ZigBeeEndpoint endpoint = getEndpoint();
endpoint.setDeviceId(9999);
assertEquals(9999, endpoint.getDeviceId());
}
内容来源于网络,如有侵权,请联系作者删除!