本文整理汇总了Java中org.llrp.ltk.generated.enumerations.StatusCode类的典型用法代码示例。如果您正苦于以下问题:Java StatusCode类的具体用法?Java StatusCode怎么用?Java StatusCode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StatusCode类属于org.llrp.ltk.generated.enumerations包,在下文中一共展示了StatusCode类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readTransmitPowerEntries
import org.llrp.ltk.generated.enumerations.StatusCode; //导入依赖的package包/类
public List<TransmitPowerLevelTableEntry> readTransmitPowerEntries() throws LLRPException {
GET_READER_CAPABILITIES_RESPONSE response;
try {
GET_READER_CAPABILITIES getReaderCaps = new GET_READER_CAPABILITIES();
getReaderCaps.setRequestedData(new GetReaderCapabilitiesRequestedData(GetReaderCapabilitiesRequestedData.All));
response = (GET_READER_CAPABILITIES_RESPONSE) reader.transact(getReaderCaps, TIMEOUT_MS);
StatusCode status = response.getLLRPStatus().getStatusCode();
if (status.equals(new StatusCode(StatusCode.M_Success))) {
return response.getRegulatoryCapabilities().getUHFBandCapabilities().getTransmitPowerLevelTableEntryList();
} else {
LOG.error("Error reading capabilities. Status code: {}", status.toString());
throw new LLRPException();
}
} catch (TimeoutException e) {
LOG.error("Timeout when adding reading capabilities.", e);
throw new LLRPException(e);
}
}