예제 #1
0
        private void myUpdateStatus(Events.StatusEventData eventData)
        {
            switch (eventData.StatusEventType)
            {
            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.INVENTORY_START_EVENT:
                functionCallStatusLabel.Text = "Inventory started";
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.INVENTORY_STOP_EVENT:
                functionCallStatusLabel.Text = "Inventory stopped";
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ACCESS_START_EVENT:
                functionCallStatusLabel.Text = "Access Operation started";
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ACCESS_STOP_EVENT:
                functionCallStatusLabel.Text = "Access Operation stopped";

                if (this.m_SelectedTagID == string.Empty)
                {
                    uint successCount, failureCount;
                    successCount = failureCount = 0;
                    m_ReaderAPI.Actions.TagAccess.GetLastAccessResult(ref successCount, ref failureCount);
                    functionCallStatusLabel.Text = "Access completed - Success Count: " + successCount.ToString()
                                                   + ", Failure Count: " + failureCount.ToString();
                }
                resetButtonState();
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.BUFFER_FULL_WARNING_EVENT:
                functionCallStatusLabel.Text = " Buffer full warning";
                myUpdateRead(null);
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.BUFFER_FULL_EVENT:
                functionCallStatusLabel.Text = "Buffer full";
                myUpdateRead(null);
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.DISCONNECTION_EVENT:
                functionCallStatusLabel.Text = "Disconnection Event " + eventData.DisconnectionEventData.DisconnectEventInfo.ToString();
                connectBackgroundWorker.RunWorkerAsync("Disconnect");
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ANTENNA_EVENT:
                functionCallStatusLabel.Text = "Antenna Status Update";
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.READER_EXCEPTION_EVENT:
                functionCallStatusLabel.Text = "Reader ExceptionEvent " + eventData.ReaderExceptionEventData.ReaderExceptionEventInfo;
                break;

            default:
                break;
            }
        }
예제 #2
0
        private void Events_StatusNotify(object sender, Events.StatusEventArgs e)
        {
            Events.StatusEventData eventData = e.StatusEventData;

            if (e.StatusEventData.StatusEventType == Symbol.RFID3.Events.STATUS_EVENT_TYPE.HANDHELD_TRIGGER_EVENT && isTriggerActive)
            {
                TriggerInfo triggerInfo = new TriggerInfo();
                triggerInfo.EnableTagEventReport = true;

                if (eventData.HandheldTriggerEventData.HandheldTriggerEvent == HANDHELD_TRIGGER_EVENT_TYPE.HANDHELD_TRIGGER_PRESSED &&
                    triggerInfo.StartTrigger.Type == START_TRIGGER_TYPE.START_TRIGGER_TYPE_IMMEDIATE)
                {
                    // Lets start the inventory upon GPI event even if the StartTrigger is configured as immediate
                    this.start();
                }
                if (eventData.HandheldTriggerEventData.HandheldTriggerEvent == HANDHELD_TRIGGER_EVENT_TYPE.HANDHELD_TRIGGER_RELEASED &&
                    triggerInfo.StopTrigger.Type == STOP_TRIGGER_TYPE.STOP_TRIGGER_TYPE_IMMEDIATE)
                {
                    this.stop();
                    TriggerStopHandler();
                }
            }
        }
예제 #3
0
        private void myUpdateStatus(Events.StatusEventData eventData)
        {
            switch (eventData.StatusEventType)
            {
            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.INVENTORY_START_EVENT:
                functionCallStatusLabel.Text = "Inventory started";
                this.readBtn.Enabled         = true;
                this.readBtn.Text            = "Stop Reading";

                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.INVENTORY_STOP_EVENT:
                functionCallStatusLabel.Text = "Inventory stopped";
                this.readBtn.Enabled         = true;
                this.readBtn.Text            = "Start Reading";
                //memBank_CB.Enabled = true;

                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ACCESS_START_EVENT:
                functionCallStatusLabel.Text = "Access Operation started";
                this.readBtn.Enabled         = true;
                this.readBtn.Text            = "Stop Reading";
                //memBank_CB.Enabled = false; ;
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ACCESS_STOP_EVENT:
                functionCallStatusLabel.Text = "Access Operation stopped";

                if (this.m_SelectedTagID == string.Empty)
                {
                    uint successCount, failureCount;
                    successCount = failureCount = 0;
                    m_ReaderAPI.Actions.TagAccess.GetLastAccessResult(ref successCount, ref failureCount);
                    functionCallStatusLabel.Text = "Access completed - Success Count: " + successCount.ToString()
                                                   + ", Failure Count: " + failureCount.ToString();
                }
                //resetButtonState();
                this.readBtn.Enabled = true;
                this.readBtn.Text    = "Start Reading";
                //memBank_CB.Enabled = true;
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.GPI_EVENT:
                this.updateGPIState();
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ANTENNA_EVENT:
                string status = (eventData.AntennaEventData.AntennaEvent == ANTENNA_EVENT_TYPE.ANTENNA_CONNECTED ? "connected" : "disconnected");
                functionCallStatusLabel.Text = "Antenna " + eventData.AntennaEventData.AntennaID.ToString() + " has been " + status;
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.BUFFER_FULL_WARNING_EVENT:
                functionCallStatusLabel.Text = " Buffer full warning";
                myUpdateRead(null);
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.BUFFER_FULL_EVENT:
                functionCallStatusLabel.Text = "Buffer full";
                myUpdateRead(null);
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.DISCONNECTION_EVENT:
                functionCallStatusLabel.Text = "Disconnection Event " + eventData.DisconnectionEventData.DisconnectEventInfo.ToString();

                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.READER_EXCEPTION_EVENT:
                functionCallStatusLabel.Text = "Reader ExceptionEvent " + eventData.ReaderExceptionEventData.ReaderExceptionEventInfo.ToString();
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.TEMPERATURE_ALARM_EVENT:
                functionCallStatusLabel.Text = "Temperature Alarm " + eventData.TemperatureAlarmEventData.SourceName.ToString() + " Temperature " + eventData.TemperatureAlarmEventData.CurrentTemperature.ToString() + " Level " + eventData.TemperatureAlarmEventData.AlarmLevel.ToString();
                break;

            default:
                break;
            }
        }
예제 #4
0
        private void myUpdateStatus(Events.StatusEventData eventData)
        {
            switch (eventData.StatusEventType)
            {
            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.INVENTORY_START_EVENT:
                loglst.Items.Add("Inventory started");
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.INVENTORY_STOP_EVENT:
                loglst.Items.Add("Inventory stopped");
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ACCESS_START_EVENT:
                loglst.Items.Add("Access Operation started");
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ACCESS_STOP_EVENT:
                loglst.Items.Add("Access Operation stopped");

                if (this.datagrd.Items == null)
                {
                    uint successCount, failureCount;
                    successCount = failureCount = 0;
                    m_ReaderAPI.Actions.TagAccess.GetLastAccessResult(ref successCount, ref failureCount);
                    loglst.Items.Add("Access completed - Success Count: " + successCount.ToString()
                                     + ", Failure Count: " + failureCount.ToString());
                }
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.GPI_EVENT:
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.ANTENNA_EVENT:
                string status = (eventData.AntennaEventData.AntennaEvent == ANTENNA_EVENT_TYPE.ANTENNA_CONNECTED ? "connected" : "disconnected");
                loglst.Items.Add("Antenna " + eventData.AntennaEventData.AntennaID.ToString() + " has been " + status);
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.BUFFER_FULL_WARNING_EVENT:
                loglst.Items.Add(" Buffer full warning");
                myUpdateRead(null);
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.BUFFER_FULL_EVENT:
                loglst.Items.Add("Buffer full");
                myUpdateRead(null);
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.DISCONNECTION_EVENT:
                loglst.Items.Add("Disconnection Event " + eventData.DisconnectionEventData.DisconnectEventInfo.ToString());
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.READER_EXCEPTION_EVENT:
                loglst.Items.Add("Reader ExceptionEvent " + eventData.ReaderExceptionEventData.ReaderExceptionEventInfo.ToString());
                break;

            case Symbol.RFID3.Events.STATUS_EVENT_TYPE.TEMPERATURE_ALARM_EVENT:
                loglst.Items.Add("Temperature Alarm " + eventData.TemperatureAlarmEventData.SourceName.ToString() + " Temperature " + eventData.TemperatureAlarmEventData.CurrentTemperature.ToString() + " Level " + eventData.TemperatureAlarmEventData.AlarmLevel.ToString());
                break;

            default:
                break;
            }
        }