26 lines
655 B
C#
26 lines
655 B
C#
namespace Common.Hardware.SIRT.Tasks
|
|
{
|
|
public class ReadPamTask : SIRTTask
|
|
{
|
|
public ReadPamTask()
|
|
=> this.request.Command = SIRTConstants.R_PAM;
|
|
|
|
public byte Length
|
|
{
|
|
get => this.request.P2;
|
|
set => this.request.P2 = value;
|
|
}
|
|
|
|
public byte[] Payload { get; private set; }
|
|
|
|
public override void Push(SIRTMessage response)
|
|
{
|
|
if (response.Command == SIRTConstants.ACKN_ANSW && response.P1 == 0)
|
|
{
|
|
this.Payload = response.Payload;
|
|
this.State = SIRTTaskState.Completed;
|
|
}
|
|
}
|
|
}
|
|
}
|