- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getNwkAddress()
方法的一些代码示例,展示了ZigBeeTransportTransmit.getNwkAddress()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeTransportTransmit.getNwkAddress()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit
类名称:ZigBeeTransportTransmit
方法名:getNwkAddress
[英]Returns the network address of the local device
[中]返回本地设备的网络地址
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
private void addLocalNode() {
Integer nwkAddress = transport.getNwkAddress();
IeeeAddress ieeeAddress = transport.getIeeeAddress();
if (nwkAddress != null && ieeeAddress != null) {
ZigBeeNode node = getNode(ieeeAddress);
if (node == null) {
logger.debug("{}: Adding local node to network, NWK={}", ieeeAddress, nwkAddress);
node = new ZigBeeNode(this, ieeeAddress);
node.setNetworkAddress(nwkAddress);
addNode(node);
}
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
localNwkAddress = transport.getNwkAddress();
localIeeeAddress = transport.getIeeeAddress();
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void initialize() {
ZigBeeTransportTransmit transport = Mockito.mock(ZigBeeTransportTransmit.class);
Mockito.when(transport.initialize()).thenReturn(ZigBeeStatus.COMMUNICATION_ERROR);
ZigBeeNetworkManager manager = new ZigBeeNetworkManager(transport);
ZigBeeStatus response = manager.initialize();
assertEquals(ZigBeeStatus.COMMUNICATION_ERROR, response);
transport = Mockito.mock(ZigBeeTransportTransmit.class);
Mockito.when(transport.initialize()).thenReturn(ZigBeeStatus.SUCCESS);
Mockito.when(transport.getNwkAddress()).thenReturn(Integer.valueOf(123));
Mockito.when(transport.getIeeeAddress()).thenReturn(new IeeeAddress("1234567890ABCDEF"));
manager = new ZigBeeNetworkManager(transport);
response = manager.initialize();
assertEquals(ZigBeeStatus.SUCCESS, response);
ZigBeeNode node = manager.getNode(new IeeeAddress("1234567890ABCDEF"));
assertNotNull(node);
assertEquals(Integer.valueOf(123), node.getNetworkAddress());
manager.shutdown();
Mockito.verify(transport, Mockito.times(1)).shutdown();
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void testNetworkStateListener() {
// ZigBeeNetworkManager networkManager = mockZigBeeNetworkManager();
ZigBeeTransportTransmit transport = Mockito.mock(ZigBeeTransportTransmit.class);
ZigBeeNetworkManager manager = new ZigBeeNetworkManager(transport);
ZigBeeNetworkStateListener stateListener = Mockito.mock(ZigBeeNetworkStateListener.class);
manager.addNetworkStateListener(stateListener);
Mockito.when(transport.getNwkAddress()).thenReturn(Integer.valueOf(123));
Mockito.when(transport.getIeeeAddress()).thenReturn(new IeeeAddress("1234567890ABCDEF"));
// This will be ignored as an illegal state transition
manager.setNetworkState(ZigBeeTransportState.INITIALISING);
manager.setNetworkState(ZigBeeTransportState.UNINITIALISED);
Mockito.verify(stateListener, Mockito.timeout(TIMEOUT)).networkStateUpdated(ZigBeeTransportState.UNINITIALISED);
manager.setNetworkState(ZigBeeTransportState.INITIALISING);
Mockito.verify(stateListener, Mockito.timeout(TIMEOUT)).networkStateUpdated(ZigBeeTransportState.INITIALISING);
manager.setNetworkState(ZigBeeTransportState.ONLINE);
Mockito.verify(stateListener, Mockito.timeout(TIMEOUT)).networkStateUpdated(ZigBeeTransportState.ONLINE);
assertEquals(Integer.valueOf(123), manager.getLocalNwkAddress());
assertEquals(new IeeeAddress("1234567890ABCDEF"), manager.getLocalIeeeAddress());
manager.removeNetworkStateListener(mockedStateListener);
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Tests that after {@link ZigBeeTransportTransmit#startup()} has been called,
* {@link ZigBeeTransportTransmit#getNwkAddress()} does not return null.
*/
@Test
public void getNwkAddress() {
assertEquals(ZigBeeStatus.SUCCESS, transport.initialize());
assertEquals(ZigBeeStatus.SUCCESS, transport.startup(false));
assertNotNull(transport.getNwkAddress());
}
}
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getTcLinkKey()方法的一些代码示例,展示了ZigB
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getVersionString()方法的一些代码示例,展示了
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.initialize()方法的一些代码示例,展示了ZigBee
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getZigBeeNetworkKey()方法的一些代码示例,
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.setZigBeePanId()方法的一些代码示例,展示了Zi
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getZigBeePanId()方法的一些代码示例,展示了Zi
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getNwkAddress()方法的一些代码示例,展示了Zig
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.setTcLinkKey()方法的一些代码示例,展示了ZigB
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getZigBeeChannel()方法的一些代码示例,展示了
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.updateTransportConfig()方法的一些代码示
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getIeeeAddress()方法的一些代码示例,展示了Zi
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getZigBeeExtendedPanId()方法的一些代码
我是一名优秀的程序员,十分优秀!