This commit is contained in:
2026-04-17 14:55:32 -04:00
commit bc3ac1d4c9
18017 changed files with 4371742 additions and 0 deletions

View File

@@ -0,0 +1,151 @@
using System;
namespace DTS.DASLib.Service
{
internal interface IArmActions
{
void TurnOffT0Lights(ServiceCallback callback, object userData);
/// <summary>
/// initiates background flash erase for units that support it
/// will return immediately after flash erase begins
/// </summary>
/// <param name="callbck"></param>
/// <param name="userData"></param>
void BeginBackgroundFlashErase(ServiceCallback callback, object userData);
/// <summary>
/// returns whether unit is capable of flash erase
/// </summary>
bool SupportsBackgroundFlashErase { get; }
/// <summary>
/// returns whether unit has started background flash erase
/// </summary>
bool BackgroundFlashEraseStarted { get; }
DateTime? BackgroundFlashEraseStartTime { get; }
/// <summary>
/// Start an asynchronous flash erase on a single DAS.
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void BeginFlashErase(ServiceCallback callback, object userData, bool DummyArm);
/// <summary>
/// Query a single DAS for flash erase progress and an errors that have occurred.
/// </summary>
/// <param name="callback">The function to call with update information</param>
/// <param name="userData"></param>
void QueryFlashEraseStatus(ServiceCallback callback, object userData);
void ReadyForArming(ServiceCallback callback, object userData, Guid eventGuid, int
armNowTimeout, bool testingMode,
int maxNumberEvents, bool DummyArm, bool SysMode);
/// <summary>
/// Arm a single DAS now
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="eventGuid">A unique GUID that this event will be tagged
/// with</param>
void ArmNow(ServiceCallback callback, object userData, Guid eventGuid, int
armNowTimeout, bool testingMode,
int maxNumberEvents, bool SysMode);
void PrepareForArmNow(ServiceCallback callback, object userData, Guid eventGuid, int
armNowTimeout, bool testingMode,
int maxNumberEvents, bool SysMode);
void PreparedArmNow(ServiceCallback callback, object userData, Guid eventGuid, int
armNowTimeout, bool checkoutMode,
int maxNumberEvents, bool SysMode);
/// <summary>
/// re-arm all units, potentially setting auto arm and repeat enable flags as well and whether to
/// call arm right away (or rely on the unit being restarted)
/// </summary>
void ReArm(ServiceCallback callback, object userData, bool autoArm, bool arm, bool repeatEnable);
/// <summary>
/// the UDP settings to broadcast auto arm status to on auto arm boot
/// 17583 Monitor Test UI
/// </summary>
string AutoArmUDPSetting { get; set; }
/// <summary>
/// Auto Arm a single DAS now
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="eventGuid">A unique GUID that this event will be tagged
/// with</param>
void AutoArmNow(ServiceCallback callback, object userData, Guid eventGuid, int
armNowTimeout, bool testingMode, UInt32 diagnosticsDelayMs, int MaxEventCount, bool repeatEnable, bool preserveDiagnostics);
/// <summary>
/// Arm multiple chained DAS now
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void EnableFaultChecking(ServiceCallback callback, object userData);
/// <summary>
/// checks all channels to see if the are level triggered
/// sets the AlreadyLevelTriggered channel for the channel accordingly.
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void CheckAlreadyLevelTriggered(ServiceCallback callback, object userData);
/// <summary>
/// Disarm the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void Disarm(ServiceCallback callback, object userData);
/// <summary>
/// DisAutoArm the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void DisAutoArm(ServiceCallback callback, object userData);
/// <summary>
/// Retrieve the current arm status from the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void GetArmStatus(ServiceCallback callback, object userData, uint inputVoltageCutoff, int maxTimeout);
/// <summary>
/// Retrieve the current auto arm status from the DAS
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void GetAutoArmStatus(ServiceCallback callback, object userData);
/// <summary>
/// Set the DAS to low power mode
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void EnterLowPowerMode(ServiceCallback callback, object userData);
/// <summary>
/// Tells the DAS to start record
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void StartRecord(ServiceCallback callback, object userData);
/// <summary>
/// Sends trigger signal to HW
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void Trigger(ServiceCallback callback, object userData);
/// <summary>
/// queries for extended fault ids from hw
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void GetExtendedFaultIds(ServiceCallback callback, object userData);
}
}

View File

@@ -0,0 +1,10 @@
using DTS.Common.Enums.DASFactory;
using DTS.DASLib.Command.SLICE;
namespace DTS.DASLib.Service
{
public interface IAutoArmStatus
{
DFConstantsAndEnums.CommandStatus AutoArmStatus { get; set; }
}
}

View File

@@ -0,0 +1,98 @@
using System;
using DTS.Common;
namespace DTS.DASLib.Service.Interfaces
{
public interface IClockSyncActions
{
/// <summary>
/// Retrieve the current clock source & sync status from the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
///
void GetClockSyncStatus(ServiceCallback callback, object userData);
//- Command Parameter: uint8[4]. Default = 0.
//- Response data payload byte stream:
//Byte 0: Input Synchronization Clock Source
//---- Bit_0: PTP
//---- Bit_1: IRIG-B122
//---- Bit_2: GPS
//---- Bit_3: 1PPS
//---- Bit_7:4: RSV
//Byte 1: Output Synchronization Clock Source
//---- Bit_1:0: = 0 disable.
// 1 = PTP Master
// 2 = PTP Boundary
// 3 = Reserved
//---- Bit_2: E2E(0)/P2P(1)
//---- Bit_3: 1PPS
//---- Bit_7:4: Reserved
//Byte 2: Synchronization Status.
//---- Bit_0: PTP
//---- Bit_1: IRIG-B122
//---- Bit_2: GPS
//---- Bit_3: 1PPS
//---- Bit_7:4: RSV
// Bit set = true.Clear = false.
//Byte 3: Current Arm State.
//Byte[7:4] = 32bit for seconds when sync is locked. --
//Byte[11:8] = 32bit for nanoseconds when sync is locked. 64-bit PTP format to keep track of sync status
//Byte[15:12] = 32bit for seconds when sync is lost. --
//Byte[19:16] = 32bit for nanoseconds when sync is lost. 64-bit PTP format to keep track of sync status
//Byte[31:20] = 12 bytes reserved for future usage.
// Total data response = 32B in payload.
/// <summary>
/// Set the input and output clock configuration for the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="profile">Whatever you want to pass along</param>
///
void SetClockSyncConfig(ServiceCallback callback, object userData, ClockSyncProfile profile);
//SLICE6 AIR has various input clock synchronization methods such as PTP, GPS/1PPS, or IRIG.In addition, it can also be acting as PTP boundary/master on the Ethernet output.
//Currently supported inputs:
//1. 1588 PTP
//2. IRIG-B122
//3. GPS/1PPS
// Note that 1PPS can be a standalone feature in addition to GPS, IRIGB or even 1588. For Clock Synchronization commands, we are adding set/query clocksync as following:
//(Command Class of SYNC1588)
//Set Clocksync config: CMD_CLOCKSYNC_SET_CONFIG(0x0D)
// - Command Parameter: uint8[4].
//Byte 0: Input Synchronization Clock Source
//---- Bit_0: PTP
//---- Bit_1: IRIG-B122
//---- Bit_2: GPS
//---- Bit_3: 1PPS
//---- Bit_7:4: RSV
//Byte 1: Output Synchronization Clock Source
//---- Bit_1:0: = 0 disable.
// 1 = PTP Master
// 2 = PTP Boundary
// 3 = Reserved
//---- Bit_2: E2E(0)/P2P(1)
//---- Bit_3: 1PPS
//---- Bit_7:4: Reserved
//Byte 2: Reserved
// Byte 3: Reserved
//- Response with Status Code Success(0) or Error Code(non-zero)
//No payload.
void GetPTPDomainID(ServiceCallback callback, object userData);
void SetPTPDomainID(ServiceCallback callback, object userData, byte domainID);
}
}

View File

@@ -0,0 +1,111 @@
using DTS.Common.Interface.DASFactory;
using DTS.Common.Interface.StatusAndProgressBar;
using System;
using System.Collections.Generic;
using DTS.Common.Enums;
using System.IO.Ports;
using DTS.Common.Classes.DSP;
namespace DTS.DASLib.Service
{
public interface IConfigurationActions
{
/// <summary>
/// for DAS that support setting channel types and auto detecting attached sensor types
/// this sets the channels back into auto detect configuration and out of a forced
/// configuration.
/// an example of this is SLICE 2 which supports forced IEPE and forced bridge (and autodect)
/// this sets the bridge type and queries each channel for channel type and stores the result in ConfigData channels
/// [(c as AnalogInputDASChannel).IEPEChannel]
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void AutoDetect(bool bQueryConfiguration, ServiceCallback callback, object userData);
/// <summary>
/// Verify that the ConfigData property is correctly constructed
/// </summary>
/// <param name="DoStrictCheck">Set to true if your're arming</param>
void VerifyConfig(bool DoStrictCheck);
void VerifyConfig(bool DoStrictCheck, ErrorCallback FailedChallengeFunc);
/// <summary>
/// sets the user attributes for first use date to the given date
/// to unset the date the firstUseDate should be set to MsqlDateTime.MinValue
/// </summary>
/// <param name="firstUseDate"></param>
/// <param name="callback"></param>
/// <param name="userData"></param>
void SetFirstUseDate(DateTime firstUseDate, ServiceCallback callback, object userData);
/// <summary>
/// resets trigger/start line attributes in SLICE,
/// calls ArmOff for TDAS
/// </summary>
void StoreTestSetupXML(ServiceCallback callback, object userData, string testSetupXML);
void ResetHardwareLines(ServiceCallback callback, object userData);
void CheckAAFilterRate(ServiceCallback callback, object userData);
void QueryTestSetup(ServiceCallback callback,
object userData);
/// <summary>
/// Apply the data in the ConfigData property to the DAS
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="MaxAAF">array of double for Max AAF, 0 is TDAS, 1 is G5, not needed for slice, so not used</param>
/// <param name="tmatsIntervals">lookup with interval between sending TMATS while streaming
/// key is unit and value is time in ms</param>
void Configure(ServiceCallback callback,
object userData,
bool bEventConfig,
bool DummyConfig,
double[] MaxAAF,
bool configureDigitalOutputs,
uint crc,
bool turnOffAAFRealtime,
IStreamingFilterProfile dspFilterType,
bool discardDiagnostics, Dictionary<IDASCommunication, ushort> timeChannelIds, Dictionary<IDASCommunication, ushort> dataChannelIds,
Dictionary<IDASCommunication, UDPStreamProfile> streamProfiles, Dictionary<IDASCommunication, int> streamADCPerPacket, Dictionary<IDASCommunication, ushort> irigTDPIntervals,
Dictionary<IDASCommunication, string> addresses, Dictionary<IDASCommunication, uint[]> tmnsConfigs,
Dictionary<IDASCommunication, uint> baudRates, Dictionary<IDASCommunication, uint> dataBits, Dictionary<IDASCommunication, StopBits> stopBits,
Dictionary<IDASCommunication, Parity> parities, Dictionary<IDASCommunication, Handshake> flowControls, Dictionary<IDASCommunication, UartDataFormat> dataFormats,
Dictionary<IDASCommunication, ushort> tmatsIntervals
);
/// <summary>
/// Apply level triggers only [no other configuration actions]
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void ApplyLevelTriggers(ServiceCallback callback, object userData);
/// <summary>
/// Retrieve configuration from DAS and store it in the ConfigData property
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void QueryConfiguration(ServiceCallback callback, object userData, uint crc, string strConfig, bool bReadIds, bool bDeviceScaleFactors = true, bool sourceDASStorageList = false);
/// <summary>
/// updates the configuration on the units using a file as input data
/// 17872 Use DASConfig XMLs on disk when performing an emergency download with DAS that have blank filestore(s)
/// </summary>
void UpdateConfigurationFromFile(ServiceCallback callback, object userData, string filePath);
/// <summary>
/// Retrieve the EID's and store it in the ConfigData property
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void UpdateIDs(ServiceCallback callback, object userData);
void UpdateId(ServiceCallback callback, object userData, DASModule module, DASChannel channel);
void CheckSafetyState(bool bArmed, ServiceCallback callback, object userData);
/// <summary>
/// Reboot a device
/// FB15335: Move UART and ClockProfile sets to RunTest -> Hardware NavStep, add Reboot
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void Reboot(ServiceCallback callback, object userData);
}
}

View File

@@ -0,0 +1,206 @@
using System;
using DTS.Common.DAS.Concepts;
using DTS.Common.Enums.Sensors;
using DTS.Common.Interface.DASFactory;
using DTS.Common.Interface.DASFactory.ARM;
using DTS.Common.Interface.DASFactory.Config;
using DTS.Common.Interface.DASFactory.Diagnostics;
using DTS.Common.Interface.DASFactory.Download;
namespace DTS.DASLib.Service
{
/// <summary>
/// Interface to a DAS unit. The IDASCommunication interface for a DAS unit is the most used
/// data structure in the API. Nearly all services performed on the hardware will take a List
/// of these interfaces (representing a List of hardware units) as a parameter. Each DAS unit in
/// the real world will have an IDASCommunication interface in the API. In the case of Configuration, for
/// example, the local IDASCommunication corresponding to the hardware configuration target is edited, then
/// ConfigurationService.SetConfiguration(...) is called which basically synchronizes the local IDASCommunication
/// with the hardware, and vice versa with GetConfiguration(...).
/// </summary>
public interface IDASCommunication : IConfiguration,
IDiagnos,
ITriggerCheck,
IRealTime,
IArmStatus,
IDownload,
IInformation,
IComparable<IDASCommunication>,
IDisposable,
IAutoArmStatus,
IAutoArmed,
IRangeBandwidthLimited,
ITimeSynchronization
{
int RecordId { get; set; }
/// returns the nominal ranges for the das given a bridge type
double[] GetNominalRanges(SensorConstants.BridgeType bridge);
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; }
/// <summary>
/// The serial number of the base unit of this DAS.
/// </summary>
string SerialNumber { get; set; }
/// <summary>
/// The firmware version currently installed on this DAS.
/// </summary>
string FirmwareVersion { get; }
/// <summary>
/// This flag is used to tell if arm attributes should be defaulted when arming
/// or not. It also serves to let the user know that this DAS has not been
/// diagnosed.
/// </summary>
bool DiagnosticsHasBeenRun { get; set; }
/// <summary>
/// this flag is used to tell if configure has been run
/// this is used prior to when diagnostic results are needed, like the
/// diagnostics tab or the acquire tab [when running acquire]
/// </summary>
bool ConfigureHasBeenRun { get; set; }
/// <summary>
/// Count how many channels are configured.
/// </summary>
/// <returns>Number of configured channels.</returns>
int NumberOfConfiguredChannels();
/// <summary>
/// Count how many channels we have (regardless if they are configured or not).
/// </summary>
/// <returns>Total number of channels</returns>
int NumberOfChannels();
/// <summary>
/// max memory for the das
/// </summary>
/// <returns></returns>
long MaxMemory();
int MaxModules { get; set; }
/// <summary>
/// min sample rate for the das
/// </summary>
/// <returns></returns>
uint MinSampleRate();
/// <summary>
/// max sample rate for the das
/// </summary>
/// <returns></returns>
uint MaxSampleRate();
bool SupportsAutoArm();
bool SupportsLevelTrigger();
bool SupportsRealtime();
bool SupportsMultipleEvents();
/// <summary>
/// SLICE can invert trigger, not all das will be able to
/// </summary>
/// <returns></returns>
bool SupportsTriggerInversion();
bool InvertTrigger { set; }
/// <summary>
/// slice can invert start, not all das will be able to
/// </summary>
/// <returns></returns>
bool SupportsStartInversion();
bool InvertStart { get; set; }
bool IgnoreShortedStart { get; set; }
bool IgnoreShortedTrigger { get; set; }
/// <summary>
/// SLICE Base firmware supports checking the trigger and start lines as of protocol 7,
/// this function returns whether the hardware supports checking input status or not
/// </summary>
/// <returns></returns>
bool SupportsHardwareInputCheck();
/// <summary>
/// whether to use multiple sample real time or not
/// for sliceware there are times we need to turn off multiple sample realtime
/// (like when using a slicedb for instance)
/// </summary>
/// <returns></returns>
bool SupportsMultipleSampleRealtime();
/// <summary>
/// whether the DASbase actually controls the DAQ for modules
/// in the case of TDAS, the modules actually are responsible for the DAQ and the
/// rack is just a middleman
/// this is relevant because if the DAQ is controlled by the base then the sample numbers
/// should match for all modules.
/// </summary>
/// <returns></returns>
bool ControlsDAQ();
/// <summary>
/// returns if the new AAF rate is acceptible or not
/// right now this is only used to handle SLICE2 and it's multiple rate tables
/// it does this by comparing the AAF rate that the unit was configured with against the new rate
/// </summary>
/// <param name="rate">new AAF rate</param>
/// <returns></returns>
bool CheckAAF(float rate);
bool RequireDiagnosticRateMatchSampleRate();
/// <summary>
/// returns the phase delay in samples given a module index, a sample rate, and a
/// Hardware AAF
/// some DAS may have one phase delay across all modules, some may have separate phase delays for
/// individual module types.
///
/// for now most systems will just return 0 for the phase shift samples as the amount of delay
/// is only know for a very small number of DAS types
/// </summary>
/// <param name="ModuleIndex">module to query</param>
/// <param name="ActualSampleRate">actual sample rate of data collection</param>
/// <param name="HardwareAAF">actual rate of Hardware AAF, this is the sum of
/// fixed and variable AAFs
/// </param>
/// <returns></returns>
ulong GetPhaseShiftSamples(uint ModuleIndex, double ActualSampleRate, uint HardwareAAF, ulong originalT0);
/// <summary>
/// returns true if the devices is an ethernet distributor
/// for now that is SLICEDb, SLICE ECM, SLICE6DB
/// these are devices that we talk through, but not to for device communication
/// a rack we communicate with the modules by talking to the rack, so it's not a distributor
/// </summary>
/// <returns>returns true if the devices is an ethernet distributor</returns>
bool IsEthernetDistributor();
/// <summary>
/// returns true if the device is a SLICE6DB, originally for the purpose
/// of knowing when we should download values from external temperature sensors
/// </summary>
/// <returns></returns>
bool IsSlice6Distributor();
string MACAddress { get; set; }
string[] DownstreamMACAddresses { get; set; }
/// <summary>
/// Indicates that the unit supports selectable channels for realtime streaming
/// this is for 10572 implement SW side for single command streaming realtime
/// only SPS supports this currently
/// </summary>
bool SupportsIndividualChannelRealtimeStreaming { get; }
}
}

View File

@@ -0,0 +1,37 @@
using DTS.Common.Interface.DASFactory;
using System;
using System.Collections.Generic;
namespace DTS.DASLib.Service.Interfaces
{
// Custom comparer for the IDASCommunication class.
public class IDASCommunicationComparer : IComparer<IDASCommunication>
{
public int Compare(IDASCommunication x, IDASCommunication y)
{
if (x == null && y == null)
{
return 0;
}
if (x != null && y == null)
{
return 1;
}
if (x == null && y != null)
{
return -1;
}
// Check whether the compared objects reference the same data.
if (Object.ReferenceEquals(x, y))
{
return 0;
}
// Check whether the GainInfos' properties are equal.
return x.SerialNumber.CompareTo(y.SerialNumber);
}
}
}

View File

@@ -0,0 +1,40 @@
using DTS.Common.Interface.DASFactory;
using System;
using System.Collections.Generic;
namespace DTS.DASLib.Service
{
// Custom comparer for the IDASCommunication class.
public class IDASCommunicationEqComparer : IEqualityComparer<IDASCommunication>
{
// GainInfo are equal if their Gain is equal.
public bool Equals(IDASCommunication x, IDASCommunication y)
{
// Check whether the compared objects reference the same data.
if (Object.ReferenceEquals(x, y))
return true;
// Check whether any of the compared objects is null.
if (Object.ReferenceEquals(x, null) || Object.ReferenceEquals(y, null))
return false;
// Check whether the GainInfos' properties are equal.
return x.SerialNumber == y.SerialNumber;
}
// If Equals() returns true for a pair of objects,
// GetHashCode must return the same value for these objects.
public int GetHashCode(IDASCommunication idascom)
{
// Check whether the object is null.
if (Object.ReferenceEquals(idascom, null))
return 0;
// Get the hash code for the Gain field.
return idascom.SerialNumber.GetHashCode();
}
}
}

View File

@@ -0,0 +1,19 @@
namespace DTS.DASLib.Service
{
/// <summary>
/// diagnostics interface for a DAS unit, see <see cref="IDASCommunication" />.
/// </summary>
public interface IDiagnos
{
DiagnosticsActions[] ChannelDiagnostics { get; set; }
DiagnosticsResult[] ChannelDiagnosticsResults { get; set; }
ModuleDiagnosticsResult[] ModuleDiagnosticsResults { get; set; }
BaseInputValues BaseInput { get; set; }
ClockSyncStatus DASClockSyncStatus { get; set; }
ArmCheckActions ArmCheckActions { get; set; }
ArmCheckResults ArmCheckResults { get; set; }
}
}

View File

@@ -0,0 +1,99 @@
using System;
namespace DTS.DASLib.Service
{
public interface IDiagnosticsActions
{
/// <summary>
/// clears the trigger out line via SetSwitchImmediate
/// </summary>
void ClearTriggerOut(ServiceCallback callback, object userData);
/// <summary>
/// clears any latched FPGA via a QATS call
/// </summary>
void ClearLatches(ServiceCallback callback, object userData);
void PerformVoltageCheck(ServiceCallback callback, object userData);
void PerformVoltageCheckTAOnly(ServiceCallback callback, object userData);
void PerformArmChecks(ServiceCallback callback, object userData);
void SaveTiltSensorDataPre(ServiceCallback callback, object userData);
void SaveTemperaturesPre(ServiceCallback callback, object userData);
/// <summary>
/// If any of the units to run diagnostics are in
/// <see cref="DTS.DASLib.Service.ArmingService">
/// DTS.DASLib.Service.ArmingService.EnterLowPowerMode</see> then the analog circuits must be "warmed up" before accurate
/// diagnostics can be performed. If the units have not been placed into
/// <see cref="DTS.DASLib.Service.ArmingService">DTS.DASLib.Service.ArmingService.EnterLowPowerMode</see> then there is no need to call
/// this but since it is quite important habitually calling it everytime
/// diagnostics are performed would be beneficial.
/// </summary>
/// <param name="DiagnosticsSampleRateHz">The firmware will use this sample rate when
/// collecting diagnostics data from the channel.</param>
/// <param name="DiagnosticsAAFilterFrequencyHz">The firmware will use this Anti-Aliasing
/// filter when collectin diagnostics data from the channel.</param>
/// <param name="callback">The function to call with information.</param>
/// <param name="userData">Whatever you want to pass along.</param>
void PrepareForBridgeResistanceMeasurement(UInt32 DiagnosticsSampleRateHz,
float DiagnosticsAAFilterFrequencyHz,
ServiceCallback callback, object userData);
/// <summary>
/// Perform diagnostics based on the property ChannelDiagnostics and stuff the
/// result in ChannelDiagnosticsResults
/// </summary>
/// <param name="DiagnosticsSampleRateHz">sample rate</param>
/// <param name="DiagnosticsAAFilterFrequencyHz">AA Filter rate</param>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void PrepareForDiagnostics(UInt32 DiagnosticsSampleRateHz,
float DiagnosticsAAFilterFrequencyHz,
DTS.DASLib.Service.PrePostResults WhichResult,
ServiceCallback callback, object userData);
void SetStatusIndicator(DiagnosticsStatusIndicatorState state,
ServiceCallback callback, object userData);
/// <summary>
/// Perform diagnostics based on the property ChannelDiagnostics and stuff the
/// result in ChannelDiagnosticsResults
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void DiagnosAndGetResults(int EventNumber, PrePostResults WhichResult,
ServiceCallback callback, object userData);
/// <summary>
/// Retrieve the results from the implicit pre and post event diagnostics
/// </summary>
/// <param name="EventNumber">Which event number to Retrieve from</param>
/// <param name="WhichResult">The pre or post test results?</param>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void GetEventDiagnosticsResults(int EventNumber, PrePostResults WhichResult,
ServiceCallback callback, object userData);
/// <summary>
/// clears the trigger lines for any DAS
/// 14229 DataPRO crash when run diagnostics second time
/// note there's already a service to clear the trigger lines for S6DB, ECM (TriggerCheck.PreStart)
/// 5211 for more info
/// however we need one for DAS that will explictly run AFTER prestart runs
/// this service just sets trigger out to 0 and runs QATS to reset the FPGA on affected units
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void ClearDASTriggerLine(ServiceCallback callback, object userData);
void SquibFireCheckArm(double delay, double duration, ServiceCallback callback, object userData);
void TriggerCheckTrigger(ServiceCallback callback, object userData);
void TriggerCheckDownload(double delay, double duration, float diagnosticsAAFilterFrequencyHz, uint diagnosticsSampleRateHz, ServiceCallback callback, object userData);
/// <summary>
/// Perform diagnostics based on the property ChannelDiagnostics and stuff the
/// result in ChannelDiagnosticsResults
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void GetBridgeMeasurement(ServiceCallback callback, object userData);
void MeasureTransferSpeed(ServiceCallback callback, object userData);
}
}

View File

@@ -0,0 +1,91 @@
using System;
namespace DTS.DASLib.Service
{
internal interface IDownloadActions
{
/// <summary>
/// Download the data specified in the WhatToDownload property
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void Download(ServiceCallback callback, object userData);
/// <summary>
/// Cancel the current operation
/// </summary>
void Cancel();
/// <summary>
/// Cancels the current operation (with a smaller clear cancel time)
/// </summary>
void ForceCancel();
/// <summary>
/// Clear the cancel flag
/// </summary>
void ClearCancel();
/// <summary>
/// Retrieve info about available events to download
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void QueryDownload(ServiceCallback callback, object userData, int eventIndex, TDASServiceSetupInfo setupInfo);
/// <summary>
/// Figure out if events have been downloaded
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void QueryDownloadedStatus(ServiceCallback callback, object userData);
/// <summary>
/// Update the recorded trigger sample numbers in HW
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void SetTriggerSampleNumbers(ServiceCallback callback, object userData);
/// <summary>
/// Set event status to downloaded (to be used when there is no data to download)
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
///
void SetDownloaded(ServiceCallback callback, object userData);
/// <summary>
/// updates an event with new information
/// </summary>
/// <param name="eventIndex"></param>
/// <param name="id"></param>
/// <param name="guid"></param>
/// <param name="totalSamples"></param>
/// <param name="triggerSamples"></param>
/// <param name="startRecordSample"></param>
/// <param name="callback"></param>
/// <param name="userData"></param>
void SetEventInfo(int eventIndex,
string id,
Guid guid,
ulong totalSamples,
ulong[] triggerSamples,
ulong startRecordSample,
UInt32 eventHasDownloaded,
ServiceCallback callback,
object userData);
/// <summary>
/// corrects the T0 and Total samples recorded attributes
/// note that not all IDownloadAction devices support
/// devices that don't support will return an error and complete
/// this functionality searches ADC on a device for rails and
/// local peaks and troughs
/// 18469 Implement missing trigger(t0) recovery(Circular Buffer / Hybrid Recorder)
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void CorrectT0s(ServiceCallback callback,
object userData);
}
}

View File

@@ -0,0 +1,81 @@
using System.Collections.Generic;
using System.Threading;
using DTS.Common.Enums;
namespace DTS.DASLib.Service
{
internal interface IRealTimeActions
{
/// <summary>
/// tell DAS to start sending data at specific rate
/// </summary>
/// <param name="samplesPerSec">How many samples per second to receive</param>
/// <param name="msBetweenSamples">the amount of time to sleep between samples
/// 0 is ok</param>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="channels">
/// channels to operate realtime on, added for
/// 10572 implement SW side for single command streaming realtime
/// </param>
void RealTime(int samplesPerSec,
int msBetweenSamples,
ServiceCallback callback,
object userData,
bool allowMultipleSampleRealtime,
int moduleIndex,
ManualResetEvent stopEvent,
byte[] channels,
double aaf,
int minCallbackUpdateTimeMs = 100,
bool UseUDPStreaming = false,
string HostIPAddress = "");
/// <summary>
/// conduct realtime by actively polling them for sample averages
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
/// <param name="stopEvent"></param>
/// <param name="channels">
/// channels to operate realtime on, added for
/// 10572 implement SW side for single command streaming realtime
/// </param>
void RealTimePolling(ServiceCallback callback,
object userData,
ManualResetEvent stopEvent,
byte[] channels);
/// <summary>
/// Stop sending real time data
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void ExitRealTimeMode(ServiceCallback callback, object userData);
void RealTimeTiltPolling(ServiceCallback callback,
object userData,
ManualResetEvent stopEvent);
/// <summary>
/// FB15313 Configure S6A udp streaming
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="streamProfile">The profile to set</param>
/// <param name="udpAddress">UDP streaming address</param>
/// <param name="timeChannelId">The time channel id to set</param>
/// <param name="dataChannelId">The data channel id to set</param>
/// <param name="tmnsConfig">TMNS format information</param>
void SetUDPStreamProfile(ServiceCallback callback,
object userData,
UDPStreamProfile streamProfile,
string udpAddress,
ushort timeChannelId,
ushort dataChannelId,
uint[] tmnsConfig,
ushort irigTimeDataPacketIntervalMs);
void GetUDPStreamProfile(ServiceCallback callback, object userData);
}
}

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
namespace DTS.DASLib.Service
{
/// <summary>
/// RealTime Interface for an DAS unit.
/// </summary>
public interface IRealTime
{
/// <summary>
/// The list of channels from which to recieve Real Time Data.
/// </summary>
List<int> RealtimeDASChannels { get; set; }
/// <summary>
/// The Slice6 Axis 1, 2, 3 (X, Y, Z) tilt data in degrees.
/// </summary>
List<double> TiltAxisData { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
using System.Windows.Forms;
namespace DTS.DASLib.Service
{
/// <summary>
/// The delegate that we call with the callback data
/// </summary>
/// <param name="data">The actual callback data</param>
public delegate void ServiceCallback(ServiceCallbackData data);
}

View File

@@ -0,0 +1,11 @@
using System;
namespace DTS.DASLib.Service
{
internal interface ITimeActions
{
void Synchronize(ServiceCallback callback, object userData, DateTime time);
void QueryTime(ServiceCallback callback, object userData);
}
}

View File

@@ -0,0 +1,56 @@
namespace DTS.DASLib.Service
{
internal interface ITriggerCheckActions
{
/// <summary>
/// handles any preparation work that must be done before StartTriggerCheck
/// is called on any units
/// this is designed to be called by the StartTriggerCheck service explicitly
/// and not as part of it's own generic service
///13820 With the S6 ATD and a SLICE PRO system in the setup, consistently see Trigger Check Fail
/// </summary>
void PreStartTriggerCheck(ServiceCallback callback, object userData);
/// <summary>
/// handles any actions that must be done AFTER StartTriggerCheck is called
/// this is designed to be called by the StartTriggerCheck service explicitly
/// and not as part of it's own generic service
///13820 With the S6 ATD and a SLICE PRO system in the setup, consistently see Trigger Check Fail
/// </summary>
void PostStartTriggerCheck(ServiceCallback callback, object userData);
/// <summary>
/// change mode in the DAS to latch signal lines
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void StartTriggerCheck(ServiceCallback callback, object userData);
/// <summary>
/// Perform the trigger check and store the result in the TriggerResult property
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void DoTriggerCheck(ServiceCallback callback, object userData);
/// <summary>
/// DoTriggerCheck is Async, this is a Sync form (which the async form calls asynchronously)
/// </summary>
void DoTriggerCheckSync();
/// <summary>
/// Perform the start check and store the results in the StartResult property
/// </summary>
/// <param name="callback"></param>
/// <param name="userData"></param>
void DoStartCheck(ServiceCallback callback, object userData);
/// <summary>
/// Set the latching mechanism in the DAS back to normal
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void CancelTriggerCheck(ServiceCallback callback, object userData);
}
}

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DTS.DASLib.Service.Interfaces
{
public interface IUARTDownloadActions
{
/// <summary>
/// Download the data specified in the WhatToDownload property
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void UARTDownload(ServiceCallback callback, object userData);
/// <summary>
/// Retrieve UART info about available events to download
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
void QueryUARTDownload(ServiceCallback callback, object userData, int eventIndex, TDASServiceSetupInfo setupInfo);
/// <summary>
/// FB15268: Set UART connection settings
/// </summary>
/// <param name="callback">The function to call with information</param>
/// <param name="userData">Whatever you want to pass along</param>
/// <param name="baudRate"></param>
/// <param name="dataBits"></param>
/// <param name="stopBits"></param>
/// <param name="parity"></param>
/// <param name="flowControl"></param>
void SetUARTSettings(ServiceCallback callback, object userData, uint baudRate, uint dataBits, uint stopBits, uint parity, uint flowControl);
void GetUARTSettings(ServiceCallback callback, object userData);
}
}