83 lines
2.6 KiB
C#
83 lines
2.6 KiB
C#
/*-------------------------------------------------------------------------
|
|
// UNCLASSIFIED
|
|
/*-------------------------------------------------------------------------
|
|
RAYTHEON PROPRIETARY: THIS DOCUMENT CONTAINS DATA OR INFORMATION
|
|
PROPRIETARY TO RAYTHEON COMPANY AND IS RESTRICTED TO USE ONLY BY PERSONS
|
|
AUTHORIZED BY RAYTHEON COMPANY IN WRITING TO USE IT. DISCLOSURE TO
|
|
UNAUTHORIZED PERSONS WOULD LIKELY CAUSE SUBSTANTIAL COMPETITIVE HARM TO
|
|
RAYTHEON COMPANY'S BUSINESS POSITION. NEITHER SAID DOCUMENT NOR ITS
|
|
CONTENTS SHALL BE FURNISHED OR DISCLOSED TO OR COPIED OR USED BY PERSONS
|
|
OUTSIDE RAYTHEON COMPANY WITHOUT THE EXPRESS WRITTEN APPROVAL OF RAYTHEON
|
|
COMPANY.
|
|
|
|
THIS PROPRIETARY NOTICE IS NOT APPLICABLE IF DELIVERED TO THE U.S.
|
|
GOVERNMENT.
|
|
|
|
UNPUBLISHED WORK - COPYRIGHT RAYTHEON COMPANY.
|
|
-------------------------------------------------------------------------*/
|
|
using ProgramGui;
|
|
using Raytheon.Instruments;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProgramLib
|
|
{
|
|
/// <summary>
|
|
/// Methods to call into actions
|
|
/// </summary>
|
|
public partial class Program
|
|
{
|
|
/// <summary>
|
|
/// Power on UUT
|
|
/// </summary>
|
|
public void UutPowerOn()
|
|
{
|
|
try
|
|
{
|
|
_logger?.Debug($"Entering {this.GetType().Name}::{System.Reflection.MethodBase.GetCurrentMethod().Name}() method...");
|
|
|
|
UutPowerAction uutPowerAction = new UutPowerAction();
|
|
|
|
uutPowerAction.UutPowerOn();
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.Error(ex.Message + "\n" + ex.StackTrace);
|
|
|
|
// DO NOT THROW in this block
|
|
// this function will handle the error accordingly since we could be calling this from third-party test executive like TestStand
|
|
TerminateTestOnMainThreadError(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Power off UUT
|
|
/// </summary>
|
|
public void UutPowerOff()
|
|
{
|
|
try
|
|
{
|
|
_logger?.Debug($"Entering {this.GetType().Name}::{System.Reflection.MethodBase.GetCurrentMethod().Name}() method...");
|
|
|
|
UutPowerAction uutPowerAction = new UutPowerAction();
|
|
|
|
uutPowerAction.UutPowerOff();
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_logger.Error(ex.Message + "\n" + ex.StackTrace);
|
|
|
|
// DO NOT THROW in this block
|
|
// this function will handle the error accordingly since we could be calling this from third-party test executive like TestStand
|
|
TerminateTestOnMainThreadError(ex);
|
|
}
|
|
}
|
|
}
|
|
}
|