public bool SendCommandGetDataTimeout(ReaderCmd cmd, byte[] abyData, byte[] abyResultBuf, int nTiemout, ref int nNumBytes) { byte[] readerCmd = new byte[255]; ReaderCmd2Text(cmd, readerCmd); uint b_retv = m_clsRFReader.SendCommandGetDataTimeout(readerCmd, abyData, abyResultBuf, nTiemout); nNumBytes = abyResultBuf[0]; if (b_retv.Equals(1)) { return(true); } return(false); }
public bool SendCommand(ReaderCmd cmd, byte[] abyData) { byte[] readerCmd = new byte[255]; ReaderCmd2Text(cmd, readerCmd); uint b_retv = m_clsRFReader.SendCommand(readerCmd, abyData); if (b_retv.Equals(1)) { return(true); } return(false); }
void ReaderCmd2Text(ReaderCmd cmd, byte[] abyCmd) { String textCmd = null; switch (cmd) { case ReaderCmd.rcAntennaOn: textCmd = "antenna on"; break; case ReaderCmd.rcAntennaOff: textCmd = "antenna off"; break; case ReaderCmd.rcIsoReqa: textCmd = "iso reqa"; break; case ReaderCmd.rcPPSR: textCmd = "PPSR"; break; case ReaderCmd.rcMultiList: textCmd = "multilist"; break; case ReaderCmd.rcReadBlock: textCmd = "read block"; break; case ReaderCmd.rcSelect: textCmd = "select"; break; case ReaderCmd.rcWriteBlock: textCmd = "write block"; break; case ReaderCmd.rcWriteUserport: textCmd = "write userport"; break; case ReaderCmd.rcHighSpeedSelect: textCmd = "h"; break; case ReaderCmd.rcSetTagType: textCmd = "o"; break; case ReaderCmd.rcGetVersion: textCmd = "v"; break; case ReaderCmd.rcResetReader: textCmd = "x"; break; case ReaderCmd.rcResetField: textCmd = "y"; break; case ReaderCmd.rcLogin: textCmd = "login"; break; case ReaderCmd.rcDecVBlock: textCmd = "dec vblock"; break; case ReaderCmd.rcIncVBlock: textCmd = "inc vblock"; break; case ReaderCmd.rcCopyValue: textCmd = "copy vblock"; break; case ReaderCmd.rcReadValue: textCmd = "read vblock"; break; case ReaderCmd.rcWriteValue: textCmd = "write vblock"; break; // ISO 15693 case ReaderCmd.rcChangeDataCodeMode: textCmd = "changedata mode"; break; case ReaderCmd.rcInventory: textCmd = "inventory"; break; case ReaderCmd.rcQuietRequest: textCmd = "quiet request"; break; case ReaderCmd.rcReadyRequest: textCmd = "ready request"; break; case ReaderCmd.rcSelectRequest: textCmd = "select request"; break; case ReaderCmd.rcReadSingleBlock: textCmd = "readsingle block"; break; case ReaderCmd.rcWriteSingleBlock: textCmd = "writesingle block"; break; case ReaderCmd.rcLockBlock: textCmd = "lock block"; break; case ReaderCmd.rcGetSystemInfo: textCmd = "getsystem info"; break; case ReaderCmd.rcReadMultiBlock: textCmd = "readmulti block"; break; case ReaderCmd.rcWriteMultiBlock: textCmd = "writemulti block"; break; case ReaderCmd.rcWriteAFI: textCmd = "write afi"; break; case ReaderCmd.rcLockAFI: textCmd = "lock afi"; break; case ReaderCmd.rcWriteDSFID: textCmd = "write dsfid"; break; case ReaderCmd.rcLockDSFID: textCmd = "lock dsfid"; break; case ReaderCmd.rcGetMultiSecStatus: textCmd = "get bss"; break; default: textCmd = "baad f00d"; break; } byte[] temp = Encoding.ASCII.GetBytes(textCmd); Array.Copy(temp, abyCmd, temp.Length); }
public bool SendCommandGetDataTimeout(ReaderCmd cmd, byte[] abyData, byte[] abyResultBuf, int nTiemout, ref int nNumBytes) { byte[] readerCmd = new byte[255]; ReaderCmd2Text(cmd, readerCmd); uint b_retv = m_clsRFReader.SendCommandGetDataTimeout(readerCmd, abyData, abyResultBuf, nTiemout); nNumBytes = abyResultBuf[0]; if (b_retv.Equals(1)) return true; return false; }
public bool SendCommand(ReaderCmd cmd, byte[] abyData) { byte[] readerCmd = new byte[255]; ReaderCmd2Text(cmd, readerCmd); uint b_retv = m_clsRFReader.SendCommand(readerCmd, abyData); if (b_retv.Equals(1)) return true; return false; }