/*------------------------------------------------------------------------- // 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 System; namespace TestStand { /// /// Provide wrapper functions to initialize instruments, measurements, gui, support threads, etc /// All methods defined in this class must be called from TestStand. /// No other code should be calling these methods outside of TestStand. /// public static class SetupManager { /// /// Initialize power supply measurement manager /// /// /// public static void InitializePowerSupplyMeasurementManager() { try { ProgramLib.Program.Instance().InitializePowerSupplyMeasurementManager(); } catch (Exception ex) { // 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 ProgramManager.TerminateTestOnMainThreadError(ex); } } /// /// Initialize DIO measurement manager /// /// /// public static void InitializeDioMeasurementManager() { try { ProgramLib.Program.Instance().InitializeDioMeasurementManager(); } catch (Exception ex) { // 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 ProgramManager.TerminateTestOnMainThreadError(ex); } } /// /// Initialize switch measurement manager /// /// /// public static void InitializeSwitchMeasurementManager() { try { ProgramLib.Program.Instance().InitializeSwitchMeasurementManager(); } catch (Exception ex) { // 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 ProgramManager.TerminateTestOnMainThreadError(ex); } } /// /// Initialize switch measurement manager /// /// /// public static void InitializeCoeMeasurementManager() { try { ProgramLib.Program.Instance().InitializeCoeMeasurementManager(); } catch (Exception ex) { // 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 ProgramManager.TerminateTestOnMainThreadError(ex); } } /// /// Initialize serial devices /// /// /// public static void InitializeSerialDevices() { try { ProgramLib.Program.Instance().InitializeSerialDevices(); } catch (Exception ex) { // 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 ProgramManager.TerminateTestOnMainThreadError(ex); } } /// /// Initialize GUI manager /// /// /// public static void InitializeGuiManager() { try { ProgramLib.Program.Instance().InitializeGuiManager(); } catch (Exception ex) { // 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 ProgramManager.TerminateTestOnMainThreadError(ex); } } /// /// Start all the monitor/read threads here /// Call this only after ProgramGuiManager and PowerSupplyManager has been initialized since these threads could be /// accessing those objects /// /// /// public static void InitializeSupportThreads() { try { ProgramLib.Program.Instance().InitializeSupportThreads(); } catch (Exception ex) { // 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 ProgramManager.TerminateTestOnMainThreadError(ex); } } } }