29 lines
714 B
C#
29 lines
714 B
C#
namespace Common.Hardware.SIRT.Parameters
|
|
{
|
|
public class P821
|
|
{
|
|
private readonly byte[] bits;
|
|
|
|
public P821() => this.bits = new byte[8];
|
|
|
|
public P821(byte p12) => this.bits = p12.GetBits();
|
|
|
|
public P821(byte[] bits) => this.bits = bits;
|
|
|
|
public bool PamStruct
|
|
{
|
|
get => this.bits[0] == 1;
|
|
set => this.bits[0] = (byte)(value ? 1 : 0);
|
|
}
|
|
|
|
public static implicit operator byte(P821 p11)
|
|
=> p11.bits.GetByte();
|
|
|
|
public static implicit operator string(P821 p11)
|
|
=> p11.ToString();
|
|
|
|
public static implicit operator P821(byte _byte)
|
|
=> new P821(_byte.GetBits());
|
|
}
|
|
}
|