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 { /// /// 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(...). /// public interface IDASCommunication : IConfiguration, IDiagnos, ITriggerCheck, IRealTime, IArmStatus, IDownload, IInformation, IComparable, 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; } /// /// The serial number of the base unit of this DAS. /// string SerialNumber { get; set; } /// /// The firmware version currently installed on this DAS. /// string FirmwareVersion { get; } /// /// 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. /// bool DiagnosticsHasBeenRun { get; set; } /// /// 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] /// bool ConfigureHasBeenRun { get; set; } /// /// Count how many channels are configured. /// /// Number of configured channels. int NumberOfConfiguredChannels(); /// /// Count how many channels we have (regardless if they are configured or not). /// /// Total number of channels int NumberOfChannels(); /// /// max memory for the das /// /// long MaxMemory(); int MaxModules { get; set; } /// /// min sample rate for the das /// /// uint MinSampleRate(); /// /// max sample rate for the das /// /// uint MaxSampleRate(); bool SupportsAutoArm(); bool SupportsLevelTrigger(); bool SupportsRealtime(); bool SupportsMultipleEvents(); /// /// SLICE can invert trigger, not all das will be able to /// /// bool SupportsTriggerInversion(); bool InvertTrigger { set; } /// /// slice can invert start, not all das will be able to /// /// bool SupportsStartInversion(); bool InvertStart { get; set; } bool IgnoreShortedStart { get; set; } bool IgnoreShortedTrigger { get; set; } /// /// 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 /// /// bool SupportsHardwareInputCheck(); /// /// 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) /// /// bool SupportsMultipleSampleRealtime(); /// /// 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. /// /// bool ControlsDAQ(); /// /// 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 /// /// new AAF rate /// bool CheckAAF(float rate); bool RequireDiagnosticRateMatchSampleRate(); /// /// 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 /// /// module to query /// actual sample rate of data collection /// actual rate of Hardware AAF, this is the sum of /// fixed and variable AAFs /// /// ulong GetPhaseShiftSamples(uint ModuleIndex, double ActualSampleRate, uint HardwareAAF, ulong originalT0); /// /// 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 /// /// returns true if the devices is an ethernet distributor bool IsEthernetDistributor(); /// /// returns true if the device is a SLICE6DB, originally for the purpose /// of knowing when we should download values from external temperature sensors /// /// bool IsSlice6Distributor(); string MACAddress { get; set; } string[] DownstreamMACAddresses { get; set; } /// /// 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 /// bool SupportsIndividualChannelRealtimeStreaming { get; } } }