17 KiB
17 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:57:16.444957+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | b07fbe9a3474c9e8 |
DASLib.Service Interfaces Documentation
1. Purpose
This module defines a set of interfaces that collectively represent the service layer for Data Acquisition Systems (DAS) in the DataPRO ecosystem. These interfaces abstract hardware-specific operations—such as arming, diagnostics, real-time data streaming, clock synchronization, UART communication, configuration, and download management—into a standardized contract. They serve as the primary API surface for interacting with DAS hardware units, enabling decoupling of service logic from device-specific implementations. The interfaces are designed to support multiple DAS types (e.g., SLICE, TDAS, G5, S6) and coordinate complex workflows like event-triggered acquisition, diagnostics validation, and low-power state transitions.
2. Public Interface
IAutoArmStatus
AutoArmStatus(DFConstantsAndEnums.CommandStatus): Gets or sets the auto-arm status of the DAS unit.
ITimeActions (internal)
Synchronize(ServiceCallback callback, object userData, DateTime time): Synchronizes the DAS clock to the specifiedtime.QueryTime(ServiceCallback callback, object userData): Queries the current time from the DAS.
IService
ServiceCallbackdelegate:void ServiceCallback(ServiceCallbackData data)— The callback signature used to return results from service operations.
IRealTime
RealtimeDASChannels(List<int>): Gets or sets the list of channel indices to stream in real-time mode.TiltAxisData(List<double>): Gets or sets the SLICE6 Axis 1/2/3 (X/Y/Z) tilt data in degrees.
IDiagnos
ChannelDiagnostics(DiagnosticsActions[]): Gets or sets the diagnostics actions to perform per channel.ChannelDiagnosticsResults(DiagnosticsResult[]): Gets or sets the results of channel diagnostics.ModuleDiagnosticsResults(ModuleDiagnosticsResult[]): Gets or sets the results of module-level diagnostics.BaseInput(BaseInputValues): Gets or sets base input voltage/temperature values.DASClockSyncStatus(ClockSyncStatus): Gets or sets the DAS clock synchronization status.ArmCheckActions(ArmCheckActions): Gets or sets the arm check actions to perform.ArmCheckResults(ArmCheckResults): Gets or sets the results of arm checks.
IDASCommunicationComparer
Compare(IDASCommunication x, IDASCommunication y)(int): Compares twoIDASCommunicationinstances bySerialNumber. Handles nulls and reference equality.
IDASCommunicationEqComparer
Equals(IDASCommunication x, IDASCommunication y)(bool): Returnstrueif both instances have the sameSerialNumber.GetHashCode(IDASCommunication idascom)(int): Returns hash code based onSerialNumber.
IUARTDownloadActions
UARTDownload(ServiceCallback callback, object userData): Downloads data as specified inWhatToDownload.QueryUARTDownload(ServiceCallback callback, object userData, int eventIndex, TDASServiceSetupInfo setupInfo): Queries available UART events for download.SetUARTSettings(ServiceCallback callback, object userData, uint baudRate, uint dataBits, uint stopBits, uint parity, uint flowControl): Sets UART connection parameters (FB15268).GetUARTSettings(ServiceCallback callback, object userData): Retrieves current UART settings.
ITriggerCheckActions (internal)
PreStartTriggerCheck(ServiceCallback callback, object userData): Prepares hardware beforeStartTriggerCheck(e.g., for S6 ATD/SLICE PRO trigger check failures, issue #13820).PostStartTriggerCheck(ServiceCallback callback, object userData): Performs post-StartTriggerCheckcleanup.StartTriggerCheck(ServiceCallback callback, object userData): Sets DAS to latch signal lines for trigger checking.DoTriggerCheck(ServiceCallback callback, object userData): Performs trigger check and stores result inTriggerResult.DoTriggerCheckSync(): Synchronous version ofDoTriggerCheck.DoStartCheck(ServiceCallback callback, object userData): Performs start check and stores result inStartResult.CancelTriggerCheck(ServiceCallback callback, object userData): Resets DAS latching mechanism to normal mode.
IRealTimeActions (internal)
RealTime(...): Starts real-time streaming with configurable sample rate, channels, AAF, UDP settings, etc.RealTimePolling(ServiceCallback callback, object userData, ManualResetEvent stopEvent, byte[] channels): Polls DAS for real-time sample averages.ExitRealTimeMode(ServiceCallback callback, object userData): Stops real-time data streaming.RealTimeTiltPolling(ServiceCallback callback, object userData, ManualResetEvent stopEvent): Polls tilt data in real-time.SetUDPStreamProfile(...): Configures UDP streaming for S6A (FB15313).GetUDPStreamProfile(ServiceCallback callback, object userData): Retrieves current UDP streaming profile.
IDownloadActions (internal)
Download(ServiceCallback callback, object userData): Downloads data as specified inWhatToDownload.Cancel(): Cancels current download operation.ForceCancel(): Cancels with shorter clear time.ClearCancel(): Clears the cancel flag.QueryDownload(...): Queries available events for download.QueryDownloadedStatus(...): Checks if events have been downloaded.SetTriggerSampleNumbers(...): Updates trigger sample numbers in hardware.SetDownloaded(...): Marks event as downloaded (used when no data exists).SetEventInfo(...): Updates event metadata (ID, GUID, samples, etc.).CorrectT0s(...): Recovers T0 and total sample counts via ADC rail/peak detection (issue #18469).
IClockSyncActions
GetClockSyncStatus(ServiceCallback callback, object userData): Retrieves clock source and sync status (32-byte payload; see comments for layout).SetClockSyncConfig(ServiceCallback callback, object userData, ClockSyncProfile profile): Sets input/output clock configuration (PTP, IRIG-B122, GPS/1PPS, etc.).GetPTPDomainID(ServiceCallback callback, object userData): Gets PTP domain ID.SetPTPDomainID(ServiceCallback callback, object userData, byte domainID): Sets PTP domain ID.
IDiagnosticsActions
ClearTriggerOut(ServiceCallback callback, object userData): Clears trigger output line viaSetSwitchImmediate.ClearLatches(ServiceCallback callback, object userData): Clears latched FPGA via QATS.PerformVoltageCheck(...): Performs voltage checks.PerformArmChecks(...): Performs arm checks.SaveTiltSensorDataPre(...)/SaveTemperaturesPre(...): Saves pre-event tilt/temperature data.PrepareForBridgeResistanceMeasurement(...): Warms up analog circuits before bridge resistance measurement.PrepareForDiagnostics(...): Prepares for diagnostics (sample rate, AAF, pre/post result type).SetStatusIndicator(...): Sets diagnostics status indicator state.DiagnosAndGetResults(...): Runs diagnostics and stores results.GetEventDiagnosticsResults(...): Retrieves pre/post event diagnostics results.ClearDASTriggerLine(...): Explicitly clears DAS trigger lines afterPreStartTriggerCheck(issue #14229).SquibFireCheckArm(...): Performs squib fire check during arming.TriggerCheckTrigger(...)/TriggerCheckDownload(...): Triggers and downloads trigger check data.GetBridgeMeasurement(...): Retrieves bridge resistance measurement.MeasureTransferSpeed(...): Measures data transfer speed.
IConfigurationActions
AutoDetect(bool bQueryConfiguration, ServiceCallback callback, object userData): Resets channels to auto-detect mode (e.g., for SLICE2 IEPE/bridge).VerifyConfig(bool DoStrictCheck)/VerifyConfig(bool DoStrictCheck, ErrorCallback FailedChallengeFunc): ValidatesConfigData.SetFirstUseDate(...): Sets first-use date (useMsqlDateTime.MinValueto unset).StoreTestSetupXML(...): Stores test setup XML; resets trigger/start lines.ResetHardwareLines(...): Resets hardware trigger/start lines.CheckAAFilterRate(...): Validates AAF rate.QueryTestSetup(...): Retrieves test setup from DAS.Configure(...): Applies configuration fromConfigDatato DAS (supports UDP streaming, DSP filters, UART, etc.).ApplyLevelTriggers(...): Applies only level triggers (no full config).QueryConfiguration(...): Retrieves configuration from DAS intoConfigData.UpdateConfigurationFromFile(...): Updates config from XML file (issue #17872).UpdateIDs(...)/UpdateId(...): Retrieves EIDs or single module/channel ID.CheckSafetyState(...): Checks safety state (armed/unarmed).Reboot(...): Reboots device (FB15335).
IArmActions (internal)
TurnOffT0Lights(...): Turns off T0 indicator lights.BeginBackgroundFlashErase(...): Starts background flash erase (non-blocking).SupportsBackgroundFlashErase(bool): Indicates if background flash erase is supported.BackgroundFlashEraseStarted(bool): Indicates if background erase has started.BackgroundFlashEraseStartTime(DateTime?): Timestamp of background erase start.BeginFlashErase(...): Starts asynchronous flash erase.QueryFlashEraseStatus(...): Queries flash erase progress/errors.ReadyForArming(...): Prepares DAS for arming (event GUID, timeout, testing mode, etc.).ArmNow(...): Arms DAS immediately.PrepareForArmNow(...)/PreparedArmNow(...): Pre-arming steps.ReArm(...): Re-arms units with optional auto-arm/repeat flags.AutoArmUDPSetting(string): UDP broadcast address for auto-arm status (issue #17583).AutoArmNow(...): Auto-arms DAS with diagnostics delay and repeat enable.EnableFaultChecking(...): Arms multiple chained DAS units.CheckAlreadyLevelTriggered(...): Checks if channels are level-triggered.Disarm(...)/DisAutoArm(...): Disarms or disables auto-arm.GetArmStatus(...)/GetAutoArmStatus(...): Retrieves current arm/auto-arm status.EnterLowPowerMode(...): Sets DAS to low-power mode.StartRecord(...): Instructs DAS to start recording.Trigger(...): Sends hardware trigger signal.GetExtendedFaultIds(...): Queries extended fault IDs.
IDASCommunication
- Inherits from:
IConfiguration,IDiagnos,ITriggerCheck,IRealTime,IArmStatus,IDownload,IInformation,IAutoArmStatus,IAutoArmed,IRangeBandwidthLimited,ITimeSynchronization. RecordId(int): Gets/sets the record ID.GetNominalRanges(BridgeType bridge)(double[]): Returns nominal voltage ranges for given bridge type.- Voltage properties (
InputLow/Medium/HighVoltage,BatteryLow/Medium/HighVoltage,Minimum/MaximumValid...Voltage): Hardware-specific voltage thresholds. SerialNumber(string): Base unit serial number.FirmwareVersion(string): Firmware version (read-only).DiagnosticsHasBeenRun/ConfigureHasBeenRun(bool): Flags indicating if diagnostics/configuration have been run.NumberOfConfiguredChannels()/NumberOfChannels()(int): Counts configured or total channels.MaxMemory()(long): Maximum memory capacity.MaxModules(int): Maximum module count.MinSampleRate()/MaxSampleRate()(uint): Sample rate limits.- Feature support flags (
SupportsAutoArm,SupportsLevelTrigger,SupportsRealtime, etc.): Hardware capability indicators. InvertTrigger/InvertStart(bool): Trigger/start line inversion (SLICE-specific).IgnoreShortedStart/IgnoreShortedTrigger(bool): Ignore shorted start/trigger lines.SupportsHardwareInputCheck()(bool): Hardware input status check support (SLICE Base firmware ≥ v7).SupportsMultipleSampleRealtime()(bool): Multiple sample real-time support.ControlsDAQ()(bool): Indicates if base unit controls module DAQ.CheckAAF(float rate)(bool): Validates new AAF rate (e.g., SLICE2 rate tables).RequireDiagnosticRateMatchSampleRate()(bool): Requires diagnostic sample rate to match data rate.GetPhaseShiftSamples(...)(ulong): Returns phase delay in samples (module-specific).IsEthernetDistributor()/IsSlice6Distributor()(bool): Identifies distributor devices (e.g., SLICEDb).MACAddress/DownstreamMACAddresses(string[]): Network identifiers.SupportsIndividualChannelRealtimeStreaming(bool): Per-channel real-time streaming (SPS only, issue #10572).
3. Invariants
IDASCommunicationinstances must uniquely identify hardware units viaSerialNumber. Comparers (IDASCommunicationComparer,IDASCommunicationEqComparer) enforce this viaSerialNumber-based equality.ServiceCallbackmust be invoked exactly once per service operation, carryingServiceCallbackDatawith operation result.RealtimeDASChannelsandRealTime(...)channelsparameter must contain valid channel indices for the DAS unit.DiagnosticsHasBeenRunandConfigureHasBeenRunflags must be set only after successful completion of respective operations.AutoArmUDPSettingmust be a valid UDP address string when auto-arm is enabled; otherwise, it may be null/empty.TiltAxisDatamust contain exactly 3 elements (X, Y, Z) for SLICE6 tilt reporting.IDownloadActions.Cancel()andForceCancel()must set an internal cancel flag that is checked during download operations.ITriggerCheckActions.PreStartTriggerCheckandPostStartTriggerCheckare not generic services—they are called explicitly by theStartTriggerCheckservice to handle hardware-specific timing (e.g., S6 ATD quirks, issue #13820).
4. Dependencies
Dependencies on this module:
DTS.Common.*namespaces:DTS.Common.Enums.DASFactory(e.g.,CommandStatusinIAutoArmStatus)DTS.Common.Interface.DASFactory(e.g.,IDASCommunicationinherits fromIConfiguration,IDiagnos, etc.)DTS.Common.DAS.Concepts,DTS.Common.Enums.Sensors,DTS.Common.Classes.DSP
- System namespaces:
System,System.Collections.Generic,System.IO.Ports,System.Threading - Windows Forms:
System.Windows.Forms(only inIService.cs, likely for legacy UI integration)
Dependencies of this module:
IDASCommunicationis the central abstraction; all service interfaces (IArmActions,IDiagnosticsActions, etc.) operate onList<IDASCommunication>(implied by usage).ServiceCallbackis used by all service interfaces to return results.TDASServiceSetupInfois referenced inIUARTDownloadActions.QueryUARTDownloadandIDownloadActions.QueryDownload.PrePostResultsis used inIDiagnosticsActionsmethods (e.g.,PrepareForDiagnostics,DiagnosAndGetResults).UDPStreamProfile,ClockSyncProfile,DiagnosticsStatusIndicatorState,DiagnosticsActions,ArmCheckActions, etc., are defined in externalDTS.Common.*assemblies.
5. Gotchas
ITimeActionsandIRealTimeActionsare markedinternal—they are not part of the public API surface and should not be used outsideDTS.DASLib.Service.ITriggerCheckActions.PreStartTriggerCheck/PostStartTriggerCheckare not generic services; they are called by theStartTriggerCheckservice to handle hardware-specific timing (e.g., S6 ATD/SLICE PRO trigger check failures, issue #13820).IDownloadActions.CorrectT0s(...)may return an error on devices that do not support T0 recovery (e.g., non-circular buffer/hybrid recorders, issue #18469).IUARTDownloadActions.SetUARTSettings(...)usesuintfor all UART parameters (baudRate, dataBits, etc.), but actual hardware may have constrained ranges (e.g., dataBits ∈ {7,8}, stopBits ∈ {1,2}).IDiagnosticsActions.PrepareForBridgeResistanceMeasurement(...)must be called only if units were previously in low-power mode; otherwise, it is unnecessary but harmless (per comment).IDASCommunication.CheckAAF(float rate)is primarily used for SLICE2’s multiple AAF rate tables; other DAS types may ignore it.- **`IArmActions.Background