This module defines a set of interfaces that collectively describe the contract for interacting with Data Acquisition Systems (DAS) in the DASFactory subsystem. It serves as the primary abstraction layer between the application logic and hardware-specific implementations, enabling uniform access to device capabilities such as configuration, diagnostics, real-time streaming, arming, time synchronization, and discovery. The interfaces are intentionally granular to support composition (via interface inheritance, e.g., IDASCommunication implements multiple sub-interfaces) and to decouple concerns like communication transport, device metadata, channel configuration, and feature support flags. This design allows the system to handle heterogeneous hardware (e.g., SLICE6, TDAS, g5, SPS) through a unified API surface while preserving hardware-specific behavior via optional interface implementations.
2. Public Interface
Core Interfaces
IAutoArmed
bool AutoArmed { get; set; }
Gets or sets whether the device is in auto-armed mode (i.e., automatically arms upon meeting arming conditions).
ITMATSStreamingDevice
int GetMaxFileLengthTMATS()
Returns the maximum file length (in samples or bytes, context-dependent) for TMATS-compliant streaming output.
ITiltSensorCalAware
double[] TiltSensorCals { get; }
Gets an array of calibration coefficients for tilt sensors (e.g., channel offsets/gains).
IRangeBandwidthLimited
bool RangeBandwidthLimited { get; }
Indicates whether the device’s measurement range is constrained by bandwidth limitations (e.g., anti-aliasing filters).
IAutoArmStatus
DFConstantsAndEnums.CommandStatus AutoArmStatus { get; set; }
Gets or sets the current status of the auto-arm process (e.g., Ready, InProgress, Failed).
ITimeSynchronization
bool SupportsTimeSynchronization { get; }
Indicates whether the device supports time synchronization (e.g., via PTP or GPS).
DateTime SystemBaseTime { get; }
Gets the device’s base system time (typically the reference timestamp for sample timestamps).
IConnectedEthernetDevice
string MACAddress { get; }
Gets the MAC address of the device.
int Port { get; }
Gets the port number on the parent device (e.g., SLICE6DB) to which this device is connected.
string SerialNumber { get; set; }
Gets or sets the device’s serial number.
IDASReconfigure
int GetMaxModuleCount()
Returns the maximum number of modules supported by the DAS base unit.
void SetMaxModuleCount(int count)
Sets the maximum module count (used during reconfiguration).
IDASConfigurationArg
IDASCommunication DAS { get; }
Reference to the DAS unit being configured.
bool BlankConfigurationRead { get; }
Indicates whether the configuration was read from a blank/empty XML file (e.g., during emergency download).
void StartMulticastAutoDiscovery() / void StopMulticastAutoDiscovery()
Start/stop device discovery via multicast.
IDiscoveredDevice[] GetDiscoveredDevices()
Returns all devices discovered via multicast.
bool PingAll()
Sends a ping to all connected devices to verify liveness.
List<IDASCommunication> GetDASList() / List<IDASCommunication> GetSortedDASList()
Returns the list of all connected DAS units (sorted by position or not).
List<ICommunication> GetDevList()
Returns all connected communication endpoints (not limited to DAS).
void DetachAllDevices(bool detachUSB = false)
Removes all devices from the factory’s internal state.
void Refresh(ActionCompleteDelegate action)
Re-scans hardware and updates GetDASList() asynchronously.
SortableBindingList<IDiscoveredDevice> AutoDiscoverMulticast(CancellationToken cancelToken, bool discoverParents = true)
Performs multicast-based discovery and returns a sorted list of discovered devices.
IDASCommunication must implement all sub-interfaces listed in its declaration (e.g., IAutoArmed, ITimeSynchronization, IRealTime).
ICommunication.Transport must be non-null after Connect() succeeds and before Disconnect() completes.
ICommunication.Connected must be true only when the underlying transport is actively connected.
IDiscoveredDevice.DevClass must be consistent with IDiscoveredDevice.IsModule (e.g., modules have DevClass values like SLICE6_MODULE, bases like SLICE6DB).
IAnalogInputDASChannel.IsConfigured() must return true if and only if SerialNumber is non-null/non-empty (per the comment).
IUDPQATSEntry.Timestamp must represent the time the UDP packet was received by the host (not the device’s internal timestamp).
IDASFactory.GetDASList() must reflect the current state of connected hardware only after Refresh() completes.
IAutoArmStatus.AutoArmStatus must be set to DFConstantsAndEnums.CommandStatus.Unknown if auto-arm is unsupported or uninitialized.
System.Collections.Generic, System.Threading, System.Xml, System (for DateTime, ManualResetEvent).
Depended Upon By:
Services in DASFactory (e.g., ConfigurationService, DiagnosticsService, DownloadService) use IDASCommunication as the primary input.
Discovery logic in IDASFactory relies on IDiscoveredDevice to build device topologies.
Real-time streaming clients consume IRealTime and IUDPQATSEntry for live data.
UI components use IAnalogInputDASChannel for channel configuration and IDiscoveredDevice for device topology visualization.
5. Gotchas
IDASReconfigure is explicitly suppressed for PascalCase naming (S101) due to "DAS" being an acronym; this is a known code-smell exception.
ICommunication.CancelEvent is a ManualResetEvent—consumers must dispose it properly if the ICommunication instance is long-lived.
IUDPQATSEntry.TiltSensorCh1/2/3 are short (raw ADC counts), not calibrated values; calibration requires ITiltSensorCalAware.TiltSensorCals.
IAnalogInputDASChannel.SoftwareFilterClass is marked as a temporary fix (FB 13120) and may be refactored; avoid relying on its current implementation.
IDASCommunication.IsFirstUseDateSupported requires hardware support and prior calibration; FirstUseDate is null if unsupported or unset.
IDiscoveredDevice.PositionOnChain and PositionOnDistributor are used exclusively for SLICE6 devices on a SLICE6DB; other topologies may leave these unset.
ICommunication.SyncExecute blocks the calling thread; avoid in UI threads.
IDASFactory.Refresh() is asynchronous (via ActionCompleteDelegate); callers must wait for completion before using GetDASList().
IAnalogInputDASChannel.UpdateChannelFromDatabase is a flag to prevent overwriting group-channel configurations during configuration; misuse may cause stale data.
IDASCommunication.SupportsHardwareInputCheck() requires protocol version ≥7 for SLICE Base firmware; older devices will return false.
IUDPQATSEntry.ShuntDeviationPercent and ChannelOffsetMV are arrays—size is not specified in the interface (likely fixed per hardware type).