gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-13 10:44:56 26 4
gpt4 key购买 nike

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

ZigBeeTransportReceive.receiveCommand介绍

[英]A callback called by the ZigBeeTransportTransmit when a ZigBee Cluster Library command is received.

The method allows the transport layer to specify the NWK (Network) header, the APS (Application Support Sublayer) and the payload. The headers are provided separately to allow the framework to specify the configuration in some detail, while allowing the transport implementation (eg dongle) to format the data as per its needs. The payload is deserialised by the framework using the ZigBeeDeserializer interface, thus allowing the format to be set for different hardware implementations.
[中]当收到ZigBee集群库命令时,ZigBeetTransportTransmit调用的回调。
该方法允许传输层指定NWK(网络)报头、APS(应用程序支持子层)和有效负载。标题是单独提供的,以允许框架详细指定配置,同时允许传输实现(例如加密狗)根据需要格式化数据。框架使用ZigBeeDeserializer接口对有效负载进行反序列化,从而允许为不同的硬件实现设置格式。

代码示例

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

@Override
public boolean notify(final AF_INCOMING_MSG clusterMessage) {
  ZigBeeApsFrame apsFrame = new ZigBeeApsFrame();
  apsFrame.setCluster(clusterMessage.getClusterId());
  apsFrame.setDestinationEndpoint(clusterMessage.getDstEndpoint());
  apsFrame.setSourceEndpoint(clusterMessage.getSrcEndpoint());
  apsFrame.setProfile(getEndpointProfile(clusterMessage.getDstEndpoint()));
  // nwkHeader.setDestinationAddress(clusterMessage.geta);
  apsFrame.setSourceAddress(clusterMessage.getSrcAddr());
  apsFrame.setApsCounter(clusterMessage.getTransId());
  apsFrame.setPayload(clusterMessage.getData());
  zigbeeNetworkReceive.receiveCommand(apsFrame);
  return true;
}

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

zigbeeNetworkReceive.receiveCommand(apsFrame);
return;

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

zigbeeNetworkReceive.receiveCommand(apsFrame);
return;

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