- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeBroadcastDestination
类的一些代码示例,展示了ZigBeeBroadcastDestination
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeBroadcastDestination
类的具体详情如下:
包路径:com.zsmartsystems.zigbee.ZigBeeBroadcastDestination
类名称:ZigBeeBroadcastDestination
[英]Defines the broadcast destination addresses defined in the ZigBee protocol.
Broadcast transmissions shall not use the MAC sub-layer acknowledgement; instead, a passive acknowledgement mechanism may be used. Passive acknowledgement means that every ZigBee router and ZigBee coordinator keeps track of which of its neighboring devices have successfully relayed the broadcast transmission. The MAC sub-layer acknowledgement is disabled by setting the acknowledged transmission flag of the TxOptions parameter to FALSE. All other flags of the TxOptions parameter shall be set based on the network configuration
[中]定义ZigBee协议中定义的广播目标地址。
广播传输不得使用MAC子层确认;相反,可以使用被动确认机制。被动确认意味着每个ZigBee路由器和ZigBee协调器都会跟踪其相邻设备中的哪些设备已成功中继广播传输。通过将TxOptions参数的已确认传输标志设置为FALSE,可以禁用MAC子层确认。TxOptions参数的所有其他标志应根据网络配置进行设置
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Tests the supplied address to determine if it is a broadcast address
*
* @param address the address to test
* @return true if the address is in the broadcast address range
*/
public static boolean isBroadcast(int address) {
return (address >= BROADCAST_RESERVED_FFF8.getKey() && address <= BROADCAST_ALL_DEVICES.getKey());
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Lookup function based on the broadcast address. Returns null if the address does not exist.
*
* @param address the address to lookup
* @return enumeration value of the broadcast address.
*/
public static ZigBeeBroadcastDestination getBroadcastDestination(int address) {
if (codeMapping == null) {
initMapping();
}
return codeMapping.get(address);
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
private static void initMapping() {
codeMapping = new HashMap<Integer, ZigBeeBroadcastDestination>();
for (ZigBeeBroadcastDestination s : values()) {
codeMapping.put(s.key, s);
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void getDestination() {
ZigBeeBroadcastDestination destination = ZigBeeBroadcastDestination.getBroadcastDestination(0);
assertEquals(null, destination);
destination = ZigBeeBroadcastDestination.getBroadcastDestination(0xFFFC);
assertEquals(ZigBeeBroadcastDestination.BROADCAST_ROUTERS_AND_COORD, destination);
destination = ZigBeeBroadcastDestination.getBroadcastDestination(0xFFFB);
assertEquals(ZigBeeBroadcastDestination.BROADCAST_LOW_POWER_ROUTERS, destination);
assertEquals(0xFFFF, ZigBeeBroadcastDestination.BROADCAST_ALL_DEVICES.getKey());
assertTrue(ZigBeeBroadcastDestination.isBroadcast(0xfff8));
assertTrue(ZigBeeBroadcastDestination.isBroadcast(0xffff));
assertFalse(ZigBeeBroadcastDestination.isBroadcast(0xfff7));
assertFalse(ZigBeeBroadcastDestination.isBroadcast(0x10000));
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
if (ZigBeeBroadcastDestination.getBroadcastDestination(destination.getAddress()) != null) {
command = new ManagementPermitJoiningRequest();
command.setPermitDuration(duration);
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Enables or disables devices to join the whole network.
* <p>
* Devices can only join the network when joining is enabled. It is not advised to leave joining enabled permanently
* since it allows devices to join the network without the installer knowing.
*
* @param duration sets the duration of the join enable. Setting this to 0 disables joining. As per ZigBee 3, a
* value of 255 is not permitted and will be ignored.
* @return {@link ZigBeeStatus} with the status of function
*/
public ZigBeeStatus permitJoin(final int duration) {
return permitJoin(new ZigBeeEndpointAddress(ZigBeeBroadcastDestination.BROADCAST_ROUTERS_AND_COORD.getKey()),
duration);
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
request.setStartIndex(0);
request.setDestinationAddress(
new ZigBeeEndpointAddress(ZigBeeBroadcastDestination.BROADCAST_RX_ON.getKey()));
CommandResult response;
response = networkManager.sendTransaction(request, request).get();
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Get node descriptor
*
* @return true if the message was processed ok
* @throws ExecutionException
* @throws InterruptedException
*/
private boolean requestNetworkAddress() throws InterruptedException, ExecutionException {
NetworkAddressRequest networkAddressRequest = new NetworkAddressRequest();
networkAddressRequest.setIeeeAddr(node.getIeeeAddress());
networkAddressRequest.setRequestType(0);
networkAddressRequest.setStartIndex(0);
networkAddressRequest.setDestinationAddress(
new ZigBeeEndpointAddress(ZigBeeBroadcastDestination.BROADCAST_ALL_DEVICES.getKey()));
CommandResult response = networkManager.sendTransaction(networkAddressRequest, networkAddressRequest).get();
final NetworkAddressResponse networkAddressResponse = (NetworkAddressResponse) response.getResponse();
logger.debug("{}: Node SVC Discovery: NetworkAddressRequest returned {}", node.getNetworkAddress(),
networkAddressResponse);
if (networkAddressResponse == null) {
return false;
}
if (networkAddressResponse.getStatus() == ZdoStatus.SUCCESS) {
node.setNetworkAddress(networkAddressResponse.getNwkAddrRemoteDev());
return true;
}
return false;
}
本文整理了Java中com.zsmartsystems.zigbee.ZigBeeBroadcastDestination.getKey()方法的一些代码示例,展示了ZigBeeBroadcastDe
我是一名优秀的程序员,十分优秀!