/*
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
{
///
/// A container for DTS generic module concepts.
///
public sealed partial class Module
{
///
/// All available recording mode options.
///
public enum RecordingMode
{
///
/// invalid mode, this can't be used
///
[Description("Invalid arm mode")]
InvalidArmMode = 0,
///
/// circular buffer mode (constant recording, trigger)
///
[Description("Circular buffer")]
CircularBuffer = 1,
///
/// recorder mode (start, trigger)
///
[Description("Recorder mode")]
RecorderMode = 2,
///
/// contant recording, trigger, rearm after data collected
///
[Description("Circular buffer Multiple-Events")]
AutoCircularBufferMode = 4,
///
/// recorder mode (start, trigger) rearm after data collected
///
[Description("Recorder mode Multiple-Events")]
AutoRecorderMode = 5,
///
/// ???
///
[Description("Immediate mode")]
ImmediateMode = 0x06,
///
/// ???
///
[Description("High Power mode")]
HighPowerRecorderMode = 0x07,
///
/// ???
///
[Description("Low Power mode")]
LowPowerRecorderMode = 0x08,
///
/// ???
///
[Description("Continuous mode")]
ContinuousRecorderMode = 0x09,
///
/// ???
///
[Description("Hybrid mode")]
HybridRecorderMode = 0x0A,
///
/// ???
///
[Description("Hybrid mode Multiple-Events")]
MultiHybridRecorderMode = 0x0B
}
///
/// Convert a string representation of a recording mode enumeration into its corresponding
/// enumeration value.
///
///
///
/// The representation to be converted.
///
///
///
/// The value corresponding to the
/// specified string, if any. If not, an exception will be thrown.
///
///
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 + "\"" : "<>" ), ex );
}
}
}
}
}