Skip to content

Instantly share code, notes, and snippets.

@lorennorman
Created November 28, 2022 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorennorman/1d17b70a78b9f86c5f2aee7803eeb39e to your computer and use it in GitHub Desktop.
Save lorennorman/1d17b70a78b9f86c5f2aee7803eeb39e to your computer and use it in GitHub Desktop.
JSON descriptor of the (current) wippersnapper protobufs as exported by protobuf.js
{
"nested": {
"wippersnapper": {
"nested": {
"signal": {
"nested": {
"v1": {
"nested": {
"Ds18x20Request": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"reqDs18x20Init",
"reqDs18x20Deinit"
]
}
},
"fields": {
"reqDs18x20Init": {
"type": "wippersnapper.ds18x20.v1.Ds18x20InitRequest",
"id": 1
},
"reqDs18x20Deinit": {
"type": "wippersnapper.ds18x20.v1.Ds18x20DeInitRequest",
"id": 2
}
}
},
"Ds18x20Response": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"respDs18x20Init",
"respDs18x20Event"
]
}
},
"fields": {
"respDs18x20Init": {
"type": "wippersnapper.ds18x20.v1.Ds18x20InitResponse",
"id": 1
},
"respDs18x20Event": {
"type": "wippersnapper.ds18x20.v1.Ds18x20DeviceEvent",
"id": 2
}
}
},
"I2CRequest": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"reqI2cInit",
"reqI2cScan",
"reqI2cSetFreq",
"reqI2cDeviceInit",
"reqI2cDeviceDeinit",
"reqI2cDeviceUpdate",
"reqI2cDeviceInitRequests"
]
}
},
"fields": {
"reqI2cInit": {
"type": "wippersnapper.i2c.v1.I2CBusInitRequest",
"id": 1,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"reqI2cScan": {
"type": "wippersnapper.i2c.v1.I2CBusScanRequest",
"id": 2
},
"reqI2cSetFreq": {
"type": "wippersnapper.i2c.v1.I2CBusSetFrequency",
"id": 3
},
"reqI2cDeviceInit": {
"type": "wippersnapper.i2c.v1.I2CDeviceInitRequest",
"id": 4
},
"reqI2cDeviceDeinit": {
"type": "wippersnapper.i2c.v1.I2CDeviceDeinitRequest",
"id": 5
},
"reqI2cDeviceUpdate": {
"type": "wippersnapper.i2c.v1.I2CDeviceUpdateRequest",
"id": 6
},
"reqI2cDeviceInitRequests": {
"type": "wippersnapper.i2c.v1.I2CDeviceInitRequests",
"id": 7
}
}
},
"I2CResponse": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"respI2cInit",
"respI2cScan",
"respI2cDeviceInit",
"respI2cDeviceDeinit",
"respI2cDeviceUpdate",
"respI2cDeviceEvent"
]
}
},
"fields": {
"respI2cInit": {
"type": "wippersnapper.i2c.v1.I2CBusInitResponse",
"id": 1,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"respI2cScan": {
"type": "wippersnapper.i2c.v1.I2CBusScanResponse",
"id": 2
},
"respI2cDeviceInit": {
"type": "wippersnapper.i2c.v1.I2CDeviceInitResponse",
"id": 3
},
"respI2cDeviceDeinit": {
"type": "wippersnapper.i2c.v1.I2CDeviceDeinitResponse",
"id": 4
},
"respI2cDeviceUpdate": {
"type": "wippersnapper.i2c.v1.I2CDeviceUpdateResponse",
"id": 5
},
"respI2cDeviceEvent": {
"type": "wippersnapper.i2c.v1.I2CDeviceEvent",
"id": 6
}
}
},
"ServoRequest": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"servoAttach",
"servoDetach",
"servoWrite"
]
}
},
"fields": {
"servoAttach": {
"type": "wippersnapper.servo.v1.ServoAttachRequest",
"id": 1
},
"servoDetach": {
"type": "wippersnapper.servo.v1.ServoDetachRequest",
"id": 2
},
"servoWrite": {
"type": "wippersnapper.servo.v1.ServoWriteRequest",
"id": 3
}
}
},
"ServoResponse": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"servoAttachResp"
]
}
},
"fields": {
"servoAttachResp": {
"type": "wippersnapper.servo.v1.ServoAttachResponse",
"id": 1
}
}
},
"CreateSignalRequest": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"pinConfigs",
"pinEvent",
"pwmPinConfig",
"pwmPinEvent",
"pinEvents"
]
}
},
"fields": {
"pinConfigs": {
"type": "wippersnapper.pin.v1.ConfigurePinRequests",
"id": 6
},
"pinEvent": {
"type": "wippersnapper.pin.v1.PinEvent",
"id": 15
},
"pwmPinConfig": {
"type": "wippersnapper.pin.v1.ConfigurePWMPinRequests",
"id": 10,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"pwmPinEvent": {
"type": "wippersnapper.pin.v1.PWMPinEvents",
"id": 12,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"pinEvents": {
"type": "wippersnapper.pin.v1.PinEvents",
"id": 7
}
}
},
"SignalResponse": {
"oneofs": {
"payload": {
"oneof": [
"configurationComplete"
]
}
},
"fields": {
"configurationComplete": {
"type": "bool",
"id": 1
}
}
},
"PWMRequest": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"attachRequest",
"detachRequest",
"writeDutyRequest",
"writeDutyMultiRequest",
"writeFreqRequest"
]
}
},
"fields": {
"attachRequest": {
"type": "wippersnapper.pwm.v1.PWMAttachRequest",
"id": 1
},
"detachRequest": {
"type": "wippersnapper.pwm.v1.PWMDetachRequest",
"id": 2
},
"writeDutyRequest": {
"type": "wippersnapper.pwm.v1.PWMWriteDutyCycleRequest",
"id": 3
},
"writeDutyMultiRequest": {
"type": "wippersnapper.pwm.v1.PWMWriteDutyCycleMultiRequest",
"id": 4
},
"writeFreqRequest": {
"type": "wippersnapper.pwm.v1.PWMWriteFrequencyRequest",
"id": 5
}
}
},
"PWMResponse": {
"options": {
"(nanopb_msgopt).submsg_callback": true
},
"oneofs": {
"payload": {
"oneof": [
"attachResponse"
]
}
},
"fields": {
"attachResponse": {
"type": "wippersnapper.pwm.v1.PWMAttachResponse",
"id": 1
}
}
}
}
}
}
},
"pin": {
"nested": {
"v1": {
"nested": {
"Mode": {
"values": {
"MODE_UNSPECIFIED": 0,
"MODE_ANALOG": 1,
"MODE_DIGITAL": 2
}
},
"ConfigurePinRequests": {
"fields": {
"list": {
"rule": "repeated",
"type": "ConfigurePinRequest",
"id": 1
}
}
},
"ConfigurePinRequest": {
"fields": {
"pinName": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5
}
},
"mode": {
"type": "Mode",
"id": 2
},
"direction": {
"type": "Direction",
"id": 3
},
"pull": {
"type": "Pull",
"id": 4
},
"period": {
"type": "float",
"id": 5
},
"requestType": {
"type": "RequestType",
"id": 6
},
"aref": {
"type": "float",
"id": 7,
"options": {
"deprecated": true
}
},
"analogReadMode": {
"type": "AnalogReadMode",
"id": 8
}
},
"nested": {
"Direction": {
"values": {
"DIRECTION_UNSPECIFIED": 0,
"DIRECTION_INPUT": 1,
"DIRECTION_OUTPUT": 2
}
},
"Pull": {
"values": {
"PULL_UNSPECIFIED": 0,
"PULL_UP": 1,
"PULL_DOWN": 2
}
},
"RequestType": {
"values": {
"REQUEST_TYPE_UNSPECIFIED": 0,
"REQUEST_TYPE_CREATE": 1,
"REQUEST_TYPE_UPDATE": 2,
"REQUEST_TYPE_DELETE": 3
}
},
"AnalogReadMode": {
"values": {
"ANALOG_READ_MODE_UNSPECIFIED": 0,
"ANALOG_READ_MODE_PIN_VALUE": 1,
"ANALOG_READ_MODE_PIN_VOLTAGE": 2
}
}
}
},
"PinEvent": {
"fields": {
"pinName": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5
}
},
"pinValue": {
"type": "string",
"id": 2,
"options": {
"(nanopb).max_size": 12
}
},
"mode": {
"type": "Mode",
"id": 3,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"pinValueVolts": {
"type": "float",
"id": 4,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
}
}
},
"ConfigureReferenceVoltage": {
"fields": {
"referenceVoltage": {
"type": "float",
"id": 1
}
}
},
"PinEvents": {
"options": {
"deprecated": true
},
"fields": {
"list": {
"rule": "repeated",
"type": "PinEvent",
"id": 1
}
}
},
"ConfigurePWMPinRequest": {
"options": {
"deprecated": true
},
"fields": {
"pinName": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5,
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"dutyCycle": {
"type": "int32",
"id": 2,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"frequency": {
"type": "int32",
"id": 3,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"variableFrequency": {
"type": "bool",
"id": 4,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
}
}
},
"ConfigurePWMPinRequests": {
"options": {
"deprecated": true
},
"fields": {
"list": {
"rule": "repeated",
"type": "ConfigurePWMPinRequest",
"id": 1,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
}
}
},
"PWMPinEvent": {
"options": {
"deprecated": true
},
"fields": {
"dutyCycle": {
"type": "int32",
"id": 2,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
}
}
},
"PWMPinEvents": {
"options": {
"deprecated": true
},
"fields": {
"list": {
"rule": "repeated",
"type": "PWMPinEvent",
"id": 1,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
}
}
}
}
}
}
},
"i2c": {
"nested": {
"v1": {
"nested": {
"BusResponse": {
"values": {
"BUS_RESPONSE_UNSPECIFIED": 0,
"BUS_RESPONSE_SUCCESS": 1,
"BUS_RESPONSE_ERROR_HANG": 2,
"BUS_RESPONSE_ERROR_PULLUPS": 3,
"BUS_RESPONSE_ERROR_WIRING": 4,
"BUS_RESPONSE_UNSUPPORTED_SENSOR": 5,
"BUS_RESPONSE_DEVICE_INIT_FAIL": 6,
"BUS_RESPONSE_DEVICE_DEINIT_FAIL": 7
}
},
"I2CBusInitRequest": {
"fields": {
"i2cPinScl": {
"type": "int32",
"id": 1
},
"i2cPinSda": {
"type": "int32",
"id": 2
},
"i2cFrequency": {
"type": "uint32",
"id": 3
},
"i2cPortNumber": {
"type": "int32",
"id": 4
}
}
},
"I2CBusInitResponse": {
"fields": {
"isInitialized": {
"type": "bool",
"id": 1,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"busResponse": {
"type": "BusResponse",
"id": 2
}
}
},
"I2CBusSetFrequency": {
"fields": {
"frequency": {
"type": "uint32",
"id": 1
},
"busId": {
"type": "int32",
"id": 2
}
}
},
"I2CBusScanRequest": {
"fields": {
"i2cPortNumber": {
"type": "int32",
"id": 1
},
"busInitRequest": {
"type": "I2CBusInitRequest",
"id": 2
}
}
},
"I2CBusScanResponse": {
"fields": {
"addressesFound": {
"rule": "repeated",
"type": "uint32",
"id": 1,
"options": {
"packed": true,
"(nanopb).max_count": 120
}
},
"busResponse": {
"type": "BusResponse",
"id": 2
}
}
},
"I2CDeviceSensorProperties": {
"fields": {
"sensorType": {
"type": "SensorType",
"id": 1
},
"sensorPeriod": {
"type": "uint32",
"id": 2
}
}
},
"I2CDeviceInitRequests": {
"fields": {
"list": {
"rule": "repeated",
"type": "I2CDeviceInitRequest",
"id": 1
}
}
},
"I2CDeviceInitRequest": {
"fields": {
"i2cPortNumber": {
"type": "int32",
"id": 1
},
"i2cBusInitReq": {
"type": "I2CBusInitRequest",
"id": 2
},
"i2cDeviceAddress": {
"type": "uint32",
"id": 3
},
"i2cDeviceName": {
"type": "string",
"id": 4,
"options": {
"(nanopb).max_size": 15
}
},
"i2cDeviceProperties": {
"rule": "repeated",
"type": "I2CDeviceSensorProperties",
"id": 5,
"options": {
"(nanopb).max_count": 15
}
}
}
},
"I2CDeviceInitResponse": {
"fields": {
"isSuccess": {
"type": "bool",
"id": 1,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"i2cDeviceAddress": {
"type": "uint32",
"id": 2
},
"busResponse": {
"type": "BusResponse",
"id": 3
}
}
},
"I2CDeviceUpdateRequest": {
"fields": {
"i2cPortNumber": {
"type": "int32",
"id": 1
},
"i2cDeviceAddress": {
"type": "uint32",
"id": 2
},
"i2cDeviceName": {
"type": "string",
"id": 3,
"options": {
"(nanopb).max_size": 15
}
},
"i2cDeviceProperties": {
"rule": "repeated",
"type": "I2CDeviceSensorProperties",
"id": 4,
"options": {
"(nanopb).max_count": 15
}
}
}
},
"I2CDeviceUpdateResponse": {
"fields": {
"i2cDeviceAddress": {
"type": "uint32",
"id": 1
},
"isSuccess": {
"type": "bool",
"id": 2,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"busResponse": {
"type": "BusResponse",
"id": 3
}
}
},
"I2CDeviceDeinitRequest": {
"fields": {
"i2cPortNumber": {
"type": "int32",
"id": 1
},
"i2cDeviceAddress": {
"type": "uint32",
"id": 2
}
}
},
"I2CDeviceDeinitResponse": {
"fields": {
"isSuccess": {
"type": "bool",
"id": 1,
"options": {
"deprecated": true,
"(nanopb).type": "FT_IGNORE"
}
},
"i2cDeviceAddress": {
"type": "uint32",
"id": 2
},
"busResponse": {
"type": "BusResponse",
"id": 3
}
}
},
"SensorType": {
"values": {
"SENSOR_TYPE_UNSPECIFIED": 0,
"SENSOR_TYPE_ACCELEROMETER": 1,
"SENSOR_TYPE_MAGNETIC_FIELD": 2,
"SENSOR_TYPE_ORIENTATION": 3,
"SENSOR_TYPE_GYROSCOPE": 4,
"SENSOR_TYPE_LIGHT": 5,
"SENSOR_TYPE_PRESSURE": 6,
"SENSOR_TYPE_PROXIMITY": 8,
"SENSOR_TYPE_GRAVITY": 9,
"SENSOR_TYPE_LINEAR_ACCELERATION": 10,
"SENSOR_TYPE_ROTATION_VECTOR": 11,
"SENSOR_TYPE_RELATIVE_HUMIDITY": 12,
"SENSOR_TYPE_AMBIENT_TEMPERATURE": 13,
"SENSOR_TYPE_OBJECT_TEMPERATURE": 14,
"SENSOR_TYPE_VOLTAGE": 15,
"SENSOR_TYPE_CURRENT": 16,
"SENSOR_TYPE_COLOR": 17,
"SENSOR_TYPE_RAW": 18,
"SENSOR_TYPE_PM10_STD": 19,
"SENSOR_TYPE_PM25_STD": 20,
"SENSOR_TYPE_PM100_STD": 21,
"SENSOR_TYPE_PM10_ENV": 22,
"SENSOR_TYPE_PM25_ENV": 23,
"SENSOR_TYPE_PM100_ENV": 24,
"SENSOR_TYPE_CO2": 25,
"SENSOR_TYPE_GAS_RESISTANCE": 26,
"SENSOR_TYPE_ALTITUDE": 27,
"SENSOR_TYPE_LUX": 28,
"SENSOR_TYPE_ECO2": 29,
"SENSOR_TYPE_UNITLESS_PERCENT": 30,
"SENSOR_TYPE_AMBIENT_TEMPERATURE_FAHRENHEIT": 31,
"SENSOR_TYPE_OBJECT_TEMPERATURE_FAHRENHEIT": 32
}
},
"SensorEvent": {
"fields": {
"type": {
"type": "SensorType",
"id": 1
},
"value": {
"type": "float",
"id": 2
}
}
},
"I2CDeviceEvent": {
"fields": {
"sensorAddress": {
"type": "uint32",
"id": 1
},
"sensorEvent": {
"rule": "repeated",
"type": "SensorEvent",
"id": 2,
"options": {
"(nanopb).max_count": 15
}
}
}
}
}
}
}
},
"servo": {
"nested": {
"v1": {
"nested": {
"ServoAttachRequest": {
"fields": {
"servoPin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 6
}
},
"servoFreq": {
"type": "int32",
"id": 2
},
"minPulseWidth": {
"type": "int32",
"id": 3
},
"maxPulseWidth": {
"type": "int32",
"id": 4
}
}
},
"ServoAttachResponse": {
"fields": {
"attachSuccess": {
"type": "bool",
"id": 1
},
"servoPin": {
"type": "string",
"id": 2,
"options": {
"(nanopb).max_size": 6
}
}
}
},
"ServoDetachRequest": {
"fields": {
"servoPin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5
}
}
}
},
"ServoWriteRequest": {
"fields": {
"servoPin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5
}
},
"pulseWidth": {
"type": "int32",
"id": 2
}
}
}
}
}
}
},
"pwm": {
"nested": {
"v1": {
"nested": {
"PWMAttachRequest": {
"fields": {
"pin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 6
}
},
"frequency": {
"type": "int32",
"id": 2
},
"resolution": {
"type": "int32",
"id": 3
}
}
},
"PWMAttachResponse": {
"fields": {
"pin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 6
}
},
"didAttach": {
"type": "bool",
"id": 2
}
}
},
"PWMDetachRequest": {
"fields": {
"pin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 6
}
}
}
},
"PWMWriteDutyCycleRequest": {
"fields": {
"pin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 6
}
},
"dutyCycle": {
"type": "int32",
"id": 2
}
}
},
"PWMWriteDutyCycleMultiRequest": {
"fields": {
"writeDutyCycleReq": {
"rule": "repeated",
"type": "PWMWriteDutyCycleRequest",
"id": 1,
"options": {
"(nanopb).max_count": 4
}
}
}
},
"PWMWriteFrequencyRequest": {
"fields": {
"pin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 6
}
},
"frequency": {
"type": "int32",
"id": 2
}
}
}
}
}
}
},
"ds18x20": {
"nested": {
"v1": {
"nested": {
"Ds18x20InitRequest": {
"fields": {
"onewirePin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5
}
},
"sensorResolution": {
"type": "int32",
"id": 2
},
"i2cDeviceProperties": {
"rule": "repeated",
"type": "wippersnapper.i2c.v1.I2CDeviceSensorProperties",
"id": 3,
"options": {
"(nanopb).max_count": 2
}
}
}
},
"Ds18x20InitResponse": {
"fields": {
"isInitialized": {
"type": "bool",
"id": 1
},
"onewirePin": {
"type": "string",
"id": 2,
"options": {
"(nanopb).max_size": 5
}
}
}
},
"Ds18x20DeInitRequest": {
"fields": {
"onewirePin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5
}
}
}
},
"Ds18x20DeviceEvent": {
"fields": {
"onewirePin": {
"type": "string",
"id": 1,
"options": {
"(nanopb).max_size": 5
}
},
"sensorEvent": {
"rule": "repeated",
"type": "wippersnapper.i2c.v1.SensorEvent",
"id": 2,
"options": {
"(nanopb).max_count": 2
}
}
}
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment