public void Initialize()
 {
     try
     {
         if (!_readerReady)
         {
             _reader.Connect(CAEN.CAENRFIDPort.CAENRFID_RS232, "MOC1");
             System.Threading.Thread.Sleep(500);
             _source      = _reader.GetSources()[0];
             _readerReady = true;
         }
     }
     catch (CAEN.CAENRFIDException ex)
     {
         // where to output it?
         // NOTE: the actual source of the issue
         // is hidden from us
         _readerReady = false;
         // prevent CS0168
         ex = null;
     }
     //var chan = _reader.GetRFChannel(); // 2 by default
     //var reg = _reader.GetRFRegulation(); // KOREA by default!
     //_reader.SetRFRegulation(com.caen.RFIDLibrary.CAENRFIDRFRegulations.ETSI_300220);
 }
Esempio n. 2
0
 /// <exception cref="Exception">Thrown when interrogator initialization has failed</exception>
 public M3OrangeInterrogator()
 {
     _reader = new CAEN.CAENRFIDReader();
     _reader.CAENRFIDEvent += new com.caen.RFIDLibrary.CAENRFIDEventHandler(HandleRFIDEvent);
     _reader.Connect(CAEN.CAENRFIDPort.CAENRFID_RS232, "MOC1");
     System.Threading.Thread.Sleep(500);
     _source      = _reader.GetSources()[0];
     _readerReady = true;
 }