[
  {
    "description": "RT v1 Config request sensor conditions, default",
    "type": "downlink-encode",
    "input": {
      "data": {
        "config_update_req": {
          "config_type": "sensor_conditions",
          "protocol_version": 1,
          "tag": "0x11223344",
          "payload": {
            "device_type": "rt",
            "event_conditions": [
              {
                "mode": "off",
                "measurement_window": 0,
                "measurement_threshold": 0,
                "frequent_event": false
              },
              {
                "mode": "off",
                "measurement_window": 0,
                "measurement_threshold": 0,
                "frequent_event": false
              },
              {
                "mode": "off",
                "measurement_window": 0,
                "measurement_threshold": 0,
                "frequent_event": false
              },
              {
                "mode": "off",
                "measurement_window": 0,
                "measurement_threshold": 0,
                "frequent_event": false
              }
            ]
          }
        }
      }
    },
    "output": {
      "fPort": 7,
      "bytes": "154433221108000000000000000000000000000000000000000000"
    }
  },
  {
    "description": "RT v1 Config request sensor conditions, default simplified",
    "type": "downlink-encode",
    "input": {
      "data": {
        "config_update_req": {
          "config_type": "sensor_conditions",
          "protocol_version": 1,
          "tag": "0x11223344",
          "payload": {
            "device_type": "rt",
            "event_conditions": [
              {
                "mode": "off"
              },
              {
                "mode": "off"
              },
              {
                "mode": "off"
              },
              {
                "mode": "off"
              }
            ]
          }
        }
      }
    },
    "output": {
      "fPort": 7,
      "bytes": "154433221108000000000000000000000000000000000000000000"
    }
  },
  {
    "description": "RT v1 Config request sensor conditions, pattern",
    "type": "downlink-encode",
    "input": {
      "data": {
        "config_update_req": {
          "config_type": "sensor_conditions",
          "protocol_version": 1,
          "tag": "0x11223344",
          "payload": {
            "device_type": "rt",
            "event_conditions": [
              {
                "mode": "below",
                "measurement_window": 1,
                "measurement_threshold": 1.25,
                "frequent_event": false
              },
              {
                "mode": "above",
                "measurement_window": 10,
                "measurement_threshold": 12.5,
                "frequent_event": true
              },
              {
                "mode": "increasing",
                "measurement_window": 63,
                "measurement_threshold": 0,
                "frequent_event": true
              },
              {
                "mode": "decreasing",
                "measurement_window": 32,
                "measurement_threshold": 125,
                "frequent_event": false
              }
            ]
          }
        }
      }
    },
    "output": {
      "fPort": 7,
      "bytes": "15443322110806050000a03f2800004841fe00000000830000fa42"
    }
  },
  {
    "description": "RT v1 Config request sensor conditions, wrong mode",
    "type": "downlink-encode",
    "input": {
      "data": {
        "config_update_req": {
          "config_type": "sensor_conditions",
          "protocol_version": 1,
          "tag": "0x11223344",
          "payload": {
            "device_type": "rt",
            "event_conditions": [
              {
                "mode": "off"
              },
              {
                "mode": "wrong"
              },
              {
                "mode": "off"
              },
              {
                "mode": "off"
              }
            ]
          }
        }
      }
    },
    "output": {
      "errors": ["mode is outside of specification: wrong"]
    }
  }
]
