Files
DP44/DataPRO/SLICECommands/DownloadCommands/StartDownloadStreamData.cs
2026-04-17 14:55:32 -04:00

65 lines
1.9 KiB
C#

using DTS.Common.ICommunication;
namespace DTS.DASLib.Command.SLICE.DownloadCommands
{
/// <summary>
/// this was ported almost directly from FirmwareTestUtility, where it was written by Loc Pham
/// this was done for
/// 10573 implement SW side of single command/streaming download
/// this command should put SLICE2 firmware >= A1N4 into download streaming mode
/// any command should be sufficient to stop this streaming early
/// </summary>
public class StartDownloadStreamData : EventDataCommands
{
protected override Commands Command => Commands.StartDownloadStreamData;
public StartDownloadStreamData(DTS.Common.Interface.DASFactory.ICommunication sock)
: base(sock)
{
command.Parameter = new byte[18];
}
public StartDownloadStreamData(DTS.Common.Interface.DASFactory.ICommunication sock, int timeoutMillisec)
: base(sock, timeoutMillisec)
{
command.Parameter = new byte[18];
}
public const byte AllChannels = 0xFF;
private ushort _eventNumber;
private ulong _firstSample;
private ulong _lastSample;
public ushort EventNumber
{
get => _eventNumber;
set
{
_eventNumber = value;
command.SetParameter(0, _eventNumber);
}
}
public virtual ulong FirstSample
{
get => _firstSample;
set
{
_firstSample = value;
command.SetParameter(2, _firstSample);
}
}
public virtual ulong LastSample
{
get => _lastSample;
set
{
_lastSample = value;
command.SetParameter(10, _lastSample);
}
}
}
}