0

我正在使用 impinj octane SDK 3.6.0,我想做 EPC Gens2 标签过滤,但我的代码不能正常工作:

这是我的代码:

''''''''''''''''代码'''''''''''''''

   Settings setupFilter(Settings settings) {
        TagFilter TagFilter1 = settings.getFilters().getTagFilter1();
        TagFilter1.setBitCount(96);
        TagFilter1.setBitPointer(BitPointers.Epc);
        TagFilter1.setMemoryBank(MemoryBank.Epc);
        TagFilter1.setFilterOp(TagFilterOp.Match);
        TagFilter1.setTagMask("E280117000000213682C6B7B");
        settings.getFilters().setMode(TagFilterMode.OnlyFilter1);
        //settings.getFilters().setMode(TagFilterMode.UseTagSelectFilters);
        //settings.setFilters(null);
        
        //settings.getReport().setIncludeCrc(crc);
        settings.setReport(report);
     
    return settings;
   }



 public     Filter() {
    hostname = SampleProperties.hostname;

    reader = new ImpinjReader();
    startConexion();
    Settings settings = null;
    
    try {
        settings = reader.querySettings();
    } catch (OctaneSdkException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    
    // Gen2 Filtering
   settings = setupFilter(settings);


   try {
    reader.applySettings(settings);
   } catch (OctaneSdkException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   }

}

'''''''''''''''''代码''''''''''''''''

我收到一条错误消息:

'''''''''''''''代码''''''''''''

log4j:WARN No appenders could be found for logger (org.llrp.ltk.net.LLRPIoHandlerAdapterImpl).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "com.impinj.octane.ReportConfig.getMode()" because the return value of "com.impinj.octane.Settings.getReport()" is null
    at com.impinj.octane.ImpinjReader.buildAddROSpecMessage(ImpinjReader.java:1310)
    at com.impinj.octane.ImpinjReader.applySettings(ImpinjReader.java:1049)
    at com.example.sdksamples.main.<init>Filter.java:136)
    at com.example.sdksamples.Filter.main(Filter.java:226)

''''''''''''代码''''''''''''''''

有什么建议么?

提前致谢

4

0 回答 0