all changes
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
namespace SIRTBroadcaster.Abstraction.Parameters
|
||||
{
|
||||
using SIRTBroadcaster.Abstraction.Values;
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
public class P12 : Parameter
|
||||
{
|
||||
private P12(byte value) : base(value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 0 - ok || requested buffer is full or not available
|
||||
/// </summary>
|
||||
public Bit IsBufferFull => this.bits[0];
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 1 - ok || operating system is busy
|
||||
/// </summary>
|
||||
public Bit IsOSBusy => this.bits[1];
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 2 - ok || wrong CRC recognized
|
||||
/// </summary>
|
||||
public Bit IsWrongCRC => this.bits[2];
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 3 - ok || command cannot be executed
|
||||
/// </summary>
|
||||
public Bit IsCmdNotExecuted => this.bits[3];
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 4 - ok || telegram / command byte unknown
|
||||
/// </summary>
|
||||
public Bit IsCmdUnknown => this.bits[4];
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 5 - ok || no such entry found
|
||||
/// </summary>
|
||||
public Bit IsEntryNotFound => this.bits[5];
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 6 - ok || unknown fixed byte
|
||||
/// </summary>
|
||||
public Bit HasUnknownByte => this.bits[6];
|
||||
|
||||
/// <summary>
|
||||
/// Bit: 7 - normal address || address was 0xFFFFFFFF
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user