public WayneKerr4300Emulator(string name) : base(name)
        {
#if DEBUG
            Debug = new StreamWriter(@"D:\Steve\Projects\Microfab\C-V\C_V_App\wkDebug.dat");
#else
            var memStream = new MemoryStream(100);
            Debug = new StreamWriter(memStream);
#endif

            _commandResponses = new Dictionary <string, CommandResponse>()
            {
                { "*IDN?", DeviceName },
                { ":READ?", DataPoint },
                { ":TRIG", DataPoint },
                { ":MEAS:LEV?", ReturnLevel },
                { ":MEAS:FREQ?", ReturnFreq },
                { ":MEAS:FUNC1?", ReturnFunc1 },
                { ":MEAS:FUNC2?", ReturnFunc2 }
            };

            _readLineResponse = null;
            _state            = SerialPortStates.Closed;

            _openDelegates       = new VoidZero[] { AlreadyOpen, Closed2Open };
            _closeDelegates      = new VoidZero[] { Open2Closed, NotOpen };
            _nullActionDelegates = new VoidZero[] { NullAction, NotOpen };

            _writeLineDelegates = new VoidString[] { WriteLineDelegate, NotOpen };

            _readLineDelegates = new StringZero[] { OpenReadLine, NotOpenReadLine };
        }
        public Keithley2400Emulator(string name) : base(name)
        {
            _commandResponses = new Dictionary <string, CommandResponse>()
            {
                { "*IDN?", DeviceName },
                { "READ?", DataPoint },
                { "SYSTem:RSENse?", Sensors },
                { ":FORM:ELEM?", Headers }
            };
#if DEBUG
            Debug = new StreamWriter(@"D:\Steve\Projects\Microfab\C-V\C_V_App\kt_DEBUG.dat");
#else
            var memStream = new MemoryStream(100);
            Debug = new StreamWriter(memStream);
#endif

            _readLineResponse = null;
            _state            = SerialPortStates.Closed;

            _openDelegates       = new VoidZero[] { AlreadyOpen, Closed2Open };
            _closeDelegates      = new VoidZero[] { Open2Closed, NotOpen };
            _nullActionDelegates = new VoidZero[] { NullAction, NotOpen };

            _writeLineDelegates = new VoidString[] { WriteLineDelegate, NotOpen };

            _readLineDelegates = new StringZero[] { OpenReadLine, NotOpenReadLine };
        }
 private void Open2Closed(string functionName)
 {
     _state = SerialPortStates.Closed;
 }
 private void Closed2Open(string functionName)
 {
     _readLineResponse = WAYNE_KERR_4300;
     _state            = SerialPortStates.Open;
 }
 private void Closed2Open(string functionName)
 {
     _readLineResponse = KEITHLEY_2400;
     _state            = SerialPortStates.Open;
 }