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,59 @@
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IConfiguration
{
/// <summary>
/// path on pc the IConfiguration device is storing test information to
/// </summary>
string TestDirectory { get; set; }
/// <summary>
/// returns true if the unit supports discovering channel type [bridge/IEPE]
/// </summary>
bool SupportsAutoDetect{ get; }
/// <summary>
/// directly query (if possible) if there are any devices connected to this unit
/// </summary>
void QueryConnectedDevices();
/// <summary>
/// ConfigData object containing the pre-test setup and configuration
/// of all modules and channels in the hardware. The object is updated
/// when <see cref="ConfigurationService">ConfigurationService.Configure(...)</see> is called, and the properties
/// of the entire DAS unit can be inspected.
/// </summary>
IConfigurationData ConfigData { get; set; }
/// <summary>
/// DASClockSyncProfile object containing the profile for clock sync for the hardware
/// The data is updated
/// when <see cref="ConfigurationService">ConfigurationService.Configure(...)</see> is called, and is only
/// applied to units that support the value
/// </summary>
ClockSyncProfile DASClockSyncProfile { get; set; }
/// <summary>
/// get the display order of this das
/// allows a das to be display before or after other das
/// default display order is -1
/// </summary>
/// <returns>display order (-1 default)</returns>
int GetDASDisplayOrder();
/// <summary>
/// gets the display order of channels in this das
/// allows channels to have a different order in display UIs
///
/// </summary>
/// <returns></returns>
int[] GetChannelDisplayOrder();
/// <summary>
/// sets the order of the das to be displayed in UIs
/// should only be called really from FWTU
/// </summary>
/// <param name="order"></param>
void SetDASDisplayOrder(int order);
/// <summary>
/// sets the order of channels to be displayed in UIs
/// should only be called really from FWTU
/// </summary>
/// <param name="order"></param>
void SetChannelDisplayOrder(int[] order);
}
}

View File

@@ -0,0 +1,67 @@
using System.Xml;
using System.Xml.Schema;
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IConfigurationData
{
/// <summary>
/// Array of Module objects in the DAS.
/// </summary>
IDASModule[] Modules { get; set; }
/// <summary>
/// EID's for the whole DAS.
/// </summary>
IEID[] IDs { get; set; }
/// <summary>
/// The ID of the current test/event.
/// </summary>
string TestID { get; set; }
string TestSetupUniqueId { get; set; }
/// <summary>
/// A description of the current test/event.
/// </summary>
string Description { get; set; }
bool ClearSetup { get; set; }
/// <summary>
/// Counts how many channels are configured. If a channel's
/// 'IsConfigured' property is 'true' it is 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>
/// Count how many downloadable channels (i.e. not UART or StreamOut) we have (regardless if they are configured or not).
/// </summary>
/// <returns>Total number of downloadable channels</returns>
int NumberOfDownloadChannels();
int[] DisplayOrder { get; set; }
int DasDisplayOrder { get; set; }
int GetDisplayOrder(uint channelIdx);
#region Serialization functions
void WriteXml(XmlWriter writer);
void ReadXml(XmlReader reader);
XmlSchema GetSchema();
/// <summary>
/// the Address the DAS receives UDP information from
/// used to control the OBR-DDR
/// </summary>
string UDPReceiveAddress { get; set; }
#endregion
}
}

View File

@@ -0,0 +1,102 @@
using DTS.Common.Enums.DASFactory;
using DTS.Common.Enums.Sensors;
using System;
using System.Xml;
using System.Xml.Schema;
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IDASChannel
{
DFConstantsAndEnums.ConfigMode ConfigurationMode { get; set; }
/// <summary>
/// whether the channel should be put in Diagnostics mode or not
/// </summary>
bool DiagnosticsMode { get; set; }
/// <summary>
/// Channel number with respect to it's containing module <see cref="OwningModule"/>
/// </summary>
int ModuleChannelNumber { get; set; }
int AbsoluteDisplayOrder { get; set; }
double UnitConverision { get; set; }
bool AtCapacity { get; set; }
double CapacityOutputIsBasedOn { get; set; }
SensorConstants.SensUnits SensitivityUnits { get; set; }
/// <summary>
/// A link back to the Module that contains this channel.
/// </summary>
//public DASModule OwningModule { get; set; }
/// <summary>
/// The "stack channel number" of this channel with respect to the owning
/// DAS (0 based).
/// </summary>
byte Number { get; }
/// <summary>
/// Array of (string, byte[]) for EID
/// </summary>
IEID[] IDs { get; set; }
/// <summary>
/// time stamp of this event
/// </summary>
DateTime EventStartTime { get; set; }
/// <summary>
/// <see cref="bool"/> value indicating whether or not this channel has registered a level trigger.
/// </summary>
bool LevelTriggerSeen { get; set; }
string IsoChannelName { get; set; }
string ChannelGroupName { get; set; }
string UserCode { get; set; }
string UserChannelName { get; set; }
string LinearSensorCalibration { get; set; }
/// <summary>
/// the number of samples to qualify over
/// </summary>
int QualificationSamples { get; set; }
///// <summary>
///// Number of samples that T0 on DASes that did not directly experience the level trigger must be shifted
///// to time align with this channel's directly level triggered T0. A null value indicates that this channel
///// did not directly receive a level trigger.
///// </summary>
int? LevelTriggerT0AdjustmentSamples { get; set; }
/// <summary>
/// Is this channel configured? 'Configured' means a sensor is connected and/or there is
/// information in the containg device's ConfigData object, put there with a call to
/// ConfigureService.Configure(...) in the API.
/// </summary>
/// <returns>True if it is configured, False otherwise.</returns>
bool IsConfigured();
void WriteElementStart(XmlWriter writer);
void WriteElementEnd(XmlWriter writer);
void WriteXmlCRC32(XmlWriter writer);
void WriteXml(XmlWriter writer);
void ReadXml(XmlReader reader);
XmlSchema GetSchema();
int IdType { get; set; }
string UserValue1 { get; set; }
string UserValue2 { get; set; }
string UserValue3 { get; set; }
}
}

View File

@@ -0,0 +1,308 @@
using DTS.Common.Enums.DASFactory;
using System;
using System.Xml;
using System.Xml.Schema;
using DTS.Common.Enums;
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IDASModule
{
/// <summary>
/// An array of <see cref="DASChannel" /> objects representing the channels attatched to this
/// module, indexable by ModuleChannelNumber of the Channel.
/// </summary>
IDASChannel[] Channels { get; set; }
/// <summary>
/// EID's for the module corresponding to the sensors on each of the channels.
/// </summary>
IEID[] IDs { get; set; }
/// <summary>
/// Index of this Module in any array of Modules. The first module in a DAS unit will have a
/// ModuleArrayIndex of 0.
/// </summary>
int ModuleArrayIndex { get; set; }
/// <summary>
/// For use only with Circular-Buffer mode.
/// See <see cref="DASModule.RecordingMode" />.
/// The number of requested seconds for this Module to sample data before a 'Trigger' event; the number of
/// seconds to sample BEFORE time-zero.
/// </summary>
double RequestedPreTriggerSeconds { get; set; }
/// <summary>
/// For use with all recording modes.
/// See <see cref="DASModule.RecordingMode" />.
/// The number of requested seconds to sample data from sensors after time-zero, that is after
/// a trigger or start event.
/// </summary>
double RequestedPostTriggerSeconds { get; set; }
/// <summary>
/// For use only with Circular-Buffer mode.
/// See <see cref="DASModule.RecordingMode" />.
/// The number of seconds for this Module to sample data before a 'Trigger' event; the number of
/// seconds to sampel BEFORE time-zero.
/// </summary>
double PreTriggerSeconds { get; set; }
/// <summary>
/// For use with all recording modes.
/// See <see cref="DASModule.RecordingMode" />.
/// The number of seconds to sample data from sensors after time-zero, that is after
/// a trigger or start event.
/// </summary>
double PostTriggerSeconds { get; set; }
/// <summary>
/// The number of events to collect before disarming.
/// </summary>
int NumberOfEvents { get; set; }
/// <summary>
/// The number of seconds of inactivity before going to sleep.
/// </summary>
int WakeUpMotionTimeout { get; set; }
/// <summary>
/// The version of the firmware on a module.
/// </summary>
string FirmwareVersion { get; set; }
/// <summary>
/// A string that describes the module, for example, to know if it was created for the
/// purposes of adding it to the .dts file during download of Slice6 Distributor attributes.
/// </summary>
string Description { get; set; }
/// <summary>
/// The maximum storage space for a module.
/// </summary>
ulong? MaxEventStorageSpaceInBytes { get; set; }
/// <summary>
/// This is set after a recording session and is the total number of samples this Module
/// captured during the last data acquisition run.
/// </summary>
ulong NumberOfSamples { get; set; }
/// <summary>
/// An array of sample numbers where a trigger was activated.
/// </summary>
ulong[] TriggerSampleNumbers { get; set; }
int GetLevelTriggerT0AdjustmentSamplesAutoApplied();
/// <summary>
/// The sample number where recording started.
/// </summary>
ulong StartRecordSampleNumber { get; set; }
/// <summary>
///
/// </summary>
uint StartRecordTimestampSec { get; set; }
/// <summary>
///
/// </summary>
uint TriggerTimestampSec { get; set; }
/// <summary>
///
/// </summary>
uint StartRecordTimestampNanoSec { get; set; }
/// <summary>
///
/// </summary>
uint TriggerTimestampNanoSec { get; set; }
/// <summary>
///
/// </summary>
bool PTPMasterSync { get; set; }
/// <summary>
///
/// </summary>
double TiltSensorAxisXDegreesPre { get; set; }
/// <summary>
///
/// </summary>
double TiltSensorAxisYDegreesPre { get; set; }
/// <summary>
///
/// </summary>
double TiltSensorAxisZDegreesPre { get; set; }
/// <summary>
///
/// </summary>
double TiltSensorAxisXDegreesPost { get; set; }
/// <summary>
///
/// </summary>
double TiltSensorAxisYDegreesPost { get; set; }
/// <summary>
///
/// </summary>
double TiltSensorAxisZDegreesPost { get; set; }
float TemperatureLocation1Pre { get; set; }
float TemperatureLocation2Pre { get; set; }
float TemperatureLocation3Pre { get; set; }
float TemperatureLocation4Pre { get; set; }
float TemperatureLocation1Post { get; set; }
float TemperatureLocation2Post { get; set; }
float TemperatureLocation3Post { get; set; }
float TemperatureLocation4Post { get; set; }
/// <summary>
/// The sample rate in Hz at which the Module will sample sensor data.
/// </summary>
uint SampleRateHz { get; set; }
/// <summary>
/// FB 25558 Actual sample rate currently is used in realtime for TSR AIR type only in future it might be used for other hardware types
/// </summary>
uint ActualSampleRateHz { get; set; }
/// <summary>
/// Hardware anti-alias filter rate.
/// </summary>
float AAFilterRateHz { get; set; }
/// <summary>
/// What type of recording mode is this Module in?
/// See <see cref="Test.Module.RecordingMode.RecorderMode" />.
/// </summary>
DFConstantsAndEnums.RecordingMode RecordingMode { get; set; }
DateTime ScheduledStartTime { get; set; }
int RecordingInterval { get; set; }
UDPStreamProfile StreamProfile { get; set; }
#region Slice 6 Tilt Feature
/// <summary>
/// Defines which 2 axis will be used for the bubble level feature for Slice 6.
/// </summary>
DFConstantsAndEnums.TiltAxes TiltAxes { get; set; }
double TargetAxisOne { get; set; }
double TargetAxisTwo { get; set;}
/// <summary>
/// The target angle threshold in degrees for Axis 1
/// </summary>
float TargetAngleAxisX { get; set; }
/// <summary>
/// The target angle threshold in degrees for Axis 2
/// </summary>
float TargetAngleAxisY { get; set; }
/// <summary>
/// The target angle threshold in degrees for Axis 3
/// </summary>
float TargetAngleAxisZ { get; set; }
double MountOffsetAxisOne { get; set; }
double MountOffsetAxisTwo { get; set; }
string SystemLocation { get; set; }
string SystemID { get; set; }
int AxisIgnored { get; set; }
double LevelTolerance { get; set; }
bool UseForTiltCalculation { get; set; }
double InputVoltage { get; set; }
double BatteryVoltage { get; set; }
/// <summary>
/// The external tilt enumeration given by the attached DAS
/// </summary>
byte TiltID { get; set; }
/// <summary>
/// The serial number of the external tilt
/// </summary>
string TiltSerialNumber { get; set; }
#endregion
//public IDASCommunication OwningDAS { get; set; }
/// <summary>
/// Count how many channels are configured in this Module.
/// See <see cref="AnalogInputDASChannel.IsConfigured" />.
/// </summary>
/// <returns>Number of configured channels</returns>
int NumberOfConfiguredChannels();
/// <summary>
/// Count how many TOM channels are configured in this module
/// </summary>
/// <returns>Number of configured TOM channels</returns>
int NumberOfConfiguredTOMChannels();
bool IsDummyArmed();
/// <summary>
/// Count how many channels this module has (regardless if they are configured
/// or not).
/// </summary>
/// <returns>Total number of channels</returns>
int NumberOfChannels();
/// <summary>
/// Retrieve the serial number from DASInfo
/// </summary>
/// <returns>The serial number of this module</returns>
string SerialNumber();
/// <summary>
/// Retrieve the module type from DASInfo
/// </summary>
/// <returns>The type of this module</returns>
DFConstantsAndEnums.ModuleType ModuleType();
/// <summary>
/// Retrieve the module type from DASInfo and return whether or not it's a stream in type
/// </summary>
/// <returns>Whether the type of this module is a stream in</returns>
bool IsStreamIn();
/// <summary>
/// Retrieve the module type from DASInfo and return whether or not it's a stream out type
/// </summary>
/// <returns>Whether the type of this module is a stream out</returns>
bool IsStreamOut();
/// <summary>
/// Retrieve the module type from DASInfo and return whether or not it's a uart type
/// </summary>
/// <returns>Whether the type of this module is a uart</returns>
bool IsUart();
/// <summary>
/// Retrieve the module type from DASInfo and return whether or not it's a clock type
/// </summary>
/// <returns>Whether the type of this module is a clock</returns>
bool IsClock();
/// <summary>
/// Retrieve the module type from DASInfo and return whether or not it's an embedded type
/// </summary>
/// <returns>Whether the type of this module is embedded</returns>
bool IsEmbedded();
void WriteXmlCRC32(XmlWriter writer);
void WriteXml(XmlWriter writer);
void ReadXml(XmlReader reader);
XmlSchema GetSchema();
ushort GetCRC32();
}
}

View File

@@ -0,0 +1,10 @@
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IEID
{
string ID { get; set; }
byte[] Blob { get; set; }
bool IsValid();
}
}

View File

@@ -0,0 +1,96 @@
using System;
using System.Collections.Generic;
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IInfoResult
{
string MACAddress { get; set; }
/// <summary>
/// An array of the modules in this DAS.
/// </summary>
IInfoResultModule[] Modules { get; set; }
List<Common.Classes.Hardware.ExternalTilt> ActiveExternalTilts { get; set; }
//public IDASCommunication OwningDAS { get; set; }
uint MaxNumberOfModules { get; set; }
/// <summary>
/// How many bytes of sample storage is available in this DAS? This is null if
/// it's specified per module instead.
/// </summary>
ulong? MaxEventStorageSpaceInBytes { get; set; }
/// <summary>
/// How many bytes are stored for all channels at each sample interval? This is
/// null if it's specified per module instead.
/// </summary>
uint? NumberOfBytesPerSampleClock { get; set; }
/// <summary>
/// FB15353 Is this device hardware configured for streaming only?
/// null if device doesn't support a streaming-only configuration
/// </summary>
bool? DeviceStreamingOnly { get; set; }
// temporary constant
int NumberOfBridgeChannels { get; set; }
IEID BatteryID { get; set; }
/// <summary>
/// TRUE if a battery is present in the hardware unit.
/// </summary>
bool HasBattery{ get; }
byte MapDASChannelNumber2RealtimeChannelNumber(int channelNumber);
/// <summary>
/// Convert a DASChannel number (0..29) to a module array index (0..9).
/// A DASChannel number is a channel's identifier global within this DAS.
/// A Module array index is a Module identifier as it would be indexed in an array.
/// </summary>
/// <param name="channelNumber">The DAS channel number to convert</param>
/// <returns>The module array index</returns>
byte MapDASChannelNumber2ModuleArrayIndex(int channelNumber);
/// <summary>
/// Convert a DAS channel number (0..29) to a module device id (1..10)
/// A DASChannel number is a channel's identifier global within this DAS.
/// A Module deviceID is an identifier for the corresponding channel that starts at 1 for the first Module.
/// </summary>
/// <param name="channelNumber">The DAS channel number to convert</param>
/// <returns>The module device id</returns>
byte MapDASChannelNumber2ModuleDeviceID(int channelNumber);
/// <summary>
/// Convert a DAS channel number (0..29) to a module channel number (0..2)
/// A DASChannel number is a channel's identifier global within this DAS.
/// A moduleChannel number is the channel's identifier relative only to it's parent Module.
/// </summary>
/// <param name="channelNumber">The DAS channel number to convert</param>
/// <returns>The channel number within the module</returns>
byte MapDASChannelNumber2ModuleChannelNumber(int channelNumber);
/// <summary>
/// Convert a module array index (0..9) and a module channel number (0..2) to a DAS channel number (0..29)
/// A Module array index is a Module identifier as it would be indexed in an array.
/// A moduleChannel number is the channel's identifier relative only to it's parent Module.
/// A DASChannel number is a channel's identifier global within this DAS.
/// </summary>
/// <param name="moduleArrayIdx">The module array index (0..9)</param>
/// <param name="channelNumber">The module channel number (0..2)</param>
/// <returns>The DAS channel number within the DAS (0..29)</returns>
byte MapModuleArrayIndexAndChannelNum2DASChannel(int moduleArrayIdx, int channelNumber);
/// <summary>
/// The <see cref="System.DateTime"/> returns the datetime of the DAS (or the oldest module's calibration)
/// returns 1970-01-01 is considering invalid/NA
/// </summary>
DateTime? CalibrationDate{ get; set; }
}
}

View File

@@ -0,0 +1,84 @@
using DTS.Common.Enums.DASFactory;
using System;
using System.Collections.Generic;
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IInfoResultModule
{
/// <summary>
/// Serial number of this module
/// </summary>
string SerialNumber { get; set; }
/// <summary>
/// Firmware version in this module
/// </summary>
string FirmwareVersion { get; set; }
/// <summary>
/// who does this module belong to?
/// </summary>
//public InfoResult OwningInfoResult { get; set; }
/// <summary>
/// The number of this Module as it would be indexed in an array of Modules.
/// </summary>
int ModuleArrayIndex { get; set; }
/// <summary>
/// How many channels are connected to this Module.
/// </summary>
uint NumberOfChannels { get; set; }
/// <summary>
/// What sample rates does it support (in samples per second).
/// </summary>
uint[] SupportedSampleRates { get; set; }
/// <summary>
/// An associative list (Dictionary) of sample rates and corresponding
/// Anti-Aliasing filter frequencies.
/// </summary>
Dictionary<uint, float> SampleRate2AAFrequency { get; set; }
/// <summary>
/// How many bytes of sample storage is available in this module? This is null
/// if it's specified per DAS instead.
/// </summary>
ulong? MaxEventStorageSpaceInBytes { get; set; }
/// <summary>
/// How many bytes are stored for all channels at each sample interval? This is
/// null if it's specified per DAS instead.
/// </summary>
uint? NumberOfBytesPerSampleClock { get; set; }
/// <summary>
/// How many samples can you record in this module?
/// </summary>
double MaxRecordingSamples { get; set; }
/// <summary>
/// The <see cref="System.DateTime"/> of this module's last calibration.
/// </summary>
DateTime? CalibrationDate { get; set; }
/// <summary>
/// True if a TDAS rack is armed and doesn't respond to some queries.
/// </summary>
bool RackIsUnreadable { get; set; }
/// <summary>
/// What type of module is this?
/// </summary>
DFConstantsAndEnums.ModuleType TypeOfModule { get; set; }
/// <summary>
/// What recording modes does this Module support.
/// </summary>
DFConstantsAndEnums.RecordingMode[] SupportedModes { get; set; }
bool IsProgrammable { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
namespace DTS.Common.Interface.DASFactory.Config
{
/// <summary>
/// Information interface for an IDASCommunication object, providing DASInfo object.
/// </summary>
public interface IInformation
{
/// <summary>
/// DASInfo is populated with values from the hardware. It provides information
/// about the entire DAS as well as the functions necessary to covert between
/// Module, ModuleChannel, and DASChannel values.
/// </summary>
IInfoResult DASInfo { get; set; }
void SetDASInfo(IInfoResult dasInfo, bool bSetInDb = true);
void SetDASInfo();
}
}

View File

@@ -0,0 +1,11 @@
namespace DTS.Common.Interface.DASFactory.Config
{
public interface IVoltageInsertionEnabled
{
/// <summary>
/// Indicates that Voltage Insertion was detected as being on
/// http://manuscript.dts.local/f/cases/34284/Warn-when-VoltageInsertion-switches-are-set
/// </summary>
bool VoltageInsertionEnabled { get; }
}
}