gpt4 book ai didi

com.zsmartsystems.zigbee.ZigBeeEndpoint.setProfileId()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 07:49:31 27 4
gpt4 key购买 nike

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

ZigBeeEndpoint.setProfileId介绍

[英]Sets the profile ID
[中]设置配置文件ID

代码示例

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

@Test
public void testProfileId() {
  ZigBeeEndpoint endpoint = getEndpoint();
  endpoint.setProfileId(0x104);
  assertEquals(0x104, endpoint.getProfileId());
}

代码示例来源:origin: openhab/org.openhab.binding.zigbee

endpointId, ZigBeeProfileType.getByValue(profileId));
endpoint = new ZigBeeEndpoint(node, endpointId);
endpoint.setProfileId(profileId);
node.addEndpoint(endpoint);

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

@Test
  public void testSerialize() {
    ZigBeeTransportTransmit mockedTransport = Mockito.mock(ZigBeeTransportTransmit.class);
    ZigBeeNetworkManager networkManager = new ZigBeeNetworkManager(mockedTransport);
    ZigBeeNode node = new ZigBeeNode(networkManager, new IeeeAddress("1234567890ABCDEF"));
    node.setNetworkAddress(12345);

    ZigBeeEndpoint endpoint;
    endpoint = new ZigBeeEndpoint(node, 1);
    endpoint.setProfileId(123);
    node.addEndpoint(endpoint);
    endpoint = new ZigBeeEndpoint(node, 2);
    endpoint.setProfileId(321);
    node.addEndpoint(endpoint);
    /*
     * ZigBeeNodeDao nodeDao = ZigBeeNodeDao.createFromZigBeeNode(node);
     * assertEquals(new IeeeAddress("1234567890ABCDEF").toString(), nodeDao.getIeeeAddress());
     * assertEquals(Integer.valueOf(12345), nodeDao.getNetworkAddress());
     *
     * node = ZigBeeNodeDao.createFromZigBeeDao(networkManager, nodeDao);
     * assertEquals(new IeeeAddress("1234567890ABCDEF"), node.getIeeeAddress());
     * assertEquals(Integer.valueOf(12345), node.getNetworkAddress());
     * assertEquals(2, node.getEndpoints().size());
     *
     * endpoint = node.getEndpoint(1);
     * assertEquals(123, endpoint.getProfileId());
     */
  }
}

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

ZigBeeEndpoint endpoint = new ZigBeeEndpoint(node, endpointId);
SimpleDescriptor simpleDescriptor = simpleDescriptorResponse.getSimpleDescriptor();
endpoint.setProfileId(simpleDescriptor.getProfileId());
endpoint.setDeviceId(simpleDescriptor.getDeviceId());
endpoint.setDeviceVersion(simpleDescriptor.getDeviceVersion());

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