示例#1
0
        private void Plc_OnPLCDataReported(Xindeco.Device.Model.PLCData plcData)
        {
            if (plcData.Command == Xindeco.Device.Model.PLCRequest.OPEN_RFID)
            {
                StartInventory();
            }
            else if (plcData.Command == Xindeco.Device.Model.PLCRequest.ASK_RESULT)
            {
                switch (inventoryResult)
                {
                case 1:    //正常
                    StopInventory();
                    plc.SendCommand(Xindeco.Device.Model.PLCResponse.RIGHT);
                    break;

                case 3:    //异常
                    StopInventory();
                    plc.SendCommand(Xindeco.Device.Model.PLCResponse.ERROR);
                    break;

                default:

                    break;
                }
            }
        }
示例#2
0
 private void Plc_OnPLCDataReported(Xindeco.Device.Model.PLCData plcData)
 {
     if (plcData.Command == Xindeco.Device.Model.PLCRequest.OPEN_RFID)
     {
         StartInventory();
     }
 }
示例#3
0
 private void Plc_OnPLCDataReported(Xindeco.Device.Model.PLCData plcData)
 {
     OnPLCDataReported?.Invoke(plcData);
 }