namespace SIRTBroadcaster.Abstraction.Parameters
{
using SIRTBroadcaster.Abstraction.Values;
///
/// P12 is the parameter of "Acknowledge or Answer" message and is placed at third position, if telegram from SIRT-> PC
/// begins with {0xFF, 0x12}. This parameter gives more detailed information about the last command or request which
/// was send to SIRT.Parameter 12 is given at third position of acknowledge- or answer telegram from SIRT.
/// NOTE: The bits of Parameter 12 are decoded as following, where Bit 0 is the least significant bit
///
public class P12 : Parameter
{
private P12(byte value) : base(value)
{
}
///
/// Bit: 0 - ok || requested buffer is full or not available
///
public Bit IsBufferFull => this.bits[0];
///
/// Bit: 1 - ok || operating system is busy
///
public Bit IsOSBusy => this.bits[1];
///
/// Bit: 2 - ok || wrong CRC recognized
///
public Bit IsWrongCRC => this.bits[2];
///
/// Bit: 3 - ok || command cannot be executed
///
public Bit IsCmdNotExecuted => this.bits[3];
///
/// Bit: 4 - ok || telegram / command byte unknown
///
public Bit IsCmdUnknown => this.bits[4];
///
/// Bit: 5 - ok || no such entry found
///
public Bit IsEntryNotFound => this.bits[5];
///
/// Bit: 6 - ok || unknown fixed byte
///
public Bit HasUnknownByte => this.bits[6];
///
/// Bit: 7 - normal address || address was 0xFFFFFFFF
///
public Bit IsWildcardAddress => this.bits[7];
public static implicit operator P12 (byte value)
=> new P12(value);
public static implicit operator byte (P12 parameter)
=> parameter.value;
}
}