init
This commit is contained in:
@@ -0,0 +1,429 @@
|
||||
---
|
||||
source_files:
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IAutoArmed.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/ITiltSensorCalAware.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IRangeBandwidthLimited.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IAutoArmStatus.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/ITimeSynchronization.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IConnectedEthernetDevice.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IDASConfigurationArg.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IRealtime.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IUDPQATSEntry.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IDASFactory.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/ICommunication.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IDiscoveredDevice.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IAnalogInputDASChannel.cs
|
||||
- Common/DTS.CommonCore/Interface/DASFactory/IDASCommunication.cs
|
||||
generated_at: "2026-04-16T12:19:30.502497+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "5d1420792c49604c"
|
||||
---
|
||||
|
||||
# DASFactory Interfaces Documentation
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module defines the core abstraction layer for the Data Acquisition System (DAS) Factory pattern. It provides interfaces for device discovery, hardware communication, channel configuration, real-time data streaming, and diagnostics across multiple DAS hardware types (SLICE, TDAS, TSR, etc.). The interfaces enable polymorphic treatment of diverse hardware while exposing type-specific capabilities through optional interface implementation. This module serves as the contract layer between high-level application services and low-level hardware drivers.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### IAutoArmed
|
||||
```csharp
|
||||
bool AutoArmed { get; set; }
|
||||
```
|
||||
Simple marker interface for auto-arming capability.
|
||||
|
||||
### ITiltSensorCalAware
|
||||
```csharp
|
||||
double[] TiltSensorCals { get; }
|
||||
```
|
||||
Exposes tilt sensor calibration values. Returns an array of calibration coefficients.
|
||||
|
||||
### IRangeBandwidthLimited
|
||||
```csharp
|
||||
bool RangeBandwidthLimited { get; }
|
||||
```
|
||||
Read-only flag indicating if the device has range/bandwidth limitations applied.
|
||||
|
||||
### IAutoArmStatus
|
||||
```csharp
|
||||
DFConstantsAndEnums.CommandStatus AutoArmStatus { get; set; }
|
||||
```
|
||||
Tracks the command status of auto-arm operations using `DFConstantsAndEnums.CommandStatus` enum.
|
||||
|
||||
### ITimeSynchronization
|
||||
```csharp
|
||||
bool SupportsTimeSynchronization { get; }
|
||||
DateTime SystemBaseTime { get; }
|
||||
```
|
||||
Indicates time synchronization support and provides the system base time reference.
|
||||
|
||||
### IConnectedEthernetDevice
|
||||
```csharp
|
||||
string MACAddress { get; }
|
||||
int Port { get; }
|
||||
string SerialNumber { get; set; }
|
||||
```
|
||||
Represents an ethernet-connected device with network identification properties.
|
||||
|
||||
### IDASConfigurationArg
|
||||
```csharp
|
||||
IDASCommunication DAS { get; }
|
||||
bool BlankConfigurationRead { get; }
|
||||
bool ConfigurationFailedValidation { get; }
|
||||
```
|
||||
Argument interface for configuration events. Used per comment "17872 Use DASConfig XMLs on disk when performing an emergency download with DAS that have blank filestore(s)".
|
||||
|
||||
### IRealTime
|
||||
```csharp
|
||||
List<int> RealtimeDASChannels { get; set; }
|
||||
List<double> TiltAxisData { get; set; }
|
||||
string UDPStreamAddress { get; }
|
||||
```
|
||||
Real-time data streaming interface. `TiltAxisData` provides Slice6 Axis 1/2/3 (X/Y/Z) tilt in degrees. `UDPStreamAddress` provides the S6/S6A realtime UDP stream endpoint.
|
||||
|
||||
### IUDPQATSEntry
|
||||
Extensive interface for UDP QATS (Quick Acquisition and Telemetry System) entries:
|
||||
```csharp
|
||||
string ResponseHostMac { get; }
|
||||
string ResponseClientMacAddress { get; }
|
||||
string SerialNumber { get; }
|
||||
byte ArmState { get; }
|
||||
byte ArmMode { get; }
|
||||
byte Started { get; }
|
||||
byte Triggered { get; }
|
||||
byte FaultFlags { get; }
|
||||
uint SampleRate { get; }
|
||||
ulong TotalSamples { get; }
|
||||
ulong CurrentSample { get; }
|
||||
ushort EventNumber { get; }
|
||||
ulong FaultSampleNumber { get; }
|
||||
ushort LegacyFaultFlags { get; }
|
||||
float InputVoltage { get; }
|
||||
float BackupVoltage { get; }
|
||||
float BatterySOC { get; }
|
||||
ulong EstimateMaxSamples { get; }
|
||||
short TiltSensorCh1 { get; }
|
||||
short TiltSensorCh2 { get; }
|
||||
short TiltSensorCh3 { get; }
|
||||
float SysTempC { get; }
|
||||
byte SyncClockEnable { get; }
|
||||
byte ADCExtClockSyncEnable { get; }
|
||||
byte SyncClockStatus { get; }
|
||||
byte ADCExtClockSyncStatus { get; }
|
||||
ulong EventTriggerSample { get; }
|
||||
float[] ChannelOffsetMV { get; }
|
||||
float[] ShuntDeviationPercent { get; }
|
||||
DateTime Timestamp { get; }
|
||||
```
|
||||
|
||||
### IDASFactory
|
||||
Primary factory interface for DAS device management:
|
||||
```csharp
|
||||
bool PingAll();
|
||||
string Language { get; set; }
|
||||
void TakeOwnership();
|
||||
bool AllowSDBCommandPort { get; set; }
|
||||
double S6ConnectNewTimeout { get; set; }
|
||||
string[] SliceDBHostNames { get; set; }
|
||||
string[] GetConnectedDevices();
|
||||
string[] TDASHostNames { get; set; }
|
||||
string[] TDASSerialPortNames { get; set; }
|
||||
string TDASSerialRackSerialNumber { get; set; }
|
||||
List<IDASCommunication> GetDASList();
|
||||
List<IDASCommunication> GetSortedDASList();
|
||||
List<ICommunication> GetDevList();
|
||||
void DetachAllDevices(bool detachUSB = false);
|
||||
void Refresh(ActionCompleteDelegate action);
|
||||
int MultiCastAutoDiscoveryDefaultTimeoutMS { get; set; }
|
||||
SortableBindingList<IDiscoveredDevice> AutoDiscoverMulticast(bool discoverParents = true);
|
||||
```
|
||||
|
||||
### ICommunication
|
||||
Low-level communication interface extending `IComparable<ICommunication>` and `IComparable<string>`:
|
||||
```csharp
|
||||
IConnection Transport { get; set; }
|
||||
void SetupReader();
|
||||
int ReceiveBufferSize { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
string FirmwareVersion { get; set; }
|
||||
byte ProtocolVersion { get; set; }
|
||||
ICommunication_DASInfo DASInfo { get; set; }
|
||||
Dictionary<DFConstantsAndEnums.ProtocolLimitedCommands, byte> MinimumProtocols { get; set; }
|
||||
void InitMinProto();
|
||||
bool IsCommandSupported(DFConstantsAndEnums.ProtocolLimitedCommands command);
|
||||
byte GetMinProto(DFConstantsAndEnums.ProtocolLimitedCommands command);
|
||||
event EventHandler OnDisconnected;
|
||||
string ConnectString { get; }
|
||||
bool Connected { get; }
|
||||
void Connect(string ConnectString, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout, string ipAddress);
|
||||
void Disconnect(bool reuseSocket, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout);
|
||||
void Close(int Timeout);
|
||||
void Flush(int Timeout);
|
||||
bool ExecuteIsBusy { get; set; }
|
||||
void Execute(byte[] byteData, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout);
|
||||
void PseudoExecute(byte[] byteData, CommunicationConstantsAndEnums.CommunicationCallback Callback, object CallbackObject, int CallbackTimeout);
|
||||
byte[] SyncExecute(byte[] byteData, int Timeout);
|
||||
void Cancel();
|
||||
void ForceCancel();
|
||||
bool IsCanceled();
|
||||
void ClearCancel();
|
||||
ManualResetEvent CancelEvent { get; }
|
||||
```
|
||||
|
||||
### IDiscoveredDevice
|
||||
Interface for multicast-discovered devices:
|
||||
```csharp
|
||||
string Serial { get; set; }
|
||||
MultiCastDeviceClasses DevClass { get; set; }
|
||||
string Mac { get; set; }
|
||||
IDiscoveredDevice Parent { get; set; }
|
||||
bool IsParent(IDiscoveredDevice possibleChild);
|
||||
int GetPort(IDiscoveredDevice device);
|
||||
int GetSlot(IDiscoveredDevice child, Dictionary<string, IDiscoveredDevice> lookup);
|
||||
int GetSlotOnPort(IDiscoveredDevice child, Dictionary<string, IDiscoveredDevice> lookup);
|
||||
bool IsModule { get; set; }
|
||||
int Port { get; set; }
|
||||
int PositionOnDistributor { get; set; }
|
||||
int PositionOnChain { get; set; }
|
||||
bool Dhcp { get; set; }
|
||||
string Ip { get; set; }
|
||||
string Subnet { get; set; }
|
||||
string Gateway { get; set; }
|
||||
string Dns { get; set; }
|
||||
bool Connected { get; set; }
|
||||
string ConnectedIp { get; set; }
|
||||
string ConnectedHost { get; set; }
|
||||
ushort SystemId { get; set; }
|
||||
string Location { get; set; }
|
||||
string FirmwareVersion { get; set; } // Format: [Product Name]-[FW/BL]-[REL/DBG]-[Board #]-[FW Ver Name]
|
||||
string BuildId { get; set; }
|
||||
IConnectedEthernetDevice[] Connections { get; set; }
|
||||
```
|
||||
|
||||
### IAnalogInputDASChannel
|
||||
Comprehensive interface for analog input channel configuration (100+ members). Key properties include:
|
||||
|
||||
**Bridge Configuration:**
|
||||
```csharp
|
||||
SensorConstants.BridgeType TypeOfBridge { get; set; }
|
||||
SensorConstants.BridgeType[] SupportedBridges { get; set; }
|
||||
double BridgeResistanceOhms { get; set; }
|
||||
```
|
||||
|
||||
**Sensor Properties:**
|
||||
```csharp
|
||||
double SensorCapacityEU { get; set; }
|
||||
double SensorCapacity { get; set; }
|
||||
string SensorPolarity { get; set; }
|
||||
double DesiredRangeWithHeadroomEU { get; set; }
|
||||
double SensitivityMilliVoltsPerEU { get; set; }
|
||||
double SensitivityMilliVoltsPerEUNormalized { get; }
|
||||
bool IsProportionalToExcitation { get; set; }
|
||||
bool IsInverted { get; set; }
|
||||
```
|
||||
|
||||
**Channel Identification:**
|
||||
```csharp
|
||||
string OriginalChannelName { get; set; }
|
||||
string ChannelName2 { get; set; }
|
||||
string ChannelId { get; set; }
|
||||
string ChannelGroupName { get; set; }
|
||||
string HardwareChannelName { get; set; }
|
||||
```
|
||||
|
||||
**Excitation:**
|
||||
```csharp
|
||||
ExcitationVoltageOptions.ExcitationVoltageOption Excitation { get; set; }
|
||||
ExcitationVoltageOptions.ExcitationVoltageOption[] SupportedExcitation { get; set; }
|
||||
bool IsSupported(ExcitationVoltageOptions.ExcitationVoltageOption o);
|
||||
```
|
||||
|
||||
**Digital Input:**
|
||||
```csharp
|
||||
DigitalInputModes[] SupportedDigitalInputModes { get; set; }
|
||||
DigitalInputModes DigitalMode { get; set; }
|
||||
string DIUnits { get; set; }
|
||||
bool DigitalInputChannel { get; set; }
|
||||
```
|
||||
|
||||
**Zero Configuration:**
|
||||
```csharp
|
||||
ZeroMethodType ZeroMethod { get; set; }
|
||||
double ZeroAverageStartSeconds { get; set; }
|
||||
double ZeroAverageStopSeconds { get; set; }
|
||||
double InitialEU { get; set; }
|
||||
string InitialOffset { get; set; }
|
||||
```
|
||||
|
||||
**Diagnostics:**
|
||||
```csharp
|
||||
bool ShuntIsEnabled { get; set; }
|
||||
int ShuntTargetADC { get; set; }
|
||||
bool VoltageInsertionCheckEnabled { get; set; }
|
||||
bool RemoveOffset { get; set; }
|
||||
bool VerifyOffset { get; set; }
|
||||
double OffsetToleranceLowMilliVolts { get; set; }
|
||||
double OffsetToleranceHighMilliVolts { get; set; }
|
||||
IDiagnosticResult Diagnostics { get; }
|
||||
IDiagnosticResult DiagnosticInformation { get; }
|
||||
```
|
||||
|
||||
**Level Triggering:**
|
||||
```csharp
|
||||
double? TriggerBelowThresholdEu { get; set; }
|
||||
double? TriggerAboveThresholdEu { get; set; }
|
||||
bool AlreadyLevelTriggered { get; set; }
|
||||
double MeasuredEULevelTriggerCheck { get; set; }
|
||||
```
|
||||
|
||||
**XML Serialization:**
|
||||
```csharp
|
||||
void WriteElementEnd(XmlWriter writer);
|
||||
void WriteXml(XmlWriter writer);
|
||||
void WriteXmlCRC32(XmlWriter writer);
|
||||
string GetSupportedExcitationSerialized();
|
||||
string GetSupportedDigitalInputModesSerialized();
|
||||
string GetSupportedBridgesSerialized();
|
||||
```
|
||||
|
||||
### IDASCommunication
|
||||
Primary interface for DAS unit interaction. Extends multiple capability interfaces:
|
||||
- `IConfiguration`, `IDiagnos`, `ITriggerCheck`, `IRealTime`, `IArmStatus`, `IDownload`, `IInformation`
|
||||
- `IComparable<IDASCommunication>`, `IDisposable`, `IAutoArmStatus`, `IAutoArmed`, `IRangeBandwidthLimited`, `ITimeSynchronization`
|
||||
|
||||
**Key Properties:**
|
||||
```csharp
|
||||
ExcitationStatus ExcitationStatus { get; set; }
|
||||
DateTime? FirstUseDate { get; set; }
|
||||
bool IsFirstUseDateSupported { get; set; }
|
||||
bool IsStreamingSupported { get; set; }
|
||||
HardwareTypes GetHardwareType();
|
||||
int RecordId { get; set; }
|
||||
string SerialNumber { get; set; }
|
||||
string FirmwareVersion { get; }
|
||||
bool DiagnosticsHasBeenRun { get; set; }
|
||||
bool ConfigureHasBeenRun { get; set; }
|
||||
string MACAddress { get; set; }
|
||||
string[] DownstreamMACAddresses { get; set; }
|
||||
```
|
||||
|
||||
**Voltage Thresholds:**
|
||||
```csharp
|
||||
float InputLowVoltage { get; set; }
|
||||
float InputMediumVoltage { get; set; }
|
||||
float InputHighVoltage { get; set; }
|
||||
float BatteryLowVoltage { get; set; }
|
||||
float BatteryMediumVoltage { get; set; }
|
||||
float BatteryHighVoltage { get; set; }
|
||||
double MinimumValidInputVoltage { get; set; }
|
||||
double MaximumValidInputVoltage { get; set; }
|
||||
double MinimumValidBatteryVoltage { get; set; }
|
||||
double MaximumValidBatteryVoltage { get; set; }
|
||||
```
|
||||
|
||||
**Channel & Memory:**
|
||||
```csharp
|
||||
int NumberOfConfiguredChannels();
|
||||
int NumberOfChannels();
|
||||
long MaxMemory();
|
||||
int MaxModules { get; set; }
|
||||
```
|
||||
|
||||
**Sample Rates:**
|
||||
```csharp
|
||||
uint MinSampleRate();
|
||||
uint MaxSampleRate(int numberOfConfiguredChannels);
|
||||
uint MaxAAFilterRate();
|
||||
```
|
||||
|
||||
**Capability Queries:**
|
||||
```csharp
|
||||
bool SupportsAutoArm();
|
||||
bool SupportsLevelTrigger();
|
||||
bool SupportsRealtime();
|
||||
bool SupportsMultipleEvents();
|
||||
bool SupportsTriggerInversion();
|
||||
bool SupportsStartInversion();
|
||||
bool SupportsHardwareInputCheck();
|
||||
bool SupportsMultipleSampleRealtime();
|
||||
bool SupportsIndividualChannelRealtimeStreaming { get; }
|
||||
bool InvertTrigger { set; }
|
||||
bool InvertStart { get; set; }
|
||||
bool IgnoreShortedStart { get; set; }
|
||||
bool IgnoreShortedTrigger { get; set; }
|
||||
```
|
||||
|
||||
**Hardware Type Checks:**
|
||||
```csharp
|
||||
bool IsEthernetDistributor();
|
||||
bool IsSlice6Distributor();
|
||||
bool IsBattery();
|
||||
bool IsTSRAIR();
|
||||
bool IsSlice6Air();
|
||||
bool ControlsDAQ();
|
||||
bool IsStreamingSupported { get; set; }
|
||||
```
|
||||
|
||||
**Operations:**
|
||||
```csharp
|
||||
void ReadFirstUseDate();
|
||||
void SetIsStreamingSupported(bool supported = false);
|
||||
bool ConnectionCheck();
|
||||
double[] GetNominalRanges(SensorConstants.BridgeType bridge);
|
||||
bool CheckAAF(float rate);
|
||||
bool RequireDiagnosticRateMatchSampleRate();
|
||||
ulong GetPhaseShiftSamples(uint ModuleIndex, double ActualSampleRate, uint HardwareAAF, ulong originalT0);
|
||||
bool GetCanCheckArmStatus();
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Invariants
|
||||
|
||||
1. **Channel Configuration**: A channel is considered "configured" if and only if `SerialNumber` field is populated (per `IsConfigured()` contract in `IAnalogInputDASChannel`).
|
||||
|
||||
2. **First Use Date**: `FirstUseDate` is only valid when `IsFirstUseDateSupported` is `true`. A `null` value indicates the hardware has not been used since calibration.
|
||||
|
||||
3. **Protocol Versioning**: Commands must be checked via `IsCommandSupported()` before execution on `ICommunication` implementations, as protocol support varies by firmware version.
|
||||
|
||||
4. **SetupReader Requirement**: `SetupReader()` must be called whenever a socket is connected (per comment in `ICommunication`).
|
||||
|
||||
5. **Diagnostics/Configuration State**: `DiagnosticsHasBeenRun` and `ConfigureHasBeenRun` flags indicate whether these operations have been executed and should be checked before relying on diagnostic results.
|
||||
|
||||
6. **Phase Shift Calculation**: `GetPhaseShiftSamples()` returns 0 for most DAS types as phase delay is only known for specific hardware.
|
||||
|
||||
7. **Position Hierarchy**: For devices on a SLICE6DB, `PositionOnDistributor` and `PositionOnChain` track device location when individual SLICE6 devices are not shown in UI.
|
||||
|
||||
---
|
||||
|
||||
## 4. Dependencies
|
||||
|
||||
### This module depends on:
|
||||
- `DTS.Common.Enums` - Core enumerations
|
||||
- `DTS.Common.Enums.Communication` - Communication-specific enums
|
||||
- `DTS.Common.Enums.DASFactory` - DAS factory enums including `DFConstantsAndEnums`, `MultiCastDeviceClasses`
|
||||
- `DTS.Common.Enums.Hardware` - `HardwareTypes`, `ExcitationStatus`
|
||||
- `DTS.Common.Enums.Sensors` - `SensorConstants.BridgeType`, `SensorConstants.CouplingModes`, `ExcitationVoltageOptions`, `DigitalInputModes`, `ZeroMethodType`
|
||||
- `DTS.Common.Interface.Communication` - Communication interfaces
|
||||
- `DTS.Common.Interface.Connection` - `IConnection` interface
|
||||
- `DTS.Common.Interface.DASFactory.ARM` - ARM-related interfaces
|
||||
- `DTS.Common.Interface.DASFactory.Config` - Configuration interfaces
|
||||
- `DTS.Common.Interface.DASFactory.Diagnostics` - `IDiagnosticResult`, `IDiagnos`
|
||||
- `DTS.Common.Interface.DASFactory.Download` - Download interfaces
|
||||
- `DTS.Common.Interface.Sensors.SoftwareFilters` - `IFilterClass`
|
||||
- `DTS.Common.Interface.StatusAndProgressBar` - `ActionCompleteDelegate`
|
||||
- `DTS.Common.Utilities` - `SortableBindingList<T>`
|
||||
- `System.Xml` - `XmlWriter` for serialization
|
||||
|
||||
### What depends on this module:
|
||||
Cannot be determined from source alone, but `IDASCommunication` documentation states it is "the most used data structure in the API" with nearly all hardware services taking `List<IDASCommunication>` as a parameter.
|
||||
|
||||
---
|
||||
|
||||
## 5. Gotchas
|
||||
|
||||
1. **SoftwareFilterClass Refactoring** (IAnalog
|
||||
Reference in New Issue
Block a user