本文整理匯總了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);
}
}