本文整理了Java中com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit.updateTransportConfig()
方法的一些代码示例,展示了ZigBeeTransportTransmit.updateTransportConfig()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZigBeeTransportTransmit.updateTransportConfig()
方法的具体详情如下:
包路径:com.zsmartsystems.zigbee.transport.ZigBeeTransportTransmit
类名称:ZigBeeTransportTransmit
方法名:updateTransportConfig
[英]Sets the transport configuration.
This method passes a Map of TransportConfigOptions to the transport layer. Each option must be defined as a {link Object} as defined by the option (see the documentation for TransportConfigOption. The transport layer should update its configuration as appropriate - if this will take any appreciable time to complete, the implementation should perform error checking and then return TransportConfigResult#SUCCESS.
This method returns the result of each configuration in the calling TransportConfig. If configuration options are invalid, TransportConfigResult#ERROR_INVALID_VALUE is returned. If the transport is not in a mode where it can accept a specific configuration change TransportConfigResult#ERROR_INVALID_VALUE is returned in the value status
[中]设置传输配置。
此方法将TransportConfigOptions的映射传递给传输层。每个选项必须定义为该选项所定义的{link Object}(请参阅TransportConfigOption的文档)。传输层应根据需要更新其配置——如果这将需要相当长的时间才能完成,则实现应执行错误检查,然后返回TransportConfigResult#SUCCESS。
此方法返回调用TransportConfig的每个配置的结果。如果配置选项无效,则返回TransportConfigResult#ERROR _invalid_值。如果传输未处于可接受特定配置更改的模式下,TransportConfigResult#错误_无效_值将在值状态中返回
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* Adds an installation key for the specified address. The {@link ZigBeeKey} should have an address associated with
* it.
*
* @param key the install key as {@link ZigBeeKey} to be used. The key must contain a partner address.
* @return {@link ZigBeeStatus} with the status of function
*/
public ZigBeeStatus setZigBeeInstallKey(final ZigBeeKey key) {
if (!key.hasAddress()) {
return ZigBeeStatus.INVALID_ARGUMENTS;
}
TransportConfig config = new TransportConfig(TransportConfigOption.INSTALL_KEY, key);
transport.updateTransportConfig(config);
return config.getResult(TransportConfigOption.INSTALL_KEY);
}
代码示例来源:origin: openhab/org.openhab.binding.zigbee
zigbeeTransport.updateTransportConfig(transportConfig);
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
/**
* {@inheritDoc}
*/
@Override
public boolean process(final ZigBeeApi zigbeeApi, final String[] args, PrintStream out) throws Exception {
if (args.length < 3) {
return false;
}
TransportConfig config = new TransportConfig();
switch (args[1].toLowerCase()) {
case "mode":
config.addOption(TransportConfigOption.TRUST_CENTRE_JOIN_MODE,
TrustCentreJoinMode.valueOf(args[2].toUpperCase()));
break;
case "key":
String key = "";
for (int cnt = 0; cnt < 16; cnt++) {
key += args[cnt + 2];
}
config.addOption(TransportConfigOption.TRUST_CENTRE_LINK_KEY, new ZigBeeKey(key));
break;
default:
return false;
}
TransportConfigOption option = config.getOptions().iterator().next();
dongle.updateTransportConfig(config);
print("Trust Centre configuration for " + option + " returned " + config.getResult(option), out);
return true;
}
}
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
networkManager.setZigBeeExtendedPanId(epanId);
transportOptions.addOption(TransportConfigOption.DEVICE_TYPE, deviceType);
networkManager.getZigBeeTransport().updateTransportConfig(transportOptions);
networkManager.startup(true);
代码示例来源:origin: zsmartsystems/com.zsmartsystems.zigbee
dongle.updateTransportConfig(transportOptions);
代码示例来源:origin: openhab/org.openhab.binding.zigbee
zigbeeTransport.updateTransportConfig(transportConfig);
内容来源于网络,如有侵权,请联系作者删除!