예제 #1
0
 public static bool SetRssiStatus(bool enable, out string errInfo)
 {
     errInfo = "";
     //0x1B: RSSI
     //0x01: set , 0x00: cancel
     byte[] bval = new byte[] { 0x00 };
     if (enable)
     {
         bval[0] = 0x01;
     }
     Invengo.NetAPI.Protocol.IRP1.SysConfig_800 msg = new SysConfig_800(0x14, bval);
     if (RfReader.Send(msg))
     {
         return(true);
     }
     else
     {
         if (msg.ErrInfo == null || msg.ErrInfo == "")
         {
             errInfo = string.Format("0x{0}", msg.StatusCode.ToString("X2"));
         }
         else
         {
             errInfo = msg.ErrInfo;
         }
     }
     return(false);
 }
예제 #2
0
 public static bool SetLoopRead(out string errInfo)
 {
     errInfo = "";
     Invengo.NetAPI.Protocol.IRP1.SysConfig_800 msg = new SysConfig_800(0x01, new byte[] { 0x00, 0x00 });
     if (RfReader.Send(msg))
     {
         return(true);
     }
     else
     {
         errInfo = msg.ErrInfo;
     }
     return(false);
 }
예제 #3
0
 /// <summary>
 /// Set Antenna Power
 /// </summary>
 /// <param name="val"></param>
 /// <param name="errInfo"></param>
 /// <returns></returns>
 public static bool SetAntennaPower(byte val, out string errInfo)
 {
     errInfo = "";
     byte[] bval = new byte[] { 0x00, val };
     Invengo.NetAPI.Protocol.IRP1.SysConfig_800 msg = new SysConfig_800(0x03, bval);
     if (RfReader.Send(msg))
     {
         return(true);
     }
     else
     {
         errInfo = msg.ErrInfo;
     }
     return(false);
 }
예제 #4
0
 public static bool SetScanInterval(ushort val, out string errInfo)
 {
     errInfo = "";
     byte[] bval = new byte[] { (byte)val };
     Invengo.NetAPI.Protocol.IRP1.SysConfig_800 msg = new SysConfig_800(0x12, bval);
     if (RfReader.Send(msg))
     {
         return(true);
     }
     else
     {
         if (msg.ErrInfo == null || msg.ErrInfo == "")
         {
             errInfo = string.Format("0x{0}", msg.StatusCode.ToString("X2"));
         }
         else
         {
             errInfo = msg.ErrInfo;
         }
     }
     return(false);
 }
예제 #5
0
        public static bool SetFrequency(byte[] data, out string errInfo)
        {
            errInfo = "";
            SysConfig_800 msg = new SysConfig_800(0x04, data);

            if (RfReader.Send(msg))
            {
                return(true);
            }
            else
            {
                if (msg.ErrInfo == null || msg.ErrInfo == "")
                {
                    errInfo = string.Format("0x{0}", msg.StatusCode.ToString("X2"));
                }
                else
                {
                    errInfo = msg.ErrInfo;
                }
            }
            return(false);
        }