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

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