Big changes
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
using Raytheon.Instruments;
|
||||
using CryoMeasurementManagerLib;
|
||||
|
||||
using System;
|
||||
|
||||
namespace MeasurementManagerLib
|
||||
{
|
||||
public class CryoMeasurementManager
|
||||
{
|
||||
private bool _isThereHardware;
|
||||
private ICommDevice _commDevice;
|
||||
private ICommDevice _serialDevice;
|
||||
|
||||
public CryoMeasurementManager(bool isThereHardware, string measurementDefFile, string instrumentDefFile, string errorLogFileName)
|
||||
{
|
||||
if (measurementDefFile == null)
|
||||
{
|
||||
throw new ArgumentNullException("CryoMeasurementManager::CryoMeasurementManager() - measurementDefFile input parameter is null.");
|
||||
}
|
||||
if (instrumentDefFile == null)
|
||||
{
|
||||
throw new ArgumentNullException("CryoMeasurementManager::CryoMeasurementManager() - instrumentDefFile input parameter is null.");
|
||||
}
|
||||
if (errorLogFileName == null)
|
||||
{
|
||||
throw new ArgumentNullException("CryoMeasurementManager::CryoMeasurementManager() - errorLogFileName input parameter is null.");
|
||||
}
|
||||
_isThereHardware = isThereHardware;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// constructor that uses instrument manager to create an instrument
|
||||
/// </summary>
|
||||
/// <param name="instrumentManaegr"></param>
|
||||
/// <param name="commDeviceName"></param>
|
||||
/// <param name="serialDeviceName"></param>
|
||||
/// <param name="isThereHardware"></param>
|
||||
/// <param name="errorLogFileName"></param>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public CryoMeasurementManager(IInstrumentManager instrumentManaegr, string commDeviceName, string serialDeviceName, bool isThereHardware, string errorLogFileName)
|
||||
{
|
||||
if (errorLogFileName == null)
|
||||
{
|
||||
throw new ArgumentNullException("CryoMeasurementManager::CryoMeasurementManager() - errorLogFileName input parameter is null.");
|
||||
}
|
||||
_isThereHardware = isThereHardware;
|
||||
|
||||
if(!string.IsNullOrEmpty(commDeviceName))
|
||||
{
|
||||
_commDevice = instrumentManaegr.GetInstrument<ICommDevice>(commDeviceName);
|
||||
}
|
||||
|
||||
if(!string.IsNullOrEmpty(serialDeviceName))
|
||||
{
|
||||
_serialDevice = instrumentManaegr.GetInstrument<ICommDevice>(serialDeviceName);
|
||||
}
|
||||
}
|
||||
|
||||
public CryoMeasurementManager(string instrumentName, string errorLogFileName, bool isThereHardware)
|
||||
{
|
||||
_isThereHardware = isThereHardware;
|
||||
}
|
||||
|
||||
|
||||
private void SendMessageGetResponse(CryoMessage message)
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public void StartFastCoolDown(object[] inputs)
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public void StartLogging(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public void StartSlowCoolDown(object[] inputs)
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public void StopLogging()
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)Solution.props" />
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net472</TargetFramework>
|
||||
<AssemblyName>CryoMeasurementManager</AssemblyName>
|
||||
<Product>Composable Test Software Library</Product>
|
||||
<Description>Cryo Measurement Manager</Description>
|
||||
<OutputType>Library</OutputType>
|
||||
|
||||
<!-- Static versioning (Suitable for Development) -->
|
||||
<!-- Disable the line below for dynamic versioning -->
|
||||
<Version>1.1.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NLog" Version="5.0.0" />
|
||||
<PackageReference Include="Raytheon.Common" Version="1.0.0" />
|
||||
<PackageReference Include="Raytheon.Instruments.InstrumentManager.Contracts" Version="1.8.0" />
|
||||
<PackageReference Include="Raytheon.Instruments.CommDevice.Contracts" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
|
||||
namespace CryoMeasurementManagerLib
|
||||
{
|
||||
public class CryoMessage
|
||||
{
|
||||
protected string _command;
|
||||
|
||||
protected uint _id;
|
||||
|
||||
public CryoMessage(int id)
|
||||
{
|
||||
}
|
||||
|
||||
public void Extract()
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public string GetCommand()
|
||||
{
|
||||
string str;
|
||||
try
|
||||
{
|
||||
str = "@@@DEFAULT RETURN STRING;";
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
public uint GetId()
|
||||
{
|
||||
uint num;
|
||||
try
|
||||
{
|
||||
num = 0;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public void Insert()
|
||||
{
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user