예제 #1
0
        public Tape(uint u)
        {
            unit        = u;
            f           = null;
            ReadActive  = false;
            WriteActive = false;

            WRecord = new List <ulong>();
        }
예제 #2
0
 public void MountTape(string file, bool rdonly) /* Mount Tape on unit */
 {
     if (f != null)
     {
         throw new InvalidOperationException(string.Format("tape on unit {0} already mounted", unit));
     }
     if (file != null)
     {
         f = new TapeFile(file, rdonly);
     }
     else
     {
         f = null;
     }
 }
예제 #3
0
 public void MountDeck(string file)
 {
     if (f != null)
     {
         throw new InvalidOperationException("Deck already mounted");
     }
     if (file != null)
     {
         f = new TapeFile(file, true);
     }
     else
     {
         f = null;
     }
     cardwasread = false;
 }
예제 #4
0
 protected virtual void Dispose(bool disposing) /* IDisposable-Handling */
 {
     if (disposing)
     {
         if (ReadActive)
         {
             Disconnect();
         }
         // free managed resources
         if (f != null)
         {
             f.Dispose();
             f = null;
         }
     }
 }
예제 #5
0
        bool WriteActive;     /* write is active */
        public void MountDeck(string file)
        {
            if (f != null)
            {
                throw new InvalidOperationException("Deck already mounted");
            }
            if (file != null)
            {
                f = new TapeFile(file, false);
            }
            else
            {
                f = null;
            }
            WriteActive = false;

            WRecord = new List <ulong>(24);
        }
예제 #6
0
 public void UnMountDeck()
 {
     Disconnect();
     f.Dispose();
     f = null;
 }
예제 #7
0
 public CardReader()
 {
     f           = null;
     ReadActive  = false;
     cardwasread = false;
 }
예제 #8
0
 public void UnMountTape() /* Unmount Tape on unit */
 {
     EndRW();
     f.Dispose();
     f = null;
 }