/*
* 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
{
///
/// 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.
///
public class DefaultSaeJ211Filter
: SaeJ211Filter
{
public DefaultSaeJ211Filter(SaeJ211Filter filter)
: base(filter)
{
}
///
/// Initialize an instance of the DefaultSaeJ211Filter class.
///
///
///
/// The to be applied by this filter.
///
///
public DefaultSaeJ211Filter(ChannelFilter filterType)
: base(filterType)
{
}
///
/// Initialize an instance of the DefaultSaeJ211Filter class.
///
///
///
///The ad hoc frequency of this filter.
///
///
public DefaultSaeJ211Filter(double adHocFrequency)
: base(adHocFrequency)
{
}
///
/// The name of this filter.
///
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);
}
}
}
///
/// Generate a string representation of this object.
///
///
///
/// A representation of this object.
///
///
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);
}
}
///
/// Generate a string representation of this object.
///
///
///
/// A representation of this object.
///
///
public override string ToString()
{
try
{
return Name;
}
catch (System.Exception ex)
{
throw new Exception("encountered problem generating the string value for " + GetType().FullName, ex);
}
}
}
}