init
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,91 @@
|
||||
using DTS.Common.ICommunication;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DTS.DASLib.Command.SLICE.RealtimeCommands
|
||||
{
|
||||
public class StartTimeStampStreamMode : RealtimeCommandBase
|
||||
{
|
||||
private bool _bSupportsIrigTimeStampSampleRealtime = true;
|
||||
public bool SupportsMultipleSampleRealtime
|
||||
{
|
||||
get { return _bSupportsIrigTimeStampSampleRealtime; }
|
||||
set
|
||||
{
|
||||
_bSupportsIrigTimeStampSampleRealtime = value;
|
||||
if (value) { command.Parameter = new byte[1]; }
|
||||
else { command.Parameter = new byte[0]; }
|
||||
}
|
||||
}
|
||||
protected override Commands _Command => Commands.StartTimeStampStreamMode;
|
||||
|
||||
public StartTimeStampStreamMode(DTS.Common.Interface.DASFactory.ICommunication sock)
|
||||
: base(sock)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(Common.Enums.DASFactory.DFConstantsAndEnums.ProtocolLimitedCommands.UDPRealtimeStream);
|
||||
}
|
||||
|
||||
public StartTimeStampStreamMode(DTS.Common.Interface.DASFactory.ICommunication sock, int timeoutMillisec)
|
||||
: base(sock, timeoutMillisec)
|
||||
{
|
||||
MinimumProtocolVersion = sock.GetMinProto(Common.Enums.DASFactory.DFConstantsAndEnums.ProtocolLimitedCommands.UDPRealtimeStream);
|
||||
}
|
||||
private byte[] _paramsToSend;
|
||||
public byte[] ParamsToSend
|
||||
{
|
||||
get => _paramsToSend;
|
||||
set
|
||||
{
|
||||
_paramsToSend = value;
|
||||
command.Parameter = new byte[value.Length];
|
||||
for (var i = 0; i < value.Length; i++)
|
||||
{
|
||||
command.SetParameter(i, _paramsToSend[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void CommandToString(ref List<List<string>> list)
|
||||
{
|
||||
base.CommandToString(ref list);
|
||||
list.Add(new List<string>(new[] { $"ParamsToSend: {System.Text.Encoding.UTF8.GetString(ParamsToSend)}" }));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// this puts the firmware into realtime streaming mode
|
||||
/// in this mode the firmware will constantly send out realtime data
|
||||
/// </summary>
|
||||
public class StartRealtimeStreamingMode : RealtimeCommandBase
|
||||
{
|
||||
protected override Commands _Command => Commands.StartRealtimeStreamingMode;
|
||||
|
||||
public StartRealtimeStreamingMode(DTS.Common.Interface.DASFactory.ICommunication sock, byte[] channelList)
|
||||
: base(sock)
|
||||
{
|
||||
ChannelList = channelList;
|
||||
}
|
||||
|
||||
public StartRealtimeStreamingMode(DTS.Common.Interface.DASFactory.ICommunication sock, int timeoutMillisec, byte[] channelList)
|
||||
: base(sock, timeoutMillisec)
|
||||
{
|
||||
ChannelList = channelList;
|
||||
}
|
||||
|
||||
private byte[] _channelList;
|
||||
/// <summary>
|
||||
/// channels to collect data on, each channel should be represented as a byte
|
||||
/// </summary>
|
||||
public byte[] ChannelList
|
||||
{
|
||||
get => _channelList;
|
||||
set
|
||||
{
|
||||
_channelList = value;
|
||||
command.Parameter = new byte[value.Length];
|
||||
for (var i = 0; i < value.Length; i++)
|
||||
{
|
||||
command.SetParameter(i, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user