本文整理了Java中com.zsmartsystems.zigbee.security.ZigBeeKey.toString()
方法的一些代码示例,展示了ZigBeeKey.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeKey.toString()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.security.ZigBeeKey
类名称:ZigBeeKey
方法名:toString
暂无
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Override
public void process(ZigBeeNetworkManager networkManager, String[] args, PrintStream out)
throws IllegalArgumentException {
if (args.length < 2 || args.length > 3) {
throw new IllegalArgumentException("Incorrect number of arguments.");
}
ZigBeeKey key;
if (args.length == 2) {
key = new ZigBeeKey(args[1]);
} else if (args.length == 3 && args[1].equalsIgnoreCase("mmo")) {
MmoHash hash;
try {
hash = new MmoHash(args[2]);
key = new ZigBeeKey(hash.getHash());
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("MMO key is incorrect format.");
}
} else {
throw new IllegalArgumentException("Invalid arguments.");
}
ZigBeeStatus result = networkManager.setZigBeeLinkKey(key);
out.println("Link key " + key.toString() + " was " + (result == ZigBeeStatus.SUCCESS ? "" : "not") + " set.");
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
builder.append(channel.toString());
builder.append('>');
builder.append(networkKey.toString());
builder.append('>');
if (networkKey.hasSequenceNumber()) {
builder.append(linkKey.toString());
builder.append('>');
if (linkKey.hasSequenceNumber()) {
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testConstructorString() {
ZigBeeKey key = new ZigBeeKey("11223344556677889900AABBCCDDEEFF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
key = new ZigBeeKey("11 22 33 44 55 66 77 88 99 00 AA BB CC DD EE FF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
key = new ZigBeeKey("11,22,33,44,55,66,77,88,99,00,AA,BB,CC,DD,EE,FF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
key = new ZigBeeKey("11:22:33:44:55:66:77:88:99:00:AA:BB:CC:DD:EE:FF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
key = new ZigBeeKey("0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 0x99 0x00 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
key = new ZigBeeKey("0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0x00,0xAA,0xBB,0xCC,0xDD,0xEE,0xFF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
key = new ZigBeeKey("0x11:0x22:0x33:0x44:0x55:0x66:0x77:0x88:0x99:0x00:0xAA:0xBB:0xCC:0xDD:0xEE:0xFF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testToString() {
ZigBeeKey key = new ZigBeeKey("11223344556677889900AABBCCDDEEFF");
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testConstructorArray() {
ZigBeeKey key = new ZigBeeKey(new int[] { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0x00, 0xAA,
0xBB, 0xCC, 0xDD, 0xEE, 0xFF });
assertEquals("11223344556677889900AABBCCDDEEFF", key.toString());
}
代码示例来源:origin: openhab/org.openhab.binding.zigbee
configuration.put(CONFIGURATION_LINKKEY, linkKey.toString());
configuration.put(CONFIGURATION_NETWORKKEY, networkKey.toString());
configuration.put(CONFIGURATION_INITIALIZE, false);
updateConfiguration(configuration);
内容来源于网络,如有侵权,请联系作者删除!