gpt4 book ai didi

com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getZigBeePanId()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 21:45:31 28 4
gpt4 key购买 nike

本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.getZigBeePanId()方法的一些代码示例,展示了ZigBeeTransportTransmit.getZigBeePanId()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeTransportTransmit.getZigBeePanId()方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit
类名称:ZigBeeTransportTransmit
方法名:getZigBeePanId

ZigBeeTransportTransmit.getZigBeePanId介绍

[英]Gets the ZigBee PAN ID currently in use by the transport
[中]获取传输当前正在使用的ZigBee PAN ID

代码示例

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

/**
 * Gets the ZigBee PAN ID currently in use by the transport
 *
 * @return the PAN ID
 */
public int getZigBeePanId() {
  return (transport.getZigBeePanId() & 0xFFFF);
}

代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee

private ZigBeeNetworkManager mockZigBeeNetworkManager() {
  mockedTransport = Mockito.mock(ZigBeeTransportTransmit.class);
  mockedStateListener = Mockito.mock(ZigBeeNetworkStateListener.class);
  mockedNodeListener = Mockito.mock(ZigBeeNetworkNodeListener.class);
  nodeNodeListenerCapture = new ArrayList<ZigBeeNode>();
  networkStateListenerCapture = new ArrayList<ZigBeeTransportState>();
  final ZigBeeNetworkManager networkManager = new ZigBeeNetworkManager(mockedTransport);
  networkManager.addNetworkNodeListener(mockedNodeListener);
  commandListenerCapture = new ArrayList<>();
  networkManager.addNetworkNodeListener(this);
  networkManager.addNetworkStateListener(this);
  networkManager.addCommandListener(this);
  Mockito.when(mockedTransport.setZigBeeChannel(ArgumentMatchers.any(ZigBeeChannel.class)))
      .thenReturn(ZigBeeStatus.SUCCESS);
  Mockito.when(mockedTransport.setZigBeePanId(ArgumentMatchers.anyInt())).thenReturn(ZigBeeStatus.SUCCESS);
  Mockito.when(mockedTransport.setZigBeeExtendedPanId(ArgumentMatchers.any(ExtendedPanId.class)))
      .thenReturn(ZigBeeStatus.SUCCESS);
  Mockito.when(mockedTransport.getZigBeePanId()).thenReturn(0xFFFFABCD);
  Mockito.when(mockedTransport.getZigBeeChannel()).thenReturn(ZigBeeChannel.CHANNEL_11);
  Mockito.when(mockedTransport.getZigBeeExtendedPanId()).thenReturn(new ExtendedPanId("1"));
  mockedApsFrameListener = ArgumentCaptor.forClass(ZigBeeApsFrame.class);
  Mockito.doNothing().when(mockedTransport).sendCommand(mockedApsFrameListener.capture());
  return networkManager;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com