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

27 lines
639 B
C#

namespace Common.Hardware.SIRT.Tasks
{
public class WriteRegisterTask : SIRTTask
{
public WriteRegisterTask()
=> this.request.Command = SIRTConstants.W_REG;
public byte[] Payload
{
get => this.request.Payload;
set
{
this.request.Payload = value;
this.request.P2 = (byte)value.Length;
}
}
public override void Receive(SIRTMessage response)
{
if (response.Command == SIRTConstants.ACKN_ANSW)
{
this.SetCompleted();
}
}
}
}