init
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IDownload
|
||||
{
|
||||
/// <summary>
|
||||
/// What do you want to download?
|
||||
/// </summary>
|
||||
IDownloadRequest WhatToDownload { get; set; }
|
||||
void SetWhatToDownload(IDownloadRequest request, bool bSetInDb = true);
|
||||
/// <summary>
|
||||
/// The Retrieved information about stored events.
|
||||
/// </summary>
|
||||
IDownloadReport EventInfo { get; set; }
|
||||
void SetEventInfo(IDownloadReport eventInfo, bool bSetInDb = true);
|
||||
/// <summary>
|
||||
/// QueryDownloadedStatus will fill this array (indexed by event number, true if
|
||||
/// HasBeenDownloaded was set for this event, false otherwise)
|
||||
/// </summary>
|
||||
bool[] EventDownloadedStatus { get; set; }
|
||||
void SetEventDownloadStatus(bool[] status, bool storeInDb=true);
|
||||
/// <summary>
|
||||
/// DASFactory will fill this array (indexed by event number).
|
||||
/// </summary>
|
||||
Guid[] EventGuids { get; set; }
|
||||
void SetEventGuids(Guid[] guids, bool storeInDb = true);
|
||||
/// <summary>
|
||||
/// DASFactory will fill this array (indexed by event number).
|
||||
/// </summary>
|
||||
ushort[] FaultFlags { get; set; }
|
||||
void SetEventFaultFlags(ushort[] flags, bool storeInDb = true);
|
||||
/// <summary>
|
||||
/// DASFactory will fill this array (indexed by event number).
|
||||
/// </summary>
|
||||
byte[] ArmAttempts { get; set; }
|
||||
void SetEventArmAttemps(byte[] armAttempts, bool storeInDb = true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using DTS.Common.Interface.DownloadEvent;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IDownloadReport
|
||||
{
|
||||
/// <summary>
|
||||
/// An array of all events stored on this DAS.
|
||||
/// </summary>
|
||||
IEventInfo[] Events { get; set; }
|
||||
/// <summary>
|
||||
/// An array of all UART events stored on this DAS.
|
||||
/// </summary>
|
||||
IUARTEventInfo[] UARTEvents { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IDownloadRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// From which event do we want to download data?
|
||||
/// </summary>
|
||||
ushort EventNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Which channel? (set to ALL_CHANNELS for all)
|
||||
/// </summary>
|
||||
byte DASChannelNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The first sample you want.
|
||||
/// </summary>
|
||||
ulong StartSample { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The last sample you want.
|
||||
/// </summary>
|
||||
ulong EndSample { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This is used for sub-sampling data, 0 (or 1) means don't sub-sample, 2 means
|
||||
/// give me every other sample and so on. The number of samples requested
|
||||
/// (EndSample-StartSample+1) must be an multiple of SamplesToSkip.
|
||||
/// </summary>
|
||||
ulong SamplesToSkip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double StartRecordTimestampSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TriggerTimestampSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double StartRecordTimestampNanoSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
double TriggerTimestampNanoSec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
bool PTPMasterSync { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using DTS.Common.Interface.DASFactory.Config;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IEventInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Information about each module that was part of the event. Addressable by
|
||||
/// ModuleArrayIndex of the corresponding module.
|
||||
/// </summary>
|
||||
IDASModule[] Modules { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The event number this information is regarding.
|
||||
/// </summary>
|
||||
int EventNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The GUID of the corresponding event.
|
||||
/// </summary>
|
||||
Guid TestGUID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Fault flags (if any)
|
||||
/// </summary>
|
||||
ushort FaultFlags { get; set; }
|
||||
/// <summary>
|
||||
/// Extended Fault flags (if any)
|
||||
/// </summary>
|
||||
ushort FaultFlagsEx { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Arm Attempts (if any)
|
||||
/// </summary>
|
||||
byte ArmAttempts { get; set; }
|
||||
/// <summary>
|
||||
/// The timestamp of this event.
|
||||
/// </summary>
|
||||
DateTime TestTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The ID of this event.
|
||||
/// </summary>
|
||||
string TestID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A text description that was stored.
|
||||
/// </summary>
|
||||
string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// True if this event has already been downloaded.
|
||||
/// </summary>
|
||||
bool HasBeenDownloaded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// True if this event received a trigger.
|
||||
/// </summary>
|
||||
bool WasTriggered { get; set; }
|
||||
|
||||
void ClearFaults();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IEventInfoAggregate
|
||||
{
|
||||
string EventId { get; set; }
|
||||
string EventDescription { get; set; }
|
||||
double DurationSeconds { get; set; }
|
||||
string GUID { get; set; }
|
||||
bool HasBeenDownloaded { get; set; }
|
||||
bool WasTriggered { get; set; }
|
||||
int NumberOfChannels { get; set; }
|
||||
ulong NumberOfSamples { get; set; }
|
||||
ulong NumberOfBytes { get; set; }
|
||||
bool Faulted { get; set; }
|
||||
int EventNumber { get; set; }
|
||||
void Add(IEventInfo newEvent);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using DTS.Common.Enums;
|
||||
using System.IO.Ports;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IUARTDownload
|
||||
{
|
||||
/// <summary>
|
||||
/// FB15335: Move UART and ClockProfile sets to RunTest -> Hardware NavStep, add Reboot
|
||||
/// DASFactory will fill these with the current values.
|
||||
/// </summary>
|
||||
uint BaudRate { get; }
|
||||
uint DataBits { get; }
|
||||
StopBits StopBits { get; }
|
||||
Parity Parity { get; }
|
||||
Handshake FlowControl { get; }
|
||||
UartDataFormat DataFormat { get; }
|
||||
/// <summary>
|
||||
/// What do you want to download?
|
||||
/// </summary>
|
||||
IUARTDownloadRequest WhatUARTToDownload { get; set; }
|
||||
void SetWhatUARTToDownload(IUARTDownloadRequest request, bool bSetInDb = true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IUARTDownloadRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// From which event do we want to download data?
|
||||
/// </summary>
|
||||
ushort EventNumber { get; set; }
|
||||
/// <summary>
|
||||
/// How much data is there?
|
||||
/// </summary>
|
||||
ulong TotalByteCount { get; set; }
|
||||
/// <summary>
|
||||
/// Where in the data did the trigger occur?
|
||||
/// </summary>
|
||||
ulong TriggerByteCount { get; set; }
|
||||
/// <summary>
|
||||
/// Where in the data did the trigger occur?
|
||||
/// </summary>
|
||||
ulong FaultByteCount { get; set; }
|
||||
/// <summary>
|
||||
/// When did the UART stream start?
|
||||
/// </summary>
|
||||
ulong StartTimestamp { get; set; }
|
||||
/// <summary>
|
||||
/// When did the UART stream end?
|
||||
/// </summary>
|
||||
ulong EndTimestamp { get; set; }
|
||||
/// <summary>
|
||||
/// What was the baud rate during recording?
|
||||
/// </summary>
|
||||
int BaudRate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
namespace DTS.Common.Interface.DASFactory.Download
|
||||
{
|
||||
public interface IUARTEventInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// From which event do we want to download data?
|
||||
/// </summary>
|
||||
ushort EventNumber { get; set; }
|
||||
/// <summary>
|
||||
/// Is data present?
|
||||
/// </summary>
|
||||
bool DataPresent { get; set; }
|
||||
/// <summary>
|
||||
/// Has data already been downloaded?
|
||||
/// </summary>
|
||||
bool DataDownloaded { get; set; }
|
||||
/// <summary>
|
||||
/// How much data is there?
|
||||
/// </summary>
|
||||
ulong TotalByteCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Where in the data did the trigger occur?
|
||||
/// </summary>
|
||||
ulong TriggerByteCount { get; set; }
|
||||
/// <summary>
|
||||
/// Where are the faults?
|
||||
/// </summary>
|
||||
ulong FaultByteCount { get; set; }
|
||||
/// <summary>
|
||||
/// When did the UART stream start?
|
||||
/// </summary>
|
||||
ulong StartTimestamp { get; set; }
|
||||
/// <summary>
|
||||
/// When did the UART stream end?
|
||||
/// </summary>
|
||||
ulong EndTimestamp { get; set; }
|
||||
/// <summary>
|
||||
/// What was the baud rate during UART recording?
|
||||
/// </summary>
|
||||
uint BaudRate { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user