Files
DP44/Common/DTS.Common.DAS.Concepts/Test/Test.Module.RecordingMode.cs
2026-04-17 14:55:32 -04:00

114 lines
4.0 KiB
C#

/*
Test.Module.RecordingMode.cs
Copyright © 2008
Diversified Technical Systems, Inc.
All Rights Reserved
*/
using System;
using System.ComponentModel;
namespace DTS.DAS.Concepts
{
// *** see Test.cs ***
public partial class Test
{
/// <summary>
/// A container for DTS generic module concepts.
/// </summary>
public sealed partial class Module
{
/// <summary>
/// All available recording mode options.
/// </summary>
public enum RecordingMode
{
/// <summary>
/// invalid mode, this can't be used
/// </summary>
[Description("Invalid arm mode")]
InvalidArmMode = 0,
/// <summary>
/// circular buffer mode (constant recording, trigger)
/// </summary>
[Description("Circular buffer")]
CircularBuffer = 1,
/// <summary>
/// recorder mode (start, trigger)
/// </summary>
[Description("Recorder mode")]
RecorderMode = 2,
/// <summary>
/// contant recording, trigger, rearm after data collected
/// </summary>
[Description("Circular buffer Multiple-Events")]
AutoCircularBufferMode = 4,
/// <summary>
/// recorder mode (start, trigger) rearm after data collected
/// </summary>
[Description("Recorder mode Multiple-Events")]
AutoRecorderMode = 5,
/// <summary>
/// ???
/// </summary>
[Description("Immediate mode")]
ImmediateMode = 0x06,
/// <summary>
/// ???
/// </summary>
[Description("High Power mode")]
HighPowerRecorderMode = 0x07,
/// <summary>
/// ???
/// </summary>
[Description("Low Power mode")]
LowPowerRecorderMode = 0x08,
/// <summary>
/// ???
/// </summary>
[Description("Continuous mode")]
ContinuousRecorderMode = 0x09,
/// <summary>
/// ???
/// </summary>
[Description("Hybrid mode")]
HybridRecorderMode = 0x0A,
/// <summary>
/// ???
/// </summary>
[Description("Hybrid mode Multiple-Events")]
MultiHybridRecorderMode = 0x0B
}
/// <summary>
/// Convert a string representation of a recording mode enumeration into its corresponding
/// enumeration value.
/// </summary>
///
/// <param name="recordingMode">
/// The <see cref="string"/> representation to be converted.
/// </param>
///
/// <returns>
/// The <see cref="DTS.DAS.Concepts.Test.Module.RecordingMode"/> value corresponding to the
/// specified string, if any. If not, an exception will be thrown.
/// </returns>
///
public static RecordingMode GetRecordingModeFromString( string recordingMode )
{
try
{
return ( RecordingMode )Enum.Parse( typeof( RecordingMode ), recordingMode );
}
catch ( Exception ex )
{
throw new Exception( "encountered problem getting recording mode from string representation " + ( null != recordingMode ? "\"" + recordingMode + "\"" : "<<NULL>>" ), ex );
}
}
}
}
}