laatzen/Common/Hardware/Common.Hardware.SIRT/Tasks/ReadRegisterTask.cs
2025-11-20 08:46:37 +01:00

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();
}
}
}
}