207 lines
8.3 KiB
C#
207 lines
8.3 KiB
C#
|
|
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; }
|
|
}
|
|
}
|