/*
* IDownloadEnabled.cs
*
* Copyright © 2010
* Diversified Technical Systems, Inc.
* All Rights Reserved.
*/
using System;
using DTS.Utilities;
///
/// It may make sense to refactor this namespace to be DTS.DAS.Concepts.Tsr and rename the TSR-specific
/// event to "Event" so that the fully qualified name of the class is "DTS.DAS.Concepts.Tsr.Event", but
/// then maybe keep the IDownloadEnabled and other generic interfaces outside of the "Tsr"-specific
/// namespace...? No, should probably stay with Event, since it has an "Event" type referenced in the
/// interface.
///
namespace DTS.DAS.Concepts
{ ///
///
/// Representation of data and metadata associated with a TSR event.
///
///
public abstract class TsrEvent : Exceptional, ICloneable
{
///
/// The 1-based identifier for this event.
///
public virtual UInt64 EventId { get; protected set; }
///
/// The containing the date and time of this event.
///
public virtual DateTime TimeStamp { get; protected set; }
///
/// The serial number of the hardware that captured this event.
///
public virtual string SerialNumber { get; protected set; }
///
/// The alternate serial number of the hardware that captured the event.
///
public virtual string AlternateSerialNumber { get; protected set; }
///
/// The duration in seconds of this event.
///
public virtual double DurationSeconds { get; protected set; }
///
/// The maximum sample rate for this event.
///
public virtual double MaxSampleRate { get; protected set; } // note this is the "highest" sample rate
///
/// The temperature (in C).
///
public virtual float TemperatureC { get; protected set; }
///
/// The number of pre-trigger seconds.
///
public virtual double PreTriggerSeconds { get; protected set; }
///
///
/// Generate a shallow copy of this object.
///
/// A shallow copy of this .
///
public abstract object Clone();
}
///
///
/// Representation of the ability to download from this object.
///
///
public interface IDownloadEnabled
{ //
// TODO: Determine whether or not these things should be in here. Maybe the implementing
// object should just ask for them in the constructor and keep them private? I don't think
// these are universally applicable to something "download enabled"... are they?
//
//public uint MaximumStoredEventSizeSeconds { get; }
//public ushort DownloadIncrementSamples { get; }
//public string[] ChannelDescription { get; }
//public int TimeOffsetMilliseconds { get; }
///
/// A list of download s available for download.
///
TsrEvent[] EventList {get;}
///
///
/// Get the event data for the specified sample.
///
/// The to have it's data extracted.
/// The index of the first sample to be downloaded.
/// The index of the last sample to be downloaded.
/// An array of data arrays for each channel.
///
double [][] GetEventData( TsrEvent Event, UInt64 FirstSample, UInt64 LastSample ); // Any reason to do data as an out parameter rather than a return value?
// Have a subclassed channel class that has a data array, just so that 2-d array isn't so ambiguous?
///
/// Determine whether or not the data on this download-enabled entity has been downloaded.
///
bool DataHasBeenDownloaded { get; }
}
}