27 lines
634 B
C#
27 lines
634 B
C#
namespace Common.Hardware.SIRT.Tasks
|
|
{
|
|
public class ReadRegisterTask : SIRTTask
|
|
{
|
|
public ReadRegisterTask()
|
|
=> this.request.Command = SIRTConstants.R_REG;
|
|
|
|
public byte Length
|
|
{
|
|
get => this.request.P2;
|
|
set => this.request.P2 = value;
|
|
}
|
|
|
|
public byte[] Payload { get; protected set; }
|
|
|
|
public override void Receive(SIRTMessage response)
|
|
{
|
|
if (response.Command == SIRTConstants.ACKN_ANSW)
|
|
{
|
|
this.Payload = response.Payload;
|
|
|
|
this.SetCompleted();
|
|
}
|
|
}
|
|
}
|
|
}
|