{
  "nested": {
    "IronPi": {
      "nested": {
        "DeviceModel": {
          "fields": {
            "name": {
              "type": "string",
              "id": 1
            },
            "version": {
              "type": "string",
              "id": 2
            },
            "numDigitalInputs": {
              "type": "uint32",
              "id": 3
            },
            "numDigitalOutputs": {
              "type": "uint32",
              "id": 4
            },
            "numAnalogInputs": {
              "type": "uint32",
              "id": 5
            },
            "hasConnectButton": {
              "type": "bool",
              "id": 6
            }
          }
        },
        "DetectedDevice": {
          "fields": {
            "address": {
              "type": "uint32",
              "id": 1
            },
            "ioOffset": {
              "type": "uint32",
              "id": 2
            },
            "model": {
              "type": "DeviceModel",
              "id": 3
            }
          }
        },
        "HardwareInfo": {
          "fields": {
            "devices": {
              "rule": "repeated",
              "type": "DetectedDevice",
              "id": 1
            },
            "serialNumber": {
              "type": "string",
              "id": 2
            },
            "accessCode": {
              "type": "string",
              "id": 3
            }
          }
        },
        "DeviceInputState": {
          "fields": {
            "address": {
              "type": "uint32",
              "id": 1
            },
            "ioOffset": {
              "type": "uint32",
              "id": 2
            },
            "digitalInputs": {
              "rule": "repeated",
              "type": "bool",
              "id": 3
            },
            "digitalInputEventCounts": {
              "rule": "repeated",
              "type": "uint32",
              "id": 4
            },
            "digitalOutputs": {
              "rule": "repeated",
              "type": "bool",
              "id": 5
            },
            "analogInputs": {
              "rule": "repeated",
              "type": "float",
              "id": 6
            },
            "connectButtonPressed": {
              "type": "bool",
              "id": 7
            },
            "connectButtonEventCount": {
              "type": "uint32",
              "id": 8
            }
          }
        },
        "DeviceInputStates": {
          "fields": {
            "inputStates": {
              "rule": "repeated",
              "type": "DeviceInputState",
              "id": 1
            }
          }
        },
        "MessageFromDriver": {
          "oneofs": {
            "message": {
              "oneof": [
                "hardwareInfo",
                "deviceInputStates"
              ]
            }
          },
          "fields": {
            "hardwareInfo": {
              "type": "HardwareInfo",
              "id": 1
            },
            "deviceInputStates": {
              "type": "DeviceInputStates",
              "id": 2
            }
          }
        },
        "DeviceOutputState": {
          "fields": {
            "address": {
              "type": "uint32",
              "id": 1
            },
            "levels": {
              "rule": "repeated",
              "type": "bool",
              "id": 2
            }
          }
        },
        "SetOutputs": {
          "fields": {
            "outputs": {
              "rule": "repeated",
              "type": "DeviceOutputState",
              "id": 1
            }
          }
        },
        "LEDCommand": {
          "fields": {
            "address": {
              "type": "uint32",
              "id": 1
            },
            "colors": {
              "type": "string",
              "id": 2
            },
            "onTime": {
              "type": "uint32",
              "id": 3
            },
            "offTime": {
              "type": "uint32",
              "id": 4
            },
            "idleTime": {
              "type": "uint32",
              "id": 5
            }
          }
        },
        "SetLEDs": {
          "fields": {
            "leds": {
              "rule": "repeated",
              "type": "LEDCommand",
              "id": 1
            }
          }
        },
        "MessageToDriver": {
          "oneofs": {
            "message": {
              "oneof": [
                "setOutputs",
                "setLEDs"
              ]
            }
          },
          "fields": {
            "setOutputs": {
              "type": "SetOutputs",
              "id": 1
            },
            "setLEDs": {
              "type": "SetLEDs",
              "id": 2
            }
          }
        }
      }
    }
  }
}