6.4 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||
|---|---|---|---|---|---|---|
|
2026-04-16T03:41:25.272025+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | d1bb42983adadb6c |
DAS
Documentation: IFilterable and IFilter Interfaces
1. Purpose
This module defines core interfaces (IFilterable and IFilter) for managing and applying signal filters to channel data within the DTS Slice Control DAS (Data Acquisition System) framework. It enables consumers to query available filters, set a current filter, optionally cache filter results for performance, and retrieve filtered data in specified display units. The interfaces serve as abstractions for channel filtering logic—likely implemented by concrete classes representing physical or logical channel groups in the control system.
2. Public Interface
IFilterable Interface
Namespace: DTS.Slice.Control.DAS.Channel
| Member | Signature | Description |
|---|---|---|
UseFilterCaching |
bool UseFilterCaching { get; set; } |
Enables or disables caching of previously computed filtered results. |
AvailableFilters |
List<IFilter> AvailableFilters { get; } |
Returns a list of filters that can be applied to this object. |
CurrentFilter |
IFilter CurrentFilter { get; set; } |
Gets or sets the filter currently applied to data requests. |
GetDataFilteredBy |
double[] GetDataFilteredBy(IFilter filter, Event.Module.Channel.DataDisplayUnits displayUnits) |
Returns filtered data for the specified filter and displayUnits. |
IFilter Interface
Namespace: DTS.Slice.Control.DAS.Channel
| Member | Signature | Description |
|---|---|---|
Name |
string Name { get; } |
Returns a human-readable name/description of the filter. |
IsCfc |
bool IsCfc { get; } |
Indicates whether the filter represents a cardinal CFC (Cycle Count Filter) value. |
Type |
ChannelFilter Type { get; } |
Returns the filter’s type (e.g., low-pass, high-pass), represented by the ChannelFilter enum (not shown in source). |
CutoffFrequencyHz |
double CutoffFrequencyHz { get; } |
Returns the cutoff frequency (in Hz) used by the filter. |
Apply (1) |
double[] Apply(Event.Module.Channel input, Event.Module.Channel.DataDisplayUnits displayUnits, bool bUseLegacyTDCSofwareFilterAdjustment) |
Applies the filter to channel data, converting to displayUnits. The bUseLegacyTDCSofwareFilterAdjustment flag adjusts output one sample to the right for backward compatibility with legacy TDC software. |
Apply (2) |
double[] Apply(double[] data, double sampleRate, bool bUseLegacyTDCSoftwareFilterAdjustment) |
Applies the filter to raw numeric data (assumed to be in base units), given the sampleRate. Same legacy adjustment flag applies. |
ToBaseString |
string ToBaseString() |
Returns the base name of the filter (e.g., "LowPass"), without any decoration (e.g., no suffix like " (10 Hz)"). |
Note
: The
Applymethods are overloaded: one accepts anEvent.Module.Channelobject (likely containing metadata and raw data), and the other accepts rawdouble[]data plussampleRate.
3. Invariants
AvailableFiltersmust be non-null and immutable in the sense that its contents should not change during the lifetime of theIFilterableinstance (though the list itself may be recreated on each access).CurrentFiltermust be eithernullor one of the items inAvailableFilters.GetDataFilteredBymust return data consistent with the specifiedfilteranddisplayUnits, and must not mutate the underlying channel data.IsCfcandTypemust be consistent: ifIsCfcistrue, thenTypelikely corresponds to a CFC-specificChannelFiltervalue (exact mapping not specified in source).- The
bUseLegacyTDCSofwareFilterAdjustmentparameter inApplycontrols sample alignment: whentrue, output is shifted one sample to the right (i.e., delayed by one sample period) to preserve legacy behavior.
4. Dependencies
Dependencies of this module:
System.Collections.Generic(List<T>)DTS.Common.Utilities(namespace referenced, but no types used directly in interface definitions)Event.Module.Channel(used inApplysignatures; type not shown, but assumed to contain raw channel data and metadata)Event.Module.Channel.DataDisplayUnits(enum or type defining unit conversion options; not shown)
Dependencies on this module:
- Any class implementing
IFilterable(e.g., channel or group implementations) must provide filtering capabilities. - Any class implementing
IFiltermust define concrete filtering logic (e.g.,LowPassFilter,HighPassFilter,CfcFilter). - Likely used by higher-level components in
DTS.Slice.Control.DASorDTS.Slice.Control.CASnamespaces (inferred from commented-out base interface inIFilterable).
5. Gotchas
- Typo in parameter name: In
GetDataFilteredBy, the parameterfilteris documented asDTS.Slice.Control.CAS.Channel.IFilter, but the actual interface isDTS.Slice.Control.DAS.Channel.IFilter. This may indicate outdated documentation or namespace refactoring. - Typo in flag name:
bUseLegacyTDCSofwareFilterAdjustmentis misspelled asSofware(missing 't') in oneApplysignature (Applyoverload 1), but correctly spelled asTDCSoftwarein the second overload. This inconsistency may cause confusion or errors in code generation or reflection-based usage. - No explicit thread-safety guarantees: Neither interface documents thread-safety; concurrent access to
CurrentFilter,UseFilterCaching, orApplymay require external synchronization. - Caching behavior unspecified: While
UseFilterCachingtoggles caching, the caching strategy (e.g., cache key, eviction policy, scope) is not defined here—implementation-specific. ToBaseString()vsToString(): The comment impliesToString()is overridden elsewhere (likely in concrete implementations) to include metadata (e.g.,"LowPass (10 Hz)"), whileToBaseString()returns the base name only. Consumers must be aware of this distinction when displaying filter names.
None identified from source alone.
(Note: The above gotchas are inferred from inconsistencies in naming and documentation; no behavioral quirks beyond those are evident from the interfaces themselves.)