Major upgrade
This commit is contained in:
@@ -16,115 +16,73 @@ UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
using System;
|
||||
using Raytheon.Instruments.GeneralIO;
|
||||
using System.Collections.Generic;
|
||||
using Raytheon.Common;
|
||||
using NLog;
|
||||
using Pickering.Lxi.Communication;
|
||||
using Pickering.Lxi.Piplx;
|
||||
using Pickering.Lxi;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using NLog;
|
||||
using Pickering.Lxi.Piplx;
|
||||
using Raytheon.Common;
|
||||
using Raytheon.Instruments.GeneralIO;
|
||||
|
||||
namespace Raytheon.Instruments
|
||||
{
|
||||
/// <summary>
|
||||
/// A class that implements a Pickering DIO card
|
||||
/// </summary>
|
||||
public class DIOPickering40x : IGeneralIO, IDisposable
|
||||
public class DIOPickering40x : IGeneralIO
|
||||
{
|
||||
#region PrivateClassMembers
|
||||
private string _name;
|
||||
private readonly int _pxiCardSlotIndex;
|
||||
private SelfTestResult _selfTestResult;
|
||||
private State _state;
|
||||
private object _syncObj = new Object();
|
||||
private PiplxCard _dioCard;
|
||||
private string _lxiIpAddress;
|
||||
private int _deviceNum;
|
||||
private int _busNum;
|
||||
private SelfTestResult _selfTestResult;
|
||||
private State _state;
|
||||
private object _syncObj = new Object();
|
||||
private PiplxCard _dioCard;
|
||||
private int _numChannelPerPort = 8;
|
||||
private int _channelStartIndex = 0;
|
||||
private int _numInputChannels;
|
||||
private int _numOutputChannels;
|
||||
private bool _shallWeInitializeOutput = false;
|
||||
private bool _shallWeInitializeOutput = false;
|
||||
PiplxManager _piplxManager;
|
||||
|
||||
private Dictionary<string, IODatatypes.DIOChannelInfo> _signalNameToChannelMap = new Dictionary<string, IODatatypes.DIOChannelInfo>();
|
||||
private Dictionary<string, IODatatypes.DIOChannelInfo> _signalNameToChannelInfoMap = new Dictionary<string, IODatatypes.DIOChannelInfo>();
|
||||
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly IConfigurationManager _configurationManager;
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
#endregion
|
||||
|
||||
#region PublicClassFunctions
|
||||
|
||||
/// <summary>
|
||||
/// NLog logger
|
||||
/// DIOPickering40x factory constructor
|
||||
/// </summary>
|
||||
private readonly ILogger _logger;
|
||||
/// <summary>
|
||||
/// Raytheon configuration
|
||||
/// </summary>
|
||||
private readonly IConfigurationManager _configurationManager;
|
||||
private readonly IConfiguration _configuration;
|
||||
/// <param name="deviceName"></param>
|
||||
/// <param name="configurationManager"></param>
|
||||
public DIOPickering40x(string deviceName, IConfigurationManager configurationManager)
|
||||
{
|
||||
Name = deviceName;
|
||||
|
||||
#endregion
|
||||
_logger = LogManager.GetLogger($"{this.GetType().Name} - {deviceName}");
|
||||
|
||||
#region PrivateClassFunctions
|
||||
_configurationManager = configurationManager;
|
||||
_configuration = _configurationManager.GetConfiguration(Name);
|
||||
|
||||
/// <summary>
|
||||
/// The finalizer.
|
||||
/// </summary>
|
||||
~DIOPickering40x()
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose of this object.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True = currently disposing, False = not disposing.</param>
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// nothing to do here
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
//ErrorLogger.Instance().Write(err.Message + "\r\n" + err.StackTrace);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//Do not rethrow. Exception from error logger that has already been garbage collected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PublicClassFunctions
|
||||
|
||||
/// <summary>
|
||||
/// DIOPickering40x factory constructor
|
||||
/// </summary>
|
||||
/// <param name="deviceName"></param>
|
||||
/// <param name="configurationManager"></param>
|
||||
public DIOPickering40x(string deviceName, IConfigurationManager configurationManager, ILogger logger)
|
||||
{
|
||||
Name = deviceName;
|
||||
|
||||
_logger = logger;
|
||||
|
||||
_configurationManager = configurationManager;
|
||||
_configuration = _configurationManager.GetConfiguration(Name);
|
||||
|
||||
string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
string dioModuleDefPath = _configuration.GetConfigurationValue(deviceName, ConfigXml.DIO_MODULE_DEF_FILEPATH.ToString());
|
||||
|
||||
if (!Path.IsPathRooted(dioModuleDefPath))
|
||||
dioModuleDefPath = Path.GetFullPath(Path.Combine(assemblyFolder, dioModuleDefPath));
|
||||
dioModuleDefPath = Path.GetFullPath(Path.Combine(_configurationManager.ConfigurationStoragePath, dioModuleDefPath));
|
||||
|
||||
IConfigurationFile dioModuleConfig = new ConfigurationFile(dioModuleDefPath);
|
||||
|
||||
Int32.TryParse(dioModuleConfig.ReadValue(Name, ConfigIni.PXI_CARD_SLOT_INDEX.ToString()), out _pxiCardSlotIndex);
|
||||
_lxiIpAddress = dioModuleConfig.ReadValue(Name, ConfigIni.LXI_IP_ADDRESS.ToString());
|
||||
Int32.TryParse(dioModuleConfig.ReadValue(Name, ConfigIni.BUS_NUMBER.ToString()), out _busNum);
|
||||
Int32.TryParse(dioModuleConfig.ReadValue(Name, ConfigIni.DEVICE_NUMBER.ToString()), out _deviceNum);
|
||||
|
||||
Boolean.TryParse(dioModuleConfig.ReadValue(Name, ConfigIni.SHALL_WE_DRIVE_OUTPUT_UPON_INITIALIZATION.ToString()), out _shallWeInitializeOutput);
|
||||
Boolean.TryParse(dioModuleConfig.ReadValue(Name, ConfigIni.SHALL_WE_DRIVE_OUTPUT_UPON_INITIALIZATION.ToString()), out _shallWeInitializeOutput);
|
||||
|
||||
List<string> outputSignalNames = dioModuleConfig.ReadAllKeys($"{Name}.{ConfigIni.OUTPUT_SIGNALS}");
|
||||
List<string> intputSignalNames = dioModuleConfig.ReadAllKeys($"{Name}.{ConfigIni.INPUT_SIGNALS}");
|
||||
@@ -139,39 +97,50 @@ namespace Raytheon.Instruments
|
||||
|
||||
IODatatypes.DIOChannelInfo info;
|
||||
foreach (string signalName in outputSignalNames)
|
||||
{
|
||||
if (_signalNameToChannelMap.ContainsKey(signalName))
|
||||
{
|
||||
if (_signalNameToChannelInfoMap.ContainsKey(signalName))
|
||||
throw new Exception($"Key {signalName} in section {Name}.{ConfigIni.OUTPUT_SIGNALS} conflicts with the same key defined in another section.");
|
||||
|
||||
string iniLine = dioModuleConfig.ReadValue($"{Name}.{ConfigIni.OUTPUT_SIGNALS}", signalName);
|
||||
string[] infoTokens = iniLine.Split('|');
|
||||
if (infoTokens.Length != 2)
|
||||
{
|
||||
throw new Exception($"Key {signalName} in section {Name}.{ConfigIni.OUTPUT_SIGNALS} does not contain 2 tokens");
|
||||
}
|
||||
string[] infoTokens = iniLine.Split('|');
|
||||
if (infoTokens.Length != 2)
|
||||
{
|
||||
throw new Exception($"Key {signalName} in section {Name}.{ConfigIni.OUTPUT_SIGNALS} does not contain 2 tokens");
|
||||
}
|
||||
|
||||
info.channelNumber = Convert.ToUInt32(infoTokens[0]);
|
||||
info.ioType = IODatatypes.IOType.DigitalOutput;
|
||||
info.initialValue = Convert.ToInt32(infoTokens[1]);
|
||||
|
||||
_signalNameToChannelMap[signalName] = info;
|
||||
_signalNameToChannelInfoMap[signalName] = info;
|
||||
}
|
||||
|
||||
foreach (string signalName in intputSignalNames)
|
||||
{
|
||||
if (_signalNameToChannelMap.ContainsKey(signalName))
|
||||
if (_signalNameToChannelInfoMap.ContainsKey(signalName))
|
||||
throw new Exception($"Key {signalName} in section {Name}.{ConfigIni.INPUT_SIGNALS} conflicts with the same key defined in another section.");
|
||||
|
||||
string iniLine = dioModuleConfig.ReadValue($"{Name}.{ConfigIni.INPUT_SIGNALS}", signalName);
|
||||
|
||||
info.channelNumber = Convert.ToUInt32(iniLine);
|
||||
info.initialValue = -1;
|
||||
info.ioType = IODatatypes.IOType.DigitalInput;
|
||||
info.initialValue = -1;
|
||||
|
||||
_signalNameToChannelMap[signalName] = info;
|
||||
_signalNameToChannelInfoMap[signalName] = info;
|
||||
}
|
||||
|
||||
_selfTestResult = SelfTestResult.Unknown;
|
||||
_state = State.Uninitialized;
|
||||
}
|
||||
_state = State.Uninitialized;
|
||||
}
|
||||
|
||||
~DIOPickering40x()
|
||||
{
|
||||
if (_dioCard != null)
|
||||
{
|
||||
_dioCard.Close();
|
||||
_piplxManager.Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the card
|
||||
@@ -182,27 +151,39 @@ namespace Raytheon.Instruments
|
||||
{
|
||||
if (_state == State.Uninitialized)
|
||||
{
|
||||
PiplxManager manager = new PiplxManager("");
|
||||
_piplxManager = new PiplxManager(_lxiIpAddress);
|
||||
|
||||
_dioCard = (PiplxCard)manager.Cards[_pxiCardSlotIndex];
|
||||
foreach (PiplxCard card in _piplxManager.Cards)
|
||||
{
|
||||
PiplxCardInfo info = (PiplxCardInfo)card.Info;
|
||||
|
||||
PiplxCardInfo info = (PiplxCardInfo)_dioCard.Info;
|
||||
if (info.Device == _deviceNum && info.Bus == _busNum)
|
||||
{
|
||||
_dioCard = card;
|
||||
_numInputChannels = info.InputSubunitsCount * _numChannelPerPort;
|
||||
_numOutputChannels = info.OutputSubunitsCount * _numChannelPerPort;
|
||||
|
||||
_numInputChannels = info.InputSubunitsCount * _numChannelPerPort;
|
||||
_numOutputChannels = info.OutputSubunitsCount * _numChannelPerPort;
|
||||
_dioCard.Open();
|
||||
|
||||
_dioCard.Open();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_shallWeInitializeOutput)
|
||||
{
|
||||
foreach (KeyValuePair<string, IODatatypes.DIOChannelInfo> item in _signalNameToChannelMap)
|
||||
{
|
||||
if (item.Value.initialValue != -1)
|
||||
{
|
||||
SetBit(item.Key, (IODatatypes.BitState)item.Value.initialValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_dioCard == null)
|
||||
{
|
||||
throw new Exception($"No DIO card exists in LXI chassis with DEVICE_NUMBER={_deviceNum} and BUS_NUMBER={_busNum}");
|
||||
}
|
||||
|
||||
if (_shallWeInitializeOutput)
|
||||
{
|
||||
foreach (KeyValuePair<string, IODatatypes.DIOChannelInfo> item in _signalNameToChannelInfoMap)
|
||||
{
|
||||
if (item.Value.initialValue != -1)
|
||||
{
|
||||
SetBit(item.Key, (IODatatypes.BitState)item.Value.initialValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_state = State.Ready;
|
||||
}
|
||||
@@ -214,11 +195,11 @@ namespace Raytheon.Instruments
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return list of signal names
|
||||
/// Return map of all signals
|
||||
/// </summary>
|
||||
public List<string> GetSignalNames()
|
||||
{
|
||||
return new List<string>(_signalNameToChannelMap.Keys);
|
||||
public Dictionary<string, IODatatypes.DIOChannelInfo> GetAllSignals()
|
||||
{
|
||||
return _signalNameToChannelInfoMap;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -226,79 +207,52 @@ namespace Raytheon.Instruments
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool ClearErrors()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string DetailedStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return "This is a Pickering DIO Card " + _name;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string DetailedStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return "This is a Pickering DIO Card " + _name;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool DisplayEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool DisplayEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose of this object.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
try
|
||||
{
|
||||
Dispose(true);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool FrontPanelEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
//ErrorLogger.Instance().Write(err.Message + "\r\n" + err.StackTrace);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//Do not rethrow. Exception from error logger that has already been garbage collected.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool FrontPanelEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -309,19 +263,19 @@ namespace Raytheon.Instruments
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
if (!_signalNameToChannelMap.ContainsKey(signalName))
|
||||
if (!_signalNameToChannelInfoMap.ContainsKey(signalName))
|
||||
throw new Exception($"Signal name {signalName} doesn't exist for card: " + _name);
|
||||
|
||||
if (_signalNameToChannelMap[signalName].channelNumber >= _numOutputChannels || _signalNameToChannelMap[signalName].channelNumber < _channelStartIndex)
|
||||
if (_signalNameToChannelInfoMap[signalName].channelNumber >= _numOutputChannels || _signalNameToChannelInfoMap[signalName].channelNumber < _channelStartIndex)
|
||||
{
|
||||
throw new Exception($"The input channel number {_signalNameToChannelMap[signalName].channelNumber} specified must be >= {_channelStartIndex} and < {_numOutputChannels +_channelStartIndex} on card " + _name);
|
||||
throw new Exception($"The output channel number {_signalNameToChannelInfoMap[signalName].channelNumber} specified must be >= {_channelStartIndex} and < {_numOutputChannels + _channelStartIndex} on card " + _name);
|
||||
}
|
||||
|
||||
GetPortIndexAndBitIndex(signalName, out int portIndex, out int bitIndex);
|
||||
|
||||
DigitalInputOutputSubunit subunit = (DigitalInputOutputSubunit)_dioCard.OutputSubunits[portIndex];
|
||||
|
||||
subunit[bitIndex+1] = state != 0;
|
||||
subunit[bitIndex + 1] = state != 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,24 +285,24 @@ namespace Raytheon.Instruments
|
||||
/// <param name="signalName"></param>
|
||||
/// <returns></returns>
|
||||
public IODatatypes.BitState GetBitState(string signalName)
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
if (!_signalNameToChannelMap.ContainsKey(signalName))
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
if (!_signalNameToChannelInfoMap.ContainsKey(signalName))
|
||||
throw new Exception($"Signal name {signalName} doesn't exist for card: " + _name);
|
||||
|
||||
if (_signalNameToChannelMap[signalName].channelNumber >= _numInputChannels || _signalNameToChannelMap[signalName].channelNumber < _channelStartIndex)
|
||||
if (_signalNameToChannelInfoMap[signalName].channelNumber >= _numInputChannels || _signalNameToChannelInfoMap[signalName].channelNumber < _channelStartIndex)
|
||||
{
|
||||
throw new Exception($"The input channel number {_signalNameToChannelMap[signalName].channelNumber} specified must be >= {_channelStartIndex} and < {_numInputChannels+_channelStartIndex} on card " + _name);
|
||||
throw new Exception($"The input channel number {_signalNameToChannelInfoMap[signalName].channelNumber} specified must be >= {_channelStartIndex} and < {_numInputChannels + _channelStartIndex} on card " + _name);
|
||||
}
|
||||
|
||||
GetPortIndexAndBitIndex(signalName, out int portIndex, out int bitIndex);
|
||||
|
||||
DigitalInputOutputSubunit subunit = (DigitalInputOutputSubunit)_dioCard.InputSubunits[portIndex];
|
||||
|
||||
return (IODatatypes.BitState)(subunit[bitIndex+1] ? 1:0);
|
||||
return (IODatatypes.BitState)(subunit[bitIndex + 1] ? 1 : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Because the user has to define each channel number in the config file, some people will use 0 or 1 start their starting channel number
|
||||
@@ -360,10 +314,10 @@ namespace Raytheon.Instruments
|
||||
/// </summary>
|
||||
private void GetPortIndexAndBitIndex(string signalName, out int portIndex, out int bitIndex)
|
||||
{
|
||||
portIndex = (int)(Math.Ceiling((double)((int)_signalNameToChannelMap[signalName].channelNumber + Math.Abs(_channelStartIndex - 1)) / (double)_numChannelPerPort) - 1.0);
|
||||
portIndex = (int)(Math.Ceiling((double)((int)_signalNameToChannelInfoMap[signalName].channelNumber + Math.Abs(_channelStartIndex - 1)) / (double)_numChannelPerPort) - 1.0);
|
||||
|
||||
int multiplier = ((int)_signalNameToChannelMap[signalName].channelNumber + _numChannelPerPort) / _numChannelPerPort;
|
||||
bitIndex = (((int)_signalNameToChannelMap[signalName].channelNumber + _numChannelPerPort) - (_numChannelPerPort * multiplier)) - _channelStartIndex;
|
||||
int multiplier = ((int)_signalNameToChannelInfoMap[signalName].channelNumber + _numChannelPerPort) / _numChannelPerPort;
|
||||
bitIndex = (((int)_signalNameToChannelInfoMap[signalName].channelNumber + _numChannelPerPort) - (_numChannelPerPort * multiplier)) - _channelStartIndex;
|
||||
if (bitIndex < 0)
|
||||
{
|
||||
bitIndex = _numChannelPerPort - 1;
|
||||
@@ -374,109 +328,109 @@ namespace Raytheon.Instruments
|
||||
///
|
||||
/// </summary>
|
||||
public InstrumentMetadata Info
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get { return _name; }
|
||||
set { _name = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint NumberOfInputBits
|
||||
{
|
||||
get
|
||||
{
|
||||
return (uint)_numInputChannels;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint NumberOfOutputBits
|
||||
{
|
||||
get
|
||||
{
|
||||
return (uint)_numOutputChannels;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public SelfTestResult PerformSelfTest()
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get { return _name; }
|
||||
set { _name = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint NumberOfInputBits
|
||||
{
|
||||
get
|
||||
{
|
||||
return (uint)_numInputChannels;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public uint NumberOfOutputBits
|
||||
{
|
||||
get
|
||||
{
|
||||
return (uint)_numOutputChannels;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public SelfTestResult PerformSelfTest()
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
Shutdown();
|
||||
Initialize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public SelfTestResult SelfTestResult
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selfTestResult;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public SelfTestResult SelfTestResult
|
||||
{
|
||||
get
|
||||
{
|
||||
return _selfTestResult;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="bit"></param>
|
||||
public void SetTristate(string signalName)
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="bit"></param>
|
||||
public void SetTristate(string signalName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public State Status
|
||||
{
|
||||
get
|
||||
{
|
||||
return _state;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public State Status
|
||||
{
|
||||
get
|
||||
{
|
||||
return _state;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Shutdown()
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
_state = State.Uninitialized;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Shutdown()
|
||||
{
|
||||
lock (_syncObj)
|
||||
{
|
||||
_state = State.Uninitialized;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user