Files
laatzen/Common/SIRTBroadcaster.Client/Parameters/P11.cs
T
2023-08-22 14:58:05 +02:00

69 lines
2.2 KiB
C#

namespace SIRTBroadcaster.Abstraction.Parameters
{
using SIRTBroadcaster.Abstraction.Values;
/// <summary>
/// Parameter P11 is given at third position of "Telegram from Air" telegram and give more detailed information about the
/// received packets from radio section of SIRT.The bits of Parameter 11 are decoded as following, where Bit 0 is the least
/// significant bit:
/// </summary>
public class P11 : Parameter
{
private P11(byte value) : base(value)
{
}
/// <summary>
/// Bit: 0 - RF-Module1 is source || RF-Module2 is source
/// </summary>
public Bit SourceChannel => this.bits[0];
/// <summary>
/// Bit: 1 - only one RF module data is valid || both RF module data are valid
/// </summary>
public Bit AreBothValid => this.bits[1];
/// <summary>
/// Bit: 2 - RF-Module1 data is valid || RF-Module1 data is invalid
/// </summary>
public Bit InvalidModule1 => this.bits[2];
/// <summary>
/// Bit: 3 - RF-Module2 data is valid || RF-Module2 data is invalid
/// </summary>
public Bit InvalidModule2 => this.bits[3];
/// <summary>
/// Bit: 4 - all ok || invalid -> module detects length > 128
/// </summary>
public Bit Overflow => this.bits[4];
/// <summary>
/// Bit: 5 - no attention for PAM / RAC || will look at PAM / RAC Pool
/// </summary>
public Bit Attention => this.bits[5];
/// <summary>
/// Bit: 6 -
/// If .modeSensus = 0 wireless M-busMode
/// 0: S1 - Mode
/// 1: T1 - Mode
/// If.modeSensus = 1 SensusRF
/// 0: receive at f1
/// 1: receive at f2
/// </summary>
public Bit ModeRF => this.bits[6];
/// <summary>
/// Bit: 7 - wireless M-Bus Mode || Sensus RF Mode
/// </summary>
public Bit ModeSensus => this.bits[7];
public static implicit operator P11(byte value)
=> new P11(value);
public static implicit operator byte(P11 parameter)
=> parameter.value;
}
}