コード例 #1
0
        private void ReadData()
        {
            if (blockCount != 1)
            {
                this.Log(LogLevel.Warning, "This model curently supports only reading a sinlge block at a time, but the block count is set to {0}", blockCount);
                return;
            }

            readerDataBuffer = RegisteredPeripheral.ReadData(blockSize);
            this.Log(LogLevel.Noisy, "Received data is: {0}", Misc.PrettyPrintCollectionHex(readerDataBuffer));
        }
コード例 #2
0
        private void ReadData()
        {
            readerAddress &= 0xffffffff;

            var data = RegisteredPeripheral.ReadData(readerLength.Value);

#if DEBUG_PACKETS
            this.Log(LogLevel.Noisy, "Reading {0} bytes of data from device: {1}. Writing it to 0x{2:X}", data.Length, Misc.PrettyPrintCollectionHex(data), readerAddress);
#endif

            Machine.SystemBus.WriteBytes(data, readerAddress);
        }
コード例 #3
0
 protected byte[] ReadFromCard(uint cardOffset, int bytes)
 {
     return(RegisteredPeripheral.ReadData((long)BlockSize * cardOffset, bytes));
 }