init
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using DTS.Common.Enums.DASFactory;
|
||||
|
||||
namespace DTS.DASLib.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for channels encoding sample timestamps
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class TimestampDASChannel : InputDASChannel
|
||||
{
|
||||
/// <summary>
|
||||
/// CTOR to populate a channel's owning module and channel WRT that module. Calls
|
||||
/// base class CTOR.
|
||||
/// </summary>
|
||||
/// <param name="owner">Module that contains this channel.</param>
|
||||
/// <param name="channelNumber">ChannelNumber of this channel WRT owning module.</param>
|
||||
public TimestampDASChannel(DASModule owner, int channelNumber)
|
||||
: base(owner, channelNumber)
|
||||
{
|
||||
}
|
||||
|
||||
public TimestampDASChannel()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If the rtc channel exists, it is "Configured".
|
||||
/// </summary>
|
||||
public override bool IsConfigured()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public const string MARKER = "MARKER";
|
||||
public const string SEC_H = "SECONDS_HIGH";
|
||||
public const string SEC_L = "SECONDS_LOW";
|
||||
public const string NANOS_H = "NANOSECONDS_HIGH";
|
||||
public const string NANOS_L = "NANOSECONDS_LOW";
|
||||
public const string RSVD = "RESERVED";
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
switch (OwningModule.ModuleType())
|
||||
{
|
||||
case DFConstantsAndEnums.ModuleType.EmbeddedClockSecondsAndMarker:
|
||||
switch (ModuleChannelNumber)
|
||||
{
|
||||
case 0:
|
||||
return MARKER;
|
||||
case 1:
|
||||
return SEC_H;
|
||||
case 2:
|
||||
return SEC_L;
|
||||
}
|
||||
break;
|
||||
case DFConstantsAndEnums.ModuleType.EmbeddedClockNanosAndPad:
|
||||
switch (ModuleChannelNumber)
|
||||
{
|
||||
case 0:
|
||||
return NANOS_H;
|
||||
case 1:
|
||||
return NANOS_L;
|
||||
case 2:
|
||||
return RSVD;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return ModuleChannelNumber.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user