LLRP の出力電力と受信感度

# LLRP 出力電力 ・ 受信感度設定値
LLRP のアンテナ設定時に使用する出力電力と受信感度についてです.
詳細は下記のページを参照してください.

[Setting Receive Sensitivity and Transmit Power on Revolution Reader using LLRP - Impinj Support Portal](https://support.impinj.com/hc/en-us/articles/202756358-Setting-Receive-Sensitivity-and-Transmit-Power-on-Revolution-Reader-using-LLRP)

## 出力電力 / 受信感度

```C#
/// <summary>電力(抽象)</summary>
public abstract class AbsPower {
  /// <summary>ID</summary>
  public ushort Id {
    get {
      return this.id;
    }
  }



  /// <summary>値</summary>
  public double Value {
    protected set {
      this.value = value;
    }
    get {
      return this.value;
    }
  }



  private ushort id;
  private double value;



  /// <summary>コンストラクタ</summary>
  /// <param name="id">id</param>
  public AbsPower(ushort id) {
    this.id = id;
  }
}



/// <summary>出力電力</summary>
public sealed class TxPower : AbsPower {
  public static readonly ushort Min = 1;
  public static readonly ushort Max = 81;

  /// <summary>対応する出力電力の配列</summary>
  public static TxPower[] Values {
    get {
      return Enumerable.Range(Min, Max)
        .Select(id => new TxPower((ushort)id))
        .ToArray();
    }
  }


  /// <summary>コンストラクタ</summary>
  /// <param name="id">出力電力ID(1 - 81)</param>
  public TxPower(ushort id) : base(id) {
    if(Min < this.Id || this.Id > Max) {
      throw new Exception(string.Format(
            "{0} ~ {1} 間の値を指定してください.",
            Min,
            Max));
    }

    this.Value = 10.0f + (id - 1) * 0.25;
  }
}

/// <summary>受信感度</summary>
public sealed class RfSensitivity : AbsPower {
  public static readonly ushort Min = 1;
  public static readonly ushort Max = 42;

  /// <summary>対応する受信感度の配列</summary>
  public static RfSensitivity[] Values {
    get {
      return Enumerable.Range(Min, Max)
        .Select(id => new RfSensitivity((ushort)id))
        .ToArray();
    }
  }


  /// <summary>コンストラクタ</summary>
  /// <param name="id">受信感度ID(1 - 42)</param>
  public RfSensitivity(ushort id) : base(id) {
    if(Min < this.Id || this.Id > Max) {
      throw new Exception(string.Format(
            "{0} ~ {1} 間の値を指定してください.",
            Min,
            Max));
    }

    this.Value = (this.Id == Min)
      ? -80.0f
      : -70.0f + (this.Id - 2);
  }
}
```

## 対応表
日本国内の場合, RFIDリーダの出力電力は 1[W] までなので, ここでは 81(30[dBm]) までの値を表記しています.
ID が 1 で 10[dBm] となります. それ以降は, 0.25[dBm] ずつ増加していきます.
### 出力電力　
| ID | 出力電力[dBm] |
| --- | --- |
| 1 | 10.00 |
| 2 | 10.25 |
| 3 | 10.50 |
| 4 | 10.75 |
| 5 | 11.00 |
| 6 | 11.25 |
| 7 | 11.50 |
| 8 | 11.75 |
| 9 | 12.00 |
| 10 | 12.25 |
| 11 | 12.50 |
| 12 | 12.75 |
| 13 | 13.00 |
| 14 | 13.25 |
| 15 | 13.50 |
| 16 | 13.75 |
| 17 | 14.00 |
| 18 | 14.25 |
| 19 | 14.50 |
| 20 | 14.75 |
| 21 | 15.00 |
| 22 | 15.25 |
| 23 | 15.50 |
| 24 | 15.75 |
| 25 | 16.00 |
| 26 | 16.25 |
| 27 | 16.50 |
| 28 | 16.75 |
| 29 | 17.00 |
| 30 | 17.25 |
| 31 | 17.50 |
| 32 | 17.75 |
| 33 | 18.00 |
| 34 | 18.25 |
| 35 | 18.50 |
| 36 | 18.75 |
| 37 | 19.00 |
| 38 | 19.25 |
| 39 | 19.50 |
| 40 | 19.75 |
| 41 | 20.00 |
| 42 | 20.25 |
| 43 | 20.50 |
| 44 | 20.75 |
| 45 | 21.00 |
| 46 | 21.25 |
| 47 | 21.50 |
| 48 | 21.75 |
| 49 | 22.00 |
| 50 | 22.25 |
| 51 | 22.50 |
| 52 | 22.75 |
| 53 | 23.00 |
| 54 | 23.25 |
| 55 | 23.50 |
| 56 | 23.75 |
| 57 | 24.00 |
| 58 | 24.25 |
| 59 | 24.50 |
| 60 | 24.75 |
| 61 | 25.00 |
| 62 | 25.25 |
| 63 | 25.50 |
| 64 | 25.75 |
| 65 | 26.00 |
| 66 | 26.25 |
| 67 | 26.50 |
| 68 | 26.75 |
| 69 | 27.00 |
| 70 | 27.25 |
| 71 | 27.50 |
| 72 | 27.75 |
| 73 | 28.00 |
| 74 | 28.25 |
| 75 | 28.50 |
| 76 | 28.75 |
| 77 | 29.00 |
| 78 | 29.25 |
| 79 | 29.50 |
| 80 | 29.75 |
| 81 | 30.00 |

### 受信感度
| ID | 受信感度[dBm] |
| --- | --- |
| 1 | -80.00 |
| 2 | -70.00 |
| 3 | -69.00 |
| 4 | -68.00 |
| 5 | -67.00 |
| 6 | -66.00 |
| 7 | -65.00 |
| 8 | -64.00 |
| 9 | -63.00 |
| 10 | -62.00 |
| 11 | -61.00 |
| 12 | -60.00 |
| 13 | -59.00 |
| 14 | -58.00 |
| 15 | -57.00 |
| 16 | -56.00 |
| 17 | -55.00 |
| 18 | -54.00 |
| 19 | -53.00 |
| 20 | -52.00 |
| 21 | -51.00 |
| 22 | -50.00 |
| 23 | -49.00 |
| 24 | -48.00 |
| 25 | -47.00 |
| 26 | -46.00 |
| 27 | -45.00 |
| 28 | -44.00 |
| 29 | -43.00 |
| 30 | -42.00 |
| 31 | -41.00 |
| 32 | -40.00 |
| 33 | -39.00 |
| 34 | -38.00 |
| 35 | -37.00 |
| 36 | -36.00 |
| 37 | -35.00 |
| 38 | -34.00 |
| 39 | -33.00 |
| 40 | -32.00 |
| 41 | -31.00 |
| 42 | -30.00 |