Files
DP44/Common/DTS.Common.SerializationPlus/.svn/pristine/a4/a4a2a6f4f07cd4c86bbcac445d0b7a601e829933.svn-base

115 lines
3.1 KiB
Plaintext
Raw Permalink Normal View History

2026-04-17 14:55:32 -04:00
/*
* DTS.Slice.Control.Event.Module.Channel.SaeJ211Filter.cs
*
* Copyright © 2009
* Diversified Technical Systems, Inc.
* All Rights Reserved
*/
using DTS.Common.Utilities;
namespace DTS.Common.SerializationPlus
{
/// <summary>
/// Base class for all SaeJ211-based event module channel filters. It is intended
/// that fixed-filter-setting filters be derived from this class that will set their
/// filter setting using the protected constructor.
/// </summary>
public class DefaultSaeJ211Filter
: SaeJ211Filter
{
public DefaultSaeJ211Filter(SaeJ211Filter filter)
: base(filter)
{
}
/// <summary>
/// Initialize an instance of the DefaultSaeJ211Filter class.
/// </summary>
///
/// <param name="filterType">
/// The <see cref="ChannelFilter"/> to be applied by this filter.
/// </param>
///
public DefaultSaeJ211Filter(ChannelFilter filterType)
: base(filterType)
{
}
/// <summary>
/// Initialize an instance of the DefaultSaeJ211Filter class.
/// </summary>
///
///<param name="adHocFrequency">
///The <see cref="double"/> ad hoc frequency of this filter.
/// </param>
///
public DefaultSaeJ211Filter(double adHocFrequency)
: base(adHocFrequency)
{
}
/// <summary>
/// The <see cref="string"/> name of this filter.
/// </summary>
public override string Name
{
get
{
try
{
return "Default (" + base.Name + ")";
}
catch (System.Exception ex)
{
throw new Exception("encountered problem generating name string for " + GetType().FullName, ex);
}
}
}
/// <summary>
/// Generate a string representation of this object.
/// </summary>
///
/// <returns>
/// A <see cref="string"/> representation of this object.
/// </returns>
///
public override string ToBaseString()
{
try
{
return base.Name;
}
catch (System.Exception ex)
{
throw new Exception("encountered problem generating the string value for " + GetType().FullName, ex);
}
}
/// <summary>
/// Generate a string representation of this object.
/// </summary>
///
/// <returns>
/// A <see cref="string"/> representation of this object.
/// </returns>
///
public override string ToString()
{
try
{
return Name;
}
catch (System.Exception ex)
{
throw new Exception("encountered problem generating the string value for " + GetType().FullName, ex);
}
}
}
}