- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.initialize()
方法的一些代码示例,展示了ZigBeeTransportTransmit.initialize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeTransportTransmit.initialize()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit
类名称:ZigBeeTransportTransmit
方法名:initialize
[英]Initialize the transport interface. Following the call to initialize the configuration methods may be used to configure the transport layer.
During the initialize() method, the provider must initialize the ports and perform any configuration required to get the stack ready for use. If the dongle has already joined a network, then this method will return ZigBeeStatus#SUCCESS.
At the completion of the initialize method, the #getIeeeAddress() method must return the valid address for the coordinator.
[中]初始化传输接口。在调用初始化之后,可以使用配置方法来配置传输层。
在initialize()方法期间,提供程序必须初始化端口,并执行使堆栈准备好使用所需的任何配置。如果加密狗已加入网络,则此方法将返回ZigBeeStatus#SUCCESS。
初始化方法完成时,#getIeeeAddress()方法必须返回协调器的有效地址。
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void getTransportVersionString() {
ZigBeeTransportTransmit transport = Mockito.mock(ZigBeeTransportTransmit.class);
Mockito.when(transport.initialize()).thenReturn(ZigBeeStatus.COMMUNICATION_ERROR);
ZigBeeNetworkManager manager = new ZigBeeNetworkManager(transport);
Mockito.when(transport.getVersionString()).thenReturn("Version!");
assertEquals("Version!", manager.getTransportVersionString());
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
@Test
public void startup() {
ZigBeeTransportTransmit transport = Mockito.mock(ZigBeeTransportTransmit.class);
Mockito.when(transport.initialize()).thenReturn(ZigBeeStatus.COMMUNICATION_ERROR);
ZigBeeNetworkManager manager = new ZigBeeNetworkManager(transport);
assertEquals(transport, manager.getZigBeeTransport());
Mockito.when(transport.startup(false)).thenReturn(ZigBeeStatus.COMMUNICATION_ERROR);
Mockito.when(transport.startup(true)).thenReturn(ZigBeeStatus.SUCCESS);
assertEquals(ZigBeeStatus.COMMUNICATION_ERROR, manager.startup(false));
Mockito.verify(transport, Mockito.times(1)).startup(false);
assertEquals(ZigBeeStatus.SUCCESS, manager.startup(true));
Mockito.verify(transport, Mockito.times(1)).startup(true);
}
代码示例来源: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
ZigBeeStatus transportResponse = transport.initialize();
if (transportResponse != ZigBeeStatus.SUCCESS) {
setNetworkState(ZigBeeTransportState.OFFLINE);
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Tests that after {@link ZigBeeTransportTransmit#initialize()} has been called,
* {@link ZigBeeTransportTransmit#getIeeeAddress()} does not return null.
*/
@Test
public void getIeeeAddress() {
assertEquals(ZigBeeStatus.SUCCESS, transport.initialize());
assertNotNull(transport.getIeeeAddress());
}
代码示例来源: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()方法的一些代码
我是一名优秀的程序员,十分优秀!