From cfa13b99033f935f17a89ed16cc41757aec86c04 Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Tue, 23 Apr 2024 14:37:41 +0200 Subject: [PATCH 01/11] Pull firmware for uint32 block IDs --- brewblox-proto | 2 +- .../proto-compiled/ActuatorAnalogMock_pb2.py | 6 +- .../codec/proto-compiled/ActuatorLogic_pb2.py | 30 +++--- .../proto-compiled/ActuatorOffset_pb2.py | 14 +-- .../codec/proto-compiled/ActuatorPwm_pb2.py | 8 +- .../codec/proto-compiled/Balancer_pb2.py | 10 +- .../codec/proto-compiled/Constraints_pb2.py | 42 ++++---- .../codec/proto-compiled/DS2408_pb2.py | 14 +-- .../codec/proto-compiled/DS2413_pb2.py | 10 +- .../proto-compiled/DigitalActuator_pb2.py | 8 +- .../codec/proto-compiled/DigitalInput_pb2.py | 10 +- .../proto-compiled/DisplaySettings_pb2.py | 16 +-- .../codec/proto-compiled/FastPwm_pb2.py | 8 +- .../codec/proto-compiled/GpioModule_pb2.py | 18 ++-- .../codec/proto-compiled/IoArray_pb2.py | 22 ++-- .../codec/proto-compiled/MotorValve_pb2.py | 12 +-- .../codec/proto-compiled/Pid_pb2.py | 8 +- .../PrecisionAnalogModule_pb2.py | 14 +-- .../codec/proto-compiled/Sequence_pb2.py | 100 +++++++++--------- .../proto-compiled/SetpointProfile_pb2.py | 6 +- .../proto-compiled/SetpointSensorPair_pb2.py | 12 +-- .../proto-compiled/TempSensorAnalog_pb2.py | 14 +-- .../proto-compiled/TempSensorCombi_pb2.py | 10 +- .../proto-compiled/TempSensorOneWire_pb2.py | 6 +- .../codec/proto-compiled/Variables_pb2.py | 14 +-- .../codec/proto-compiled/command_pb2.py | 30 +++--- firmware.ini | 12 +-- 27 files changed, 227 insertions(+), 229 deletions(-) diff --git a/brewblox-proto b/brewblox-proto index 619d55b2..c9c57001 160000 --- a/brewblox-proto +++ b/brewblox-proto @@ -1 +1 @@ -Subproject commit 619d55b27b4b79728f73e74c417c288bda5f03cf +Subproject commit c9c57001df1da71552f0b66df88a8dc510abcfa2 diff --git a/brewblox_devcon_spark/codec/proto-compiled/ActuatorAnalogMock_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/ActuatorAnalogMock_pb2.py index 77936646..e4474bd1 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/ActuatorAnalogMock_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/ActuatorAnalogMock_pb2.py @@ -17,7 +17,7 @@ import Claims_pb2 as Claims__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x41\x63tuatorAnalogMock.proto\x12\x17\x62lox.ActuatorAnalogMock\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\x0c\x43laims.proto\"\xb5\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\r \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\'\n\rstoredSetting\x18\x0b \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 0\x01x\x01\x12(\n\x0e\x64\x65siredSetting\x18\t \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x07setting\x18\x01 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1f\n\x05value\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\"\n\nminSetting\x18\x04 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12\"\n\nmaxSetting\x18\x05 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12 \n\x08minValue\x18\x06 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12 \n\x08maxValue\x18\x07 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12\x44\n\rconstrainedBy\x18\x08 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\x0e \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12!\n\tclaimedBy\x18\n \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0c \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01:\x0e\x8a\xb5\x18\n\x18\xb1\x02J\x05\x01\x05\x13\x0f\x10\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x41\x63tuatorAnalogMock.proto\x12\x17\x62lox.ActuatorAnalogMock\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\x0c\x43laims.proto\"\xb0\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\r \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\'\n\rstoredSetting\x18\x0b \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 0\x01x\x01\x12(\n\x0e\x64\x65siredSetting\x18\t \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x07setting\x18\x01 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1f\n\x05value\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\"\n\nminSetting\x18\x04 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12\"\n\nmaxSetting\x18\x05 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12 \n\x08minValue\x18\x06 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12 \n\x08maxValue\x18\x07 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12\x44\n\rconstrainedBy\x18\x08 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\x0e \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12\x1c\n\tclaimedBy\x18\n \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0c \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01:\x0e\x8a\xb5\x18\n\x18\xb1\x02J\x05\x01\x05\x13\x0f\x10\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -45,11 +45,11 @@ _BLOCK.fields_by_name['constraints']._options = None _BLOCK.fields_by_name['constraints']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['claimedBy']._options = None - _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BLOCK.fields_by_name['settingMode']._options = None _BLOCK.fields_by_name['settingMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\n\030\261\002J\005\001\005\023\017\020' _globals['_BLOCK']._serialized_start=117 - _globals['_BLOCK']._serialized_end=682 + _globals['_BLOCK']._serialized_end=677 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/ActuatorLogic_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/ActuatorLogic_pb2.py index 99be1fcb..70e1859b 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/ActuatorLogic_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/ActuatorLogic_pb2.py @@ -16,7 +16,7 @@ import IoArray_pb2 as IoArray__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x41\x63tuatorLogic.proto\x12\x12\x62lox.ActuatorLogic\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xc9\x01\n\x0e\x44igitalCompare\x12\x37\n\x02op\x18\x01 \x01(\x0e\x32#.blox.ActuatorLogic.DigitalOperatorB\x06\x8a\xb5\x18\x02x\x01\x12\x32\n\x06result\x18\x02 \x01(\x0e\x32\x1a.blox.ActuatorLogic.ResultB\x06\x8a\xb5\x18\x02(\x01\x12\x19\n\x02id\x18\x03 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x1bx\x01\x12/\n\x03rhs\x18\x04 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01\"\xb3\x01\n\rAnalogCompare\x12\x36\n\x02op\x18\x01 \x01(\x0e\x32\".blox.ActuatorLogic.AnalogOperatorB\x06\x8a\xb5\x18\x02x\x01\x12\x32\n\x06result\x18\x02 \x01(\x0e\x32\x1a.blox.ActuatorLogic.ResultB\x06\x8a\xb5\x18\x02(\x01\x12\x19\n\x02id\x18\x03 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x01x\x01\x12\x1b\n\x03rhs\x18\x04 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\"\xea\x02\n\x05\x42lock\x12\x1f\n\x08targetId\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x06x\x01\x12\x17\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x34\n\x06result\x18\x04 \x01(\x0e\x32\x1a.blox.ActuatorLogic.ResultB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x1f\n\nexpression\x18\x05 \x01(\tB\x0b\x92?\x02p@\x8a\xb5\x18\x02x\x01\x12@\n\x07\x64igital\x18\x06 \x03(\x0b\x32\".blox.ActuatorLogic.DigitalCompareB\x0b\x92?\x02\x10\x10\x8a\xb5\x18\x02x\x01\x12>\n\x06\x61nalog\x18\x07 \x03(\x0b\x32!.blox.ActuatorLogic.AnalogCompareB\x0b\x92?\x02\x10\x10\x8a\xb5\x18\x02x\x01\x12\x1d\n\x08\x65rrorPos\x18\x08 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02(\x01\x12#\n\x0e\x64rivenTargetId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xc2\x02J\x01\x0f*\xcb\x03\n\x06Result\x12\x10\n\x0cRESULT_FALSE\x10\x00\x12\x0f\n\x0bRESULT_TRUE\x10\x01\x12\x10\n\x0cRESULT_EMPTY\x10\x02\x12\x1a\n\x16RESULT_EMPTY_SUBSTRING\x10\x03\x12\x1a\n\x16RESULT_BLOCK_NOT_FOUND\x10\x04\x12\x1d\n\x19RESULT_INVALID_DIGITAL_OP\x10\x05\x12\x1c\n\x18RESULT_INVALID_ANALOG_OP\x10\x06\x12$\n RESULT_UNDEFINED_DIGITAL_COMPARE\x10\x08\x12#\n\x1fRESULT_UNDEFINED_ANALOG_COMPARE\x10\x07\x12\"\n\x1eRESULT_UNEXPECTED_OPEN_BRACKET\x10\x0b\x12#\n\x1fRESULT_UNEXPECTED_CLOSE_BRACKET\x10\t\x12\x1f\n\x1bRESULT_UNEXPECTED_CHARACTER\x10\x0c\x12 \n\x1cRESULT_UNEXPECTED_COMPARISON\x10\r\x12\x1e\n\x1aRESULT_UNEXPECTED_OPERATOR\x10\x0e\x12 \n\x1cRESULT_MISSING_CLOSE_BRACKET\x10\n*a\n\x0f\x44igitalOperator\x12\x0f\n\x0bOP_VALUE_IS\x10\x00\x12\x13\n\x0fOP_VALUE_IS_NOT\x10\x01\x12\x11\n\rOP_DESIRED_IS\x10\n\x12\x15\n\x11OP_DESIRED_IS_NOT\x10\x0b*X\n\x0e\x41nalogOperator\x12\x0f\n\x0bOP_VALUE_LE\x10\x00\x12\x0f\n\x0bOP_VALUE_GE\x10\x01\x12\x11\n\rOP_SETTING_LE\x10\n\x12\x11\n\rOP_SETTING_GE\x10\x0b\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13\x41\x63tuatorLogic.proto\x12\x12\x62lox.ActuatorLogic\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xc4\x01\n\x0e\x44igitalCompare\x12\x37\n\x02op\x18\x01 \x01(\x0e\x32#.blox.ActuatorLogic.DigitalOperatorB\x06\x8a\xb5\x18\x02x\x01\x12\x32\n\x06result\x18\x02 \x01(\x0e\x32\x1a.blox.ActuatorLogic.ResultB\x06\x8a\xb5\x18\x02(\x01\x12\x14\n\x02id\x18\x03 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x1bx\x01\x12/\n\x03rhs\x18\x04 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01\"\xae\x01\n\rAnalogCompare\x12\x36\n\x02op\x18\x01 \x01(\x0e\x32\".blox.ActuatorLogic.AnalogOperatorB\x06\x8a\xb5\x18\x02x\x01\x12\x32\n\x06result\x18\x02 \x01(\x0e\x32\x1a.blox.ActuatorLogic.ResultB\x06\x8a\xb5\x18\x02(\x01\x12\x14\n\x02id\x18\x03 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x01x\x01\x12\x1b\n\x03rhs\x18\x04 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\"\xe5\x02\n\x05\x42lock\x12\x1a\n\x08targetId\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x06x\x01\x12\x17\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x34\n\x06result\x18\x04 \x01(\x0e\x32\x1a.blox.ActuatorLogic.ResultB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x1f\n\nexpression\x18\x05 \x01(\tB\x0b\x92?\x02p@\x8a\xb5\x18\x02x\x01\x12@\n\x07\x64igital\x18\x06 \x03(\x0b\x32\".blox.ActuatorLogic.DigitalCompareB\x0b\x92?\x02\x10\x10\x8a\xb5\x18\x02x\x01\x12>\n\x06\x61nalog\x18\x07 \x03(\x0b\x32!.blox.ActuatorLogic.AnalogCompareB\x0b\x92?\x02\x10\x10\x8a\xb5\x18\x02x\x01\x12\x1d\n\x08\x65rrorPos\x18\x08 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02(\x01\x12#\n\x0e\x64rivenTargetId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xc2\x02J\x01\x0f*\xcb\x03\n\x06Result\x12\x10\n\x0cRESULT_FALSE\x10\x00\x12\x0f\n\x0bRESULT_TRUE\x10\x01\x12\x10\n\x0cRESULT_EMPTY\x10\x02\x12\x1a\n\x16RESULT_EMPTY_SUBSTRING\x10\x03\x12\x1a\n\x16RESULT_BLOCK_NOT_FOUND\x10\x04\x12\x1d\n\x19RESULT_INVALID_DIGITAL_OP\x10\x05\x12\x1c\n\x18RESULT_INVALID_ANALOG_OP\x10\x06\x12$\n RESULT_UNDEFINED_DIGITAL_COMPARE\x10\x08\x12#\n\x1fRESULT_UNDEFINED_ANALOG_COMPARE\x10\x07\x12\"\n\x1eRESULT_UNEXPECTED_OPEN_BRACKET\x10\x0b\x12#\n\x1fRESULT_UNEXPECTED_CLOSE_BRACKET\x10\t\x12\x1f\n\x1bRESULT_UNEXPECTED_CHARACTER\x10\x0c\x12 \n\x1cRESULT_UNEXPECTED_COMPARISON\x10\r\x12\x1e\n\x1aRESULT_UNEXPECTED_OPERATOR\x10\x0e\x12 \n\x1cRESULT_MISSING_CLOSE_BRACKET\x10\n*a\n\x0f\x44igitalOperator\x12\x0f\n\x0bOP_VALUE_IS\x10\x00\x12\x13\n\x0fOP_VALUE_IS_NOT\x10\x01\x12\x11\n\rOP_DESIRED_IS\x10\n\x12\x15\n\x11OP_DESIRED_IS_NOT\x10\x0b*X\n\x0e\x41nalogOperator\x12\x0f\n\x0bOP_VALUE_LE\x10\x00\x12\x0f\n\x0bOP_VALUE_GE\x10\x01\x12\x11\n\rOP_SETTING_LE\x10\n\x12\x11\n\rOP_SETTING_GE\x10\x0b\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,7 +28,7 @@ _DIGITALCOMPARE.fields_by_name['result']._options = None _DIGITALCOMPARE.fields_by_name['result']._serialized_options = b'\212\265\030\002(\001' _DIGITALCOMPARE.fields_by_name['id']._options = None - _DIGITALCOMPARE.fields_by_name['id']._serialized_options = b'\222?\0028\020\212\265\030\004\030\033x\001' + _DIGITALCOMPARE.fields_by_name['id']._serialized_options = b'\212\265\030\004\030\033x\001' _DIGITALCOMPARE.fields_by_name['rhs']._options = None _DIGITALCOMPARE.fields_by_name['rhs']._serialized_options = b'\212\265\030\002x\001' _ANALOGCOMPARE.fields_by_name['op']._options = None @@ -36,11 +36,11 @@ _ANALOGCOMPARE.fields_by_name['result']._options = None _ANALOGCOMPARE.fields_by_name['result']._serialized_options = b'\212\265\030\002(\001' _ANALOGCOMPARE.fields_by_name['id']._options = None - _ANALOGCOMPARE.fields_by_name['id']._serialized_options = b'\222?\0028\020\212\265\030\004\030\001x\001' + _ANALOGCOMPARE.fields_by_name['id']._serialized_options = b'\212\265\030\004\030\001x\001' _ANALOGCOMPARE.fields_by_name['rhs']._options = None _ANALOGCOMPARE.fields_by_name['rhs']._serialized_options = b'\222?\0028 \212\265\030\005\020\200 x\001' _BLOCK.fields_by_name['targetId']._options = None - _BLOCK.fields_by_name['targetId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\006x\001' + _BLOCK.fields_by_name['targetId']._serialized_options = b'\212\265\030\004\030\006x\001' _BLOCK.fields_by_name['enabled']._options = None _BLOCK.fields_by_name['enabled']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['result']._options = None @@ -57,16 +57,16 @@ _BLOCK.fields_by_name['drivenTargetId']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\006\030\302\002J\001\017' - _globals['_RESULT']._serialized_start=840 - _globals['_RESULT']._serialized_end=1299 - _globals['_DIGITALOPERATOR']._serialized_start=1301 - _globals['_DIGITALOPERATOR']._serialized_end=1398 - _globals['_ANALOGOPERATOR']._serialized_start=1400 - _globals['_ANALOGOPERATOR']._serialized_end=1488 + _globals['_RESULT']._serialized_start=825 + _globals['_RESULT']._serialized_end=1284 + _globals['_DIGITALOPERATOR']._serialized_start=1286 + _globals['_DIGITALOPERATOR']._serialized_end=1383 + _globals['_ANALOGOPERATOR']._serialized_start=1385 + _globals['_ANALOGOPERATOR']._serialized_end=1473 _globals['_DIGITALCOMPARE']._serialized_start=89 - _globals['_DIGITALCOMPARE']._serialized_end=290 - _globals['_ANALOGCOMPARE']._serialized_start=293 - _globals['_ANALOGCOMPARE']._serialized_end=472 - _globals['_BLOCK']._serialized_start=475 - _globals['_BLOCK']._serialized_end=837 + _globals['_DIGITALCOMPARE']._serialized_end=285 + _globals['_ANALOGCOMPARE']._serialized_start=288 + _globals['_ANALOGCOMPARE']._serialized_end=462 + _globals['_BLOCK']._serialized_start=465 + _globals['_BLOCK']._serialized_end=822 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/ActuatorOffset_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/ActuatorOffset_pb2.py index 5acb4be2..52db40ab 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/ActuatorOffset_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/ActuatorOffset_pb2.py @@ -17,7 +17,7 @@ import Claims_pb2 as Claims__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x41\x63tuatorOffset.proto\x12\x13\x62lox.ActuatorOffset\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\x0c\x43laims.proto\"\xe8\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\n \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1f\n\x08targetId\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x04x\x01\x12\"\n\x0breferenceId\x18\x03 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x04x\x01\x12)\n\rstoredSetting\x18\r \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 0\x01x\x01\x12*\n\x0e\x64\x65siredSetting\x18\x0b \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12#\n\x07setting\x18\x06 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12!\n\x05value\x18\x07 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12K\n\x17referenceSettingOrValue\x18\x04 \x01(\x0e\x32\".blox.ActuatorOffset.ReferenceKindB\x06\x8a\xb5\x18\x02x\x01\x12\x44\n\rconstrainedBy\x18\x08 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\x0f \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12!\n\tclaimedBy\x18\x0c \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0e \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12#\n\x0e\x64rivenTargetId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0e\x8a\xb5\x18\n\x18\xb4\x02J\x05\x01\x05\x13\x0f\x10*/\n\rReferenceKind\x12\x0f\n\x0bREF_SETTING\x10\x00\x12\r\n\tREF_VALUE\x10\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x41\x63tuatorOffset.proto\x12\x13\x62lox.ActuatorOffset\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\x0c\x43laims.proto\"\xd9\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\n \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1a\n\x08targetId\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x04x\x01\x12\x1d\n\x0breferenceId\x18\x03 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x04x\x01\x12)\n\rstoredSetting\x18\r \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 0\x01x\x01\x12*\n\x0e\x64\x65siredSetting\x18\x0b \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12#\n\x07setting\x18\x06 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12!\n\x05value\x18\x07 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12K\n\x17referenceSettingOrValue\x18\x04 \x01(\x0e\x32\".blox.ActuatorOffset.ReferenceKindB\x06\x8a\xb5\x18\x02x\x01\x12\x44\n\rconstrainedBy\x18\x08 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\x0f \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12\x1c\n\tclaimedBy\x18\x0c \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0e \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12#\n\x0e\x64rivenTargetId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0e\x8a\xb5\x18\n\x18\xb4\x02J\x05\x01\x05\x13\x0f\x10*/\n\rReferenceKind\x12\x0f\n\x0bREF_SETTING\x10\x00\x12\r\n\tREF_VALUE\x10\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -27,9 +27,9 @@ _BLOCK.fields_by_name['enabled']._options = None _BLOCK.fields_by_name['enabled']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['targetId']._options = None - _BLOCK.fields_by_name['targetId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\004x\001' + _BLOCK.fields_by_name['targetId']._serialized_options = b'\212\265\030\004\030\004x\001' _BLOCK.fields_by_name['referenceId']._options = None - _BLOCK.fields_by_name['referenceId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\004x\001' + _BLOCK.fields_by_name['referenceId']._serialized_options = b'\212\265\030\004\030\004x\001' _BLOCK.fields_by_name['storedSetting']._options = None _BLOCK.fields_by_name['storedSetting']._serialized_options = b'\222?\0028 \212\265\030\t\010\006\020\200 0\001x\001' _BLOCK.fields_by_name['desiredSetting']._options = None @@ -43,15 +43,15 @@ _BLOCK.fields_by_name['constraints']._options = None _BLOCK.fields_by_name['constraints']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['claimedBy']._options = None - _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BLOCK.fields_by_name['settingMode']._options = None _BLOCK.fields_by_name['settingMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['drivenTargetId']._options = None _BLOCK.fields_by_name['drivenTargetId']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\n\030\264\002J\005\001\005\023\017\020' - _globals['_REFERENCEKIND']._serialized_start=727 - _globals['_REFERENCEKIND']._serialized_end=774 + _globals['_REFERENCEKIND']._serialized_start=712 + _globals['_REFERENCEKIND']._serialized_end=759 _globals['_BLOCK']._serialized_start=109 - _globals['_BLOCK']._serialized_end=725 + _globals['_BLOCK']._serialized_end=710 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/ActuatorPwm_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/ActuatorPwm_pb2.py index 322566a3..62890bcb 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/ActuatorPwm_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/ActuatorPwm_pb2.py @@ -17,7 +17,7 @@ import Claims_pb2 as Claims__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x41\x63tuatorPwm.proto\x12\x10\x62lox.ActuatorPwm\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\x0c\x43laims.proto\"\x90\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\x08 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12!\n\nactuatorId\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x06x\x01\x12\'\n\rstoredSetting\x18\x0b \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 0\x01x\x01\x12(\n\x0e\x64\x65siredSetting\x18\t \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x07setting\x18\x04 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1f\n\x05value\x18\x05 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1b\n\x06period\x18\x03 \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x44\n\rconstrainedBy\x18\x06 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\r \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12!\n\tclaimedBy\x18\n \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0c \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12%\n\x10\x64rivenActuatorId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0e\x8a\xb5\x18\n\x18\xb3\x02J\x05\x01\x05\x13\x0f\x10\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x41\x63tuatorPwm.proto\x12\x10\x62lox.ActuatorPwm\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\x0c\x43laims.proto\"\x86\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\x08 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1c\n\nactuatorId\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x06x\x01\x12\'\n\rstoredSetting\x18\x0b \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 0\x01x\x01\x12(\n\x0e\x64\x65siredSetting\x18\t \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x07setting\x18\x04 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1f\n\x05value\x18\x05 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1b\n\x06period\x18\x03 \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x44\n\rconstrainedBy\x18\x06 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\r \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12\x1c\n\tclaimedBy\x18\n \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0c \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12%\n\x10\x64rivenActuatorId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0e\x8a\xb5\x18\n\x18\xb3\x02J\x05\x01\x05\x13\x0f\x10\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -27,7 +27,7 @@ _BLOCK.fields_by_name['enabled']._options = None _BLOCK.fields_by_name['enabled']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['actuatorId']._options = None - _BLOCK.fields_by_name['actuatorId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\006x\001' + _BLOCK.fields_by_name['actuatorId']._serialized_options = b'\212\265\030\004\030\006x\001' _BLOCK.fields_by_name['storedSetting']._options = None _BLOCK.fields_by_name['storedSetting']._serialized_options = b'\222?\0028 \212\265\030\007\020\200 0\001x\001' _BLOCK.fields_by_name['desiredSetting']._options = None @@ -41,7 +41,7 @@ _BLOCK.fields_by_name['constraints']._options = None _BLOCK.fields_by_name['constraints']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['claimedBy']._options = None - _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BLOCK.fields_by_name['settingMode']._options = None _BLOCK.fields_by_name['settingMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['drivenActuatorId']._options = None @@ -49,5 +49,5 @@ _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\n\030\263\002J\005\001\005\023\017\020' _globals['_BLOCK']._serialized_start=103 - _globals['_BLOCK']._serialized_end=631 + _globals['_BLOCK']._serialized_end=621 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/Balancer_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/Balancer_pb2.py index 89bfd2b6..0092bbc3 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/Balancer_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/Balancer_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x42\x61lancer.proto\x12\rblox.Balancer\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"r\n\x10\x42\x61lancedActuator\x12\x1a\n\x02id\x18\x01 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12!\n\trequested\x18\x02 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 (\x01\x12\x1f\n\x07granted\x18\x03 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 (\x01\"M\n\x05\x42lock\x12\x38\n\x07\x63lients\x18\x01 \x03(\x0b\x32\x1f.blox.Balancer.BalancedActuatorB\x06\x8a\xb5\x18\x02(\x01:\n\x8a\xb5\x18\x06\x18\xb5\x02J\x01\x07\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x42\x61lancer.proto\x12\rblox.Balancer\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"m\n\x10\x42\x61lancedActuator\x12\x15\n\x02id\x18\x01 \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12!\n\trequested\x18\x02 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 (\x01\x12\x1f\n\x07granted\x18\x03 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 (\x01\"M\n\x05\x42lock\x12\x38\n\x07\x63lients\x18\x01 \x03(\x0b\x32\x1f.blox.Balancer.BalancedActuatorB\x06\x8a\xb5\x18\x02(\x01:\n\x8a\xb5\x18\x06\x18\xb5\x02J\x01\x07\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,7 +23,7 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _BALANCEDACTUATOR.fields_by_name['id']._options = None - _BALANCEDACTUATOR.fields_by_name['id']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BALANCEDACTUATOR.fields_by_name['id']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BALANCEDACTUATOR.fields_by_name['requested']._options = None _BALANCEDACTUATOR.fields_by_name['requested']._serialized_options = b'\222?\0028 \212\265\030\005\020\200 (\001' _BALANCEDACTUATOR.fields_by_name['granted']._options = None @@ -33,7 +33,7 @@ _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\006\030\265\002J\001\007' _globals['_BALANCEDACTUATOR']._serialized_start=63 - _globals['_BALANCEDACTUATOR']._serialized_end=177 - _globals['_BLOCK']._serialized_start=179 - _globals['_BLOCK']._serialized_end=256 + _globals['_BALANCEDACTUATOR']._serialized_end=172 + _globals['_BLOCK']._serialized_start=174 + _globals['_BLOCK']._serialized_end=251 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/Constraints_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/Constraints_pb2.py index 2f54dc19..d5b37c46 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/Constraints_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/Constraints_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x43onstraints.proto\x12\x10\x62lox.Constraints\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"c\n\x0fValueConstraint\x12\x1d\n\x05value\x18\x01 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\"\x9f\x01\n\x12\x42\x61lancedConstraint\x12!\n\nbalancerId\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x07x\x01\x12\x1a\n\x07granted\x18\x02 \x01(\rB\t\x8a\xb5\x18\x05\x10\x80 (\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12\x17\n\x02id\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\"\x90\x01\n\x12\x44urationConstraint\x12\"\n\x08\x64uration\x18\x01 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12#\n\tremaining\x18\x34 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\"\xf5\x01\n\x11MutexedConstraint\x12\x1e\n\x07mutexId\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x08x\x01\x12\'\n\rextraHoldTime\x18\x02 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x17\n\x07hasLock\x18\x04 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12#\n\tremaining\x18\x34 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x12&\n\x11hasCustomHoldTime\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\"\xc3\x01\n\x11\x41nalogConstraints\x12\x36\n\x03min\x18\x01 \x01(\x0b\x32!.blox.Constraints.ValueConstraintB\x06\x8a\xb5\x18\x02x\x01\x12\x36\n\x03max\x18\x02 \x01(\x0b\x32!.blox.Constraints.ValueConstraintB\x06\x8a\xb5\x18\x02x\x01\x12>\n\x08\x62\x61lanced\x18\x03 \x01(\x0b\x32$.blox.Constraints.BalancedConstraintB\x06\x8a\xb5\x18\x02x\x01\"\xd0\x02\n\x12\x44igitalConstraints\x12<\n\x06minOff\x18\x01 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12;\n\x05minOn\x18\x02 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12@\n\ndelayedOff\x18\x03 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12?\n\tdelayedOn\x18\x04 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12<\n\x07mutexed\x18\x05 \x01(\x0b\x32#.blox.Constraints.MutexedConstraintB\x06\x8a\xb5\x18\x02x\x01\"\xb8\x01\n\x1a\x44\x65precatedAnalogConstraint\x12\x1b\n\x03min\x18\x01 \x01(\x11\x42\x0c\x92?\x02\x38 \x8a\xb5\x18\x03\x10\x80 H\x00\x12\x1b\n\x03max\x18\x02 \x01(\x11\x42\x0c\x92?\x02\x38 \x8a\xb5\x18\x03\x10\x80 H\x00\x12\x38\n\x08\x62\x61lanced\x18\x03 \x01(\x0b\x32$.blox.Constraints.BalancedConstraintH\x00\x12\x18\n\x08limiting\x18\x64 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x42\x0c\n\nconstraint\"g\n\x1b\x44\x65precatedAnalogConstraints\x12H\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32,.blox.Constraints.DeprecatedAnalogConstraintB\x05\x92?\x02\x10\x08\"\xd3\x02\n\x1b\x44\x65precatedDigitalConstraint\x12 \n\x06minOff\x18\x01 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12\x1f\n\x05minOn\x18\x02 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12\x36\n\x07mutexed\x18\x04 \x01(\x0b\x32#.blox.Constraints.MutexedConstraintH\x00\x12$\n\ndelayedOff\x18\x05 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12#\n\tdelayedOn\x18\x06 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12\x1c\n\x05mutex\x18\x03 \x01(\rB\x0b\x92?\x02\x38\x10\x8a\xb5\x18\x02\x18\x08H\x00\x12\x1d\n\x08limiting\x18\x64 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12#\n\tremaining\x18\x65 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x42\x0c\n\nconstraint\"i\n\x1c\x44\x65precatedDigitalConstraints\x12I\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32-.blox.Constraints.DeprecatedDigitalConstraintB\x05\x92?\x02\x10\x08\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x43onstraints.proto\x12\x10\x62lox.Constraints\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"c\n\x0fValueConstraint\x12\x1d\n\x05value\x18\x01 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\"\x9a\x01\n\x12\x42\x61lancedConstraint\x12\x1c\n\nbalancerId\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x07x\x01\x12\x1a\n\x07granted\x18\x02 \x01(\rB\t\x8a\xb5\x18\x05\x10\x80 (\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12\x17\n\x02id\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\"\x90\x01\n\x12\x44urationConstraint\x12\"\n\x08\x64uration\x18\x01 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12#\n\tremaining\x18\x34 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\"\xf0\x01\n\x11MutexedConstraint\x12\x19\n\x07mutexId\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x08x\x01\x12\'\n\rextraHoldTime\x18\x02 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x17\n\x07hasLock\x18\x04 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12\x17\n\x07\x65nabled\x18\x32 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x18\n\x08limiting\x18\x33 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12#\n\tremaining\x18\x34 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x12&\n\x11hasCustomHoldTime\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\"\xc3\x01\n\x11\x41nalogConstraints\x12\x36\n\x03min\x18\x01 \x01(\x0b\x32!.blox.Constraints.ValueConstraintB\x06\x8a\xb5\x18\x02x\x01\x12\x36\n\x03max\x18\x02 \x01(\x0b\x32!.blox.Constraints.ValueConstraintB\x06\x8a\xb5\x18\x02x\x01\x12>\n\x08\x62\x61lanced\x18\x03 \x01(\x0b\x32$.blox.Constraints.BalancedConstraintB\x06\x8a\xb5\x18\x02x\x01\"\xd0\x02\n\x12\x44igitalConstraints\x12<\n\x06minOff\x18\x01 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12;\n\x05minOn\x18\x02 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12@\n\ndelayedOff\x18\x03 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12?\n\tdelayedOn\x18\x04 \x01(\x0b\x32$.blox.Constraints.DurationConstraintB\x06\x8a\xb5\x18\x02x\x01\x12<\n\x07mutexed\x18\x05 \x01(\x0b\x32#.blox.Constraints.MutexedConstraintB\x06\x8a\xb5\x18\x02x\x01\"\xb8\x01\n\x1a\x44\x65precatedAnalogConstraint\x12\x1b\n\x03min\x18\x01 \x01(\x11\x42\x0c\x92?\x02\x38 \x8a\xb5\x18\x03\x10\x80 H\x00\x12\x1b\n\x03max\x18\x02 \x01(\x11\x42\x0c\x92?\x02\x38 \x8a\xb5\x18\x03\x10\x80 H\x00\x12\x38\n\x08\x62\x61lanced\x18\x03 \x01(\x0b\x32$.blox.Constraints.BalancedConstraintH\x00\x12\x18\n\x08limiting\x18\x64 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x42\x0c\n\nconstraint\"g\n\x1b\x44\x65precatedAnalogConstraints\x12H\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32,.blox.Constraints.DeprecatedAnalogConstraintB\x05\x92?\x02\x10\x08\"\xce\x02\n\x1b\x44\x65precatedDigitalConstraint\x12 \n\x06minOff\x18\x01 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12\x1f\n\x05minOn\x18\x02 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12\x36\n\x07mutexed\x18\x04 \x01(\x0b\x32#.blox.Constraints.MutexedConstraintH\x00\x12$\n\ndelayedOff\x18\x05 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12#\n\tdelayedOn\x18\x06 \x01(\rB\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x08\x03\x10\xe8\x07H\x00\x12\x17\n\x05mutex\x18\x03 \x01(\rB\x06\x8a\xb5\x18\x02\x18\x08H\x00\x12\x1d\n\x08limiting\x18\x64 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12#\n\tremaining\x18\x65 \x01(\rB\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x42\x0c\n\nconstraint\"i\n\x1c\x44\x65precatedDigitalConstraints\x12I\n\x0b\x63onstraints\x18\x01 \x03(\x0b\x32-.blox.Constraints.DeprecatedDigitalConstraintB\x05\x92?\x02\x10\x08\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,7 +29,7 @@ _VALUECONSTRAINT.fields_by_name['limiting']._options = None _VALUECONSTRAINT.fields_by_name['limiting']._serialized_options = b'\212\265\030\002(\001' _BALANCEDCONSTRAINT.fields_by_name['balancerId']._options = None - _BALANCEDCONSTRAINT.fields_by_name['balancerId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\007x\001' + _BALANCEDCONSTRAINT.fields_by_name['balancerId']._serialized_options = b'\212\265\030\004\030\007x\001' _BALANCEDCONSTRAINT.fields_by_name['granted']._options = None _BALANCEDCONSTRAINT.fields_by_name['granted']._serialized_options = b'\212\265\030\005\020\200 (\001' _BALANCEDCONSTRAINT.fields_by_name['enabled']._options = None @@ -47,7 +47,7 @@ _DURATIONCONSTRAINT.fields_by_name['remaining']._options = None _DURATIONCONSTRAINT.fields_by_name['remaining']._serialized_options = b'\222?\0028 \212\265\030\007\010\003\020\350\007(\001' _MUTEXEDCONSTRAINT.fields_by_name['mutexId']._options = None - _MUTEXEDCONSTRAINT.fields_by_name['mutexId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\010x\001' + _MUTEXEDCONSTRAINT.fields_by_name['mutexId']._serialized_options = b'\212\265\030\004\030\010x\001' _MUTEXEDCONSTRAINT.fields_by_name['extraHoldTime']._options = None _MUTEXEDCONSTRAINT.fields_by_name['extraHoldTime']._serialized_options = b'\222?\0028 \212\265\030\007\010\003\020\350\007x\001' _MUTEXEDCONSTRAINT.fields_by_name['hasLock']._options = None @@ -93,7 +93,7 @@ _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['delayedOn']._options = None _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['delayedOn']._serialized_options = b'\222?\0028 \212\265\030\005\010\003\020\350\007' _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['mutex']._options = None - _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['mutex']._serialized_options = b'\222?\0028\020\212\265\030\002\030\010' + _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['mutex']._serialized_options = b'\212\265\030\002\030\010' _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['limiting']._options = None _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['limiting']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _DEPRECATEDDIGITALCONSTRAINT.fields_by_name['remaining']._options = None @@ -103,21 +103,21 @@ _globals['_VALUECONSTRAINT']._serialized_start=69 _globals['_VALUECONSTRAINT']._serialized_end=168 _globals['_BALANCEDCONSTRAINT']._serialized_start=171 - _globals['_BALANCEDCONSTRAINT']._serialized_end=330 - _globals['_DURATIONCONSTRAINT']._serialized_start=333 - _globals['_DURATIONCONSTRAINT']._serialized_end=477 - _globals['_MUTEXEDCONSTRAINT']._serialized_start=480 - _globals['_MUTEXEDCONSTRAINT']._serialized_end=725 - _globals['_ANALOGCONSTRAINTS']._serialized_start=728 - _globals['_ANALOGCONSTRAINTS']._serialized_end=923 - _globals['_DIGITALCONSTRAINTS']._serialized_start=926 - _globals['_DIGITALCONSTRAINTS']._serialized_end=1262 - _globals['_DEPRECATEDANALOGCONSTRAINT']._serialized_start=1265 - _globals['_DEPRECATEDANALOGCONSTRAINT']._serialized_end=1449 - _globals['_DEPRECATEDANALOGCONSTRAINTS']._serialized_start=1451 - _globals['_DEPRECATEDANALOGCONSTRAINTS']._serialized_end=1554 - _globals['_DEPRECATEDDIGITALCONSTRAINT']._serialized_start=1557 - _globals['_DEPRECATEDDIGITALCONSTRAINT']._serialized_end=1896 - _globals['_DEPRECATEDDIGITALCONSTRAINTS']._serialized_start=1898 - _globals['_DEPRECATEDDIGITALCONSTRAINTS']._serialized_end=2003 + _globals['_BALANCEDCONSTRAINT']._serialized_end=325 + _globals['_DURATIONCONSTRAINT']._serialized_start=328 + _globals['_DURATIONCONSTRAINT']._serialized_end=472 + _globals['_MUTEXEDCONSTRAINT']._serialized_start=475 + _globals['_MUTEXEDCONSTRAINT']._serialized_end=715 + _globals['_ANALOGCONSTRAINTS']._serialized_start=718 + _globals['_ANALOGCONSTRAINTS']._serialized_end=913 + _globals['_DIGITALCONSTRAINTS']._serialized_start=916 + _globals['_DIGITALCONSTRAINTS']._serialized_end=1252 + _globals['_DEPRECATEDANALOGCONSTRAINT']._serialized_start=1255 + _globals['_DEPRECATEDANALOGCONSTRAINT']._serialized_end=1439 + _globals['_DEPRECATEDANALOGCONSTRAINTS']._serialized_start=1441 + _globals['_DEPRECATEDANALOGCONSTRAINTS']._serialized_end=1544 + _globals['_DEPRECATEDDIGITALCONSTRAINT']._serialized_start=1547 + _globals['_DEPRECATEDDIGITALCONSTRAINT']._serialized_end=1881 + _globals['_DEPRECATEDDIGITALCONSTRAINTS']._serialized_start=1883 + _globals['_DEPRECATEDDIGITALCONSTRAINTS']._serialized_end=1988 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/DS2408_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/DS2408_pb2.py index cf8a4373..7ed61c20 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/DS2408_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/DS2408_pb2.py @@ -16,7 +16,7 @@ import IoArray_pb2 as IoArray__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x44S2408.proto\x12\x0b\x62lox.DS2408\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xfe\x01\n\x05\x42lock\x12\x19\n\x07\x61\x64\x64ress\x18\x01 \x01(\x06\x42\x08\x8a\xb5\x18\x04 \x01x\x01\x12\x19\n\tconnected\x18\x06 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12\x38\n\x0b\x63onnectMode\x18\t \x01(\x0e\x32\x1b.blox.DS2408.PinConnectModeB\x06\x8a\xb5\x18\x02x\x01\x12$\n\x0coneWireBusId\x18\n \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\x82\x02(\x01\x12\x36\n\x08\x63hannels\x18\x0b \x03(\x0b\x32\x17.blox.IoArray.IoChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02(\x01\x12\x19\n\x04pins\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0c\x8a\xb5\x18\x08\x18\xbd\x02J\x03\n\x0b\t*\xfc\x01\n\tChannelId\x12\x14\n\x10\x44S2408_CHAN_NONE\x10\x00\x12\x11\n\rDS2408_CHAN_A\x10\x01\x12\x11\n\rDS2408_CHAN_B\x10\x02\x12\x11\n\rDS2408_CHAN_C\x10\x03\x12\x11\n\rDS2408_CHAN_D\x10\x04\x12\x11\n\rDS2408_CHAN_E\x10\x05\x12\x11\n\rDS2408_CHAN_F\x10\x06\x12\x11\n\rDS2408_CHAN_G\x10\x07\x12\x11\n\rDS2408_CHAN_H\x10\x08\x12\x15\n\x11\x44S2408_VALVE_NONE\x10\x00\x12\x12\n\x0e\x44S2408_VALVE_A\x10\x05\x12\x12\n\x0e\x44S2408_VALVE_B\x10\x01\x1a\x02\x10\x01*9\n\x0ePinConnectMode\x12\x11\n\rCONNECT_VALVE\x10\x00\x12\x14\n\x10\x43ONNECT_ACTUATOR\x10\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x44S2408.proto\x12\x0b\x62lox.DS2408\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xf9\x01\n\x05\x42lock\x12\x19\n\x07\x61\x64\x64ress\x18\x01 \x01(\x06\x42\x08\x8a\xb5\x18\x04 \x01x\x01\x12\x19\n\tconnected\x18\x06 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12\x38\n\x0b\x63onnectMode\x18\t \x01(\x0e\x32\x1b.blox.DS2408.PinConnectModeB\x06\x8a\xb5\x18\x02x\x01\x12\x1f\n\x0coneWireBusId\x18\n \x01(\rB\t\x8a\xb5\x18\x05\x18\x82\x02(\x01\x12\x36\n\x08\x63hannels\x18\x0b \x03(\x0b\x32\x17.blox.IoArray.IoChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02(\x01\x12\x19\n\x04pins\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0c\x8a\xb5\x18\x08\x18\xbd\x02J\x03\n\x0b\t*\xfc\x01\n\tChannelId\x12\x14\n\x10\x44S2408_CHAN_NONE\x10\x00\x12\x11\n\rDS2408_CHAN_A\x10\x01\x12\x11\n\rDS2408_CHAN_B\x10\x02\x12\x11\n\rDS2408_CHAN_C\x10\x03\x12\x11\n\rDS2408_CHAN_D\x10\x04\x12\x11\n\rDS2408_CHAN_E\x10\x05\x12\x11\n\rDS2408_CHAN_F\x10\x06\x12\x11\n\rDS2408_CHAN_G\x10\x07\x12\x11\n\rDS2408_CHAN_H\x10\x08\x12\x15\n\x11\x44S2408_VALVE_NONE\x10\x00\x12\x12\n\x0e\x44S2408_VALVE_A\x10\x05\x12\x12\n\x0e\x44S2408_VALVE_B\x10\x01\x1a\x02\x10\x01*9\n\x0ePinConnectMode\x12\x11\n\rCONNECT_VALVE\x10\x00\x12\x14\n\x10\x43ONNECT_ACTUATOR\x10\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,17 +32,17 @@ _BLOCK.fields_by_name['connectMode']._options = None _BLOCK.fields_by_name['connectMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['oneWireBusId']._options = None - _BLOCK.fields_by_name['oneWireBusId']._serialized_options = b'\222?\0028\020\212\265\030\005\030\202\002(\001' + _BLOCK.fields_by_name['oneWireBusId']._serialized_options = b'\212\265\030\005\030\202\002(\001' _BLOCK.fields_by_name['channels']._options = None _BLOCK.fields_by_name['channels']._serialized_options = b'\222?\002\020\010\212\265\030\002(\001' _BLOCK.fields_by_name['pins']._options = None _BLOCK.fields_by_name['pins']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\010\030\275\002J\003\n\013\t' - _globals['_CHANNELID']._serialized_start=332 - _globals['_CHANNELID']._serialized_end=584 - _globals['_PINCONNECTMODE']._serialized_start=586 - _globals['_PINCONNECTMODE']._serialized_end=643 + _globals['_CHANNELID']._serialized_start=327 + _globals['_CHANNELID']._serialized_end=579 + _globals['_PINCONNECTMODE']._serialized_start=581 + _globals['_PINCONNECTMODE']._serialized_end=638 _globals['_BLOCK']._serialized_start=75 - _globals['_BLOCK']._serialized_end=329 + _globals['_BLOCK']._serialized_end=324 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/DS2413_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/DS2413_pb2.py index 1eb0155a..c64799e7 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/DS2413_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/DS2413_pb2.py @@ -16,7 +16,7 @@ import IoArray_pb2 as IoArray__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x44S2413.proto\x12\x0b\x62lox.DS2413\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xc5\x01\n\x05\x42lock\x12\x19\n\x07\x61\x64\x64ress\x18\x01 \x01(\x06\x42\x08\x8a\xb5\x18\x04 \x01x\x01\x12\x19\n\tconnected\x18\x06 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12$\n\x0coneWireBusId\x18\x08 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\x82\x02(\x01\x12\x38\n\x08\x63hannels\x18\t \x03(\x0b\x32\x17.blox.IoArray.IoChannelB\r\x92?\x04\x10\x02x\x01\x8a\xb5\x18\x02(\x01\x12\x19\n\x04pins\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0b\x8a\xb5\x18\x07\x18\xbb\x02J\x02\n\t*G\n\tChannelId\x12\x14\n\x10\x44S2413_CHAN_NONE\x10\x00\x12\x11\n\rDS2413_CHAN_A\x10\x01\x12\x11\n\rDS2413_CHAN_B\x10\x02\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x44S2413.proto\x12\x0b\x62lox.DS2413\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xc0\x01\n\x05\x42lock\x12\x19\n\x07\x61\x64\x64ress\x18\x01 \x01(\x06\x42\x08\x8a\xb5\x18\x04 \x01x\x01\x12\x19\n\tconnected\x18\x06 \x01(\x08\x42\x06\x8a\xb5\x18\x02(\x01\x12\x1f\n\x0coneWireBusId\x18\x08 \x01(\rB\t\x8a\xb5\x18\x05\x18\x82\x02(\x01\x12\x38\n\x08\x63hannels\x18\t \x03(\x0b\x32\x17.blox.IoArray.IoChannelB\r\x92?\x04\x10\x02x\x01\x8a\xb5\x18\x02(\x01\x12\x19\n\x04pins\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0b\x8a\xb5\x18\x07\x18\xbb\x02J\x02\n\t*G\n\tChannelId\x12\x14\n\x10\x44S2413_CHAN_NONE\x10\x00\x12\x11\n\rDS2413_CHAN_A\x10\x01\x12\x11\n\rDS2413_CHAN_B\x10\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,15 +28,15 @@ _BLOCK.fields_by_name['connected']._options = None _BLOCK.fields_by_name['connected']._serialized_options = b'\212\265\030\002(\001' _BLOCK.fields_by_name['oneWireBusId']._options = None - _BLOCK.fields_by_name['oneWireBusId']._serialized_options = b'\222?\0028\020\212\265\030\005\030\202\002(\001' + _BLOCK.fields_by_name['oneWireBusId']._serialized_options = b'\212\265\030\005\030\202\002(\001' _BLOCK.fields_by_name['channels']._options = None _BLOCK.fields_by_name['channels']._serialized_options = b'\222?\004\020\002x\001\212\265\030\002(\001' _BLOCK.fields_by_name['pins']._options = None _BLOCK.fields_by_name['pins']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\007\030\273\002J\002\n\t' - _globals['_CHANNELID']._serialized_start=274 - _globals['_CHANNELID']._serialized_end=345 + _globals['_CHANNELID']._serialized_start=269 + _globals['_CHANNELID']._serialized_end=340 _globals['_BLOCK']._serialized_start=75 - _globals['_BLOCK']._serialized_end=272 + _globals['_BLOCK']._serialized_end=267 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/DigitalActuator_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/DigitalActuator_pb2.py index 4060d412..1f44d69a 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/DigitalActuator_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/DigitalActuator_pb2.py @@ -18,7 +18,7 @@ import Claims_pb2 as Claims__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x44igitalActuator.proto\x12\x14\x62lox.DigitalActuator\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\rIoArray.proto\x1a\x0c\x43laims.proto\"\xad\x05\n\x05\x42lock\x12\x1f\n\x08hwDevice\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\nx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x39\n\x0bstoredState\x18\x0b \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12:\n\x0c\x64\x65siredState\x18\x06 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x33\n\x05state\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x16\n\x06invert\x18\x04 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x45\n\rconstrainedBy\x18\x05 \x01(\x0b\x32..blox.Constraints.DeprecatedDigitalConstraints\x12\x41\n\x0b\x63onstraints\x18\r \x01(\x0b\x32$.blox.Constraints.DigitalConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12P\n\x18transitionDurationPreset\x18\x07 \x01(\x0e\x32&.blox.IoArray.TransitionDurationPresetB\x06\x8a\xb5\x18\x02x\x01\x12.\n\x19transitionDurationSetting\x18\x08 \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12,\n\x17transitionDurationValue\x18\t \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x12!\n\tclaimedBy\x18\n \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0c \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01:\r\x8a\xb5\x18\t\x18\xbe\x02J\x04\x06\x15\x10\x11\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x44igitalActuator.proto\x12\x14\x62lox.DigitalActuator\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\rIoArray.proto\x1a\x0c\x43laims.proto\"\xa3\x05\n\x05\x42lock\x12\x1a\n\x08hwDevice\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\nx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x39\n\x0bstoredState\x18\x0b \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12:\n\x0c\x64\x65siredState\x18\x06 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x33\n\x05state\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x16\n\x06invert\x18\x04 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x45\n\rconstrainedBy\x18\x05 \x01(\x0b\x32..blox.Constraints.DeprecatedDigitalConstraints\x12\x41\n\x0b\x63onstraints\x18\r \x01(\x0b\x32$.blox.Constraints.DigitalConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12P\n\x18transitionDurationPreset\x18\x07 \x01(\x0e\x32&.blox.IoArray.TransitionDurationPresetB\x06\x8a\xb5\x18\x02x\x01\x12.\n\x19transitionDurationSetting\x18\x08 \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12,\n\x17transitionDurationValue\x18\t \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x12\x1c\n\tclaimedBy\x18\n \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0c \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01:\r\x8a\xb5\x18\t\x18\xbe\x02J\x04\x06\x15\x10\x11\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _BLOCK.fields_by_name['hwDevice']._options = None - _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\222?\0028\020\212\265\030\004\030\nx\001' + _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\212\265\030\004\030\nx\001' _BLOCK.fields_by_name['channel']._options = None _BLOCK.fields_by_name['channel']._serialized_options = b'\222?\0028\010\212\265\030\002x\001' _BLOCK.fields_by_name['storedState']._options = None @@ -46,11 +46,11 @@ _BLOCK.fields_by_name['transitionDurationValue']._options = None _BLOCK.fields_by_name['transitionDurationValue']._serialized_options = b'\212\265\030\007\010\003\020\350\007(\001' _BLOCK.fields_by_name['claimedBy']._options = None - _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BLOCK.fields_by_name['settingMode']._options = None _BLOCK.fields_by_name['settingMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\t\030\276\002J\004\006\025\020\021' _globals['_BLOCK']._serialized_start=126 - _globals['_BLOCK']._serialized_end=811 + _globals['_BLOCK']._serialized_end=801 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/DigitalInput_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/DigitalInput_pb2.py index 00ce4435..7a37c859 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/DigitalInput_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/DigitalInput_pb2.py @@ -16,7 +16,7 @@ import IoArray_pb2 as IoArray__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x44igitalInput.proto\x12\x11\x62lox.DigitalInput\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xb6\x02\n\x05\x42lock\x12\x1f\n\x08hwDevice\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\nx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x33\n\x05state\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x16\n\x06invert\x18\x04 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12;\n\x08\x62\x65havior\x18\x05 \x01(\x0e\x32!.blox.DigitalInput.ToggleBehaviorB\x06\x8a\xb5\x18\x02x\x01\x12\"\n\rminActiveTime\x18\x06 \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x33\n\x07hwState\x18\x07 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02(\x01:\x0b\x8a\xb5\x18\x07\x18\xca\x02J\x02\x1b\x11*-\n\x0eToggleBehavior\x12\n\n\x06\x44IRECT\x10\x00\x12\x0f\n\x0b\x41LTERNATING\x10\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x44igitalInput.proto\x12\x11\x62lox.DigitalInput\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xb1\x02\n\x05\x42lock\x12\x1a\n\x08hwDevice\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\nx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x33\n\x05state\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x16\n\x06invert\x18\x04 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12;\n\x08\x62\x65havior\x18\x05 \x01(\x0e\x32!.blox.DigitalInput.ToggleBehaviorB\x06\x8a\xb5\x18\x02x\x01\x12\"\n\rminActiveTime\x18\x06 \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12\x33\n\x07hwState\x18\x07 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02(\x01:\x0b\x8a\xb5\x18\x07\x18\xca\x02J\x02\x1b\x11*-\n\x0eToggleBehavior\x12\n\n\x06\x44IRECT\x10\x00\x12\x0f\n\x0b\x41LTERNATING\x10\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,7 +24,7 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _BLOCK.fields_by_name['hwDevice']._options = None - _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\222?\0028\020\212\265\030\004\030\nx\001' + _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\212\265\030\004\030\nx\001' _BLOCK.fields_by_name['channel']._options = None _BLOCK.fields_by_name['channel']._serialized_options = b'\222?\0028\010\212\265\030\002x\001' _BLOCK.fields_by_name['state']._options = None @@ -39,8 +39,8 @@ _BLOCK.fields_by_name['hwState']._serialized_options = b'\212\265\030\002(\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\007\030\312\002J\002\033\021' - _globals['_TOGGLEBEHAVIOR']._serialized_start=399 - _globals['_TOGGLEBEHAVIOR']._serialized_end=444 + _globals['_TOGGLEBEHAVIOR']._serialized_start=394 + _globals['_TOGGLEBEHAVIOR']._serialized_end=439 _globals['_BLOCK']._serialized_start=87 - _globals['_BLOCK']._serialized_end=397 + _globals['_BLOCK']._serialized_end=392 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/DisplaySettings_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/DisplaySettings_pb2.py index bf13210f..99cdf267 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/DisplaySettings_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/DisplaySettings_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x44isplaySettings.proto\x12\x14\x62lox.DisplaySettings\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\x85\x02\n\x06Widget\x12\x18\n\x03pos\x18\x01 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x1e\n\x05\x63olor\x18\x02 \x01(\x0c\x42\x0f\x92?\x04\x08\x03x\x01\x8a\xb5\x18\x04\x38\x01x\x01\x12\x19\n\x04name\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01\x12#\n\ntempSensor\x18\n \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x02x\x01H\x00\x12+\n\x12setpointSensorPair\x18\x0b \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x04x\x01H\x00\x12\'\n\x0e\x61\x63tuatorAnalog\x18\x0c \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x05x\x01H\x00\x12\x1d\n\x03pid\x18\x0e \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xb0\x02x\x01H\x00\x42\x0c\n\nWidgetType\"\xc6\x01\n\x05\x42lock\x12:\n\x07widgets\x18\x01 \x03(\x0b\x32\x1c.blox.DisplaySettings.WidgetB\x0b\x92?\x02\x10\x06\x8a\xb5\x18\x02x\x01\x12\x19\n\x04name\x18\x02 \x01(\tB\x0b\x92?\x02\x08(\x8a\xb5\x18\x02x\x01\x12\x1f\n\nbrightness\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1d\n\x08timeZone\x18[ \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1d\n\x08tempUnit\x18\\ \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x07\x8a\xb5\x18\x03\x18\xba\x02\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x44isplaySettings.proto\x12\x14\x62lox.DisplaySettings\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\xf1\x01\n\x06Widget\x12\x18\n\x03pos\x18\x01 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x1e\n\x05\x63olor\x18\x02 \x01(\x0c\x42\x0f\x92?\x04\x08\x03x\x01\x8a\xb5\x18\x04\x38\x01x\x01\x12\x19\n\x04name\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01\x12\x1e\n\ntempSensor\x18\n \x01(\rB\x08\x8a\xb5\x18\x04\x18\x02x\x01H\x00\x12&\n\x12setpointSensorPair\x18\x0b \x01(\rB\x08\x8a\xb5\x18\x04\x18\x04x\x01H\x00\x12\"\n\x0e\x61\x63tuatorAnalog\x18\x0c \x01(\rB\x08\x8a\xb5\x18\x04\x18\x05x\x01H\x00\x12\x18\n\x03pid\x18\x0e \x01(\rB\t\x8a\xb5\x18\x05\x18\xb0\x02x\x01H\x00\x42\x0c\n\nWidgetType\"\xc6\x01\n\x05\x42lock\x12:\n\x07widgets\x18\x01 \x03(\x0b\x32\x1c.blox.DisplaySettings.WidgetB\x0b\x92?\x02\x10\x06\x8a\xb5\x18\x02x\x01\x12\x19\n\x04name\x18\x02 \x01(\tB\x0b\x92?\x02\x08(\x8a\xb5\x18\x02x\x01\x12\x1f\n\nbrightness\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1d\n\x08timeZone\x18[ \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1d\n\x08tempUnit\x18\\ \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x07\x8a\xb5\x18\x03\x18\xba\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,13 +29,13 @@ _WIDGET.fields_by_name['name']._options = None _WIDGET.fields_by_name['name']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WIDGET.fields_by_name['tempSensor']._options = None - _WIDGET.fields_by_name['tempSensor']._serialized_options = b'\222?\0028\020\212\265\030\004\030\002x\001' + _WIDGET.fields_by_name['tempSensor']._serialized_options = b'\212\265\030\004\030\002x\001' _WIDGET.fields_by_name['setpointSensorPair']._options = None - _WIDGET.fields_by_name['setpointSensorPair']._serialized_options = b'\222?\0028\020\212\265\030\004\030\004x\001' + _WIDGET.fields_by_name['setpointSensorPair']._serialized_options = b'\212\265\030\004\030\004x\001' _WIDGET.fields_by_name['actuatorAnalog']._options = None - _WIDGET.fields_by_name['actuatorAnalog']._serialized_options = b'\222?\0028\020\212\265\030\004\030\005x\001' + _WIDGET.fields_by_name['actuatorAnalog']._serialized_options = b'\212\265\030\004\030\005x\001' _WIDGET.fields_by_name['pid']._options = None - _WIDGET.fields_by_name['pid']._serialized_options = b'\222?\0028\020\212\265\030\005\030\260\002x\001' + _WIDGET.fields_by_name['pid']._serialized_options = b'\212\265\030\005\030\260\002x\001' _BLOCK.fields_by_name['widgets']._options = None _BLOCK.fields_by_name['widgets']._serialized_options = b'\222?\002\020\006\212\265\030\002x\001' _BLOCK.fields_by_name['name']._options = None @@ -49,7 +49,7 @@ _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\003\030\272\002' _globals['_WIDGET']._serialized_start=78 - _globals['_WIDGET']._serialized_end=339 - _globals['_BLOCK']._serialized_start=342 - _globals['_BLOCK']._serialized_end=540 + _globals['_WIDGET']._serialized_end=319 + _globals['_BLOCK']._serialized_start=322 + _globals['_BLOCK']._serialized_end=520 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/FastPwm_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/FastPwm_pb2.py index 4f72ba68..4453469a 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/FastPwm_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/FastPwm_pb2.py @@ -18,7 +18,7 @@ import Claims_pb2 as Claims__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rFastPwm.proto\x12\x0c\x62lox.FastPwm\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\rIoArray.proto\x1a\x0c\x43laims.proto\"\xe8\x05\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\x08 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1f\n\x08hwDevice\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\nx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\'\n\rstoredSetting\x18\x0e \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 0\x01x\x01\x12(\n\x0e\x64\x65siredSetting\x18\x05 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x07setting\x18\x04 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1f\n\x05value\x18\x06 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x16\n\x06invert\x18\x0c \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x35\n\tfrequency\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.PwmFrequencyB\x06\x8a\xb5\x18\x02x\x01\x12\x44\n\rconstrainedBy\x18\x07 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\x10 \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12P\n\x18transitionDurationPreset\x18\t \x01(\x0e\x32&.blox.IoArray.TransitionDurationPresetB\x06\x8a\xb5\x18\x02x\x01\x12.\n\x19transitionDurationSetting\x18\n \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12,\n\x17transitionDurationValue\x18\x0b \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x12!\n\tclaimedBy\x18\r \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0f \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01:\x0f\x8a\xb5\x18\x0b\x18\xc9\x02J\x06\x01\x13\x05\x0f\x10\x11\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rFastPwm.proto\x12\x0c\x62lox.FastPwm\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\rIoArray.proto\x1a\x0c\x43laims.proto\"\xde\x05\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\x08 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1a\n\x08hwDevice\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\nx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\'\n\rstoredSetting\x18\x0e \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 0\x01x\x01\x12(\n\x0e\x64\x65siredSetting\x18\x05 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x07setting\x18\x04 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1f\n\x05value\x18\x06 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x16\n\x06invert\x18\x0c \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x35\n\tfrequency\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.PwmFrequencyB\x06\x8a\xb5\x18\x02x\x01\x12\x44\n\rconstrainedBy\x18\x07 \x01(\x0b\x32-.blox.Constraints.DeprecatedAnalogConstraints\x12@\n\x0b\x63onstraints\x18\x10 \x01(\x0b\x32#.blox.Constraints.AnalogConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12P\n\x18transitionDurationPreset\x18\t \x01(\x0e\x32&.blox.IoArray.TransitionDurationPresetB\x06\x8a\xb5\x18\x02x\x01\x12.\n\x19transitionDurationSetting\x18\n \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07x\x01\x12,\n\x17transitionDurationValue\x18\x0b \x01(\rB\x0b\x8a\xb5\x18\x07\x08\x03\x10\xe8\x07(\x01\x12\x1c\n\tclaimedBy\x18\r \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0f \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01:\x0f\x8a\xb5\x18\x0b\x18\xc9\x02J\x06\x01\x13\x05\x0f\x10\x11\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,7 +28,7 @@ _BLOCK.fields_by_name['enabled']._options = None _BLOCK.fields_by_name['enabled']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['hwDevice']._options = None - _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\222?\0028\020\212\265\030\004\030\nx\001' + _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\212\265\030\004\030\nx\001' _BLOCK.fields_by_name['channel']._options = None _BLOCK.fields_by_name['channel']._serialized_options = b'\222?\0028\010\212\265\030\002x\001' _BLOCK.fields_by_name['storedSetting']._options = None @@ -52,11 +52,11 @@ _BLOCK.fields_by_name['transitionDurationValue']._options = None _BLOCK.fields_by_name['transitionDurationValue']._serialized_options = b'\212\265\030\007\010\003\020\350\007(\001' _BLOCK.fields_by_name['claimedBy']._options = None - _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BLOCK.fields_by_name['settingMode']._options = None _BLOCK.fields_by_name['settingMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\013\030\311\002J\006\001\023\005\017\020\021' _globals['_BLOCK']._serialized_start=110 - _globals['_BLOCK']._serialized_end=854 + _globals['_BLOCK']._serialized_end=844 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/GpioModule_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/GpioModule_pb2.py index cae95031..29c076b5 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/GpioModule_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/GpioModule_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10GpioModule.proto\x12\x0f\x62lox.GpioModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\x9e\x02\n\x07\x43hannel\x12\x17\n\x02id\x18\x01 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x37\n\ndeviceType\x18\x02 \x01(\x0e\x32\x1b.blox.GpioModule.DeviceTypeB\x06\x8a\xb5\x18\x02x\x01\x12\x1f\n\x08pinsMask\x18\x03 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04P\x01x\x01\x12\x1a\n\x05width\x18\x04 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x19\n\x04name\x18\x05 \x01(\tB\x0b\x92?\x02\x08 \x8a\xb5\x18\x02x\x01\x12#\n\x0c\x63\x61pabilities\x18\x06 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04(\x01P\x01\x12!\n\tclaimedBy\x18\x07 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12!\n\nerrorFlags\x18\x08 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04P\x01x\x01\"\x89\x04\n\x06Status\x12#\n\x0cmoduleStatus\x18\x03 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12$\n\rpullUpDesired\x18\x04 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12#\n\x0cpullUpStatus\x18\x05 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\'\n\x10pullUpWhenActive\x18\x06 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12)\n\x12pullUpWhenInactive\x18\x07 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12&\n\x0fpullDownDesired\x18\x08 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12%\n\x0epullDownStatus\x18\t \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12)\n\x12pullDownWhenActive\x18\n \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12+\n\x14pullDownWhenInactive\x18\x0b \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\"\n\x0boverCurrent\x18\x0c \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\x1f\n\x08openLoad\x18\r \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12&\n\x0f\x66\x61ultsHistory5m\x18\x0f \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\'\n\x10\x66\x61ultsHistory60m\x18\x10 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01*\xa9\x05\n\nDeviceType\x12\x11\n\rGPIO_DEV_NONE\x10\x00\x12\x13\n\x0fGPIO_DEV_SSR_2P\x10\x01\x12\x13\n\x0fGPIO_DEV_SSR_1P\x10\x02\x12 \n\x1cGPIO_DEV_MECHANICAL_RELAY_2P\x10\x03\x12*\n&GPIO_DEV_MECHANICAL_RELAY_1P_HIGH_SIDE\x10\x04\x12)\n%GPIO_DEV_MECHANICAL_RELAY_1P_LOW_SIDE\x10\x05\x12\x14\n\x10GPIO_DEV_COIL_2P\x10\x06\x12\"\n\x1eGPIO_DEV_COIL_2P_BIDIRECTIONAL\x10\x07\x12\x1e\n\x1aGPIO_DEV_COIL_1P_HIGH_SIDE\x10\x08\x12\x1d\n\x19GPIO_DEV_COIL_1P_LOW_SIDE\x10\t\x12\x15\n\x11GPIO_DEV_MOTOR_2P\x10\n\x12#\n\x1fGPIO_DEV_MOTOR_2P_BIDIRECTIONAL\x10\x0b\x12\x1f\n\x1bGPIO_DEV_MOTOR_1P_HIGH_SIDE\x10\x0c\x12\x1e\n\x1aGPIO_DEV_MOTOR_1P_LOW_SIDE\x10\r\x12\"\n\x1eGPIO_DEV_DETECT_LOW_CURRENT_2P\x10\x0e\x12&\n\"GPIO_DEV_DETECT_LOW_CURRENT_1P_GND\x10\x0f\x12\x15\n\x11GPIO_DEV_POWER_1P\x10\x11\x12)\n%GPIO_DEV_DETECT_HIGH_CURRENT_1P_POWER\x10\x12\x12\x13\n\x0fGPIO_DEV_GND_1P\x10\x13\x12\'\n#GPIO_DEV_DETECT_HIGH_CURRENT_1P_GND\x10\x14\x12#\n\x1fGPIO_DEV_DETECT_HIGH_CURRENT_2P\x10\x15*\x86\x02\n\nErrorFlags\x12\x11\n\rGPIO_ERR_NONE\x10\x00\x12\x1b\n\x17GPIO_ERR_POWER_ON_RESET\x10\x01\x12\x18\n\x14GPIO_ERR_OVERVOLTAGE\x10\x02\x12\x19\n\x15GPIO_ERR_UNDERVOLTAGE\x10\x04\x12\x18\n\x14GPIO_ERR_OVERCURRENT\x10\x08\x12\x16\n\x12GPIO_ERR_OPEN_LOAD\x10\x10\x12$\n GPIO_ERR_OVERTEMPERATURE_WARNING\x10 \x12\"\n\x1eGPIO_ERR_OVERTEMPERATURE_ERROR\x10@\x12\x17\n\x12GPIO_ERR_SPI_ERROR\x10\x80\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10GpioModule.proto\x12\x0f\x62lox.GpioModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\x99\x02\n\x07\x43hannel\x12\x17\n\x02id\x18\x01 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x37\n\ndeviceType\x18\x02 \x01(\x0e\x32\x1b.blox.GpioModule.DeviceTypeB\x06\x8a\xb5\x18\x02x\x01\x12\x1f\n\x08pinsMask\x18\x03 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04P\x01x\x01\x12\x1a\n\x05width\x18\x04 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x19\n\x04name\x18\x05 \x01(\tB\x0b\x92?\x02\x08 \x8a\xb5\x18\x02x\x01\x12#\n\x0c\x63\x61pabilities\x18\x06 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04(\x01P\x01\x12\x1c\n\tclaimedBy\x18\x07 \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12!\n\nerrorFlags\x18\x08 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04P\x01x\x01\"\x89\x04\n\x06Status\x12#\n\x0cmoduleStatus\x18\x03 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12$\n\rpullUpDesired\x18\x04 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12#\n\x0cpullUpStatus\x18\x05 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\'\n\x10pullUpWhenActive\x18\x06 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12)\n\x12pullUpWhenInactive\x18\x07 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12&\n\x0fpullDownDesired\x18\x08 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12%\n\x0epullDownStatus\x18\t \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12)\n\x12pullDownWhenActive\x18\n \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12+\n\x14pullDownWhenInactive\x18\x0b \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\"\n\x0boverCurrent\x18\x0c \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\x1f\n\x08openLoad\x18\r \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12&\n\x0f\x66\x61ultsHistory5m\x18\x0f \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01\x12\'\n\x10\x66\x61ultsHistory60m\x18\x10 \x01(\rB\r\x92?\x02\x38\x08\x8a\xb5\x18\x04(\x01P\x01*\xa9\x05\n\nDeviceType\x12\x11\n\rGPIO_DEV_NONE\x10\x00\x12\x13\n\x0fGPIO_DEV_SSR_2P\x10\x01\x12\x13\n\x0fGPIO_DEV_SSR_1P\x10\x02\x12 \n\x1cGPIO_DEV_MECHANICAL_RELAY_2P\x10\x03\x12*\n&GPIO_DEV_MECHANICAL_RELAY_1P_HIGH_SIDE\x10\x04\x12)\n%GPIO_DEV_MECHANICAL_RELAY_1P_LOW_SIDE\x10\x05\x12\x14\n\x10GPIO_DEV_COIL_2P\x10\x06\x12\"\n\x1eGPIO_DEV_COIL_2P_BIDIRECTIONAL\x10\x07\x12\x1e\n\x1aGPIO_DEV_COIL_1P_HIGH_SIDE\x10\x08\x12\x1d\n\x19GPIO_DEV_COIL_1P_LOW_SIDE\x10\t\x12\x15\n\x11GPIO_DEV_MOTOR_2P\x10\n\x12#\n\x1fGPIO_DEV_MOTOR_2P_BIDIRECTIONAL\x10\x0b\x12\x1f\n\x1bGPIO_DEV_MOTOR_1P_HIGH_SIDE\x10\x0c\x12\x1e\n\x1aGPIO_DEV_MOTOR_1P_LOW_SIDE\x10\r\x12\"\n\x1eGPIO_DEV_DETECT_LOW_CURRENT_2P\x10\x0e\x12&\n\"GPIO_DEV_DETECT_LOW_CURRENT_1P_GND\x10\x0f\x12\x15\n\x11GPIO_DEV_POWER_1P\x10\x11\x12)\n%GPIO_DEV_DETECT_HIGH_CURRENT_1P_POWER\x10\x12\x12\x13\n\x0fGPIO_DEV_GND_1P\x10\x13\x12\'\n#GPIO_DEV_DETECT_HIGH_CURRENT_1P_GND\x10\x14\x12#\n\x1fGPIO_DEV_DETECT_HIGH_CURRENT_2P\x10\x15*\x86\x02\n\nErrorFlags\x12\x11\n\rGPIO_ERR_NONE\x10\x00\x12\x1b\n\x17GPIO_ERR_POWER_ON_RESET\x10\x01\x12\x18\n\x14GPIO_ERR_OVERVOLTAGE\x10\x02\x12\x19\n\x15GPIO_ERR_UNDERVOLTAGE\x10\x04\x12\x18\n\x14GPIO_ERR_OVERCURRENT\x10\x08\x12\x16\n\x12GPIO_ERR_OPEN_LOAD\x10\x10\x12$\n GPIO_ERR_OVERTEMPERATURE_WARNING\x10 \x12\"\n\x1eGPIO_ERR_OVERTEMPERATURE_ERROR\x10@\x12\x17\n\x12GPIO_ERR_SPI_ERROR\x10\x80\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -35,7 +35,7 @@ _CHANNEL.fields_by_name['capabilities']._options = None _CHANNEL.fields_by_name['capabilities']._serialized_options = b'\222?\0028\020\212\265\030\004(\001P\001' _CHANNEL.fields_by_name['claimedBy']._options = None - _CHANNEL.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _CHANNEL.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _CHANNEL.fields_by_name['errorFlags']._options = None _CHANNEL.fields_by_name['errorFlags']._serialized_options = b'\222?\0028\010\212\265\030\004P\001x\001' _STATUS.fields_by_name['moduleStatus']._options = None @@ -64,12 +64,12 @@ _STATUS.fields_by_name['faultsHistory5m']._serialized_options = b'\222?\0028\010\212\265\030\004(\001P\001' _STATUS.fields_by_name['faultsHistory60m']._options = None _STATUS.fields_by_name['faultsHistory60m']._serialized_options = b'\222?\0028\010\212\265\030\004(\001P\001' - _globals['_DEVICETYPE']._serialized_start=881 - _globals['_DEVICETYPE']._serialized_end=1562 - _globals['_ERRORFLAGS']._serialized_start=1565 - _globals['_ERRORFLAGS']._serialized_end=1827 + _globals['_DEVICETYPE']._serialized_start=876 + _globals['_DEVICETYPE']._serialized_end=1557 + _globals['_ERRORFLAGS']._serialized_start=1560 + _globals['_ERRORFLAGS']._serialized_end=1822 _globals['_CHANNEL']._serialized_start=68 - _globals['_CHANNEL']._serialized_end=354 - _globals['_STATUS']._serialized_start=357 - _globals['_STATUS']._serialized_end=878 + _globals['_CHANNEL']._serialized_end=349 + _globals['_STATUS']._serialized_start=352 + _globals['_STATUS']._serialized_end=873 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/IoArray_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/IoArray_pb2.py index b7df0078..e4bc2330 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/IoArray_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/IoArray_pb2.py @@ -15,7 +15,7 @@ import brewblox_pb2 as brewblox__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rIoArray.proto\x12\x0c\x62lox.IoArray\x1a\x0cnanopb.proto\x1a\x0e\x62rewblox.proto\"l\n\tIoChannel\x12\x17\n\x02id\x18\x01 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02(\x01\x12#\n\x0c\x63\x61pabilities\x18\x02 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04(\x01P\x01\x12!\n\tclaimedBy\x18\x03 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01*\x85\x01\n\x0c\x44igitalState\x12\x12\n\x0eSTATE_INACTIVE\x10\x00\x12\x10\n\x0cSTATE_ACTIVE\x10\x01\x12\x11\n\rSTATE_UNKNOWN\x10\x02\x12\x11\n\rSTATE_REVERSE\x10\x03\x12\x0c\n\x08Inactive\x10\x00\x12\n\n\x06\x41\x63tive\x10\x01\x12\x0b\n\x07Unknown\x10\x02\x1a\x02\x10\x01*^\n\x18TransitionDurationPreset\x12\n\n\x06ST_OFF\x10\x00\x12\x0b\n\x07ST_FAST\x10\x01\x12\r\n\tST_MEDIUM\x10\x02\x12\x0b\n\x07ST_SLOW\x10\x03\x12\r\n\tST_CUSTOM\x10\x04*\x85\x02\n\x13\x43hannelCapabilities\x12\x16\n\x12\x43HAN_SUPPORTS_NONE\x10\x00\x12 \n\x1c\x43HAN_SUPPORTS_DIGITAL_OUTPUT\x10\x01\x12\x1a\n\x16\x43HAN_SUPPORTS_PWM_80HZ\x10\x02\x12\x1b\n\x17\x43HAN_SUPPORTS_PWM_100HZ\x10\x04\x12\x1b\n\x17\x43HAN_SUPPORTS_PWM_200HZ\x10\x08\x12\x1c\n\x18\x43HAN_SUPPORTS_PWM_2000HZ\x10\x10\x12\x1f\n\x1b\x43HAN_SUPPORTS_BIDIRECTIONAL\x10 \x12\x1f\n\x1b\x43HAN_SUPPORTS_DIGITAL_INPUT\x10@*^\n\x0cPwmFrequency\x12\x11\n\rPWM_FREQ_80HZ\x10\x00\x12\x12\n\x0ePWM_FREQ_100HZ\x10\x01\x12\x12\n\x0ePWM_FREQ_200HZ\x10\x02\x12\x13\n\x0fPWM_FREQ_2000HZ\x10\x03\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rIoArray.proto\x12\x0c\x62lox.IoArray\x1a\x0cnanopb.proto\x1a\x0e\x62rewblox.proto\"g\n\tIoChannel\x12\x17\n\x02id\x18\x01 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02(\x01\x12#\n\x0c\x63\x61pabilities\x18\x02 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04(\x01P\x01\x12\x1c\n\tclaimedBy\x18\x03 \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01*\x85\x01\n\x0c\x44igitalState\x12\x12\n\x0eSTATE_INACTIVE\x10\x00\x12\x10\n\x0cSTATE_ACTIVE\x10\x01\x12\x11\n\rSTATE_UNKNOWN\x10\x02\x12\x11\n\rSTATE_REVERSE\x10\x03\x12\x0c\n\x08Inactive\x10\x00\x12\n\n\x06\x41\x63tive\x10\x01\x12\x0b\n\x07Unknown\x10\x02\x1a\x02\x10\x01*^\n\x18TransitionDurationPreset\x12\n\n\x06ST_OFF\x10\x00\x12\x0b\n\x07ST_FAST\x10\x01\x12\r\n\tST_MEDIUM\x10\x02\x12\x0b\n\x07ST_SLOW\x10\x03\x12\r\n\tST_CUSTOM\x10\x04*\x85\x02\n\x13\x43hannelCapabilities\x12\x16\n\x12\x43HAN_SUPPORTS_NONE\x10\x00\x12 \n\x1c\x43HAN_SUPPORTS_DIGITAL_OUTPUT\x10\x01\x12\x1a\n\x16\x43HAN_SUPPORTS_PWM_80HZ\x10\x02\x12\x1b\n\x17\x43HAN_SUPPORTS_PWM_100HZ\x10\x04\x12\x1b\n\x17\x43HAN_SUPPORTS_PWM_200HZ\x10\x08\x12\x1c\n\x18\x43HAN_SUPPORTS_PWM_2000HZ\x10\x10\x12\x1f\n\x1b\x43HAN_SUPPORTS_BIDIRECTIONAL\x10 \x12\x1f\n\x1b\x43HAN_SUPPORTS_DIGITAL_INPUT\x10@*^\n\x0cPwmFrequency\x12\x11\n\rPWM_FREQ_80HZ\x10\x00\x12\x12\n\x0ePWM_FREQ_100HZ\x10\x01\x12\x12\n\x0ePWM_FREQ_200HZ\x10\x02\x12\x13\n\x0fPWM_FREQ_2000HZ\x10\x03\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,15 +29,15 @@ _IOCHANNEL.fields_by_name['capabilities']._options = None _IOCHANNEL.fields_by_name['capabilities']._serialized_options = b'\222?\0028\020\212\265\030\004(\001P\001' _IOCHANNEL.fields_by_name['claimedBy']._options = None - _IOCHANNEL.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' - _globals['_DIGITALSTATE']._serialized_start=172 - _globals['_DIGITALSTATE']._serialized_end=305 - _globals['_TRANSITIONDURATIONPRESET']._serialized_start=307 - _globals['_TRANSITIONDURATIONPRESET']._serialized_end=401 - _globals['_CHANNELCAPABILITIES']._serialized_start=404 - _globals['_CHANNELCAPABILITIES']._serialized_end=665 - _globals['_PWMFREQUENCY']._serialized_start=667 - _globals['_PWMFREQUENCY']._serialized_end=761 + _IOCHANNEL.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' + _globals['_DIGITALSTATE']._serialized_start=167 + _globals['_DIGITALSTATE']._serialized_end=300 + _globals['_TRANSITIONDURATIONPRESET']._serialized_start=302 + _globals['_TRANSITIONDURATIONPRESET']._serialized_end=396 + _globals['_CHANNELCAPABILITIES']._serialized_start=399 + _globals['_CHANNELCAPABILITIES']._serialized_end=660 + _globals['_PWMFREQUENCY']._serialized_start=662 + _globals['_PWMFREQUENCY']._serialized_end=756 _globals['_IOCHANNEL']._serialized_start=61 - _globals['_IOCHANNEL']._serialized_end=169 + _globals['_IOCHANNEL']._serialized_end=164 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/MotorValve_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/MotorValve_pb2.py index 07570669..c113bd3a 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/MotorValve_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/MotorValve_pb2.py @@ -18,7 +18,7 @@ import Claims_pb2 as Claims__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10MotorValve.proto\x12\x0f\x62lox.MotorValve\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\rIoArray.proto\x1a\x0c\x43laims.proto\"\xc3\x04\n\x05\x42lock\x12\x1f\n\x08hwDevice\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x0bx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x39\n\x0bstoredState\x18\t \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12:\n\x0c\x64\x65siredState\x18\x07 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x33\n\x05state\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x39\n\nvalveState\x18\x06 \x01(\x0e\x32\x1b.blox.MotorValve.ValveStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x45\n\rconstrainedBy\x18\x05 \x01(\x0b\x32..blox.Constraints.DeprecatedDigitalConstraints\x12\x41\n\x0b\x63onstraints\x18\x0b \x01(\x0b\x32$.blox.Constraints.DigitalConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12!\n\tclaimedBy\x18\x08 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\n \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12!\n\x0cstartChannel\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\r\x8a\xb5\x18\t\x18\xc1\x02J\x04\x06\x15\x10\x11*\x96\x01\n\nValveState\x12\x11\n\rVALVE_UNKNOWN\x10\x00\x12\x0e\n\nVALVE_OPEN\x10\x01\x12\x10\n\x0cVALVE_CLOSED\x10\x02\x12\x11\n\rVALVE_OPENING\x10\x03\x12\x11\n\rVALVE_CLOSING\x10\x04\x12\x18\n\x14VALVE_HALF_OPEN_IDLE\x10\x05\x12\x13\n\x0fVALVE_INIT_IDLE\x10\x06\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10MotorValve.proto\x12\x0f\x62lox.MotorValve\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x11\x43onstraints.proto\x1a\rIoArray.proto\x1a\x0c\x43laims.proto\"\xb9\x04\n\x05\x42lock\x12\x1a\n\x08hwDevice\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x0bx\x01\x12\x1c\n\x07\x63hannel\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12\x39\n\x0bstoredState\x18\t \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12:\n\x0c\x64\x65siredState\x18\x07 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x33\n\x05state\x18\x03 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x39\n\nvalveState\x18\x06 \x01(\x0e\x32\x1b.blox.MotorValve.ValveStateB\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x45\n\rconstrainedBy\x18\x05 \x01(\x0b\x32..blox.Constraints.DeprecatedDigitalConstraints\x12\x41\n\x0b\x63onstraints\x18\x0b \x01(\x0b\x32$.blox.Constraints.DigitalConstraintsB\x06\x8a\xb5\x18\x02x\x01\x12\x1c\n\tclaimedBy\x18\x08 \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\n \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12!\n\x0cstartChannel\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\r\x8a\xb5\x18\t\x18\xc1\x02J\x04\x06\x15\x10\x11*\x96\x01\n\nValveState\x12\x11\n\rVALVE_UNKNOWN\x10\x00\x12\x0e\n\nVALVE_OPEN\x10\x01\x12\x10\n\x0cVALVE_CLOSED\x10\x02\x12\x11\n\rVALVE_OPENING\x10\x03\x12\x11\n\rVALVE_CLOSING\x10\x04\x12\x18\n\x14VALVE_HALF_OPEN_IDLE\x10\x05\x12\x13\n\x0fVALVE_INIT_IDLE\x10\x06\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _BLOCK.fields_by_name['hwDevice']._options = None - _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\222?\0028\020\212\265\030\004\030\013x\001' + _BLOCK.fields_by_name['hwDevice']._serialized_options = b'\212\265\030\004\030\013x\001' _BLOCK.fields_by_name['channel']._options = None _BLOCK.fields_by_name['channel']._serialized_options = b'\222?\0028\010\212\265\030\002x\001' _BLOCK.fields_by_name['storedState']._options = None @@ -40,15 +40,15 @@ _BLOCK.fields_by_name['constraints']._options = None _BLOCK.fields_by_name['constraints']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['claimedBy']._options = None - _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BLOCK.fields_by_name['settingMode']._options = None _BLOCK.fields_by_name['settingMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['startChannel']._options = None _BLOCK.fields_by_name['startChannel']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\t\030\301\002J\004\006\025\020\021' - _globals['_VALVESTATE']._serialized_start=698 - _globals['_VALVESTATE']._serialized_end=848 + _globals['_VALVESTATE']._serialized_start=688 + _globals['_VALVESTATE']._serialized_end=838 _globals['_BLOCK']._serialized_start=116 - _globals['_BLOCK']._serialized_end=695 + _globals['_BLOCK']._serialized_end=685 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/Pid_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/Pid_pb2.py index 2e604a58..ed5e9ba1 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/Pid_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/Pid_pb2.py @@ -16,7 +16,7 @@ import SetpointSensorPair_pb2 as SetpointSensorPair__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tPid.proto\x12\x08\x62lox.Pid\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x18SetpointSensorPair.proto\"\x9c\x07\n\x05\x42lock\x12\x1e\n\x07inputId\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x04x\x01\x12\x1f\n\x08outputId\x18\x02 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x05x\x01\x12&\n\ninputValue\x18\x05 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12(\n\x0cinputSetting\x18\x06 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12%\n\x0boutputValue\x18\x07 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\'\n\routputSetting\x18\x08 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x19\n\x07\x65nabled\x18\x0b \x01(\x08\x42\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12\x18\n\x06\x61\x63tive\x18\x0c \x01(\x08\x42\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x1c\n\x02kp\x18\r \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x02\x10\x80 x\x01\x12\x19\n\x02ti\x18\x0e \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x08\x03x\x01\x12\x19\n\x02td\x18\x0f \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x08\x03x\x01\x12\x1b\n\x01p\x18\x10 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1b\n\x01i\x18\x11 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1b\n\x01\x64\x18\x12 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x05\x65rror\x18\x13 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12\"\n\x08integral\x18\x14 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80\x02(\x01\x30\x01\x12%\n\nderivative\x18\x15 \x01(\x11\x42\x11\x92?\x02\x38 \x8a\xb5\x18\x08\x10\x80\x80 (\x01\x30\x01\x12%\n\rintegralReset\x18\x17 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 0\x01\x12)\n\x0f\x62oilPointAdjust\x18\x18 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12%\n\rboilMinOutput\x18\x19 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12 \n\x0e\x62oilModeActive\x18\x1a \x01(\x08\x42\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12G\n\x10\x64\x65rivativeFilter\x18\x1b \x01(\x0e\x32%.blox.SetpointSensorPair.FilterChoiceB\x06\x8a\xb5\x18\x02(\x01\x12M\n\x16\x64\x65rivativeFilterChoice\x18\x1c \x01(\x0e\x32%.blox.SetpointSensorPair.FilterChoiceB\x06\x8a\xb5\x18\x02x\x01\x12#\n\x0e\x64rivenOutputId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xb0\x02J\x01\x0f\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\tPid.proto\x12\x08\x62lox.Pid\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x18SetpointSensorPair.proto\"\x92\x07\n\x05\x42lock\x12\x19\n\x07inputId\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x04x\x01\x12\x1a\n\x08outputId\x18\x02 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x05x\x01\x12&\n\ninputValue\x18\x05 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12(\n\x0cinputSetting\x18\x06 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12%\n\x0boutputValue\x18\x07 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\'\n\routputSetting\x18\x08 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x19\n\x07\x65nabled\x18\x0b \x01(\x08\x42\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12\x18\n\x06\x61\x63tive\x18\x0c \x01(\x08\x42\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12\x1c\n\x02kp\x18\r \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x02\x10\x80 x\x01\x12\x19\n\x02ti\x18\x0e \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x08\x03x\x01\x12\x19\n\x02td\x18\x0f \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x08\x03x\x01\x12\x1b\n\x01p\x18\x10 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1b\n\x01i\x18\x11 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12\x1b\n\x01\x64\x18\x12 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80 (\x01\x30\x01\x12!\n\x05\x65rror\x18\x13 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x06\x10\x80 (\x01\x30\x01\x12\"\n\x08integral\x18\x14 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x10\x80\x02(\x01\x30\x01\x12%\n\nderivative\x18\x15 \x01(\x11\x42\x11\x92?\x02\x38 \x8a\xb5\x18\x08\x10\x80\x80 (\x01\x30\x01\x12%\n\rintegralReset\x18\x17 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 0\x01\x12)\n\x0f\x62oilPointAdjust\x18\x18 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12%\n\rboilMinOutput\x18\x19 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01\x12 \n\x0e\x62oilModeActive\x18\x1a \x01(\x08\x42\x08\x8a\xb5\x18\x04(\x01\x30\x01\x12G\n\x10\x64\x65rivativeFilter\x18\x1b \x01(\x0e\x32%.blox.SetpointSensorPair.FilterChoiceB\x06\x8a\xb5\x18\x02(\x01\x12M\n\x16\x64\x65rivativeFilterChoice\x18\x1c \x01(\x0e\x32%.blox.SetpointSensorPair.FilterChoiceB\x06\x8a\xb5\x18\x02x\x01\x12#\n\x0e\x64rivenOutputId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xb0\x02J\x01\x0f\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,9 +24,9 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _BLOCK.fields_by_name['inputId']._options = None - _BLOCK.fields_by_name['inputId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\004x\001' + _BLOCK.fields_by_name['inputId']._serialized_options = b'\212\265\030\004\030\004x\001' _BLOCK.fields_by_name['outputId']._options = None - _BLOCK.fields_by_name['outputId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\005x\001' + _BLOCK.fields_by_name['outputId']._serialized_options = b'\212\265\030\004\030\005x\001' _BLOCK.fields_by_name['inputValue']._options = None _BLOCK.fields_by_name['inputValue']._serialized_options = b'\222?\0028 \212\265\030\t\010\001\020\200 (\0010\001' _BLOCK.fields_by_name['inputSetting']._options = None @@ -74,5 +74,5 @@ _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\006\030\260\002J\001\017' _globals['_BLOCK']._serialized_start=80 - _globals['_BLOCK']._serialized_end=1004 + _globals['_BLOCK']._serialized_end=994 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/PrecisionAnalogModule_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/PrecisionAnalogModule_pb2.py index a898edb6..8a47942c 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/PrecisionAnalogModule_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/PrecisionAnalogModule_pb2.py @@ -16,7 +16,7 @@ import GpioModule_pb2 as GpioModule__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bPrecisionAnalogModule.proto\x12\x1a\x62lox.PrecisionAnalogModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x10GpioModule.proto\"\xdb\x02\n\rAnalogChannel\x12I\n\nsensorType\x18\x01 \x01(\x0e\x32-.blox.PrecisionAnalogModule.AnalogChannelTypeB\x06\x8a\xb5\x18\x02x\x01\x12!\n\tclaimedBy\x18\x02 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12(\n\nresistance\x18\x04 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\x0f\x10\x80 (\x01\x30\x01h\x01\x12,\n\x0eleadResistance\x18\x05 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\x0f\x10\x80 (\x01\x30\x01h\x01\x12.\n\x10\x62ridgeResistance\x18\x06 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\x0f\x10\x80 (\x01\x30\x01h\x01\x12)\n\x0c\x62ridgeOutput\x18\x07 \x01(\x11\x42\x13\x92?\x02\x38 \x8a\xb5\x18\n\x10\x80\x80\x10(\x01\x30\x01h\x01\x12)\n\x0cseebeckError\x18\x08 \x01(\x11\x42\x13\x92?\x02\x38 \x8a\xb5\x18\n\x10\x80\x80\x10(\x01\x30\x01h\x01\"\xf7\x02\n\x05\x42lock\x12;\n\x0cgpioChannels\x18\x01 \x03(\x0b\x32\x18.blox.GpioModule.ChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02x\x01\x12#\n\x0emodulePosition\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12 \n\x10useExternalPower\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x33\n\ngpioStatus\x18\x04 \x01(\x0b\x32\x17.blox.GpioModule.StatusB\x06\x8a\xb5\x18\x02(\x01\x12S\n\x0e\x61nalogChannels\x18\x05 \x03(\x0b\x32).blox.PrecisionAnalogModule.AnalogChannelB\x10\x92?\x05\x10\x04\x80\x01\x01\x8a\xb5\x18\x04(\x01\x30\x01\x12*\n\x0c\x62\x61roPressure\x18\x06 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\r\x10\x80 (\x01\x30\x01h\x01\x12+\n\x0f\x62\x61roTemperature\x18\x07 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x10\x80 (\x01\x30\x01h\x01:\x07\x8a\xb5\x18\x03\x18\xcb\x02*\xe6\x01\n\x11\x41nalogChannelType\x12\x1c\n\x18\x41NALOG_CHANNEL_TYPE_NONE\x10\x00\x12$\n ANALOG_CHANNEL_TYPE_STRAIN_GAUGE\x10\x01\x12!\n\x1d\x41NALOG_CHANNEL_TYPE_RTD_2WIRE\x10\x02\x12!\n\x1d\x41NALOG_CHANNEL_TYPE_RTD_3WIRE\x10\x03\x12!\n\x1d\x41NALOG_CHANNEL_TYPE_RTD_4WIRE\x10\x04\x12$\n ANALOG_CHANNEL_TYPE_RTD_3WIRE_LS\x10\x05\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bPrecisionAnalogModule.proto\x12\x1a\x62lox.PrecisionAnalogModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x10GpioModule.proto\"\xd6\x02\n\rAnalogChannel\x12I\n\nsensorType\x18\x01 \x01(\x0e\x32-.blox.PrecisionAnalogModule.AnalogChannelTypeB\x06\x8a\xb5\x18\x02x\x01\x12\x1c\n\tclaimedBy\x18\x02 \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12(\n\nresistance\x18\x04 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\x0f\x10\x80 (\x01\x30\x01h\x01\x12,\n\x0eleadResistance\x18\x05 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\x0f\x10\x80 (\x01\x30\x01h\x01\x12.\n\x10\x62ridgeResistance\x18\x06 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\x0f\x10\x80 (\x01\x30\x01h\x01\x12)\n\x0c\x62ridgeOutput\x18\x07 \x01(\x11\x42\x13\x92?\x02\x38 \x8a\xb5\x18\n\x10\x80\x80\x10(\x01\x30\x01h\x01\x12)\n\x0cseebeckError\x18\x08 \x01(\x11\x42\x13\x92?\x02\x38 \x8a\xb5\x18\n\x10\x80\x80\x10(\x01\x30\x01h\x01\"\xf7\x02\n\x05\x42lock\x12;\n\x0cgpioChannels\x18\x01 \x03(\x0b\x32\x18.blox.GpioModule.ChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02x\x01\x12#\n\x0emodulePosition\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12 \n\x10useExternalPower\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x33\n\ngpioStatus\x18\x04 \x01(\x0b\x32\x17.blox.GpioModule.StatusB\x06\x8a\xb5\x18\x02(\x01\x12S\n\x0e\x61nalogChannels\x18\x05 \x03(\x0b\x32).blox.PrecisionAnalogModule.AnalogChannelB\x10\x92?\x05\x10\x04\x80\x01\x01\x8a\xb5\x18\x04(\x01\x30\x01\x12*\n\x0c\x62\x61roPressure\x18\x06 \x01(\x11\x42\x14\x92?\x02\x38 \x8a\xb5\x18\x0b\x08\r\x10\x80 (\x01\x30\x01h\x01\x12+\n\x0f\x62\x61roTemperature\x18\x07 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x10\x80 (\x01\x30\x01h\x01:\x07\x8a\xb5\x18\x03\x18\xcb\x02*\xe6\x01\n\x11\x41nalogChannelType\x12\x1c\n\x18\x41NALOG_CHANNEL_TYPE_NONE\x10\x00\x12$\n ANALOG_CHANNEL_TYPE_STRAIN_GAUGE\x10\x01\x12!\n\x1d\x41NALOG_CHANNEL_TYPE_RTD_2WIRE\x10\x02\x12!\n\x1d\x41NALOG_CHANNEL_TYPE_RTD_3WIRE\x10\x03\x12!\n\x1d\x41NALOG_CHANNEL_TYPE_RTD_4WIRE\x10\x04\x12$\n ANALOG_CHANNEL_TYPE_RTD_3WIRE_LS\x10\x05\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ _ANALOGCHANNEL.fields_by_name['sensorType']._options = None _ANALOGCHANNEL.fields_by_name['sensorType']._serialized_options = b'\212\265\030\002x\001' _ANALOGCHANNEL.fields_by_name['claimedBy']._options = None - _ANALOGCHANNEL.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _ANALOGCHANNEL.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _ANALOGCHANNEL.fields_by_name['resistance']._options = None _ANALOGCHANNEL.fields_by_name['resistance']._serialized_options = b'\222?\0028 \212\265\030\013\010\017\020\200 (\0010\001h\001' _ANALOGCHANNEL.fields_by_name['leadResistance']._options = None @@ -53,10 +53,10 @@ _BLOCK.fields_by_name['baroTemperature']._serialized_options = b'\222?\0028 \212\265\030\t\020\200 (\0010\001h\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\003\030\313\002' - _globals['_ANALOGCHANNELTYPE']._serialized_start=836 - _globals['_ANALOGCHANNELTYPE']._serialized_end=1066 + _globals['_ANALOGCHANNELTYPE']._serialized_start=831 + _globals['_ANALOGCHANNELTYPE']._serialized_end=1061 _globals['_ANALOGCHANNEL']._serialized_start=108 - _globals['_ANALOGCHANNEL']._serialized_end=455 - _globals['_BLOCK']._serialized_start=458 - _globals['_BLOCK']._serialized_end=833 + _globals['_ANALOGCHANNEL']._serialized_end=450 + _globals['_BLOCK']._serialized_start=453 + _globals['_BLOCK']._serialized_end=828 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/Sequence_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/Sequence_pb2.py index 941458db..0dacd7f2 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/Sequence_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/Sequence_pb2.py @@ -16,7 +16,7 @@ import IoArray_pb2 as IoArray__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eSequence.proto\x12\rblox.Sequence\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\x1f\n\x07\x43omment\x12\x14\n\x04text\x18\x01 \x01(\tB\x06\x8a\xb5\x18\x02x\x01\"\t\n\x07Restart\"g\n\rEnableDisable\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x0fx\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"\x06\n\x04Wait\"l\n\x0cWaitDuration\x12(\n\x0f__raw__duration\x18\x01 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04\x08\x03x\x01H\x00\x12&\n\x0f__var__duration\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\n\n\x08\x64uration\"]\n\tWaitUntil\x12$\n\x0b__raw__time\x18\x01 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04X\x01x\x01H\x00\x12\"\n\x0b__var__time\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x06\n\x04time\"\x9e\x02\n\x14WaitTemperatureRange\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x02x\x01H\x00\x12$\n\r__var__target\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12(\n\x0c__raw__lower\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x01\x12#\n\x0c__var__lower\x18\x05 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x12(\n\x0c__raw__upper\x18\x03 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x02\x12#\n\x0c__var__upper\x18\x06 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x02\x42\x08\n\x06targetB\x07\n\x05lowerB\x07\n\x05upper\"\xc9\x01\n\x17WaitTemperatureBoundary\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x02x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12(\n\x0c__raw__value\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x01\x12#\n\x0c__var__value\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\x07\n\x05value\"\xc3\x01\n\x0bSetSetpoint\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x04x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12*\n\x0e__raw__setting\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x01\x12%\n\x0e__var__setting\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\t\n\x07setting\"\xca\x01\n\x0cWaitSetpoint\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x04x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12,\n\x10__raw__precision\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01H\x01\x12\'\n\x10__var__precision\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\x0b\n\tprecision\"\xd4\x01\n\nSetDigital\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x06x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12<\n\x0e__raw__setting\x18\x02 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x01\x12%\n\x0e__var__setting\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\t\n\x07setting\"e\n\x0bWaitDigital\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x06x\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"\xd4\x01\n\x10WaitDigitalState\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x1bx\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12:\n\x0c__raw__state\x18\x02 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x01\x12#\n\x0c__var__state\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\x07\n\x05state\"\xbc\x01\n\x06SetPwm\x12&\n\r__raw__target\x18\x01 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x05x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12(\n\x0e__raw__setting\x18\x02 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01H\x01\x12%\n\x0e__var__setting\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\t\n\x07setting\"h\n\rTargetProfile\x12\'\n\r__raw__target\x18\x01 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xb7\x02x\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"i\n\x0eTargetSequence\x12\'\n\r__raw__target\x18\x01 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xc6\x02x\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"\x8a\x0c\n\x0bInstruction\x12\x31\n\x07RESTART\x18\x01 \x01(\x0b\x32\x16.blox.Sequence.RestartB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x36\n\x06\x45NABLE\x18\x02 \x01(\x0b\x32\x1c.blox.Sequence.EnableDisableB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x37\n\x07\x44ISABLE\x18\x03 \x01(\x0b\x32\x1c.blox.Sequence.EnableDisableB\x06\x8a\xb5\x18\x02x\x01H\x00\x12+\n\x04WAIT\x18\x14 \x01(\x0b\x32\x13.blox.Sequence.WaitB\x06\x8a\xb5\x18\x02x\x01H\x00\x12<\n\rWAIT_DURATION\x18\x04 \x01(\x0b\x32\x1b.blox.Sequence.WaitDurationB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x36\n\nWAIT_UNTIL\x18\x05 \x01(\x0b\x32\x18.blox.Sequence.WaitUntilB\x06\x8a\xb5\x18\x02x\x01H\x00\x12H\n\x11WAIT_TEMP_BETWEEN\x18\x06 \x01(\x0b\x32#.blox.Sequence.WaitTemperatureRangeB\x06\x8a\xb5\x18\x02x\x01H\x00\x12L\n\x15WAIT_TEMP_NOT_BETWEEN\x18\x07 \x01(\x0b\x32#.blox.Sequence.WaitTemperatureRangeB\x06\x8a\xb5\x18\x02x\x01H\x00\x12K\n\x14WAIT_TEMP_UNEXPECTED\x18\x08 \x01(\x0b\x32#.blox.Sequence.WaitTemperatureRangeB\x06\x8a\xb5\x18\x02x\x01H\x00\x12I\n\x0fWAIT_TEMP_ABOVE\x18\t \x01(\x0b\x32&.blox.Sequence.WaitTemperatureBoundaryB\x06\x8a\xb5\x18\x02x\x01H\x00\x12I\n\x0fWAIT_TEMP_BELOW\x18\n \x01(\x0b\x32&.blox.Sequence.WaitTemperatureBoundaryB\x06\x8a\xb5\x18\x02x\x01H\x00\x12:\n\x0cSET_SETPOINT\x18\x0b \x01(\x0b\x32\x1a.blox.Sequence.SetSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12<\n\rWAIT_SETPOINT\x18\x0c \x01(\x0b\x32\x1b.blox.Sequence.WaitSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x42\n\x13WAIT_SETPOINT_ABOVE\x18\x15 \x01(\x0b\x32\x1b.blox.Sequence.WaitSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x42\n\x13WAIT_SETPOINT_BELOW\x18\x16 \x01(\x0b\x32\x1b.blox.Sequence.WaitSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x38\n\x0bSET_DIGITAL\x18\r \x01(\x0b\x32\x19.blox.Sequence.SetDigitalB\x06\x8a\xb5\x18\x02x\x01H\x00\x12:\n\x0cWAIT_DIGITAL\x18\x0e \x01(\x0b\x32\x1a.blox.Sequence.WaitDigitalB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x46\n\x13WAIT_DIGITAL_EQUALS\x18\x17 \x01(\x0b\x32\x1f.blox.Sequence.WaitDigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x30\n\x07SET_PWM\x18\x0f \x01(\x0b\x32\x15.blox.Sequence.SetPwmB\x06\x8a\xb5\x18\x02x\x01H\x00\x12=\n\rSTART_PROFILE\x18\x10 \x01(\x0b\x32\x1c.blox.Sequence.TargetProfileB\x06\x8a\xb5\x18\x02x\x01H\x00\x12<\n\x0cWAIT_PROFILE\x18\x11 \x01(\x0b\x32\x1c.blox.Sequence.TargetProfileB\x06\x8a\xb5\x18\x02x\x01H\x00\x12?\n\x0eSTART_SEQUENCE\x18\x12 \x01(\x0b\x32\x1d.blox.Sequence.TargetSequenceB\x06\x8a\xb5\x18\x02x\x01H\x00\x12>\n\rWAIT_SEQUENCE\x18\x13 \x01(\x0b\x32\x1d.blox.Sequence.TargetSequenceB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x32\n\x07\x43OMMENT\x18\xc8\x01 \x01(\x0b\x32\x16.blox.Sequence.CommentB\x06\x8a\xb5\x18\x02x\x01H\x00:\x06\x92?\x03\xb0\x01\x01\x42\r\n\x0binstruction\"\x9d\x04\n\x05\x42lock\x12\x19\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12\x38\n\x0cinstructions\x18\x02 \x03(\x0b\x32\x1a.blox.Sequence.InstructionB\x06\x8a\xb5\x18\x02x\x01\x12#\n\x0bvariablesId\x18\x0b \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xcd\x02x\x01\x12\x1d\n\roverrideState\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12(\n\x11\x61\x63tiveInstruction\x18\x04 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x30\x01x\x01\x12;\n\tstoreMode\x18\x0c \x01(\x0e\x32 .blox.Sequence.SequenceStoreModeB\x06\x8a\xb5\x18\x02x\x01\x12\x35\n\x06status\x18\x08 \x01(\x0e\x32\x1d.blox.Sequence.SequenceStatusB\x06\x8a\xb5\x18\x02(\x01\x12\x33\n\x05\x65rror\x18\t \x01(\x0e\x32\x1c.blox.Sequence.SequenceErrorB\x06\x8a\xb5\x18\x02(\x01\x12#\n\x07\x65lapsed\x18\n \x01(\rB\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x03\x10\xe8\x07(\x01\x30\x01\x12/\n\x1a\x61\x63tiveInstructionStartedAt\x18\x05 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1f\n\ndisabledAt\x18\x06 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10\x64isabledDuration\x18\x07 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xc6\x02J\x01\x0f*l\n\x0eSequenceStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x08\n\x04NEXT\x10\x03\x12\x08\n\x04WAIT\x10\x04\x12\x07\n\x03\x45ND\x10\x05\x12\x0b\n\x07RESTART\x10\x06\x12\t\n\x05\x45RROR\x10\x07*\xd7\x01\n\rSequenceError\x12\x08\n\x04NONE\x10\x00\x12\x14\n\x10INVALID_ARGUMENT\x10\x01\x12\x12\n\x0eINVALID_TARGET\x10\x02\x12\x13\n\x0fINACTIVE_TARGET\x10\x03\x12\x13\n\x0f\x44ISABLED_TARGET\x10\x04\x12\x1d\n\x19SYSTEM_TIME_NOT_AVAILABLE\x10\x05\x12\x1b\n\x17VARIABLES_NOT_SUPPORTED\x10\x06\x12\x16\n\x12UNDEFINED_VARIABLE\x10\x07\x12\x14\n\x10INVALID_VARIABLE\x10\x08*\x8f\x02\n\x11SequenceStoreMode\x12*\n&AT_RESTORE_INSTRUCTION_RESTORE_ENABLED\x10\x00\x12)\n%AT_RESTORE_INSTRUCTION_ALWAYS_ENABLED\x10\x01\x12(\n$AT_RESTORE_INSTRUCTION_NEVER_ENABLED\x10\x02\x12(\n$AT_FIRST_INSTRUCTION_RESTORE_ENABLED\x10\x03\x12\'\n#AT_FIRST_INSTRUCTION_ALWAYS_ENABLED\x10\x04\x12&\n\"AT_FIRST_INSTRUCTION_NEVER_ENABLED\x10\x05\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eSequence.proto\x12\rblox.Sequence\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\x1f\n\x07\x43omment\x12\x14\n\x04text\x18\x01 \x01(\tB\x06\x8a\xb5\x18\x02x\x01\"\t\n\x07Restart\"b\n\rEnableDisable\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x0fx\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"\x06\n\x04Wait\"l\n\x0cWaitDuration\x12(\n\x0f__raw__duration\x18\x01 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04\x08\x03x\x01H\x00\x12&\n\x0f__var__duration\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\n\n\x08\x64uration\"]\n\tWaitUntil\x12$\n\x0b__raw__time\x18\x01 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04X\x01x\x01H\x00\x12\"\n\x0b__var__time\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x06\n\x04time\"\x99\x02\n\x14WaitTemperatureRange\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x02x\x01H\x00\x12$\n\r__var__target\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12(\n\x0c__raw__lower\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x01\x12#\n\x0c__var__lower\x18\x05 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x12(\n\x0c__raw__upper\x18\x03 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x02\x12#\n\x0c__var__upper\x18\x06 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x02\x42\x08\n\x06targetB\x07\n\x05lowerB\x07\n\x05upper\"\xc4\x01\n\x17WaitTemperatureBoundary\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x02x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12(\n\x0c__raw__value\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x01\x12#\n\x0c__var__value\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\x07\n\x05value\"\xbe\x01\n\x0bSetSetpoint\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x04x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12*\n\x0e__raw__setting\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x01\x12%\n\x0e__var__setting\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\t\n\x07setting\"\xc5\x01\n\x0cWaitSetpoint\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x04x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12,\n\x10__raw__precision\x18\x02 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01H\x01\x12\'\n\x10__var__precision\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\x0b\n\tprecision\"\xcf\x01\n\nSetDigital\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x06x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12<\n\x0e__raw__setting\x18\x02 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x01\x12%\n\x0e__var__setting\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\t\n\x07setting\"`\n\x0bWaitDigital\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x06x\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"\xcf\x01\n\x10WaitDigitalState\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x1bx\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12:\n\x0c__raw__state\x18\x02 \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x01\x12#\n\x0c__var__state\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\x07\n\x05state\"\xb7\x01\n\x06SetPwm\x12!\n\r__raw__target\x18\x01 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x05x\x01H\x00\x12$\n\r__var__target\x18\x03 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x12(\n\x0e__raw__setting\x18\x02 \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01H\x01\x12%\n\x0e__var__setting\x18\x04 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x01\x42\x08\n\x06targetB\t\n\x07setting\"c\n\rTargetProfile\x12\"\n\r__raw__target\x18\x01 \x01(\rB\t\x8a\xb5\x18\x05\x18\xb7\x02x\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"d\n\x0eTargetSequence\x12\"\n\r__raw__target\x18\x01 \x01(\rB\t\x8a\xb5\x18\x05\x18\xc6\x02x\x01H\x00\x12$\n\r__var__target\x18\x02 \x01(\tB\x0b\x92?\x02\x08\x10\x8a\xb5\x18\x02x\x01H\x00\x42\x08\n\x06target\"\x8a\x0c\n\x0bInstruction\x12\x31\n\x07RESTART\x18\x01 \x01(\x0b\x32\x16.blox.Sequence.RestartB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x36\n\x06\x45NABLE\x18\x02 \x01(\x0b\x32\x1c.blox.Sequence.EnableDisableB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x37\n\x07\x44ISABLE\x18\x03 \x01(\x0b\x32\x1c.blox.Sequence.EnableDisableB\x06\x8a\xb5\x18\x02x\x01H\x00\x12+\n\x04WAIT\x18\x14 \x01(\x0b\x32\x13.blox.Sequence.WaitB\x06\x8a\xb5\x18\x02x\x01H\x00\x12<\n\rWAIT_DURATION\x18\x04 \x01(\x0b\x32\x1b.blox.Sequence.WaitDurationB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x36\n\nWAIT_UNTIL\x18\x05 \x01(\x0b\x32\x18.blox.Sequence.WaitUntilB\x06\x8a\xb5\x18\x02x\x01H\x00\x12H\n\x11WAIT_TEMP_BETWEEN\x18\x06 \x01(\x0b\x32#.blox.Sequence.WaitTemperatureRangeB\x06\x8a\xb5\x18\x02x\x01H\x00\x12L\n\x15WAIT_TEMP_NOT_BETWEEN\x18\x07 \x01(\x0b\x32#.blox.Sequence.WaitTemperatureRangeB\x06\x8a\xb5\x18\x02x\x01H\x00\x12K\n\x14WAIT_TEMP_UNEXPECTED\x18\x08 \x01(\x0b\x32#.blox.Sequence.WaitTemperatureRangeB\x06\x8a\xb5\x18\x02x\x01H\x00\x12I\n\x0fWAIT_TEMP_ABOVE\x18\t \x01(\x0b\x32&.blox.Sequence.WaitTemperatureBoundaryB\x06\x8a\xb5\x18\x02x\x01H\x00\x12I\n\x0fWAIT_TEMP_BELOW\x18\n \x01(\x0b\x32&.blox.Sequence.WaitTemperatureBoundaryB\x06\x8a\xb5\x18\x02x\x01H\x00\x12:\n\x0cSET_SETPOINT\x18\x0b \x01(\x0b\x32\x1a.blox.Sequence.SetSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12<\n\rWAIT_SETPOINT\x18\x0c \x01(\x0b\x32\x1b.blox.Sequence.WaitSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x42\n\x13WAIT_SETPOINT_ABOVE\x18\x15 \x01(\x0b\x32\x1b.blox.Sequence.WaitSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x42\n\x13WAIT_SETPOINT_BELOW\x18\x16 \x01(\x0b\x32\x1b.blox.Sequence.WaitSetpointB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x38\n\x0bSET_DIGITAL\x18\r \x01(\x0b\x32\x19.blox.Sequence.SetDigitalB\x06\x8a\xb5\x18\x02x\x01H\x00\x12:\n\x0cWAIT_DIGITAL\x18\x0e \x01(\x0b\x32\x1a.blox.Sequence.WaitDigitalB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x46\n\x13WAIT_DIGITAL_EQUALS\x18\x17 \x01(\x0b\x32\x1f.blox.Sequence.WaitDigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x30\n\x07SET_PWM\x18\x0f \x01(\x0b\x32\x15.blox.Sequence.SetPwmB\x06\x8a\xb5\x18\x02x\x01H\x00\x12=\n\rSTART_PROFILE\x18\x10 \x01(\x0b\x32\x1c.blox.Sequence.TargetProfileB\x06\x8a\xb5\x18\x02x\x01H\x00\x12<\n\x0cWAIT_PROFILE\x18\x11 \x01(\x0b\x32\x1c.blox.Sequence.TargetProfileB\x06\x8a\xb5\x18\x02x\x01H\x00\x12?\n\x0eSTART_SEQUENCE\x18\x12 \x01(\x0b\x32\x1d.blox.Sequence.TargetSequenceB\x06\x8a\xb5\x18\x02x\x01H\x00\x12>\n\rWAIT_SEQUENCE\x18\x13 \x01(\x0b\x32\x1d.blox.Sequence.TargetSequenceB\x06\x8a\xb5\x18\x02x\x01H\x00\x12\x32\n\x07\x43OMMENT\x18\xc8\x01 \x01(\x0b\x32\x16.blox.Sequence.CommentB\x06\x8a\xb5\x18\x02x\x01H\x00:\x06\x92?\x03\xb0\x01\x01\x42\r\n\x0binstruction\"\x98\x04\n\x05\x42lock\x12\x19\n\x07\x65nabled\x18\x01 \x01(\x08\x42\x08\x8a\xb5\x18\x04\x30\x01x\x01\x12\x38\n\x0cinstructions\x18\x02 \x03(\x0b\x32\x1a.blox.Sequence.InstructionB\x06\x8a\xb5\x18\x02x\x01\x12\x1e\n\x0bvariablesId\x18\x0b \x01(\rB\t\x8a\xb5\x18\x05\x18\xcd\x02x\x01\x12\x1d\n\roverrideState\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12(\n\x11\x61\x63tiveInstruction\x18\x04 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x30\x01x\x01\x12;\n\tstoreMode\x18\x0c \x01(\x0e\x32 .blox.Sequence.SequenceStoreModeB\x06\x8a\xb5\x18\x02x\x01\x12\x35\n\x06status\x18\x08 \x01(\x0e\x32\x1d.blox.Sequence.SequenceStatusB\x06\x8a\xb5\x18\x02(\x01\x12\x33\n\x05\x65rror\x18\t \x01(\x0e\x32\x1c.blox.Sequence.SequenceErrorB\x06\x8a\xb5\x18\x02(\x01\x12#\n\x07\x65lapsed\x18\n \x01(\rB\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x03\x10\xe8\x07(\x01\x30\x01\x12/\n\x1a\x61\x63tiveInstructionStartedAt\x18\x05 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1f\n\ndisabledAt\x18\x06 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10\x64isabledDuration\x18\x07 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xc6\x02J\x01\x0f*l\n\x0eSequenceStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\n\n\x06PAUSED\x10\x02\x12\x08\n\x04NEXT\x10\x03\x12\x08\n\x04WAIT\x10\x04\x12\x07\n\x03\x45ND\x10\x05\x12\x0b\n\x07RESTART\x10\x06\x12\t\n\x05\x45RROR\x10\x07*\xd7\x01\n\rSequenceError\x12\x08\n\x04NONE\x10\x00\x12\x14\n\x10INVALID_ARGUMENT\x10\x01\x12\x12\n\x0eINVALID_TARGET\x10\x02\x12\x13\n\x0fINACTIVE_TARGET\x10\x03\x12\x13\n\x0f\x44ISABLED_TARGET\x10\x04\x12\x1d\n\x19SYSTEM_TIME_NOT_AVAILABLE\x10\x05\x12\x1b\n\x17VARIABLES_NOT_SUPPORTED\x10\x06\x12\x16\n\x12UNDEFINED_VARIABLE\x10\x07\x12\x14\n\x10INVALID_VARIABLE\x10\x08*\x8f\x02\n\x11SequenceStoreMode\x12*\n&AT_RESTORE_INSTRUCTION_RESTORE_ENABLED\x10\x00\x12)\n%AT_RESTORE_INSTRUCTION_ALWAYS_ENABLED\x10\x01\x12(\n$AT_RESTORE_INSTRUCTION_NEVER_ENABLED\x10\x02\x12(\n$AT_FIRST_INSTRUCTION_RESTORE_ENABLED\x10\x03\x12\'\n#AT_FIRST_INSTRUCTION_ALWAYS_ENABLED\x10\x04\x12&\n\"AT_FIRST_INSTRUCTION_NEVER_ENABLED\x10\x05\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ _COMMENT.fields_by_name['text']._options = None _COMMENT.fields_by_name['text']._serialized_options = b'\212\265\030\002x\001' _ENABLEDISABLE.fields_by_name['__raw__target']._options = None - _ENABLEDISABLE.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\017x\001' + _ENABLEDISABLE.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\017x\001' _ENABLEDISABLE.fields_by_name['__var__target']._options = None _ENABLEDISABLE.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITDURATION.fields_by_name['__raw__duration']._options = None @@ -38,7 +38,7 @@ _WAITUNTIL.fields_by_name['__var__time']._options = None _WAITUNTIL.fields_by_name['__var__time']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITTEMPERATURERANGE.fields_by_name['__raw__target']._options = None - _WAITTEMPERATURERANGE.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\002x\001' + _WAITTEMPERATURERANGE.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\002x\001' _WAITTEMPERATURERANGE.fields_by_name['__var__target']._options = None _WAITTEMPERATURERANGE.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITTEMPERATURERANGE.fields_by_name['__raw__lower']._options = None @@ -50,7 +50,7 @@ _WAITTEMPERATURERANGE.fields_by_name['__var__upper']._options = None _WAITTEMPERATURERANGE.fields_by_name['__var__upper']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITTEMPERATUREBOUNDARY.fields_by_name['__raw__target']._options = None - _WAITTEMPERATUREBOUNDARY.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\002x\001' + _WAITTEMPERATUREBOUNDARY.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\002x\001' _WAITTEMPERATUREBOUNDARY.fields_by_name['__var__target']._options = None _WAITTEMPERATUREBOUNDARY.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITTEMPERATUREBOUNDARY.fields_by_name['__raw__value']._options = None @@ -58,7 +58,7 @@ _WAITTEMPERATUREBOUNDARY.fields_by_name['__var__value']._options = None _WAITTEMPERATUREBOUNDARY.fields_by_name['__var__value']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _SETSETPOINT.fields_by_name['__raw__target']._options = None - _SETSETPOINT.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\004x\001' + _SETSETPOINT.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\004x\001' _SETSETPOINT.fields_by_name['__var__target']._options = None _SETSETPOINT.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _SETSETPOINT.fields_by_name['__raw__setting']._options = None @@ -66,7 +66,7 @@ _SETSETPOINT.fields_by_name['__var__setting']._options = None _SETSETPOINT.fields_by_name['__var__setting']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITSETPOINT.fields_by_name['__raw__target']._options = None - _WAITSETPOINT.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\004x\001' + _WAITSETPOINT.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\004x\001' _WAITSETPOINT.fields_by_name['__var__target']._options = None _WAITSETPOINT.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITSETPOINT.fields_by_name['__raw__precision']._options = None @@ -74,7 +74,7 @@ _WAITSETPOINT.fields_by_name['__var__precision']._options = None _WAITSETPOINT.fields_by_name['__var__precision']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _SETDIGITAL.fields_by_name['__raw__target']._options = None - _SETDIGITAL.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\006x\001' + _SETDIGITAL.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\006x\001' _SETDIGITAL.fields_by_name['__var__target']._options = None _SETDIGITAL.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _SETDIGITAL.fields_by_name['__raw__setting']._options = None @@ -82,11 +82,11 @@ _SETDIGITAL.fields_by_name['__var__setting']._options = None _SETDIGITAL.fields_by_name['__var__setting']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITDIGITAL.fields_by_name['__raw__target']._options = None - _WAITDIGITAL.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\006x\001' + _WAITDIGITAL.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\006x\001' _WAITDIGITAL.fields_by_name['__var__target']._options = None _WAITDIGITAL.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITDIGITALSTATE.fields_by_name['__raw__target']._options = None - _WAITDIGITALSTATE.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\033x\001' + _WAITDIGITALSTATE.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\033x\001' _WAITDIGITALSTATE.fields_by_name['__var__target']._options = None _WAITDIGITALSTATE.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _WAITDIGITALSTATE.fields_by_name['__raw__state']._options = None @@ -94,7 +94,7 @@ _WAITDIGITALSTATE.fields_by_name['__var__state']._options = None _WAITDIGITALSTATE.fields_by_name['__var__state']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _SETPWM.fields_by_name['__raw__target']._options = None - _SETPWM.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\004\030\005x\001' + _SETPWM.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\004\030\005x\001' _SETPWM.fields_by_name['__var__target']._options = None _SETPWM.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _SETPWM.fields_by_name['__raw__setting']._options = None @@ -102,11 +102,11 @@ _SETPWM.fields_by_name['__var__setting']._options = None _SETPWM.fields_by_name['__var__setting']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _TARGETPROFILE.fields_by_name['__raw__target']._options = None - _TARGETPROFILE.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\005\030\267\002x\001' + _TARGETPROFILE.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\005\030\267\002x\001' _TARGETPROFILE.fields_by_name['__var__target']._options = None _TARGETPROFILE.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _TARGETSEQUENCE.fields_by_name['__raw__target']._options = None - _TARGETSEQUENCE.fields_by_name['__raw__target']._serialized_options = b'\222?\0028\020\212\265\030\005\030\306\002x\001' + _TARGETSEQUENCE.fields_by_name['__raw__target']._serialized_options = b'\212\265\030\005\030\306\002x\001' _TARGETSEQUENCE.fields_by_name['__var__target']._options = None _TARGETSEQUENCE.fields_by_name['__var__target']._serialized_options = b'\222?\002\010\020\212\265\030\002x\001' _INSTRUCTION.fields_by_name['RESTART']._options = None @@ -164,7 +164,7 @@ _BLOCK.fields_by_name['instructions']._options = None _BLOCK.fields_by_name['instructions']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['variablesId']._options = None - _BLOCK.fields_by_name['variablesId']._serialized_options = b'\222?\0028\020\212\265\030\005\030\315\002x\001' + _BLOCK.fields_by_name['variablesId']._serialized_options = b'\212\265\030\005\030\315\002x\001' _BLOCK.fields_by_name['overrideState']._options = None _BLOCK.fields_by_name['overrideState']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['activeInstruction']._options = None @@ -185,46 +185,46 @@ _BLOCK.fields_by_name['disabledDuration']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\006\030\306\002J\001\017' - _globals['_SEQUENCESTATUS']._serialized_start=4366 - _globals['_SEQUENCESTATUS']._serialized_end=4474 - _globals['_SEQUENCEERROR']._serialized_start=4477 - _globals['_SEQUENCEERROR']._serialized_end=4692 - _globals['_SEQUENCESTOREMODE']._serialized_start=4695 - _globals['_SEQUENCESTOREMODE']._serialized_end=4966 + _globals['_SEQUENCESTATUS']._serialized_start=4306 + _globals['_SEQUENCESTATUS']._serialized_end=4414 + _globals['_SEQUENCEERROR']._serialized_start=4417 + _globals['_SEQUENCEERROR']._serialized_end=4632 + _globals['_SEQUENCESTOREMODE']._serialized_start=4635 + _globals['_SEQUENCESTOREMODE']._serialized_end=4906 _globals['_COMMENT']._serialized_start=78 _globals['_COMMENT']._serialized_end=109 _globals['_RESTART']._serialized_start=111 _globals['_RESTART']._serialized_end=120 _globals['_ENABLEDISABLE']._serialized_start=122 - _globals['_ENABLEDISABLE']._serialized_end=225 - _globals['_WAIT']._serialized_start=227 - _globals['_WAIT']._serialized_end=233 - _globals['_WAITDURATION']._serialized_start=235 - _globals['_WAITDURATION']._serialized_end=343 - _globals['_WAITUNTIL']._serialized_start=345 - _globals['_WAITUNTIL']._serialized_end=438 - _globals['_WAITTEMPERATURERANGE']._serialized_start=441 - _globals['_WAITTEMPERATURERANGE']._serialized_end=727 - _globals['_WAITTEMPERATUREBOUNDARY']._serialized_start=730 - _globals['_WAITTEMPERATUREBOUNDARY']._serialized_end=931 - _globals['_SETSETPOINT']._serialized_start=934 - _globals['_SETSETPOINT']._serialized_end=1129 - _globals['_WAITSETPOINT']._serialized_start=1132 - _globals['_WAITSETPOINT']._serialized_end=1334 - _globals['_SETDIGITAL']._serialized_start=1337 - _globals['_SETDIGITAL']._serialized_end=1549 - _globals['_WAITDIGITAL']._serialized_start=1551 - _globals['_WAITDIGITAL']._serialized_end=1652 - _globals['_WAITDIGITALSTATE']._serialized_start=1655 - _globals['_WAITDIGITALSTATE']._serialized_end=1867 - _globals['_SETPWM']._serialized_start=1870 - _globals['_SETPWM']._serialized_end=2058 - _globals['_TARGETPROFILE']._serialized_start=2060 - _globals['_TARGETPROFILE']._serialized_end=2164 - _globals['_TARGETSEQUENCE']._serialized_start=2166 - _globals['_TARGETSEQUENCE']._serialized_end=2271 - _globals['_INSTRUCTION']._serialized_start=2274 - _globals['_INSTRUCTION']._serialized_end=3820 - _globals['_BLOCK']._serialized_start=3823 - _globals['_BLOCK']._serialized_end=4364 + _globals['_ENABLEDISABLE']._serialized_end=220 + _globals['_WAIT']._serialized_start=222 + _globals['_WAIT']._serialized_end=228 + _globals['_WAITDURATION']._serialized_start=230 + _globals['_WAITDURATION']._serialized_end=338 + _globals['_WAITUNTIL']._serialized_start=340 + _globals['_WAITUNTIL']._serialized_end=433 + _globals['_WAITTEMPERATURERANGE']._serialized_start=436 + _globals['_WAITTEMPERATURERANGE']._serialized_end=717 + _globals['_WAITTEMPERATUREBOUNDARY']._serialized_start=720 + _globals['_WAITTEMPERATUREBOUNDARY']._serialized_end=916 + _globals['_SETSETPOINT']._serialized_start=919 + _globals['_SETSETPOINT']._serialized_end=1109 + _globals['_WAITSETPOINT']._serialized_start=1112 + _globals['_WAITSETPOINT']._serialized_end=1309 + _globals['_SETDIGITAL']._serialized_start=1312 + _globals['_SETDIGITAL']._serialized_end=1519 + _globals['_WAITDIGITAL']._serialized_start=1521 + _globals['_WAITDIGITAL']._serialized_end=1617 + _globals['_WAITDIGITALSTATE']._serialized_start=1620 + _globals['_WAITDIGITALSTATE']._serialized_end=1827 + _globals['_SETPWM']._serialized_start=1830 + _globals['_SETPWM']._serialized_end=2013 + _globals['_TARGETPROFILE']._serialized_start=2015 + _globals['_TARGETPROFILE']._serialized_end=2114 + _globals['_TARGETSEQUENCE']._serialized_start=2116 + _globals['_TARGETSEQUENCE']._serialized_end=2216 + _globals['_INSTRUCTION']._serialized_start=2219 + _globals['_INSTRUCTION']._serialized_end=3765 + _globals['_BLOCK']._serialized_start=3768 + _globals['_BLOCK']._serialized_end=4304 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/SetpointProfile_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/SetpointProfile_pb2.py index dadd2130..9ca9542d 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/SetpointProfile_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/SetpointProfile_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15SetpointProfile.proto\x12\x14\x62lox.SetpointProfile\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"b\n\x05Point\x12\x1b\n\x04time\x18\x01 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04\x08\x03x\x01\x12\'\n\x0btemperature\x18\x02 \x01(\x05\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x00\x42\x13\n\x11temperature_oneof\"\xeb\x01\n\x05\x42lock\x12\x33\n\x06points\x18\x01 \x03(\x0b\x32\x1b.blox.SetpointProfile.PointB\x06\x8a\xb5\x18\x02x\x01\x12\x17\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12 \n\x08targetId\x18\x04 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xaf\x02x\x01\x12#\n\x07setting\x18\x05 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12\x1c\n\x05start\x18\x06 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04X\x01x\x01\x12#\n\x0e\x64rivenTargetId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xb7\x02J\x01\x0f\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15SetpointProfile.proto\x12\x14\x62lox.SetpointProfile\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"b\n\x05Point\x12\x1b\n\x04time\x18\x01 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04\x08\x03x\x01\x12\'\n\x0btemperature\x18\x02 \x01(\x05\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x00\x42\x13\n\x11temperature_oneof\"\xe6\x01\n\x05\x42lock\x12\x33\n\x06points\x18\x01 \x03(\x0b\x32\x1b.blox.SetpointProfile.PointB\x06\x8a\xb5\x18\x02x\x01\x12\x17\n\x07\x65nabled\x18\x03 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1b\n\x08targetId\x18\x04 \x01(\rB\t\x8a\xb5\x18\x05\x18\xaf\x02x\x01\x12#\n\x07setting\x18\x05 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12\x1c\n\x05start\x18\x06 \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04X\x01x\x01\x12#\n\x0e\x64rivenTargetId\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\n\x8a\xb5\x18\x06\x18\xb7\x02J\x01\x0f\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -31,7 +31,7 @@ _BLOCK.fields_by_name['enabled']._options = None _BLOCK.fields_by_name['enabled']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['targetId']._options = None - _BLOCK.fields_by_name['targetId']._serialized_options = b'\222?\0028\020\212\265\030\005\030\257\002x\001' + _BLOCK.fields_by_name['targetId']._serialized_options = b'\212\265\030\005\030\257\002x\001' _BLOCK.fields_by_name['setting']._options = None _BLOCK.fields_by_name['setting']._serialized_options = b'\222?\0028 \212\265\030\t\010\001\020\200 (\0010\001' _BLOCK.fields_by_name['start']._options = None @@ -43,5 +43,5 @@ _globals['_POINT']._serialized_start=77 _globals['_POINT']._serialized_end=175 _globals['_BLOCK']._serialized_start=178 - _globals['_BLOCK']._serialized_end=413 + _globals['_BLOCK']._serialized_end=408 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/SetpointSensorPair_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/SetpointSensorPair_pb2.py index 41e90b67..ce3cabab 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/SetpointSensorPair_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/SetpointSensorPair_pb2.py @@ -16,7 +16,7 @@ import Claims_pb2 as Claims__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18SetpointSensorPair.proto\x12\x17\x62lox.SetpointSensorPair\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x0c\x43laims.proto\"\x9b\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\x07 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1f\n\x08sensorId\x18\x02 \x01(\rB\r\x92?\x02\x38\x10\x8a\xb5\x18\x04\x18\x02x\x01\x12)\n\rstoredSetting\x18\x08 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 0\x01x\x01\x12*\n\x0e\x64\x65siredSetting\x18\x0f \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12#\n\x07setting\x18\x05 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12!\n\x05value\x18\x06 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12+\n\x0fvalueUnfiltered\x18\x0b \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12=\n\x06\x66ilter\x18\t \x01(\x0e\x32%.blox.SetpointSensorPair.FilterChoiceB\x06\x8a\xb5\x18\x02x\x01\x12)\n\x0f\x66ilterThreshold\x18\n \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12\x13\n\x0bresetFilter\x18\x0c \x01(\x08\x12!\n\tclaimedBy\x18\r \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0e \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12#\n\x0esettingEnabled\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0e\x8a\xb5\x18\n\x18\xaf\x02J\x05\x01\x14\x04\x0f\x10*~\n\x0c\x46ilterChoice\x12\x0f\n\x0b\x46ILTER_NONE\x10\x00\x12\x0e\n\nFILTER_15s\x10\x01\x12\x0e\n\nFILTER_45s\x10\x02\x12\x0e\n\nFILTER_90s\x10\x03\x12\r\n\tFILTER_3m\x10\x04\x12\x0e\n\nFILTER_10m\x10\x05\x12\x0e\n\nFILTER_30m\x10\x06\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18SetpointSensorPair.proto\x12\x17\x62lox.SetpointSensorPair\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x0c\x43laims.proto\"\x91\x04\n\x05\x42lock\x12\x17\n\x07\x65nabled\x18\x07 \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12\x1a\n\x08sensorId\x18\x02 \x01(\rB\x08\x8a\xb5\x18\x04\x18\x02x\x01\x12)\n\rstoredSetting\x18\x08 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 0\x01x\x01\x12*\n\x0e\x64\x65siredSetting\x18\x0f \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12#\n\x07setting\x18\x05 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12!\n\x05value\x18\x06 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12+\n\x0fvalueUnfiltered\x18\x0b \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12=\n\x06\x66ilter\x18\t \x01(\x0e\x32%.blox.SetpointSensorPair.FilterChoiceB\x06\x8a\xb5\x18\x02x\x01\x12)\n\x0f\x66ilterThreshold\x18\n \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12\x13\n\x0bresetFilter\x18\x0c \x01(\x08\x12\x1c\n\tclaimedBy\x18\r \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01(\x01\x12\x35\n\x0bsettingMode\x18\x0e \x01(\x0e\x32\x18.blox.Claims.SettingModeB\x06\x8a\xb5\x18\x02x\x01\x12#\n\x0esettingEnabled\x18Z \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0e\x8a\xb5\x18\n\x18\xaf\x02J\x05\x01\x14\x04\x0f\x10*~\n\x0c\x46ilterChoice\x12\x0f\n\x0b\x46ILTER_NONE\x10\x00\x12\x0e\n\nFILTER_15s\x10\x01\x12\x0e\n\nFILTER_45s\x10\x02\x12\x0e\n\nFILTER_90s\x10\x03\x12\r\n\tFILTER_3m\x10\x04\x12\x0e\n\nFILTER_10m\x10\x05\x12\x0e\n\nFILTER_30m\x10\x06\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ _BLOCK.fields_by_name['enabled']._options = None _BLOCK.fields_by_name['enabled']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['sensorId']._options = None - _BLOCK.fields_by_name['sensorId']._serialized_options = b'\222?\0028\020\212\265\030\004\030\002x\001' + _BLOCK.fields_by_name['sensorId']._serialized_options = b'\212\265\030\004\030\002x\001' _BLOCK.fields_by_name['storedSetting']._options = None _BLOCK.fields_by_name['storedSetting']._serialized_options = b'\222?\0028 \212\265\030\t\010\001\020\200 0\001x\001' _BLOCK.fields_by_name['desiredSetting']._options = None @@ -42,15 +42,15 @@ _BLOCK.fields_by_name['filterThreshold']._options = None _BLOCK.fields_by_name['filterThreshold']._serialized_options = b'\222?\0028 \212\265\030\007\010\006\020\200 x\001' _BLOCK.fields_by_name['claimedBy']._options = None - _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001(\001' + _BLOCK.fields_by_name['claimedBy']._serialized_options = b'\212\265\030\005\030\377\001(\001' _BLOCK.fields_by_name['settingMode']._options = None _BLOCK.fields_by_name['settingMode']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['settingEnabled']._options = None _BLOCK.fields_by_name['settingEnabled']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\n\030\257\002J\005\001\024\004\017\020' - _globals['_FILTERCHOICE']._serialized_start=639 - _globals['_FILTERCHOICE']._serialized_end=765 + _globals['_FILTERCHOICE']._serialized_start=629 + _globals['_FILTERCHOICE']._serialized_end=755 _globals['_BLOCK']._serialized_start=98 - _globals['_BLOCK']._serialized_end=637 + _globals['_BLOCK']._serialized_end=627 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/TempSensorAnalog_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/TempSensorAnalog_pb2.py index ff742b6d..07314af7 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/TempSensorAnalog_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/TempSensorAnalog_pb2.py @@ -16,7 +16,7 @@ import PrecisionAnalogModule_pb2 as PrecisionAnalogModule__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16TempSensorAnalog.proto\x12\x15\x62lox.TempSensorAnalog\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x1bPrecisionAnalogModule.proto\"\xe7\x02\n\x05\x42lock\x12\x41\n\x04type\x18\x01 \x01(\x0e\x32+.blox.TempSensorAnalog.TempSensorAnalogTypeB\x06\x8a\xb5\x18\x02x\x01\x12 \n\x08moduleId\x18\x02 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xcb\x02x\x01\x12\x1c\n\x07\x63hannel\x18\x03 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12!\n\x05value\x18\x04 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12 \n\x06offset\x18\x05 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12G\n\x08\x64\x65tected\x18\x06 \x01(\x0e\x32-.blox.PrecisionAnalogModule.AnalogChannelTypeB\x06\x8a\xb5\x18\x02(\x01\x12\x41\n\x04spec\x18\x07 \x01(\x0e\x32+.blox.TempSensorAnalog.TempSensorAnalogSpecB\x06\x8a\xb5\x18\x02x\x01:\n\x8a\xb5\x18\x06\x18\xcc\x02J\x01\x02*\x94\x01\n\x14TempSensorAnalogType\x12\x1c\n\x18TEMP_SENSOR_TYPE_NOT_SET\x10\x00\x12\x1e\n\x1aTEMP_SENSOR_TYPE_RTD_2WIRE\x10\x01\x12\x1e\n\x1aTEMP_SENSOR_TYPE_RTD_3WIRE\x10\x02\x12\x1e\n\x1aTEMP_SENSOR_TYPE_RTD_4WIRE\x10\x03*z\n\x14TempSensorAnalogSpec\x12\x10\n\x0cSPEC_NOT_SET\x10\x00\x12\x12\n\x0eSPEC_PT100_385\x10\x01\x12\x12\n\x0eSPEC_PT100_392\x10\x02\x12\x13\n\x0fSPEC_PT1000_385\x10\x03\x12\x13\n\x0fSPEC_PT1000_392\x10\x04\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16TempSensorAnalog.proto\x12\x15\x62lox.TempSensorAnalog\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x1bPrecisionAnalogModule.proto\"\xe2\x02\n\x05\x42lock\x12\x41\n\x04type\x18\x01 \x01(\x0e\x32+.blox.TempSensorAnalog.TempSensorAnalogTypeB\x06\x8a\xb5\x18\x02x\x01\x12\x1b\n\x08moduleId\x18\x02 \x01(\rB\t\x8a\xb5\x18\x05\x18\xcb\x02x\x01\x12\x1c\n\x07\x63hannel\x18\x03 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12!\n\x05value\x18\x04 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12 \n\x06offset\x18\x05 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12G\n\x08\x64\x65tected\x18\x06 \x01(\x0e\x32-.blox.PrecisionAnalogModule.AnalogChannelTypeB\x06\x8a\xb5\x18\x02(\x01\x12\x41\n\x04spec\x18\x07 \x01(\x0e\x32+.blox.TempSensorAnalog.TempSensorAnalogSpecB\x06\x8a\xb5\x18\x02x\x01:\n\x8a\xb5\x18\x06\x18\xcc\x02J\x01\x02*\x94\x01\n\x14TempSensorAnalogType\x12\x1c\n\x18TEMP_SENSOR_TYPE_NOT_SET\x10\x00\x12\x1e\n\x1aTEMP_SENSOR_TYPE_RTD_2WIRE\x10\x01\x12\x1e\n\x1aTEMP_SENSOR_TYPE_RTD_3WIRE\x10\x02\x12\x1e\n\x1aTEMP_SENSOR_TYPE_RTD_4WIRE\x10\x03*z\n\x14TempSensorAnalogSpec\x12\x10\n\x0cSPEC_NOT_SET\x10\x00\x12\x12\n\x0eSPEC_PT100_385\x10\x01\x12\x12\n\x0eSPEC_PT100_392\x10\x02\x12\x13\n\x0fSPEC_PT1000_385\x10\x03\x12\x13\n\x0fSPEC_PT1000_392\x10\x04\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -26,7 +26,7 @@ _BLOCK.fields_by_name['type']._options = None _BLOCK.fields_by_name['type']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['moduleId']._options = None - _BLOCK.fields_by_name['moduleId']._serialized_options = b'\222?\0028\020\212\265\030\005\030\313\002x\001' + _BLOCK.fields_by_name['moduleId']._serialized_options = b'\212\265\030\005\030\313\002x\001' _BLOCK.fields_by_name['channel']._options = None _BLOCK.fields_by_name['channel']._serialized_options = b'\222?\0028\010\212\265\030\002x\001' _BLOCK.fields_by_name['value']._options = None @@ -39,10 +39,10 @@ _BLOCK.fields_by_name['spec']._serialized_options = b'\212\265\030\002x\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\006\030\314\002J\001\002' - _globals['_TEMPSENSORANALOGTYPE']._serialized_start=471 - _globals['_TEMPSENSORANALOGTYPE']._serialized_end=619 - _globals['_TEMPSENSORANALOGSPEC']._serialized_start=621 - _globals['_TEMPSENSORANALOGSPEC']._serialized_end=743 + _globals['_TEMPSENSORANALOGTYPE']._serialized_start=466 + _globals['_TEMPSENSORANALOGTYPE']._serialized_end=614 + _globals['_TEMPSENSORANALOGSPEC']._serialized_start=616 + _globals['_TEMPSENSORANALOGSPEC']._serialized_end=738 _globals['_BLOCK']._serialized_start=109 - _globals['_BLOCK']._serialized_end=468 + _globals['_BLOCK']._serialized_end=463 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/TempSensorCombi_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/TempSensorCombi_pb2.py index 5f549824..887642aa 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/TempSensorCombi_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/TempSensorCombi_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15TempSensorCombi.proto\x12\x14\x62lox.TempSensorCombi\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\x9c\x01\n\x05\x42lock\x12!\n\x05value\x18\x01 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12\x42\n\x0b\x63ombineFunc\x18\x02 \x01(\x0e\x32%.blox.TempSensorCombi.SensorCombiFuncB\x06\x8a\xb5\x18\x02x\x01\x12 \n\x07sensors\x18\x03 \x03(\rB\x0f\x92?\x04\x10\x08\x38\x10\x8a\xb5\x18\x04\x18\x02x\x01:\n\x8a\xb5\x18\x06\x18\xc4\x02J\x01\x02*b\n\x0fSensorCombiFunc\x12\x19\n\x15SENSOR_COMBI_FUNC_AVG\x10\x00\x12\x19\n\x15SENSOR_COMBI_FUNC_MIN\x10\x01\x12\x19\n\x15SENSOR_COMBI_FUNC_MAX\x10\x02\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15TempSensorCombi.proto\x12\x14\x62lox.TempSensorCombi\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\x9a\x01\n\x05\x42lock\x12!\n\x05value\x18\x01 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12\x42\n\x0b\x63ombineFunc\x18\x02 \x01(\x0e\x32%.blox.TempSensorCombi.SensorCombiFuncB\x06\x8a\xb5\x18\x02x\x01\x12\x1e\n\x07sensors\x18\x03 \x03(\rB\r\x92?\x02\x10\x08\x8a\xb5\x18\x04\x18\x02x\x01:\n\x8a\xb5\x18\x06\x18\xc4\x02J\x01\x02*b\n\x0fSensorCombiFunc\x12\x19\n\x15SENSOR_COMBI_FUNC_AVG\x10\x00\x12\x19\n\x15SENSOR_COMBI_FUNC_MIN\x10\x01\x12\x19\n\x15SENSOR_COMBI_FUNC_MAX\x10\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -27,11 +27,11 @@ _BLOCK.fields_by_name['combineFunc']._options = None _BLOCK.fields_by_name['combineFunc']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['sensors']._options = None - _BLOCK.fields_by_name['sensors']._serialized_options = b'\222?\004\020\0108\020\212\265\030\004\030\002x\001' + _BLOCK.fields_by_name['sensors']._serialized_options = b'\222?\002\020\010\212\265\030\004\030\002x\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\006\030\304\002J\001\002' - _globals['_SENSORCOMBIFUNC']._serialized_start=236 - _globals['_SENSORCOMBIFUNC']._serialized_end=334 + _globals['_SENSORCOMBIFUNC']._serialized_start=234 + _globals['_SENSORCOMBIFUNC']._serialized_end=332 _globals['_BLOCK']._serialized_start=78 - _globals['_BLOCK']._serialized_end=234 + _globals['_BLOCK']._serialized_end=232 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/TempSensorOneWire_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/TempSensorOneWire_pb2.py index 0a5d330e..a90cafd3 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/TempSensorOneWire_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/TempSensorOneWire_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17TempSensorOneWire.proto\x12\x16\x62lox.TempSensorOneWire\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\x9a\x01\n\x05\x42lock\x12!\n\x05value\x18\x01 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12 \n\x06offset\x18\x03 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12\x19\n\x07\x61\x64\x64ress\x18\x04 \x01(\x06\x42\x08\x8a\xb5\x18\x04 \x01x\x01\x12$\n\x0coneWireBusId\x18\x05 \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\x82\x02(\x01:\x0b\x8a\xb5\x18\x07\x18\xae\x02J\x02\x02\tb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17TempSensorOneWire.proto\x12\x16\x62lox.TempSensorOneWire\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"\x95\x01\n\x05\x42lock\x12!\n\x05value\x18\x01 \x01(\x11\x42\x12\x92?\x02\x38 \x8a\xb5\x18\t\x08\x01\x10\x80 (\x01\x30\x01\x12 \n\x06offset\x18\x03 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01\x12\x19\n\x07\x61\x64\x64ress\x18\x04 \x01(\x06\x42\x08\x8a\xb5\x18\x04 \x01x\x01\x12\x1f\n\x0coneWireBusId\x18\x05 \x01(\rB\t\x8a\xb5\x18\x05\x18\x82\x02(\x01:\x0b\x8a\xb5\x18\x07\x18\xae\x02J\x02\x02\tb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -29,9 +29,9 @@ _BLOCK.fields_by_name['address']._options = None _BLOCK.fields_by_name['address']._serialized_options = b'\212\265\030\004 \001x\001' _BLOCK.fields_by_name['oneWireBusId']._options = None - _BLOCK.fields_by_name['oneWireBusId']._serialized_options = b'\222?\0028\020\212\265\030\005\030\202\002(\001' + _BLOCK.fields_by_name['oneWireBusId']._serialized_options = b'\212\265\030\005\030\202\002(\001' _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\007\030\256\002J\002\002\t' _globals['_BLOCK']._serialized_start=82 - _globals['_BLOCK']._serialized_end=236 + _globals['_BLOCK']._serialized_end=231 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/Variables_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/Variables_pb2.py index bf73be09..98d504d6 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/Variables_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/Variables_pb2.py @@ -16,7 +16,7 @@ import IoArray_pb2 as IoArray__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fVariables.proto\x12\x0e\x62lox.Variables\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xaf\x02\n\x0cVarContainer\x12\x0f\n\x05\x65mpty\x18\x01 \x01(\x08H\x00\x12\x35\n\x07\x64igital\x18\n \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x00\x12 \n\x06\x61nalog\x18\x0b \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01H\x00\x12 \n\x04temp\x18\x14 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x00\x12%\n\tdeltaTemp\x18\x15 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01H\x00\x12\"\n\ttimestamp\x18\x1e \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04X\x01x\x01H\x00\x12!\n\x08\x64uration\x18\x1f \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04\x08\x03x\x01H\x00\x12\x1e\n\x04link\x18( \x01(\rB\x0e\x92?\x02\x38\x10\x8a\xb5\x18\x05\x18\xff\x01x\x01H\x00\x42\x05\n\x03var\"\xa1\x01\n\x05\x42lock\x12?\n\tvariables\x18\x01 \x03(\x0b\x32$.blox.Variables.Block.VariablesEntryB\x06\x8a\xb5\x18\x02x\x01\x1aN\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.blox.Variables.VarContainer:\x02\x38\x01:\x07\x8a\xb5\x18\x03\x18\xcd\x02\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0fVariables.proto\x12\x0e\x62lox.Variables\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\rIoArray.proto\"\xaa\x02\n\x0cVarContainer\x12\x0f\n\x05\x65mpty\x18\x01 \x01(\x08H\x00\x12\x35\n\x07\x64igital\x18\n \x01(\x0e\x32\x1a.blox.IoArray.DigitalStateB\x06\x8a\xb5\x18\x02x\x01H\x00\x12 \n\x06\x61nalog\x18\x0b \x01(\x11\x42\x0e\x92?\x02\x38 \x8a\xb5\x18\x05\x10\x80 x\x01H\x00\x12 \n\x04temp\x18\x14 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x01\x10\x80 x\x01H\x00\x12%\n\tdeltaTemp\x18\x15 \x01(\x11\x42\x10\x92?\x02\x38 \x8a\xb5\x18\x07\x08\x06\x10\x80 x\x01H\x00\x12\"\n\ttimestamp\x18\x1e \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04X\x01x\x01H\x00\x12!\n\x08\x64uration\x18\x1f \x01(\rB\r\x92?\x02\x38 \x8a\xb5\x18\x04\x08\x03x\x01H\x00\x12\x19\n\x04link\x18( \x01(\rB\t\x8a\xb5\x18\x05\x18\xff\x01x\x01H\x00\x42\x05\n\x03var\"\xa1\x01\n\x05\x42lock\x12?\n\tvariables\x18\x01 \x03(\x0b\x32$.blox.Variables.Block.VariablesEntryB\x06\x8a\xb5\x18\x02x\x01\x1aN\n\x0eVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.blox.Variables.VarContainer:\x02\x38\x01:\x07\x8a\xb5\x18\x03\x18\xcd\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -36,7 +36,7 @@ _VARCONTAINER.fields_by_name['duration']._options = None _VARCONTAINER.fields_by_name['duration']._serialized_options = b'\222?\0028 \212\265\030\004\010\003x\001' _VARCONTAINER.fields_by_name['link']._options = None - _VARCONTAINER.fields_by_name['link']._serialized_options = b'\222?\0028\020\212\265\030\005\030\377\001x\001' + _VARCONTAINER.fields_by_name['link']._serialized_options = b'\212\265\030\005\030\377\001x\001' _BLOCK_VARIABLESENTRY._options = None _BLOCK_VARIABLESENTRY._serialized_options = b'8\001' _BLOCK.fields_by_name['variables']._options = None @@ -44,9 +44,9 @@ _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\003\030\315\002' _globals['_VARCONTAINER']._serialized_start=81 - _globals['_VARCONTAINER']._serialized_end=384 - _globals['_BLOCK']._serialized_start=387 - _globals['_BLOCK']._serialized_end=548 - _globals['_BLOCK_VARIABLESENTRY']._serialized_start=461 - _globals['_BLOCK_VARIABLESENTRY']._serialized_end=539 + _globals['_VARCONTAINER']._serialized_end=379 + _globals['_BLOCK']._serialized_start=382 + _globals['_BLOCK']._serialized_end=543 + _globals['_BLOCK_VARIABLESENTRY']._serialized_start=456 + _globals['_BLOCK_VARIABLESENTRY']._serialized_end=534 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py index 8f68dc00..33f0c905 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rcommand.proto\x12\x07\x63ommand\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"%\n\tMaskField\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x03(\rB\x07\x92?\x04\x10\x04\x38\x10\"\xbf\x01\n\x07Payload\x12\x16\n\x07\x62lockId\x18\x01 \x01(\rB\x05\x92?\x02\x38\x10\x12&\n\tblockType\x18\x02 \x01(\x0e\x32\x13.brewblox.BlockType\x12\x16\n\x07subtype\x18\x03 \x01(\rB\x05\x92?\x02\x38\x10\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\t\x12#\n\x08maskMode\x18\x06 \x01(\x0e\x32\x11.command.MaskMode\x12&\n\nmaskFields\x18\x07 \x03(\x0b\x32\x12.command.MaskField\"}\n\x07Request\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12\x1f\n\x06opcode\x18\x02 \x01(\x0e\x32\x0f.command.Opcode\x12!\n\x07payload\x18\x03 \x01(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode\"\x80\x01\n\x08Response\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x12.command.ErrorCode\x12!\n\x07payload\x18\x03 \x03(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode*\x8a\x02\n\x06Opcode\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07VERSION\x10\x01\x12\x0e\n\nBLOCK_READ\x10\n\x12\x12\n\x0e\x42LOCK_READ_ALL\x10\x0b\x12\x0f\n\x0b\x42LOCK_WRITE\x10\x0c\x12\x10\n\x0c\x42LOCK_CREATE\x10\r\x12\x10\n\x0c\x42LOCK_DELETE\x10\x0e\x12\x12\n\x0e\x42LOCK_DISCOVER\x10\x0f\x12\x10\n\x0cSTORAGE_READ\x10\x14\x12\x14\n\x10STORAGE_READ_ALL\x10\x15\x12\n\n\x06REBOOT\x10\x1e\x12\x10\n\x0c\x43LEAR_BLOCKS\x10\x1f\x12\x0e\n\nCLEAR_WIFI\x10 \x12\x11\n\rFACTORY_RESET\x10!\x12\x13\n\x0f\x46IRMWARE_UPDATE\x10(*\xed\x05\n\tErrorCode\x12\x06\n\x02OK\x10\x00\x12\x11\n\rUNKNOWN_ERROR\x10\x01\x12\x12\n\x0eINVALID_OPCODE\x10\x02\x12\x15\n\x11INSUFFICIENT_HEAP\x10\x04\x12\x18\n\x14INSUFFICIENT_STORAGE\x10\x05\x12\x11\n\rNETWORK_ERROR\x10\n\x12\x16\n\x12NETWORK_READ_ERROR\x10\x0b\x12\x1a\n\x16NETWORK_DECODING_ERROR\x10\x0c\x12\x17\n\x13NETWORK_WRITE_ERROR\x10\r\x12\x1a\n\x16NETWORK_ENCODING_ERROR\x10\x0e\x12\x11\n\rSTORAGE_ERROR\x10\x14\x12\x16\n\x12STORAGE_READ_ERROR\x10\x15\x12\x1a\n\x16STORAGE_DECODING_ERROR\x10\x16\x12\x15\n\x11STORAGE_CRC_ERROR\x10\x17\x12\x17\n\x13STORAGE_WRITE_ERROR\x10\x18\x12\x1a\n\x16STORAGE_ENCODING_ERROR\x10\x19\x12\x16\n\x12\x42LOCK_NOT_WRITABLE\x10\x1e\x12\x16\n\x12\x42LOCK_NOT_READABLE\x10\x1f\x12\x17\n\x13\x42LOCK_NOT_CREATABLE\x10 \x12\x17\n\x13\x42LOCK_NOT_DELETABLE\x10!\x12\x11\n\rINVALID_BLOCK\x10(\x12\x14\n\x10INVALID_BLOCK_ID\x10)\x12\x16\n\x12INVALID_BLOCK_TYPE\x10*\x12\x19\n\x15INVALID_BLOCK_SUBTYPE\x10+\x12\x19\n\x15INVALID_BLOCK_CONTENT\x10,\x12\x18\n\x14INVALID_STORED_BLOCK\x10\x32\x12\x1b\n\x17INVALID_STORED_BLOCK_ID\x10\x33\x12\x1d\n\x19INVALID_STORED_BLOCK_TYPE\x10\x34\x12 \n\x1cINVALID_STORED_BLOCK_SUBTYPE\x10\x35\x12 \n\x1cINVALID_STORED_BLOCK_CONTENT\x10\x36*5\n\x08MaskMode\x12\x0b\n\x07NO_MASK\x10\x00\x12\r\n\tINCLUSIVE\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*/\n\x08ReadMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06STORED\x10\x01\x12\n\n\x06LOGGED\x10\x02\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rcommand.proto\x12\x07\x63ommand\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"%\n\tMaskField\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x03(\rB\x07\x92?\x04\x10\x04\x38\x10\"\xb8\x01\n\x07Payload\x12\x0f\n\x07\x62lockId\x18\x01 \x01(\r\x12&\n\tblockType\x18\x02 \x01(\x0e\x32\x13.brewblox.BlockType\x12\x16\n\x07subtype\x18\x03 \x01(\rB\x05\x92?\x02\x38\x10\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\t\x12#\n\x08maskMode\x18\x06 \x01(\x0e\x32\x11.command.MaskMode\x12&\n\nmaskFields\x18\x07 \x03(\x0b\x32\x12.command.MaskField\"}\n\x07Request\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12\x1f\n\x06opcode\x18\x02 \x01(\x0e\x32\x0f.command.Opcode\x12!\n\x07payload\x18\x03 \x01(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode\"\x80\x01\n\x08Response\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x12.command.ErrorCode\x12!\n\x07payload\x18\x03 \x03(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode*\x8a\x02\n\x06Opcode\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07VERSION\x10\x01\x12\x0e\n\nBLOCK_READ\x10\n\x12\x12\n\x0e\x42LOCK_READ_ALL\x10\x0b\x12\x0f\n\x0b\x42LOCK_WRITE\x10\x0c\x12\x10\n\x0c\x42LOCK_CREATE\x10\r\x12\x10\n\x0c\x42LOCK_DELETE\x10\x0e\x12\x12\n\x0e\x42LOCK_DISCOVER\x10\x0f\x12\x10\n\x0cSTORAGE_READ\x10\x14\x12\x14\n\x10STORAGE_READ_ALL\x10\x15\x12\n\n\x06REBOOT\x10\x1e\x12\x10\n\x0c\x43LEAR_BLOCKS\x10\x1f\x12\x0e\n\nCLEAR_WIFI\x10 \x12\x11\n\rFACTORY_RESET\x10!\x12\x13\n\x0f\x46IRMWARE_UPDATE\x10(*\xed\x05\n\tErrorCode\x12\x06\n\x02OK\x10\x00\x12\x11\n\rUNKNOWN_ERROR\x10\x01\x12\x12\n\x0eINVALID_OPCODE\x10\x02\x12\x15\n\x11INSUFFICIENT_HEAP\x10\x04\x12\x18\n\x14INSUFFICIENT_STORAGE\x10\x05\x12\x11\n\rNETWORK_ERROR\x10\n\x12\x16\n\x12NETWORK_READ_ERROR\x10\x0b\x12\x1a\n\x16NETWORK_DECODING_ERROR\x10\x0c\x12\x17\n\x13NETWORK_WRITE_ERROR\x10\r\x12\x1a\n\x16NETWORK_ENCODING_ERROR\x10\x0e\x12\x11\n\rSTORAGE_ERROR\x10\x14\x12\x16\n\x12STORAGE_READ_ERROR\x10\x15\x12\x1a\n\x16STORAGE_DECODING_ERROR\x10\x16\x12\x15\n\x11STORAGE_CRC_ERROR\x10\x17\x12\x17\n\x13STORAGE_WRITE_ERROR\x10\x18\x12\x1a\n\x16STORAGE_ENCODING_ERROR\x10\x19\x12\x16\n\x12\x42LOCK_NOT_WRITABLE\x10\x1e\x12\x16\n\x12\x42LOCK_NOT_READABLE\x10\x1f\x12\x17\n\x13\x42LOCK_NOT_CREATABLE\x10 \x12\x17\n\x13\x42LOCK_NOT_DELETABLE\x10!\x12\x11\n\rINVALID_BLOCK\x10(\x12\x14\n\x10INVALID_BLOCK_ID\x10)\x12\x16\n\x12INVALID_BLOCK_TYPE\x10*\x12\x19\n\x15INVALID_BLOCK_SUBTYPE\x10+\x12\x19\n\x15INVALID_BLOCK_CONTENT\x10,\x12\x18\n\x14INVALID_STORED_BLOCK\x10\x32\x12\x1b\n\x17INVALID_STORED_BLOCK_ID\x10\x33\x12\x1d\n\x19INVALID_STORED_BLOCK_TYPE\x10\x34\x12 \n\x1cINVALID_STORED_BLOCK_SUBTYPE\x10\x35\x12 \n\x1cINVALID_STORED_BLOCK_CONTENT\x10\x36*5\n\x08MaskMode\x12\x0b\n\x07NO_MASK\x10\x00\x12\r\n\tINCLUSIVE\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*/\n\x08ReadMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06STORED\x10\x01\x12\n\n\x06LOGGED\x10\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,24 +24,22 @@ DESCRIPTOR._options = None _MASKFIELD.fields_by_name['address']._options = None _MASKFIELD.fields_by_name['address']._serialized_options = b'\222?\004\020\0048\020' - _PAYLOAD.fields_by_name['blockId']._options = None - _PAYLOAD.fields_by_name['blockId']._serialized_options = b'\222?\0028\020' _PAYLOAD.fields_by_name['subtype']._options = None _PAYLOAD.fields_by_name['subtype']._serialized_options = b'\222?\0028\020' - _globals['_OPCODE']._serialized_start=548 - _globals['_OPCODE']._serialized_end=814 - _globals['_ERRORCODE']._serialized_start=817 - _globals['_ERRORCODE']._serialized_end=1566 - _globals['_MASKMODE']._serialized_start=1568 - _globals['_MASKMODE']._serialized_end=1621 - _globals['_READMODE']._serialized_start=1623 - _globals['_READMODE']._serialized_end=1670 + _globals['_OPCODE']._serialized_start=541 + _globals['_OPCODE']._serialized_end=807 + _globals['_ERRORCODE']._serialized_start=810 + _globals['_ERRORCODE']._serialized_end=1559 + _globals['_MASKMODE']._serialized_start=1561 + _globals['_MASKMODE']._serialized_end=1614 + _globals['_READMODE']._serialized_start=1616 + _globals['_READMODE']._serialized_end=1663 _globals['_MASKFIELD']._serialized_start=56 _globals['_MASKFIELD']._serialized_end=93 _globals['_PAYLOAD']._serialized_start=96 - _globals['_PAYLOAD']._serialized_end=287 - _globals['_REQUEST']._serialized_start=289 - _globals['_REQUEST']._serialized_end=414 - _globals['_RESPONSE']._serialized_start=417 - _globals['_RESPONSE']._serialized_end=545 + _globals['_PAYLOAD']._serialized_end=280 + _globals['_REQUEST']._serialized_start=282 + _globals['_REQUEST']._serialized_end=407 + _globals['_RESPONSE']._serialized_start=410 + _globals['_RESPONSE']._serialized_end=538 # @@protoc_insertion_point(module_scope) diff --git a/firmware.ini b/firmware.ini index 5600a5bb..b51a4456 100644 --- a/firmware.ini +++ b/firmware.ini @@ -1,8 +1,8 @@ [FIRMWARE] -firmware_version=1d09d4b7 -firmware_date=2024-04-09 -firmware_sha=1d09d4b7f0c5d2407da114d9a51fc037ca1465c7 -proto_version=619d55b2 -proto_date=2024-04-09 -proto_sha=619d55b27b4b79728f73e74c417c288bda5f03cf +firmware_version=5c7c070e +firmware_date=2024-04-23 +firmware_sha=5c7c070ea12e42beed52ff7eb28e60f5dab955d1 +proto_version=c9c57001 +proto_date=2024-04-20 +proto_sha=c9c57001df1da71552f0b66df88a8dc510abcfa2 system_version=3.2.0 From 138ddb6eae936a5a8b6e1e6c36f9dedbd4f6fb46 Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Fri, 3 May 2024 00:23:19 +0200 Subject: [PATCH 02/11] refactor to load block names from spark --- brewblox-proto | 2 +- brewblox_devcon_spark/broadcast.py | 9 +- brewblox_devcon_spark/codec/__init__.py | 42 ++-- brewblox_devcon_spark/codec/lookup.py | 15 +- .../codec/proto-compiled/brewblox_pb2.py | 4 +- .../codec/proto-compiled/command_pb2.py | 30 ++- brewblox_devcon_spark/command.py | 22 +- .../connection/mock_connection.py | 38 +++- brewblox_devcon_spark/const.py | 10 - brewblox_devcon_spark/datastore_blocks.py | 117 +--------- .../endpoints/http_blocks.py | 9 - brewblox_devcon_spark/models.py | 22 +- brewblox_devcon_spark/spark_api.py | 203 ++++++------------ brewblox_devcon_spark/synchronization.py | 20 +- brewblox_devcon_spark/twinkeydict.py | 179 --------------- firmware.ini | 12 +- poetry.lock | 16 +- pyproject.toml | 1 + test/test_codec.py | 13 -- test/test_datastore_blocks.py | 150 ------------- test/test_integration.py | 32 +-- test/test_spark_api.py | 52 ++--- test/test_synchronization.py | 14 +- test/test_twinkeydict.py | 134 ------------ 24 files changed, 224 insertions(+), 922 deletions(-) delete mode 100644 brewblox_devcon_spark/twinkeydict.py delete mode 100644 test/test_datastore_blocks.py delete mode 100644 test/test_twinkeydict.py diff --git a/brewblox-proto b/brewblox-proto index c9c57001..b675f617 160000 --- a/brewblox-proto +++ b/brewblox-proto @@ -1 +1 @@ -Subproject commit c9c57001df1da71552f0b66df88a8dc510abcfa2 +Subproject commit b675f61736a5beb53a44b7b4a86c6fb2b0eea271 diff --git a/brewblox_devcon_spark/broadcast.py b/brewblox_devcon_spark/broadcast.py index fc362c6e..9eced604 100644 --- a/brewblox_devcon_spark/broadcast.py +++ b/brewblox_devcon_spark/broadcast.py @@ -8,7 +8,7 @@ from contextlib import asynccontextmanager from datetime import timedelta -from . import const, mqtt, spark_api, state_machine, utils +from . import mqtt, spark_api, state_machine, utils from .block_analysis import calculate_claims, calculate_relations from .models import HistoryEvent, ServiceStateEvent, ServiceStateEventData @@ -35,11 +35,8 @@ async def run(self): logged_blocks = await self.api.read_all_logged_blocks() # Convert list to key/value format suitable for history - history_data = { - block.id: block.data - for block in logged_blocks - if not block.id.startswith(const.GENERATED_ID_PREFIX) - } + history_data = {block.id: block.data + for block in logged_blocks} mqtt_client.publish(self.history_topic, HistoryEvent( diff --git a/brewblox_devcon_spark/codec/__init__.py b/brewblox_devcon_spark/codec/__init__.py index 21bdc003..311efef5 100644 --- a/brewblox_devcon_spark/codec/__init__.py +++ b/brewblox_devcon_spark/codec/__init__.py @@ -5,7 +5,6 @@ import logging from base64 import b64decode, b64encode from contextvars import ContextVar -from typing import Optional from google.protobuf import json_format @@ -24,20 +23,6 @@ CV: ContextVar['Codec'] = ContextVar('codec.Codec') -def split_type(type_str: str) -> tuple[str, Optional[str]]: - if '.' in type_str: - return tuple(type_str.split('.', 1)) - else: - return type_str, None - - -def join_type(blockType: str, subtype: Optional[str]) -> str: - if subtype: - return f'{blockType}.{subtype}' - else: - return blockType - - class Codec: def __init__(self, filter_values=True): self._processor = ProtobufProcessor(filter_values) @@ -112,6 +97,7 @@ def encode_payload(self, if payload.blockType is None: return EncodedPayload( blockId=payload.blockId, + name=payload.name, ) if payload.blockType == DEPRECATED_TYPE_STR: @@ -120,6 +106,7 @@ def encode_payload(self, return EncodedPayload( blockId=payload.blockId, blockType=DEPRECATED_TYPE_INT, + name=payload.name, content=b64encode(content_bytes).decode(), ) @@ -130,12 +117,12 @@ def encode_payload(self, return EncodedPayload( blockId=payload.blockId, blockType=impl.type_int, + name=payload.name, ) # Payload contains data impl = next((v for v in lookup.CV_OBJECTS.get() - if v.type_str == payload.blockType - and v.subtype_str == payload.subtype)) + if v.type_str == payload.blockType)) message = impl.message_cls() payload = self._processor.pre_encode(message.DESCRIPTOR, @@ -147,14 +134,14 @@ def encode_payload(self, return EncodedPayload( blockId=payload.blockId, blockType=impl.type_int, - subtype=impl.subtype_int, + name=payload.name, content=content, maskMode=payload.maskMode, maskFields=payload.maskFields ) except StopIteration: - msg = f'No codec entry found for {payload.blockType}.{payload.subtype}' + msg = f'No codec entry found for {payload.blockType}' LOGGER.debug(msg, exc_info=True) raise exceptions.EncodeException(msg) @@ -175,13 +162,13 @@ def decode_payload(self, return DecodedPayload( blockId=payload.blockId, blockType=DEPRECATED_TYPE_STR, - content=content + name=payload.name, + content=content, ) # First, try to find an object lookup impl = next((v for v in lookup.CV_OBJECTS.get() - if payload.blockType in [v.type_str, v.type_int] - and payload.subtype in [v.subtype_str, v.subtype_int]), None) + if payload.blockType in [v.type_str, v.type_int]), None) if impl: # We have an object lookup, and can decode the content @@ -196,7 +183,7 @@ def decode_payload(self, decoded = DecodedPayload( blockId=payload.blockId, blockType=impl.type_str, - subtype=impl.subtype_str, + name=payload.name, content=content, maskMode=payload.maskMode, maskFields=payload.maskFields @@ -214,15 +201,17 @@ def decode_payload(self, return DecodedPayload( blockId=payload.blockId, blockType=intf_impl.type_str, + name=payload.name, ) # No lookup of any kind found # We're decoding (returned) data, so would rather return a stub than raise an error - msg = f'No codec entry found for {payload.blockType}.{payload.subtype}' + msg = f'No codec entry found for {payload.blockType}' LOGGER.debug(msg, exc_info=True) return DecodedPayload( blockId=payload.blockId, blockType=UNKNOWN_TYPE_STR, + name=payload.name, content={ 'error': msg, }, @@ -234,10 +223,10 @@ def decode_payload(self, return DecodedPayload( blockId=payload.blockId, blockType=ERROR_TYPE_STR, + name=payload.name, content={ 'error': msg, 'blockType': payload.blockType, - 'subtype': payload.subtype, }, ) @@ -249,9 +238,6 @@ def setup(): __all__ = [ - 'split_type', - 'join_type', - 'Codec', 'setup', 'CV', diff --git a/brewblox_devcon_spark/codec/lookup.py b/brewblox_devcon_spark/codec/lookup.py index f18fad85..ee880129 100644 --- a/brewblox_devcon_spark/codec/lookup.py +++ b/brewblox_devcon_spark/codec/lookup.py @@ -5,7 +5,7 @@ from contextvars import ContextVar from dataclasses import dataclass -from typing import Generator, Optional, Type +from typing import Generator, Type from google.protobuf.descriptor import Descriptor, FileDescriptor from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper @@ -35,8 +35,6 @@ class InterfaceLookup: class ObjectLookup: type_str: str type_int: int - subtype_str: Optional[str] - subtype_int: Optional[int] message_cls: Type[Message] @@ -61,8 +59,6 @@ def _object_lookup_generator() -> Generator[ObjectLookup, None, None]: yield ObjectLookup( type_str=BlockType.Name(opts.objtype), type_int=opts.objtype, - subtype_str=(msg_name if opts.subtype else None), - subtype_int=opts.subtype, message_cls=msg_cls, ) @@ -76,17 +72,8 @@ def setup(): ObjectLookup( type_str='EdgeCase', type_int=9001, - subtype_str=None, - subtype_int=0, message_cls=pb2.EdgeCase_pb2.Block, ), - ObjectLookup( - type_str='EdgeCase', - type_int=9001, - subtype_str='SubCase', - subtype_int=1, - message_cls=pb2.EdgeCase_pb2.SubCase, - ), ] interfaces: list[InterfaceLookup] = [ diff --git a/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py index 92916c5d..c4d934f1 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x62rewblox.proto\x12\x08\x62rewblox\x1a google/protobuf/descriptor.proto\x1a\x0cnanopb.proto\"|\n\x0bMessageOpts\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12(\n\x04impl\x18\t \x03(\x0e\x32\x13.brewblox.BlockTypeB\x05\x92?\x02\x10\x05\x12\x16\n\x07subtype\x18\x0b \x01(\rB\x05\x92?\x02\x38\x10:\x05\x92?\x02\x30\x01\"\xb0\x02\n\tFieldOpts\x12 \n\x04unit\x18\x01 \x01(\x0e\x32\x12.brewblox.UnitType\x12\r\n\x05scale\x18\x02 \x01(\r\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12\r\n\x05hexed\x18\x04 \x01(\x08\x12\x10\n\x08readonly\x18\x05 \x01(\x08\x12\x0e\n\x06logged\x18\x06 \x01(\x08\x12\x0e\n\x06stored\x18\x0f \x01(\x08\x12\x0e\n\x06hexstr\x18\x07 \x01(\x08\x12\x0f\n\x07ignored\x18\t \x01(\x08\x12\x10\n\x08\x62itfield\x18\n \x01(\x08\x12\x10\n\x08\x64\x61tetime\x18\x0b \x01(\x08\x12\x13\n\x0bipv4address\x18\x0c \x01(\x08\x12\x14\n\x0comit_if_zero\x18\r \x01(\x08\x12\x14\n\x0cnull_if_zero\x18\x0e \x01(\x08:\x05\x92?\x02\x30\x01*\xad\x02\n\x08UnitType\x12\n\n\x06NotSet\x10\x00\x12\x0b\n\x07\x43\x65lsius\x10\x01\x12\x12\n\x0eInverseCelsius\x10\x02\x12\n\n\x06Second\x10\x03\x12\n\n\x06Minute\x10\x04\x12\x08\n\x04Hour\x10\x05\x12\x10\n\x0c\x44\x65ltaCelsius\x10\x06\x12\x19\n\x15\x44\x65ltaCelsiusPerSecond\x10\x07\x12\x19\n\x15\x44\x65ltaCelsiusPerMinute\x10\x08\x12\x17\n\x13\x44\x65ltaCelsiusPerHour\x10\t\x12\x1a\n\x16\x44\x65ltaCelsiusMultSecond\x10\n\x12\x1a\n\x16\x44\x65ltaCelsiusMultMinute\x10\x0b\x12\x18\n\x14\x44\x65ltaCelsiusMultHour\x10\x0c\x12\x0c\n\x08MilliBar\x10\r\x12\x08\n\x04Volt\x10\x0e\x12\x07\n\x03Ohm\x10\x0f*\x96\x0b\n\tBlockType\x12\x0b\n\x07Invalid\x10\x00\x12\x19\n\x15ProcessValueInterface\x10\x01\x12\x17\n\x13TempSensorInterface\x10\x02\x12\x1f\n\x1bSetpointSensorPairInterface\x10\x04\x12\x1b\n\x17\x41\x63tuatorAnalogInterface\x10\x05\x12\x1c\n\x18\x41\x63tuatorDigitalInterface\x10\x06\x12\x15\n\x11\x42\x61lancerInterface\x10\x07\x12\x12\n\x0eMutexInterface\x10\x08\x12\x1a\n\x16OneWireDeviceInterface\x10\t\x12\x14\n\x10IoArrayInterface\x10\n\x12\x13\n\x0f\x44S2408Interface\x10\x0b\x12\x17\n\x13OneWireBusInterface\x10\x0c\x12\x15\n\x11IoModuleInterface\x10\r\x12\x1f\n\x1bOneWireDeviceBlockInterface\x10\x0e\x12\x14\n\x10\x45nablerInterface\x10\x0f\x12\x16\n\x12\x43laimableInterface\x10\x10\x12\x15\n\x11IoDriverInterface\x10\x11\x12\x15\n\x11SetpointInterface\x10\x12\x12\x19\n\x15StoredAnalogInterface\x10\x13\x12\x1b\n\x17StoredSetpointInterface\x10\x14\x12\x1a\n\x16StoredDigitalInterface\x10\x15\x12\x1e\n\x1a\x43onstrainedAnalogInterface\x10\x16\x12 \n\x1c\x43onstrainedSetpointInterface\x10\x17\x12\x1f\n\x1b\x43onstrainedDigitalInterface\x10\x18\x12\x1c\n\x18ScanningFactoryInterface\x10\x19\x12\x1c\n\x18I2CDiscoverableInterface\x10\x1a\x12\x14\n\x10\x44igitalInterface\x10\x1b\x12\x19\n\x15\x41nalogModuleInterface\x10\x1c\x12\x08\n\x03\x41ny\x10\xff\x01\x12\x0c\n\x07SysInfo\x10\x80\x02\x12\n\n\x05Ticks\x10\x81\x02\x12\x0f\n\nOneWireBus\x10\x82\x02\x12\x0e\n\tBoardPins\x10\x83\x02\x12\x13\n\x0eTempSensorMock\x10\xad\x02\x12\x16\n\x11TempSensorOneWire\x10\xae\x02\x12\x17\n\x12SetpointSensorPair\x10\xaf\x02\x12\x08\n\x03Pid\x10\xb0\x02\x12\x17\n\x12\x41\x63tuatorAnalogMock\x10\xb1\x02\x12\x10\n\x0b\x41\x63tuatorPin\x10\xb2\x02\x12\x10\n\x0b\x41\x63tuatorPwm\x10\xb3\x02\x12\x13\n\x0e\x41\x63tuatorOffset\x10\xb4\x02\x12\r\n\x08\x42\x61lancer\x10\xb5\x02\x12\n\n\x05Mutex\x10\xb6\x02\x12\x14\n\x0fSetpointProfile\x10\xb7\x02\x12\x11\n\x0cWiFiSettings\x10\xb8\x02\x12\x12\n\rTouchSettings\x10\xb9\x02\x12\x14\n\x0f\x44isplaySettings\x10\xba\x02\x12\x0b\n\x06\x44S2413\x10\xbb\x02\x12\x14\n\x0f\x41\x63tuatorOneWire\x10\xbc\x02\x12\x0b\n\x06\x44S2408\x10\xbd\x02\x12\x14\n\x0f\x44igitalActuator\x10\xbe\x02\x12\x0f\n\nSpark3Pins\x10\xbf\x02\x12\x0f\n\nSpark2Pins\x10\xc0\x02\x12\x0f\n\nMotorValve\x10\xc1\x02\x12\x12\n\rActuatorLogic\x10\xc2\x02\x12\r\n\x08MockPins\x10\xc3\x02\x12\x14\n\x0fTempSensorCombi\x10\xc4\x02\x12\x16\n\x11OneWireGpioModule\x10\xc5\x02\x12\r\n\x08Sequence\x10\xc6\x02\x12\x17\n\x12TempSensorExternal\x10\xc8\x02\x12\x0c\n\x07\x46\x61stPwm\x10\xc9\x02\x12\x11\n\x0c\x44igitalInput\x10\xca\x02\x12\x1a\n\x15PrecisionAnalogModule\x10\xcb\x02\x12\x15\n\x10TempSensorAnalog\x10\xcc\x02\x12\x0e\n\tVariables\x10\xcd\x02:J\n\x05\x66ield\x12\x1d.google.protobuf.FieldOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x13.brewblox.FieldOptsB\x05\x92?\x02\x18\x03:L\n\x03msg\x12\x1f.google.protobuf.MessageOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x15.brewblox.MessageOptsB\x05\x92?\x02\x18\x03\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x62rewblox.proto\x12\x08\x62rewblox\x1a google/protobuf/descriptor.proto\x1a\x0cnanopb.proto\"|\n\x0bMessageOpts\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12(\n\x04impl\x18\t \x03(\x0e\x32\x13.brewblox.BlockTypeB\x05\x92?\x02\x10\x05\x12\x16\n\x07subtype\x18\x0b \x01(\rB\x05\x92?\x02\x38\x10:\x05\x92?\x02\x30\x01\"\xb0\x02\n\tFieldOpts\x12 \n\x04unit\x18\x01 \x01(\x0e\x32\x12.brewblox.UnitType\x12\r\n\x05scale\x18\x02 \x01(\r\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12\r\n\x05hexed\x18\x04 \x01(\x08\x12\x10\n\x08readonly\x18\x05 \x01(\x08\x12\x0e\n\x06logged\x18\x06 \x01(\x08\x12\x0e\n\x06stored\x18\x0f \x01(\x08\x12\x0e\n\x06hexstr\x18\x07 \x01(\x08\x12\x0f\n\x07ignored\x18\t \x01(\x08\x12\x10\n\x08\x62itfield\x18\n \x01(\x08\x12\x10\n\x08\x64\x61tetime\x18\x0b \x01(\x08\x12\x13\n\x0bipv4address\x18\x0c \x01(\x08\x12\x14\n\x0comit_if_zero\x18\r \x01(\x08\x12\x14\n\x0cnull_if_zero\x18\x0e \x01(\x08:\x05\x92?\x02\x30\x01*\xad\x02\n\x08UnitType\x12\n\n\x06NotSet\x10\x00\x12\x0b\n\x07\x43\x65lsius\x10\x01\x12\x12\n\x0eInverseCelsius\x10\x02\x12\n\n\x06Second\x10\x03\x12\n\n\x06Minute\x10\x04\x12\x08\n\x04Hour\x10\x05\x12\x10\n\x0c\x44\x65ltaCelsius\x10\x06\x12\x19\n\x15\x44\x65ltaCelsiusPerSecond\x10\x07\x12\x19\n\x15\x44\x65ltaCelsiusPerMinute\x10\x08\x12\x17\n\x13\x44\x65ltaCelsiusPerHour\x10\t\x12\x1a\n\x16\x44\x65ltaCelsiusMultSecond\x10\n\x12\x1a\n\x16\x44\x65ltaCelsiusMultMinute\x10\x0b\x12\x18\n\x14\x44\x65ltaCelsiusMultHour\x10\x0c\x12\x0c\n\x08MilliBar\x10\r\x12\x08\n\x04Volt\x10\x0e\x12\x07\n\x03Ohm\x10\x0f*\xa8\x0b\n\tBlockType\x12\x0b\n\x07Invalid\x10\x00\x12\x19\n\x15ProcessValueInterface\x10\x01\x12\x17\n\x13TempSensorInterface\x10\x02\x12\x1f\n\x1bSetpointSensorPairInterface\x10\x04\x12\x1b\n\x17\x41\x63tuatorAnalogInterface\x10\x05\x12\x1c\n\x18\x41\x63tuatorDigitalInterface\x10\x06\x12\x15\n\x11\x42\x61lancerInterface\x10\x07\x12\x12\n\x0eMutexInterface\x10\x08\x12\x1a\n\x16OneWireDeviceInterface\x10\t\x12\x14\n\x10IoArrayInterface\x10\n\x12\x13\n\x0f\x44S2408Interface\x10\x0b\x12\x17\n\x13OneWireBusInterface\x10\x0c\x12\x15\n\x11IoModuleInterface\x10\r\x12\x1f\n\x1bOneWireDeviceBlockInterface\x10\x0e\x12\x14\n\x10\x45nablerInterface\x10\x0f\x12\x16\n\x12\x43laimableInterface\x10\x10\x12\x15\n\x11IoDriverInterface\x10\x11\x12\x15\n\x11SetpointInterface\x10\x12\x12\x19\n\x15StoredAnalogInterface\x10\x13\x12\x1b\n\x17StoredSetpointInterface\x10\x14\x12\x1a\n\x16StoredDigitalInterface\x10\x15\x12\x1e\n\x1a\x43onstrainedAnalogInterface\x10\x16\x12 \n\x1c\x43onstrainedSetpointInterface\x10\x17\x12\x1f\n\x1b\x43onstrainedDigitalInterface\x10\x18\x12\x1c\n\x18ScanningFactoryInterface\x10\x19\x12\x1c\n\x18I2CDiscoverableInterface\x10\x1a\x12\x14\n\x10\x44igitalInterface\x10\x1b\x12\x19\n\x15\x41nalogModuleInterface\x10\x1c\x12\x08\n\x03\x41ny\x10\xff\x01\x12\x0c\n\x07SysInfo\x10\x80\x02\x12\n\n\x05Ticks\x10\x81\x02\x12\x0f\n\nOneWireBus\x10\x82\x02\x12\x0e\n\tBoardPins\x10\x83\x02\x12\x13\n\x0eTempSensorMock\x10\xad\x02\x12\x16\n\x11TempSensorOneWire\x10\xae\x02\x12\x17\n\x12SetpointSensorPair\x10\xaf\x02\x12\x08\n\x03Pid\x10\xb0\x02\x12\x17\n\x12\x41\x63tuatorAnalogMock\x10\xb1\x02\x12\x10\n\x0b\x41\x63tuatorPin\x10\xb2\x02\x12\x10\n\x0b\x41\x63tuatorPwm\x10\xb3\x02\x12\x13\n\x0e\x41\x63tuatorOffset\x10\xb4\x02\x12\r\n\x08\x42\x61lancer\x10\xb5\x02\x12\n\n\x05Mutex\x10\xb6\x02\x12\x14\n\x0fSetpointProfile\x10\xb7\x02\x12\x11\n\x0cWiFiSettings\x10\xb8\x02\x12\x12\n\rTouchSettings\x10\xb9\x02\x12\x14\n\x0f\x44isplaySettings\x10\xba\x02\x12\x0b\n\x06\x44S2413\x10\xbb\x02\x12\x14\n\x0f\x41\x63tuatorOneWire\x10\xbc\x02\x12\x0b\n\x06\x44S2408\x10\xbd\x02\x12\x14\n\x0f\x44igitalActuator\x10\xbe\x02\x12\x0f\n\nSpark3Pins\x10\xbf\x02\x12\x0f\n\nSpark2Pins\x10\xc0\x02\x12\x0f\n\nMotorValve\x10\xc1\x02\x12\x12\n\rActuatorLogic\x10\xc2\x02\x12\r\n\x08MockPins\x10\xc3\x02\x12\x14\n\x0fTempSensorCombi\x10\xc4\x02\x12\x16\n\x11OneWireGpioModule\x10\xc5\x02\x12\r\n\x08Sequence\x10\xc6\x02\x12\x17\n\x12TempSensorExternal\x10\xc8\x02\x12\x0c\n\x07\x46\x61stPwm\x10\xc9\x02\x12\x11\n\x0c\x44igitalInput\x10\xca\x02\x12\x1a\n\x15PrecisionAnalogModule\x10\xcb\x02\x12\x15\n\x10TempSensorAnalog\x10\xcc\x02\x12\x0e\n\tVariables\x10\xcd\x02\x12\x10\n\nDeprecated\x10\xfd\xff\x03:J\n\x05\x66ield\x12\x1d.google.protobuf.FieldOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x13.brewblox.FieldOptsB\x05\x92?\x02\x18\x03:L\n\x03msg\x12\x1f.google.protobuf.MessageOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x15.brewblox.MessageOptsB\x05\x92?\x02\x18\x03\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,7 +37,7 @@ _globals['_UNITTYPE']._serialized_start=510 _globals['_UNITTYPE']._serialized_end=811 _globals['_BLOCKTYPE']._serialized_start=814 - _globals['_BLOCKTYPE']._serialized_end=2244 + _globals['_BLOCKTYPE']._serialized_end=2262 _globals['_MESSAGEOPTS']._serialized_start=76 _globals['_MESSAGEOPTS']._serialized_end=200 _globals['_FIELDOPTS']._serialized_start=203 diff --git a/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py index 33f0c905..62fcff64 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rcommand.proto\x12\x07\x63ommand\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"%\n\tMaskField\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x03(\rB\x07\x92?\x04\x10\x04\x38\x10\"\xb8\x01\n\x07Payload\x12\x0f\n\x07\x62lockId\x18\x01 \x01(\r\x12&\n\tblockType\x18\x02 \x01(\x0e\x32\x13.brewblox.BlockType\x12\x16\n\x07subtype\x18\x03 \x01(\rB\x05\x92?\x02\x38\x10\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\t\x12#\n\x08maskMode\x18\x06 \x01(\x0e\x32\x11.command.MaskMode\x12&\n\nmaskFields\x18\x07 \x03(\x0b\x32\x12.command.MaskField\"}\n\x07Request\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12\x1f\n\x06opcode\x18\x02 \x01(\x0e\x32\x0f.command.Opcode\x12!\n\x07payload\x18\x03 \x01(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode\"\x80\x01\n\x08Response\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x12.command.ErrorCode\x12!\n\x07payload\x18\x03 \x03(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode*\x8a\x02\n\x06Opcode\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07VERSION\x10\x01\x12\x0e\n\nBLOCK_READ\x10\n\x12\x12\n\x0e\x42LOCK_READ_ALL\x10\x0b\x12\x0f\n\x0b\x42LOCK_WRITE\x10\x0c\x12\x10\n\x0c\x42LOCK_CREATE\x10\r\x12\x10\n\x0c\x42LOCK_DELETE\x10\x0e\x12\x12\n\x0e\x42LOCK_DISCOVER\x10\x0f\x12\x10\n\x0cSTORAGE_READ\x10\x14\x12\x14\n\x10STORAGE_READ_ALL\x10\x15\x12\n\n\x06REBOOT\x10\x1e\x12\x10\n\x0c\x43LEAR_BLOCKS\x10\x1f\x12\x0e\n\nCLEAR_WIFI\x10 \x12\x11\n\rFACTORY_RESET\x10!\x12\x13\n\x0f\x46IRMWARE_UPDATE\x10(*\xed\x05\n\tErrorCode\x12\x06\n\x02OK\x10\x00\x12\x11\n\rUNKNOWN_ERROR\x10\x01\x12\x12\n\x0eINVALID_OPCODE\x10\x02\x12\x15\n\x11INSUFFICIENT_HEAP\x10\x04\x12\x18\n\x14INSUFFICIENT_STORAGE\x10\x05\x12\x11\n\rNETWORK_ERROR\x10\n\x12\x16\n\x12NETWORK_READ_ERROR\x10\x0b\x12\x1a\n\x16NETWORK_DECODING_ERROR\x10\x0c\x12\x17\n\x13NETWORK_WRITE_ERROR\x10\r\x12\x1a\n\x16NETWORK_ENCODING_ERROR\x10\x0e\x12\x11\n\rSTORAGE_ERROR\x10\x14\x12\x16\n\x12STORAGE_READ_ERROR\x10\x15\x12\x1a\n\x16STORAGE_DECODING_ERROR\x10\x16\x12\x15\n\x11STORAGE_CRC_ERROR\x10\x17\x12\x17\n\x13STORAGE_WRITE_ERROR\x10\x18\x12\x1a\n\x16STORAGE_ENCODING_ERROR\x10\x19\x12\x16\n\x12\x42LOCK_NOT_WRITABLE\x10\x1e\x12\x16\n\x12\x42LOCK_NOT_READABLE\x10\x1f\x12\x17\n\x13\x42LOCK_NOT_CREATABLE\x10 \x12\x17\n\x13\x42LOCK_NOT_DELETABLE\x10!\x12\x11\n\rINVALID_BLOCK\x10(\x12\x14\n\x10INVALID_BLOCK_ID\x10)\x12\x16\n\x12INVALID_BLOCK_TYPE\x10*\x12\x19\n\x15INVALID_BLOCK_SUBTYPE\x10+\x12\x19\n\x15INVALID_BLOCK_CONTENT\x10,\x12\x18\n\x14INVALID_STORED_BLOCK\x10\x32\x12\x1b\n\x17INVALID_STORED_BLOCK_ID\x10\x33\x12\x1d\n\x19INVALID_STORED_BLOCK_TYPE\x10\x34\x12 \n\x1cINVALID_STORED_BLOCK_SUBTYPE\x10\x35\x12 \n\x1cINVALID_STORED_BLOCK_CONTENT\x10\x36*5\n\x08MaskMode\x12\x0b\n\x07NO_MASK\x10\x00\x12\r\n\tINCLUSIVE\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*/\n\x08ReadMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06STORED\x10\x01\x12\n\n\x06LOGGED\x10\x02\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rcommand.proto\x12\x07\x63ommand\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"%\n\tMaskField\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x03(\rB\x07\x92?\x04\x10\x04\x38\x10\"\xae\x01\n\x07Payload\x12\x0f\n\x07\x62lockId\x18\x01 \x01(\r\x12&\n\tblockType\x18\x02 \x01(\x0e\x32\x13.brewblox.BlockType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\t\x12#\n\x08maskMode\x18\x06 \x01(\x0e\x32\x11.command.MaskMode\x12&\n\nmaskFields\x18\x07 \x03(\x0b\x32\x12.command.MaskField\"}\n\x07Request\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12\x1f\n\x06opcode\x18\x02 \x01(\x0e\x32\x0f.command.Opcode\x12!\n\x07payload\x18\x03 \x01(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode\"\x80\x01\n\x08Response\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x12.command.ErrorCode\x12!\n\x07payload\x18\x03 \x03(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode*\xbc\x02\n\x06Opcode\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07VERSION\x10\x01\x12\x0e\n\nBLOCK_READ\x10\n\x12\x12\n\x0e\x42LOCK_READ_ALL\x10\x0b\x12\x0f\n\x0b\x42LOCK_WRITE\x10\x0c\x12\x10\n\x0c\x42LOCK_CREATE\x10\r\x12\x10\n\x0c\x42LOCK_DELETE\x10\x0e\x12\x12\n\x0e\x42LOCK_DISCOVER\x10\x0f\x12\x10\n\x0cSTORAGE_READ\x10\x14\x12\x14\n\x10STORAGE_READ_ALL\x10\x15\x12\r\n\tNAME_READ\x10\x32\x12\x11\n\rNAME_READ_ALL\x10\x33\x12\x0e\n\nNAME_WRITE\x10\x34\x12\n\n\x06REBOOT\x10\x1e\x12\x10\n\x0c\x43LEAR_BLOCKS\x10\x1f\x12\x0e\n\nCLEAR_WIFI\x10 \x12\x11\n\rFACTORY_RESET\x10!\x12\x13\n\x0f\x46IRMWARE_UPDATE\x10(*\x99\x06\n\tErrorCode\x12\x06\n\x02OK\x10\x00\x12\x11\n\rUNKNOWN_ERROR\x10\x01\x12\x12\n\x0eINVALID_OPCODE\x10\x02\x12\x15\n\x11INSUFFICIENT_HEAP\x10\x04\x12\x18\n\x14INSUFFICIENT_STORAGE\x10\x05\x12\x11\n\rNETWORK_ERROR\x10\n\x12\x16\n\x12NETWORK_READ_ERROR\x10\x0b\x12\x1a\n\x16NETWORK_DECODING_ERROR\x10\x0c\x12\x17\n\x13NETWORK_WRITE_ERROR\x10\r\x12\x1a\n\x16NETWORK_ENCODING_ERROR\x10\x0e\x12\x11\n\rSTORAGE_ERROR\x10\x14\x12\x16\n\x12STORAGE_READ_ERROR\x10\x15\x12\x1a\n\x16STORAGE_DECODING_ERROR\x10\x16\x12\x15\n\x11STORAGE_CRC_ERROR\x10\x17\x12\x17\n\x13STORAGE_WRITE_ERROR\x10\x18\x12\x1a\n\x16STORAGE_ENCODING_ERROR\x10\x19\x12\x16\n\x12\x42LOCK_NOT_WRITABLE\x10\x1e\x12\x16\n\x12\x42LOCK_NOT_READABLE\x10\x1f\x12\x17\n\x13\x42LOCK_NOT_CREATABLE\x10 \x12\x17\n\x13\x42LOCK_NOT_DELETABLE\x10!\x12\x11\n\rINVALID_BLOCK\x10(\x12\x14\n\x10INVALID_BLOCK_ID\x10)\x12\x16\n\x12INVALID_BLOCK_TYPE\x10*\x12\x19\n\x15INVALID_BLOCK_CONTENT\x10,\x12\x16\n\x12INVALID_BLOCK_NAME\x10-\x12\x18\n\x14INVALID_STORED_BLOCK\x10\x32\x12\x1b\n\x17INVALID_STORED_BLOCK_ID\x10\x33\x12\x1d\n\x19INVALID_STORED_BLOCK_TYPE\x10\x34\x12 \n\x1cINVALID_STORED_BLOCK_CONTENT\x10\x36\x12\x1d\n\x19INVALID_STORED_BLOCK_NAME\x10\x37\x12\x16\n\x12\x44UPLICATE_BLOCK_ID\x10<\x12\x18\n\x14\x44UPLICATE_BLOCK_NAME\x10=*5\n\x08MaskMode\x12\x0b\n\x07NO_MASK\x10\x00\x12\r\n\tINCLUSIVE\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*/\n\x08ReadMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06STORED\x10\x01\x12\n\n\x06LOGGED\x10\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -24,22 +24,20 @@ DESCRIPTOR._options = None _MASKFIELD.fields_by_name['address']._options = None _MASKFIELD.fields_by_name['address']._serialized_options = b'\222?\004\020\0048\020' - _PAYLOAD.fields_by_name['subtype']._options = None - _PAYLOAD.fields_by_name['subtype']._serialized_options = b'\222?\0028\020' - _globals['_OPCODE']._serialized_start=541 - _globals['_OPCODE']._serialized_end=807 - _globals['_ERRORCODE']._serialized_start=810 - _globals['_ERRORCODE']._serialized_end=1559 - _globals['_MASKMODE']._serialized_start=1561 - _globals['_MASKMODE']._serialized_end=1614 - _globals['_READMODE']._serialized_start=1616 - _globals['_READMODE']._serialized_end=1663 + _globals['_OPCODE']._serialized_start=531 + _globals['_OPCODE']._serialized_end=847 + _globals['_ERRORCODE']._serialized_start=850 + _globals['_ERRORCODE']._serialized_end=1643 + _globals['_MASKMODE']._serialized_start=1645 + _globals['_MASKMODE']._serialized_end=1698 + _globals['_READMODE']._serialized_start=1700 + _globals['_READMODE']._serialized_end=1747 _globals['_MASKFIELD']._serialized_start=56 _globals['_MASKFIELD']._serialized_end=93 _globals['_PAYLOAD']._serialized_start=96 - _globals['_PAYLOAD']._serialized_end=280 - _globals['_REQUEST']._serialized_start=282 - _globals['_REQUEST']._serialized_end=407 - _globals['_RESPONSE']._serialized_start=410 - _globals['_RESPONSE']._serialized_end=538 + _globals['_PAYLOAD']._serialized_end=270 + _globals['_REQUEST']._serialized_start=272 + _globals['_REQUEST']._serialized_end=397 + _globals['_RESPONSE']._serialized_start=400 + _globals['_RESPONSE']._serialized_end=528 # @@protoc_insertion_point(module_scope) diff --git a/brewblox_devcon_spark/command.py b/brewblox_devcon_spark/command.py index 6fa5282b..f6f0c4b6 100644 --- a/brewblox_devcon_spark/command.py +++ b/brewblox_devcon_spark/command.py @@ -58,16 +58,16 @@ def _to_payload(self, patch=False, ) -> EncodedPayload: if block.type: - (blockType, subtype) = codec.split_type(block.type) payload = DecodedPayload( blockId=block.nid, - blockType=blockType, - subypte=subtype, + blockType=block.type, + name=block.id, content=(None if identity_only else block.data), maskMode=(MaskMode.INCLUSIVE if patch else MaskMode.NO_MASK), ) else: - payload = DecodedPayload(blockId=block.nid) + payload = DecodedPayload(blockId=block.nid, + name=block.id) return self.codec.encode_payload(payload) @@ -77,8 +77,9 @@ def _to_block(self, ) -> FirmwareBlock: payload = self.codec.decode_payload(payload, mode=mode) return FirmwareBlock( + id=payload.name, nid=payload.blockId, - type=codec.join_type(payload.blockType, payload.subtype), + type=payload.blockType, data=payload.content or {}, ) @@ -201,7 +202,7 @@ async def patch_block(self, block: FirmwareBlock) -> FirmwareBlock: async def create_block(self, block: FirmwareBlock) -> FirmwareBlock: payloads = await self._execute(Opcode.BLOCK_CREATE, - payload=self._to_payload(block, patch=True)) + payload=self._to_payload(block)) return self._to_block(payloads[0]) async def delete_block(self, ident: FirmwareBlockIdentity) -> None: @@ -212,6 +213,15 @@ async def discover_blocks(self) -> list[FirmwareBlock]: payloads = await self._execute(Opcode.BLOCK_DISCOVER) return [self._to_block(v) for v in payloads] + async def read_all_block_names(self) -> list[FirmwareBlock]: + payloads = await self._execute(Opcode.NAME_READ_ALL) + return [self._to_block(v) for v in payloads] + + async def write_block_name(self, ident: FirmwareBlockIdentity) -> FirmwareBlock: + payloads = await self._execute(Opcode.NAME_WRITE, + payload=self._to_payload(ident, identity_only=True)) + return self._to_block(payloads[0]) + async def reboot(self) -> None: await self._execute(Opcode.REBOOT) diff --git a/brewblox_devcon_spark/connection/mock_connection.py b/brewblox_devcon_spark/connection/mock_connection.py index 23841e94..ca735eb8 100644 --- a/brewblox_devcon_spark/connection/mock_connection.py +++ b/brewblox_devcon_spark/connection/mock_connection.py @@ -30,6 +30,7 @@ def default_blocks() -> dict[int, FirmwareBlock]: block.nid: block for block in [ FirmwareBlock( + id='SystemInfo', nid=const.SYSINFO_NID, type='SysInfo', data={ @@ -39,21 +40,25 @@ def default_blocks() -> dict[int, FirmwareBlock]: }, ), FirmwareBlock( + id='OneWireBus', nid=const.ONEWIREBUS_NID, type='OneWireBus', data={}, ), FirmwareBlock( + id='WiFiSettings', nid=const.WIFI_SETTINGS_NID, type='WiFiSettings', data={}, ), FirmwareBlock( + id='DisplaySettings', nid=const.DISPLAY_SETTINGS_NID, type='DisplaySettings', data={}, ), FirmwareBlock( + id='SparkPins', nid=const.SPARK_PINS_NID, type='Spark3Pins', data={ @@ -82,28 +87,29 @@ def __init__(self, self._blocks: dict[int, FirmwareBlock] = default_blocks() def _to_payload(self, block: FirmwareBlock, mode: ReadMode) -> EncodedPayload: - (blockType, subtype) = codec.split_type(block.type) return self._codec.encode_payload(DecodedPayload( blockId=block.nid, - blockType=blockType, - subypte=subtype, + blockType=block.type, + name=block.id, content=block.data )) def _to_block(self, payload: EncodedPayload) -> FirmwareBlock: payload = self._codec.decode_payload(payload) return FirmwareBlock( + id=payload.name, nid=payload.blockId, - type=codec.join_type(payload.blockType, payload.subtype), + type=payload.blockType, data=payload.content, ) - def _default_block(self, block_id: int, block_type: str) -> FirmwareBlock: + def _default_block(self, block_id: str, block_nid: int, block_type: str) -> FirmwareBlock: return self._to_block( self._codec.encode_payload( DecodedPayload( - blockId=block_id, + blockId=block_nid, blockType=block_type, + name=block_id, content={} ) ) @@ -168,6 +174,7 @@ async def handle_command(self, elif request.opcode in [ Opcode.BLOCK_READ, Opcode.STORAGE_READ, + Opcode.NAME_READ, ]: block = self._blocks.get(request.payload.blockId) if not block: @@ -178,6 +185,7 @@ async def handle_command(self, elif request.opcode in [ Opcode.BLOCK_READ_ALL, Opcode.STORAGE_READ_ALL, + Opcode.NAME_READ_ALL, ]: response.payload = [self._to_payload(block, request.mode) for block in self._blocks.values()] @@ -207,7 +215,7 @@ async def handle_command(self, else: nid = nid or next(self._id_counter) argblock = self._to_block(request.payload) - block = self._default_block(nid, argblock.type) + block = self._default_block(request.payload.name, nid, argblock.type) self._merge_blocks(block, argblock) self._blocks[nid] = block response.payload = [self._to_payload(block, request.mode)] @@ -227,6 +235,22 @@ async def handle_command(self, block = self._blocks[const.SPARK_PINS_NID] response.payload = [self._to_payload(block, request.mode)] + elif request.opcode == Opcode.NAME_WRITE: + nid = request.payload.blockId + name = request.payload.name + block = self._blocks.get(nid) + match = next((block for block in self._blocks.values() + if block.id == name), None) + if not block: + response.error = ErrorCode.INVALID_BLOCK_ID + elif not name: + response.error = ErrorCode.INVALID_BLOCK_NAME + elif match and match.nid != nid: + response.error = ErrorCode.INVALID_BLOCK_NAME + else: + block.id = name + response.payload = [self._to_payload(block, ReadMode.DEFAULT)] + elif request.opcode == Opcode.REBOOT: self._start_time = datetime.now() self.update_systime() diff --git a/brewblox_devcon_spark/const.py b/brewblox_devcon_spark/const.py index 8171cc3e..f4e53b94 100644 --- a/brewblox_devcon_spark/const.py +++ b/brewblox_devcon_spark/const.py @@ -5,7 +5,6 @@ USER_NID_START = 100 OBJECT_LINK_POSTFIX_START = '<' OBJECT_LINK_POSTFIX_END = '>' -GENERATED_ID_PREFIX = 'New|' SERVICE_NAMESPACE = 'spark-service' GLOBAL_NAMESPACE = 'brewblox-global' @@ -19,15 +18,6 @@ DISPLAY_SETTINGS_NID = 7 SPARK_PINS_NID = 19 -# Default SID/NID for system objects -SYS_OBJECT_KEYS: list[tuple[str, int]] = [ - ['SystemInfo', SYSINFO_NID], - ['OneWireBus', ONEWIREBUS_NID], - ['WiFiSettings', WIFI_SETTINGS_NID], - ['DisplaySettings', DISPLAY_SETTINGS_NID], - ['SparkPins', SPARK_PINS_NID], -] - # Relevant block types SEQUENCE_BLOCK_TYPE = 'Sequence' SYSINFO_BLOCK_TYPE = 'SysInfo' diff --git a/brewblox_devcon_spark/datastore_blocks.py b/brewblox_devcon_spark/datastore_blocks.py index 6c103556..fc3b0cf9 100644 --- a/brewblox_devcon_spark/datastore_blocks.py +++ b/brewblox_devcon_spark/datastore_blocks.py @@ -1,123 +1,18 @@ """ Stores sid/nid relations for blocks """ -import asyncio import logging -from contextlib import suppress from contextvars import ContextVar -from httpx import AsyncClient - -from . import const, exceptions, state_machine, utils -from .models import (DatastoreSingleQuery, TwinKeyEntriesBox, - TwinKeyEntriesValue, TwinKeyEntry) -from .twinkeydict import TwinKeyDict, TwinKeyError - -SYS_OBJECTS: list[TwinKeyEntry] = [ - TwinKeyEntry(keys=keys, data={}) - for keys in const.SYS_OBJECT_KEYS -] +from bidict import OnDup, OnDupAction, bidict LOGGER = logging.getLogger(__name__) -CV: ContextVar['BlockStore'] = ContextVar('block_store.BlockStore') - - -class BlockStore(TwinKeyDict[str, int, dict]): - def __init__(self, defaults: list[TwinKeyEntry]): - super().__init__() - - self.config = utils.get_config() - self.state = state_machine.CV.get() - self._changed_ev = asyncio.Event() - self._flush_lock = asyncio.Lock() - self._defaults = defaults - self._client = AsyncClient(base_url=self.config.datastore_url) - self._doc_id: str | None = None - - def get_doc_id(self) -> str | None: - if not self.state.is_acknowledged(): - return None - - # Simulation services are identified by service name. - # This prevents data conflicts when a simulation service - # is reconfigured to start interacting with a controller. - desc = self.state.desc() - if desc.connection_kind == 'SIM': - device_name = f'simulator__{self.config.name}' - elif desc.connection_kind == 'MOCK': - device_name = f'mock__{self.config.name}' - else: - device_name = desc.controller.device.device_id - - return f'{device_name}-blocks-db' - - async def load(self): - self._doc_id = self.get_doc_id() - data: list[TwinKeyEntry] = [] - - if not self._doc_id: - raise exceptions.NotConnected('Not acknowledged before loading block store') - - try: - query = DatastoreSingleQuery(id=self._doc_id, - namespace=const.SERVICE_NAMESPACE) - content = query.model_dump(mode='json') - resp = await utils.httpx_retry(lambda: self._client.post('/get', json=content)) - - try: - box = TwinKeyEntriesBox.model_validate_json(resp.text) - data = box.value.data - except (AttributeError, ValueError): - data = [] - LOGGER.info(f'Loaded {len(data)} block(s)') - - finally: - # Clear -> load from database -> merge defaults - super().clear() - for obj in data: - super().__setitem__(obj.keys, obj.data) - for obj in self._defaults: - with suppress(TwinKeyError): - if obj.keys not in self: - self.__setitem__(obj.keys, obj.data) - - self._changed_ev.clear() - - async def flush(self): - if not self._doc_id: - raise exceptions.NotConnected('Not acknowledged before flushing block store') - - async with self._flush_lock: - if not self._changed_ev.is_set(): - return - - box = TwinKeyEntriesBox( - value=TwinKeyEntriesValue( - id=self._doc_id, - namespace=const.SERVICE_NAMESPACE, - data=[TwinKeyEntry(keys=k, data=v) - for k, v in self.items()] - ) - ) - self._changed_ev.clear() - await self._client.post('/set', - json=box.model_dump(mode='json')) - LOGGER.info(f'Saved {len(box.value.data)} block(s)') - - def __setitem__(self, keys: tuple[str, int], item: dict): - super().__setitem__(keys, item) - self._changed_ev.set() - - def __delitem__(self, keys: tuple[str | None, int | None]): - super().__delitem__(keys) - self._changed_ev.set() - - def clear(self): - super().clear() - for obj in self._defaults: - self.__setitem__(obj.keys, obj.data) +CV: ContextVar[bidict[str, int]] = ContextVar('datastore_blocks.bidict') def setup(): - CV.set(BlockStore(defaults=SYS_OBJECTS)) + bd = bidict() + bd.on_dup = OnDup(key=OnDupAction.DROP_OLD, + val=OnDupAction.DROP_OLD) + CV.set(bd) diff --git a/brewblox_devcon_spark/endpoints/http_blocks.py b/brewblox_devcon_spark/endpoints/http_blocks.py index 60a1a34e..155732f1 100644 --- a/brewblox_devcon_spark/endpoints/http_blocks.py +++ b/brewblox_devcon_spark/endpoints/http_blocks.py @@ -193,15 +193,6 @@ async def blocks_all_delete() -> list[BlockIdentity]: return idents -@router.post('/cleanup') -async def blocks_cleanup() -> list[BlockIdentity]: - """ - Clean unused block IDs. - """ - idents = await spark_api.CV.get().remove_unused_ids() - return idents - - @router.post('/rename') async def blocks_rename(args: BlockNameChange) -> BlockIdentity: """ diff --git a/brewblox_devcon_spark/models.py b/brewblox_devcon_spark/models.py index cc7a18c6..4791104a 100644 --- a/brewblox_devcon_spark/models.py +++ b/brewblox_devcon_spark/models.py @@ -160,12 +160,14 @@ class Block(BaseModel): class FirmwareBlockIdentity(BaseModel): + id: str | None = None nid: int type: str | None = None data: dict[str, Any] | None = None class FirmwareBlock(BaseModel): + id: str | None = None nid: int type: str data: dict[str, Any] @@ -232,6 +234,10 @@ class Opcode(enum.Enum): STORAGE_READ = 20 STORAGE_READ_ALL = 21 + NAME_READ = 50 + NAME_READ_ALL = 51 + NAME_WRITE = 52 + REBOOT = 30 CLEAR_BLOCKS = 31 CLEAR_WIFI = 32 @@ -274,15 +280,19 @@ class ErrorCode(enum.Enum): INVALID_BLOCK = 40 INVALID_BLOCK_ID = 41 INVALID_BLOCK_TYPE = 42 - INVALID_BLOCK_SUBTYPE = 43 INVALID_BLOCK_CONTENT = 44 + INVALID_BLOCK_NAME = 45 # Invalid stored block data INVALID_STORED_BLOCK = 50 INVALID_STORED_BLOCK_ID = 51 INVALID_STORED_BLOCK_TYPE = 52 - INVALID_STORED_BLOCK_SUBTYPE = 53 INVALID_STORED_BLOCK_CONTENT = 54 + INVALID_STORED_BLOCK_NAME = 55 + + # Invalid block identifiers + DUPLICATE_BLOCK_ID = 60 + DUPLICATE_BLOCK_NAME = 61 class ReadMode(enum.Enum): @@ -314,13 +324,13 @@ def parse_mask_mode(cls, v): class EncodedPayload(BasePayload): blockType: int | str | None = None - subtype: int | str | None = None + name: str | None = None content: str = '' class DecodedPayload(BasePayload): blockType: str | None = None - subtype: str | None = None + name: str | None = None content: dict | None = None @@ -502,8 +512,10 @@ class Backup(BaseModel): firmware: FirmwareDescription | None = None device: DeviceDescription | None = None + # Deprecated fields + store: list | None = None + blocks: list[Block] - store: list[TwinKeyEntry] class BackupApplyResult(BaseModel): diff --git a/brewblox_devcon_spark/spark_api.py b/brewblox_devcon_spark/spark_api.py index 1e8e64e6..9a15eaa2 100644 --- a/brewblox_devcon_spark/spark_api.py +++ b/brewblox_devcon_spark/spark_api.py @@ -3,29 +3,19 @@ """ import asyncio -import itertools import logging -import re -from contextlib import asynccontextmanager, suppress +from contextlib import asynccontextmanager from contextvars import ContextVar from datetime import datetime, timezone from typing import Callable, Union from . import (command, const, datastore_blocks, exceptions, state_machine, - twinkeydict, utils) + utils) from .codec import bloxfield, sequence from .models import (Backup, BackupApplyResult, Block, BlockIdentity, BlockNameChange, FirmwareBlock, FirmwareBlockIdentity, ReadMode) -SID_PATTERN = re.compile(r'^[a-zA-Z]{1}[a-zA-Z0-9 _\-\(\)\|]{0,199}$') -SID_RULES = """ -An object ID must adhere to the following rules: -- Starts with a letter -- May only contain alphanumeric characters, space, and _-()| -- At most 200 characters -""" - LOGGER = logging.getLogger(__name__) CV: ContextVar['SparkApi'] = ContextVar('spark_api.SparkApi') @@ -43,10 +33,10 @@ def merge(a: dict, b: dict): return a -def resolve_data_ids(data: Union[dict, list, tuple], - replacer: Union[Callable[[str, str], int], - Callable[[int, str], str] - ]): +def resolve_data_ids(data: dict | list | tuple, + replacer: Union[Callable[[str], int], + Callable[[int], str]], + ): iter = enumerate(data) \ if isinstance(data, (list, tuple)) \ else data.items() @@ -54,11 +44,10 @@ def resolve_data_ids(data: Union[dict, list, tuple], for k, v in iter: # Object-style link if bloxfield.is_link(v): - v['id'] = replacer(v['id'], v.get('type')) + v['id'] = replacer(v['id']) # Postfix-style link elif str(k).endswith(const.OBJECT_LINK_POSTFIX_END): - link_type = k[k.rfind(const.OBJECT_LINK_POSTFIX_START)+1:-1] - data[k] = replacer(v, link_type) + data[k] = replacer(v) # Nested data - increase iteration depth elif isinstance(v, (dict, list, tuple)): resolve_data_ids(v, replacer) @@ -75,21 +64,7 @@ def __init__(self): self._discovery_lock = asyncio.Lock() self._conn_check_lock = asyncio.Lock() - def _validate_sid(self, sid: str): - if not re.match(SID_PATTERN, sid): - raise exceptions.InvalidId(SID_RULES) - if next((keys for keys in const.SYS_OBJECT_KEYS if sid == keys[0]), None): - raise exceptions.InvalidId(f'Block ID `{sid}` is reserved for system objects') - if (sid, None) in self.block_store: - raise exceptions.ExistingId(f'Block ID `{sid}` is already in use') - - def _assign_sid(self, blockType: str): - for i in itertools.count(start=1): # pragma: no cover - name = f'{const.GENERATED_ID_PREFIX}{blockType}-{i}' - if (name, None) not in self.block_store: - return name - - def _find_nid(self, sid: str, blockType: str) -> int: + def _find_nid(self, sid: str) -> int: if sid is None: return 0 @@ -97,11 +72,11 @@ def _find_nid(self, sid: str, blockType: str) -> int: return int(sid) try: - return self.block_store.right_key(sid) + return self.block_store[sid] except KeyError: - raise exceptions.UnknownId(f'Block ID `{sid}` not found. type={blockType}') + raise exceptions.UnknownId(f'Block ID `{sid}` not found.') - def _find_sid(self, nid: int, blockType: str) -> str: + def _find_sid(self, nid: int) -> str: if nid is None or nid == 0: return None @@ -109,30 +84,45 @@ def _find_sid(self, nid: int, blockType: str) -> str: raise exceptions.DecodeException(f'Expected numeric block ID, got string `{nid}`') try: - sid = self.block_store.left_key(nid) + sid = self.block_store.inverse[nid] except KeyError: - # If service ID not found, randomly generate one - sid = self._assign_sid(blockType) - self.block_store[sid, nid] = dict() + # If service ID not found, use numeric representation of nid + sid = str(nid) return sid + def _sync_block_id(self, block: FirmwareBlock): + if block.id and block.nid: + self.block_store[block.id] = block.nid + + def _sync_all_block_ids(self, blocks: list[FirmwareBlock]): + if blocks and blocks[0].id and blocks[0].nid: + self.block_store.clear() + for block in blocks: + self.block_store[block.id] = block.nid + def _to_block_identity(self, block: FirmwareBlock) -> BlockIdentity: + self._sync_block_id(block) + return BlockIdentity( - id=self._find_sid(block.nid, block.type), + id=self._find_sid(block.nid), nid=block.nid, type=block.type, - serviceId=self.config.name + serviceId=self.config.name, ) def _to_block(self, block: FirmwareBlock, find_sid=True) -> Block: + if find_sid: + self._sync_block_id(block) + block = Block( **block.model_dump(), - id=None, - serviceId=self.config.name + serviceId=self.config.name, ) - block.id = self._find_sid(block.nid, block.type) if find_sid else None + if find_sid and not block.id: + block.id = self._find_sid(block.nid) + resolve_data_ids(block.data, self._find_sid) # Special case, where the API data format differs from proto-ready format @@ -142,11 +132,7 @@ def _to_block(self, block: FirmwareBlock, find_sid=True) -> Block: return block def _to_block_list(self, blocks: list[FirmwareBlock]) -> list[Block]: - # Resolve all block sids before links are resolved - # This prevents auto-generated names using interface types - for block in blocks: - self._find_sid(block.nid, block.type) - + self._sync_all_block_ids(blocks) return [self._to_block(block) for block in blocks] def _to_firmware_block_identity(self, block: BlockIdentity) -> FirmwareBlockIdentity: @@ -155,11 +141,12 @@ def _to_firmware_block_identity(self, block: BlockIdentity) -> FirmwareBlockIden if nid is None: try: - nid = self.block_store.right_key(sid) + nid = self.block_store[sid] except KeyError: raise exceptions.UnknownId(f'Block ID `{sid}` not found. type={block.type}') return FirmwareBlockIdentity( + id=sid, nid=nid, type=block.type, ) @@ -170,14 +157,15 @@ def _to_firmware_block(self, block: Block, find_nid=True) -> FirmwareBlock: if nid is None: try: - nid = self.block_store.right_key(sid) if find_nid else 0 + nid = self.block_store[sid] if find_nid else 0 except KeyError: raise exceptions.UnknownId(f'Block ID `{sid}` not found. type={block.type}') block = FirmwareBlock( + id=sid, nid=nid, type=block.type, - data=block.data + data=block.data, ) # Special case, where the API data format differs from proto-ready format @@ -238,9 +226,6 @@ async def _execute(self, desc: str): LOGGER.debug(f'Failed to execute {desc}: {utils.strex(ex)}') raise ex - finally: - asyncio.create_task(self.block_store.flush()) - async def noop(self) -> None: """ Send a Noop command to the controller. @@ -371,30 +356,9 @@ async def create_block(self, block: Block) -> Block: Block: The desired block, as present on the controller after creation. """ - async with self._execute('Create block'): - desired_sid = block.id - self._validate_sid(desired_sid) block = self._to_firmware_block(block, find_nid=False) - - # Avoid race conditions for the desired sid - # Claim it with a placeholder until the spark create call returns - placeholder_nid = object() - self.block_store[desired_sid, placeholder_nid] = 'PLACEHOLDER' - - try: - block = await self.cmder.create_block(block) - finally: - del self.block_store[desired_sid, placeholder_nid] - - # It's possible there is a leftover entry with the generated nid - # In this case, the newly created entry takes precedence - with suppress(KeyError): - del self.block_store[None, block.nid] - - # The placeholder is always removed - add real entry if create was ok - self.block_store[desired_sid, block.nid] = dict() - + block = await self.cmder.create_block(block) block = self._to_block(block) return block @@ -418,8 +382,8 @@ async def delete_block(self, block: BlockIdentity) -> BlockIdentity: await self.cmder.delete_block(block) nid = block.nid - sid = self.block_store.left_key(nid) - del self.block_store[sid, nid] + sid = self.block_store.inverse[nid] + del self.block_store[sid] ident = BlockIdentity( id=sid, nid=nid, @@ -510,13 +474,12 @@ async def clear_blocks(self) -> list[BlockIdentity]: type='DisplaySettings', data={}, )) + await self.load_block_names() return identities async def rename_block(self, change: BlockNameChange) -> BlockIdentity: """ Change a block sid. - This will not change any data on the controller, - as block string IDs are stored in the datastore. Args: change (BlockNameChange): @@ -526,32 +489,21 @@ async def rename_block(self, change: BlockNameChange) -> BlockIdentity: BlockIdentity: The new sid + nid. """ - self._validate_sid(change.desired) - self.block_store.rename((change.existing, None), (change.desired, None)) - return BlockIdentity( - id=change.desired, - nid=self.block_store.right_key(change.desired), - serviceId=self.config.name - ) + ident = FirmwareBlockIdentity(id=change.desired, + nid=self.block_store[change.existing]) + block = await self.cmder.write_block_name(ident) + self.block_store[block.id] = block.nid + return BlockIdentity(id=block.id, + nid=block.nid, + type=block.type, + serviceId=self.config.name) - async def remove_unused_ids(self) -> list[BlockIdentity]: + async def load_block_names(self): """ - Compares blocks on the controller with block sid/nid entries - in the datastore, and removes unused entries. - - Returns: - list[BlockIdentity]: - Unused (and now removed) block IDs. - """ - actual = [block.id - for block in await self.read_all_blocks()] - unused = [(sid, nid) - for (sid, nid) in self.block_store - if sid not in actual] - for (sid, nid) in unused.copy(): - del self.block_store[sid, nid] - return [BlockIdentity(id=sid, nid=nid, serviceId=self.config.name) - for (sid, nid) in unused] + Load all known block names from the controller + """ + blocks = await self.cmder.read_all_block_names() + self._sync_all_block_ids(blocks) async def make_backup(self) -> Backup: """ @@ -562,9 +514,7 @@ async def make_backup(self) -> Backup: Backup: JSON-ready backup data, compatible with apply_backup(). """ - store_data = [{'keys': keys, 'data': content} - for keys, content in self.block_store.items()] - blocks_data = await self.read_all_stored_blocks() + blocks = await self.read_all_stored_blocks() timestamp = datetime\ .now(tz=timezone.utc)\ .isoformat(timespec='seconds')\ @@ -572,8 +522,9 @@ async def make_backup(self) -> Backup: controller_info = self.state.desc().controller return Backup( - blocks=[block for block in blocks_data], - store=store_data, + blocks=[block for block in blocks], + store=[{'keys': [block.id, block.nid], 'data': {}} + for block in blocks], name=None, timestamp=timestamp, firmware=controller_info.firmware, @@ -604,26 +555,19 @@ async def apply_backup(self, exported: Backup) -> BackupApplyResult: LOGGER.info(f'Backup device = {exported.device}') await self.clear_blocks() - sys_nids = [k[1] for k in const.SYS_OBJECT_KEYS] error_log = [] # First populate the datastore, to avoid unknown links - for entry in exported.store: - - try: - self.block_store[entry.keys] = entry.data - except twinkeydict.TwinKeyError: - sid, nid = entry.keys - self.block_store.rename((None, nid), (sid, None)) - self.block_store[entry.keys] = entry.data + self.block_store.clear() + for block in exported.blocks: + self.block_store[block.id] = block.nid # Now either create or write the objects, depending on whether they are system objects for block in exported.blocks: try: block = block.model_copy(deep=True) if block.nid is not None and block.nid < const.USER_NID_START: - if block.nid in sys_nids: # Ignore deprecated system blocks - await self.write_block(block) + await self.write_block(block) else: # Bypass self.create_block(), to avoid meddling with store IDs await self.cmder.create_block(self._to_firmware_block(block)) @@ -633,17 +577,8 @@ async def apply_backup(self, exported: Backup) -> BackupApplyResult: error_log.append(message) LOGGER.error(message) - used_nids = [b.nid for b in await self.read_all_blocks()] - unused = [ - (sid, nid) for (sid, nid) in self.block_store - if nid >= const.USER_NID_START - and nid not in used_nids - ] - for sid, nid in unused: - del self.block_store[sid, nid] - message = f'Removed unused alias [{sid},{nid}]' - LOGGER.info(message) - error_log.append(message) + # Sync block names with reality + await self.load_block_names() return BackupApplyResult(messages=error_log) diff --git a/brewblox_devcon_spark/synchronization.py b/brewblox_devcon_spark/synchronization.py index 669d0e65..12812012 100644 --- a/brewblox_devcon_spark/synchronization.py +++ b/brewblox_devcon_spark/synchronization.py @@ -30,11 +30,10 @@ until status is ACKNOWLEDGED. - Verify that the service is compatible with the controller. - If the controller is not compatible, abort synchronization. -- Synchronize block store: - - Fetch controller-specific data from datastore. - Synchronize controller settings: - Send timezone to controller. - Send temperature display units to controller. + - Get block names from controller. - Set status to SYNCHRONIZED. - Wait for DISCONNECTED status. - Repeat @@ -117,7 +116,10 @@ async def _sync_handshake(self): @subroutine('sync block store') async def _sync_block_store(self): - await self.block_store.load() + blocks = await self.commander.read_all_block_names() + self.block_store.clear() + for block in blocks: + self.block_store[block.id] = block.nid @subroutine('sync controller settings') async def _sync_sysinfo(self): @@ -183,14 +185,10 @@ async def run(self): await self.state.wait_disconnected() async def repeat(self): - try: - self.settings_store.service_settings_listeners.add(self._apply_service_settings) - self.settings_store.global_settings_listeners.add(self._apply_global_settings) - while True: - await self.run() - finally: - self.settings_store.service_settings_listeners.remove(self._apply_service_settings) - self.settings_store.global_settings_listeners.remove(self._apply_global_settings) + self.settings_store.service_settings_listeners.add(self._apply_service_settings) + self.settings_store.global_settings_listeners.add(self._apply_global_settings) + while True: + await self.run() @asynccontextmanager diff --git a/brewblox_devcon_spark/twinkeydict.py b/brewblox_devcon_spark/twinkeydict.py deleted file mode 100644 index bde5f6d5..00000000 --- a/brewblox_devcon_spark/twinkeydict.py +++ /dev/null @@ -1,179 +0,0 @@ -""" -Straightforward multi-index dict. -Supports lookups where either left or right value is unknown. -When looking up objects with both left and right key, asserts that keys point to the same object. -""" - -import logging -from collections.abc import MutableMapping -from contextlib import suppress -from dataclasses import dataclass -from typing import (TYPE_CHECKING, Any, Generic, Hashable, Iterator, Optional, - TypeVar) - -LOGGER = logging.getLogger(__name__) - -LT = TypeVar('LT', bound=Hashable) -RT = TypeVar('RT', bound=Hashable) -VT = TypeVar('VT', bound=Any) - -Keys_ = tuple[LT, RT] -SparseKeys_ = tuple[Optional[LT], Optional[RT]] - -if TYPE_CHECKING: # pragma: no cover - DictBase = MutableMapping[SparseKeys_, VT] -else: - DictBase = MutableMapping - - -class TwinKeyError(Exception): - pass - - -@dataclass(frozen=True) -class TwinKeyObject(Generic[LT, RT, VT]): - left_key: LT - right_key: RT - content: VT - - -class TwinKeyDict(DictBase, Generic[LT, RT, VT]): - """ - Key/Key/Value mapping, supporting lookups with incomplete data. - - Left and right keys must be unique in their own set. - (1, 2) and (2, 1) keysets can coexist, but (1, 2) and (1, 3) can't. - - The collections.abc.MutableMapping interface is fully implemented, - giving it meaningful implementations for: - __getitem__, __setitem__, __delitem__, __iter__, __len__, __contains__, - __eq__, __ne__, pop, popitem, clear, update, setdefault, keys, items, - values, get, and set. - Additionally, the rename, left_key, and right_key functions are available. - - None is reserved as a wildcard lookup operator. Any insert must always provide both keys, - but a __getitem__ or __contains__ call only has to specify either key. - - When two keys are provided, but they point to different objects, a TwinKeyError is raised. - - Example syntax: - >>> twinkey = TwinKeyDict() - - # Setting and getting using both keys - >>> twinkey['fritz', 'froggles'] = 'frabjous' - >>> twinkey['fritz', 'froggles'] - 'frabjous' - - # Partial lookup - >>> twinkey[None, 'froggles'] - 'frabjous' - >>> ('fritz', None) in twinkey - True - - # Getting mixed keys causes an error - >>> twinkey[1, 2] = 4 - >>> twinkey['fritz', 2] - Traceback (most recent call last): - ... - brewblox_devcon_spark.twinkeydict.TwinKeyError: Keys [fritz, 2] point to different objects - - # Using left or right key to get the other key - >>> twinkey.right_key('fritz') - 'froggles' - >>> twinkey.left_key('froggles') - 'fritz' - - # Iterating - >>> for k, v in twinkey.items(): - ... print(k, v) - ... - ('fritz', 'froggles') 'frabjous' - (1, 2) 4 - """ - - def __init__(self) -> None: - self._left_view: dict[LT, TwinKeyObject[LT, RT, VT]] = dict() - self._right_view: dict[RT, TwinKeyObject[LT, RT, VT]] = dict() - - def __bool__(self) -> bool: - return bool(self._left_view) - - def __repr__(self) -> str: - return str(self._left_view.values()) - - def __len__(self) -> int: - return len(self._left_view) - - def __iter__(self) -> Iterator[Keys_]: - return ((o.left_key, o.right_key) for o in self._left_view.values()) - - def _getobj(self, keys: SparseKeys_) -> TwinKeyObject[LT, RT, VT]: - left_key, right_key = keys - - if (left_key, right_key) == (None, None): - raise TwinKeyError('[None, None] lookup not allowed') - - if left_key is None: - return self._right_view[right_key] - - if right_key is None: - return self._left_view[left_key] - - left_obj, right_obj = self._left_view.get(left_key), self._right_view.get(right_key) - if (left_obj, right_obj) == (None, None): - raise KeyError(f'[{left_key}, {right_key}]') - if left_obj is not right_obj: - raise TwinKeyError(f'Keys [{left_key}, {right_key}] point to different objects') - return left_obj - - def __getitem__(self, keys: SparseKeys_) -> VT: - return self._getobj(keys).content - - def __setitem__(self, keys: Keys_, item): - if None in keys: - raise TwinKeyError(f'None keys not allowed, {keys=}') - - with suppress(KeyError): - # Checks whether key combo either matches, or does not exist - self._getobj(keys) - - left_key, right_key = keys - obj = TwinKeyObject(left_key, right_key, item) - self._left_view[left_key] = self._right_view[right_key] = obj - - def __delitem__(self, keys: SparseKeys_): - obj = self._getobj(keys) - del self._left_view[obj.left_key] - del self._right_view[obj.right_key] - - def left_key(self, right_key: RT, default=...) -> LT: - try: - return self._right_view[right_key].left_key - except KeyError: - if default is not ...: - return default - else: - raise - - def right_key(self, left_key: LT, default=...) -> RT: - try: - return self._left_view[left_key].right_key - except KeyError: - if default is not ...: - return default - else: - raise - - def rename(self, old_keys: SparseKeys_, new_keys: SparseKeys_): - if new_keys in self: - raise TwinKeyError(f'Already contains {new_keys}') - - obj = self._getobj(old_keys) - new_left, new_right = new_keys - if new_left is None: - new_left = obj.left_key - if new_right is None: - new_right = obj.right_key - - del self[old_keys] - self[new_left, new_right] = obj.content diff --git a/firmware.ini b/firmware.ini index b51a4456..792dbd5b 100644 --- a/firmware.ini +++ b/firmware.ini @@ -1,8 +1,8 @@ [FIRMWARE] -firmware_version=5c7c070e -firmware_date=2024-04-23 -firmware_sha=5c7c070ea12e42beed52ff7eb28e60f5dab955d1 -proto_version=c9c57001 -proto_date=2024-04-20 -proto_sha=c9c57001df1da71552f0b66df88a8dc510abcfa2 +firmware_version=d1631e3d +firmware_date=2024-05-02 +firmware_sha=d1631e3d7eb26ff3fc5c7df6805ab01c040178c5 +proto_version=b675f617 +proto_date=2024-05-01 +proto_sha=b675f61736a5beb53a44b7b4a86c6fb2b0eea271 system_version=3.2.0 diff --git a/poetry.lock b/poetry.lock index 7bd92135..13eff2a4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiofiles" @@ -101,6 +101,17 @@ files = [ [package.dependencies] pycodestyle = ">=2.10.0" +[[package]] +name = "bidict" +version = "0.23.1" +description = "The bidirectional mapping library for Python." +optional = false +python-versions = ">=3.8" +files = [ + {file = "bidict-0.23.1-py3-none-any.whl", hash = "sha256:5dae8d4d79b552a71cbabc7deb25dfe8ce710b17ff41711e13010ead2abfc3e5"}, + {file = "bidict-0.23.1.tar.gz", hash = "sha256:03069d763bc387bbd20e7d49914e75fc4132a41937fa3405417e1a5a2d006d71"}, +] + [[package]] name = "bitarray" version = "2.8.3" @@ -1490,7 +1501,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1856,4 +1866,4 @@ h11 = ">=0.9.0,<1" [metadata] lock-version = "2.0" python-versions = ">=3.11,<4" -content-hash = "ca716a7dd50a19bc95a9a053cbc59eaa0c51602f3747da3f1c5eebd044f9317f" +content-hash = "f5f29e6adb6dde458f223534bdabddc0b70af0ae35e7a2c6e5d9bd7553e64d58" diff --git a/pyproject.toml b/pyproject.toml index 8ed5ca69..f591b285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,7 @@ pydantic-settings = "^2.1.0" websockets = "^12.0" httpx-ws = "^0.4.3" dnspython = "^2.4.2" +bidict = "^0.23.1" [tool.poetry.group.dev.dependencies] pytest = "*" diff --git a/test/test_codec.py b/test/test_codec.py index 6a09ab6d..2a3b9f6f 100644 --- a/test/test_codec.py +++ b/test/test_codec.py @@ -25,16 +25,6 @@ def app() -> FastAPI: return FastAPI() -async def test_type_conversion(): - for (joined, split) in [ - ['Pid', ('Pid', None)], - ['Pid.subtype', ('Pid', 'subtype')], - ['Pid.subtype.subsubtype', ('Pid', 'subtype.subsubtype')] - ]: - assert codec.split_type(joined) == split - assert codec.join_type(*split) == joined - - async def test_encode_system_objects(): cdc = codec.CV.get() @@ -158,15 +148,12 @@ async def test_encode_submessage(): payload = cdc.encode_payload(DecodedPayload( blockId=1, blockType='EdgeCase', - subtype='SubCase', content={} )) assert payload.blockType == 9001 - assert payload.subtype == 1 payload = cdc.decode_payload(payload) assert payload.blockType == 'EdgeCase' - assert payload.subtype == 'SubCase' # Interface encoding payload = cdc.encode_payload(DecodedPayload( diff --git a/test/test_datastore_blocks.py b/test/test_datastore_blocks.py deleted file mode 100644 index 0cacb4ac..00000000 --- a/test/test_datastore_blocks.py +++ /dev/null @@ -1,150 +0,0 @@ -import asyncio -from datetime import timedelta -from unittest.mock import ANY - -import pytest -from asgi_lifespan import LifespanManager -from fastapi import FastAPI -from pytest_httpx import HTTPXMock - -from brewblox_devcon_spark import (const, datastore_blocks, exceptions, - state_machine, utils) -from brewblox_devcon_spark.models import (ControllerDescription, - DeviceDescription, TwinKeyEntry) - -TESTED = datastore_blocks.__name__ - - -def read_objects() -> list[TwinKeyEntry]: - return datastore_blocks.SYS_OBJECTS[:1] + [ - TwinKeyEntry(keys=(f'key{i}', i+const.USER_NID_START), data={}) - for i in range(10) - ] - - -@pytest.fixture -def app() -> FastAPI: - config = utils.get_config() - config.datastore_flush_delay = timedelta() - - state_machine.setup() - datastore_blocks.setup() - return FastAPI() - - -@pytest.fixture(autouse=True) -async def manager(manager: LifespanManager): - yield manager - - -async def test_load_flush(httpx_mock: HTTPXMock): - config = utils.get_config() - state = state_machine.CV.get() - store = datastore_blocks.CV.get() - - default_length = len(datastore_blocks.SYS_OBJECTS) - read_length = default_length + len(read_objects()) - 1 # overlapping item is merged - - assert len(store.items()) == 0 - - # Invalid format - httpx_mock.add_response(url=f'{config.datastore_url}/get', - match_json={'id': f'mock__{config.name}-blocks-db', - 'namespace': const.SERVICE_NAMESPACE}, - json={}) - - httpx_mock.add_response(url=f'{config.datastore_url}/get', - match_json={'id': f'mock__{config.name}-blocks-db', - 'namespace': const.SERVICE_NAMESPACE}, - json={ - 'value': { - 'id': f'mock__{config.name}-blocks-db', - 'namespace': const.SERVICE_NAMESPACE, - 'data': [v.model_dump(mode='json') - for v in read_objects()], - }, - }) - - httpx_mock.add_response(url=f'{config.datastore_url}/set', - match_json={ - 'value': { - 'id': f'mock__{config.name}-blocks-db', - 'namespace': const.SERVICE_NAMESPACE, - 'data': ANY - }, - }) - - async with asyncio.timeout(10): - # Can't load before acknowledged - with pytest.raises(exceptions.NotConnected): - await store.load() - - # Can't flush before acknowledged - with pytest.raises(exceptions.NotConnected): - await store.flush() - - state.set_enabled(True) - state.set_connected('MOCK', '') - state.set_acknowledged(ControllerDescription( - system_version='', - platform='mock', - reset_reason='', - firmware=state.desc().service.firmware.model_copy(), - device=DeviceDescription(device_id='1234'), - )) - - # First attempt gets invalid data, and falls back on defaults - await store.load() - assert len(store.items()) == default_length - - await store.load() - assert len(store.items()) == read_length - - # flush on insert - store['inserted', 9001] = {} - assert len(store.items()) == read_length + 1 - await store.flush() - - # Flush on remove - del store['inserted', 9001] - assert len(store.items()) == read_length - await store.flush() - - # Does nothing if not changed - await store.flush() - - assert len(httpx_mock.get_requests(url=f'{config.datastore_url}/set')) == 2 - - -async def test_load_error(httpx_mock: HTTPXMock): - config = utils.get_config() - state = state_machine.CV.get() - store = datastore_blocks.CV.get() - - httpx_mock.add_response(url=f'{config.datastore_url}/get', - match_json={'id': '1234-blocks-db', - 'namespace': const.SERVICE_NAMESPACE}, - json={ - 'value': { - 'id': '1234-blocks-db', - 'namespace': const.SERVICE_NAMESPACE, - 'data': 'miniaturized giant hamsters from outer space', - }, - }) - - # Removed after load - store['inserted', 9001] = {} - - state.set_enabled(True) - state.set_connected('TCP', '') - state.set_acknowledged(ControllerDescription( - system_version='', - platform='dummy', - reset_reason='', - firmware=state.desc().service.firmware.model_copy(), - device=DeviceDescription(device_id='1234'), - )) - - async with asyncio.timeout(10): - await store.load() - assert len(store.items()) == len(datastore_blocks.SYS_OBJECTS) diff --git a/test/test_integration.py b/test/test_integration.py index 51241260..a9d3e597 100644 --- a/test/test_integration.py +++ b/test/test_integration.py @@ -118,7 +118,7 @@ async def test_create(client: AsyncClient, block_args: Block): # Conflict error: name already taken resp = await client.post('/blocks/create', json=block_args.model_dump()) - assert resp.status_code == 409 + assert resp.status_code == 500 block_args.id = 'other_obj' resp = await client.post('/blocks/create', json=block_args.model_dump()) @@ -445,25 +445,6 @@ async def test_delete_all(client: AsyncClient, block_args: Block): assert len(resp.json()) == n_sys_obj -async def test_cleanup(client: AsyncClient, block_args: Block): - store = datastore_blocks.CV.get() - resp = await client.post('/blocks/create', json=block_args.model_dump()) - assert resp.status_code == 201 - - store['unused', 456] = {} - - resp = await client.post('/blocks/cleanup') - retv = resp.json() - expected = { - 'id': 'unused', - 'nid': 456, - 'type': None, - 'serviceId': 'sparkey', - } - assert expected in retv - assert not [v for v in retv if v['id'] == 'testobj'] - - async def test_rename(client: AsyncClient, block_args: Block): resp = await client.post('/blocks/create', json=block_args.model_dump()) assert resp.status_code == 201 @@ -616,12 +597,6 @@ async def test_backup_load(client: AsyncClient, spark_blocks: list[Block]): keys=('TROLOLOL', 9999), data={})) - # Add renamed type to store data - backup.store.append(TwinKeyEntry( - keys=('renamed_display_settings', const.DISPLAY_SETTINGS_NID), - data={}, - )) - # Add a Block that will fail to be created, and should be skipped backup.blocks.append(Block( id='derpface', @@ -633,12 +608,11 @@ async def test_backup_load(client: AsyncClient, spark_blocks: list[Block]): resp = await client.post('/blocks/backup/load', json=backup.model_dump()) resp = resp.json()['messages'] assert len(resp) == 2 - assert 'derpface' in resp[0] - assert 'TROLOLOL' in resp[1] + assert 'Groups' in resp[0] + assert 'derpface' in resp[1] resp = await client.post('/blocks/all/read') resp_ids = ret_ids(resp.json()) - assert 'renamed_display_settings' in resp_ids assert 'derpface' not in resp_ids diff --git a/test/test_spark_api.py b/test/test_spark_api.py index 8ad1eb2e..ac4cdc9d 100644 --- a/test/test_spark_api.py +++ b/test/test_spark_api.py @@ -7,7 +7,7 @@ from fastapi import FastAPI from pytest_mock import MockerFixture -from brewblox_devcon_spark import (codec, command, connection, const, +from brewblox_devcon_spark import (codec, command, connection, datastore_blocks, datastore_settings, exceptions, mqtt, spark_api, state_machine, synchronization, utils) @@ -49,6 +49,7 @@ async def manager(manager: LifespanManager): async def test_merge(): + await state_machine.CV.get().wait_synchronized() assert spark_api.merge( {}, {'a': True} @@ -67,41 +68,13 @@ async def test_merge(): ) == {'nested': {'a': True, 'b': True}, 'second': 'empty'} -@pytest.mark.parametrize('sid', [ - 'flabber', - 'FLABBER', - 'f(1)', - 'l12142|35234231', - 'word'*50, -]) -async def test_validate_sid(sid: str): - spark_api.CV.get()._validate_sid(sid) - - -@pytest.mark.parametrize('sid', [ - '1', - '1adsjlfdsf', - 'pancakes[delicious]', - '[', - 'f]abbergasted', - '', - 'word'*51, - 'brackey><', - 'SystemInfo', - 'SparkPins', - 'a;ljfoihoewr*&(%&^&*%*&^(*&^(', -]) -async def test_validate_sid_error(sid: str): - with pytest.raises(exceptions.InvalidId): - spark_api.CV.get()._validate_sid(sid) - - async def test_to_firmware_block(): + await state_machine.CV.get().wait_synchronized() store = datastore_blocks.CV.get() api = spark_api.CV.get() - store['alias', 123] = dict() - store['4-2', 24] = dict() + store['alias'] = 123 + store['4-2'] = 24 assert api._to_firmware_block(Block(id='alias', type='', data={})).nid == 123 assert api._to_firmware_block(Block(nid=840, type='', data={})).nid == 840 @@ -120,26 +93,28 @@ async def test_to_firmware_block(): async def test_to_block(): + await state_machine.CV.get().wait_synchronized() store = datastore_blocks.CV.get() api = spark_api.CV.get() - store['alias', 123] = dict() - store['4-2', 24] = dict() + store['alias'] = 123 + store['4-2'] = 24 assert api._to_block(FirmwareBlock(nid=123, type='', data={})).id == 'alias' # Service ID not found: create placeholder generated = api._to_block(FirmwareBlock(nid=456, type='', data={})) - assert generated.id.startswith(const.GENERATED_ID_PREFIX) + assert generated.id == '456' async def test_resolve_data_ids(): + await state_machine.CV.get().wait_synchronized() store = datastore_blocks.CV.get() api = spark_api.CV.get() - store['eeney', 9001] = dict() - store['miney', 9002] = dict() - store['moo', 9003] = dict() + store['eeney'] = 9001 + store['miney'] = 9002 + store['moo'] = 9003 def create_data(): return { @@ -229,6 +204,7 @@ async def test_check_connection(mocker: MockerFixture): async def test_start_update(): + await state_machine.CV.get().wait_synchronized() state = state_machine.CV.get() api = spark_api.CV.get() diff --git a/test/test_synchronization.py b/test/test_synchronization.py index 16bf6815..d4ffe259 100644 --- a/test/test_synchronization.py +++ b/test/test_synchronization.py @@ -1,7 +1,6 @@ import asyncio from contextlib import asynccontextmanager from datetime import timedelta -from unittest.mock import AsyncMock import pytest from asgi_lifespan import LifespanManager @@ -64,14 +63,8 @@ def app() -> FastAPI: return FastAPI(lifespan=lifespan) -@pytest.fixture -def m_load_blocks(app: FastAPI, mocker: MockerFixture): - m = mocker.patch.object(datastore_blocks.CV.get(), 'load', autospec=True) - return m - - @pytest.fixture(autouse=True) -async def manager(manager: LifespanManager, m_load_blocks: AsyncMock): +async def manager(manager: LifespanManager): yield manager @@ -86,8 +79,9 @@ async def test_sync_status(m_sleep): assert states() == [False, True, True, True] -async def test_sync_errors(m_load_blocks: AsyncMock): - m_load_blocks.side_effect = RuntimeError +async def test_sync_errors(mocker: MockerFixture): + m_read_names = mocker.patch.object(command.CV.get(), 'read_all_block_names', autospec=True) + m_read_names.side_effect = RuntimeError with pytest.raises(RuntimeError): await connect() diff --git a/test/test_twinkeydict.py b/test/test_twinkeydict.py deleted file mode 100644 index 88ef696a..00000000 --- a/test/test_twinkeydict.py +++ /dev/null @@ -1,134 +0,0 @@ -import pytest - -from brewblox_devcon_spark import twinkeydict - -TESTED = twinkeydict.__name__ - - -@pytest.fixture -def items(): - return [ - ('left', 'right', dict()), - (1, 2, None), - ('same', 'same', 'twins') - ] - - -@pytest.fixture -def store(): - return twinkeydict.TwinKeyDict() - - -def test_get_set(store: twinkeydict.TwinKeyDict, items: list[tuple]): - assert not store - store['tri', 'ang'] = 'le' - assert store - - for left, right, value in items: - store[left, right] = value - - for left, right, value in items: - assert store[None, right] == value - assert store[left, None] == value - assert store[left, right] == value - - assert store.get((left, right)) == value - assert store.get((left, None)) == value - assert store.get((None, right)) == value - - assert (left, right) in store - assert (left, None) in store - assert (None, right) in store - - assert store.get(('flip', 'flop'), 'default') == 'default' - - store['left', 'right'] = 'update' - assert store['left', 'right'] == 'update' - - # __getitem__ mismatched keys - with pytest.raises(twinkeydict.TwinKeyError): - assert store['same', 'right'] == 'no' - - # __setitem__ mismatched keys - with pytest.raises(twinkeydict.TwinKeyError): - store['left', 2] = 'mismatch' - - # get mismatched keys - with pytest.raises(twinkeydict.TwinKeyError): - store.get(('left', 2)) - - # get None/None - with pytest.raises(twinkeydict.TwinKeyError): - assert store[None, None] == 'no' - - # set None/None - with pytest.raises(twinkeydict.TwinKeyError): - store[None, None] = 'pancakes' - - -def test_pop_del(store: twinkeydict.TwinKeyDict, items: list[tuple]): - for left, right, value in items: - store[left, right] = value - - with pytest.raises(ValueError): - del store['left'] - - del store['left', None] - assert len(store) == 2 - assert store.get(('left', 'right')) is None - assert ('left', 'right') not in store - - assert store.pop(('same', None)) == 'twins' - with pytest.raises(KeyError): - store.pop(('same', 'same')) - - assert len(store) == 1 - assert (None, 'same') not in store - - -def test_rename(store: twinkeydict.TwinKeyDict): - store['wabber', 'jockey'] = 'alice' - store.rename(('wabber', None), ('blobber', None)) - with pytest.raises(twinkeydict.TwinKeyError): - assert ('wabber', 'jockey') not in store - assert store['blobber', 'jockey'] == 'alice' - - store.rename((None, 'jockey'), (None, 'blibber')) - assert store['blobber', 'blibber'] == 'alice' - - store.rename(('blobber', 'blibber'), ('something', 'different')) - assert store['something', 'different'] - - with pytest.raises(twinkeydict.TwinKeyError): - store.rename(('something', 'different'), (None, None)) - - with pytest.raises(twinkeydict.TwinKeyError): - store.rename((None, None), ('something', 'different')) - - assert store['something', 'different'] - assert len(store) == 1 - - -def test_iterate(store, items): - for left, right, value in items: - store[left, right] = value - - assert len(store) == len(items) - assert [(left, right, value) for ((left, right), value) in store.items()] == items - - -def test_other_key(store): - store['cheese', 'wine'] = {} - store['caviar', 'vodka'] = {} - - assert store.left_key('wine') == 'cheese' - assert store.right_key('caviar') == 'vodka' - - with pytest.raises(KeyError): - store.left_key('cheese') - - with pytest.raises(KeyError): - store.right_key('vodka') - - assert store.left_key('cheese', 'mac') == 'mac' - assert store.right_key('vodka', None) is None From 5398feb66c44cd241a5c106ce0cbacbb13ae73dc Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Sat, 4 May 2024 21:45:05 +0200 Subject: [PATCH 03/11] implement redis name migration --- brewblox_devcon_spark/codec/__init__.py | 18 ++++------ brewblox_devcon_spark/datastore_blocks.py | 42 +++++++++++++++++++++++ brewblox_devcon_spark/models.py | 2 +- brewblox_devcon_spark/synchronization.py | 14 +++++++- test/test_codec.py | 8 ++--- 5 files changed, 66 insertions(+), 18 deletions(-) diff --git a/brewblox_devcon_spark/codec/__init__.py b/brewblox_devcon_spark/codec/__init__.py index 311efef5..a3fc2c9e 100644 --- a/brewblox_devcon_spark/codec/__init__.py +++ b/brewblox_devcon_spark/codec/__init__.py @@ -14,8 +14,6 @@ from . import lookup, pb2, time_utils, unit_conversion from .processor import ProtobufProcessor -DEPRECATED_TYPE_INT = 65533 -DEPRECATED_TYPE_STR = 'DeprecatedObject' UNKNOWN_TYPE_STR = 'UnknownType' ERROR_TYPE_STR = 'ErrorObject' @@ -100,14 +98,12 @@ def encode_payload(self, name=payload.name, ) - if payload.blockType == DEPRECATED_TYPE_STR: - actual_id = payload.content['actualId'] - content_bytes = actual_id.to_bytes(2, 'little') + if payload.blockType == 'Deprecated': return EncodedPayload( blockId=payload.blockId, - blockType=DEPRECATED_TYPE_INT, + blockType=lookup.BlockType.Value('Deprecated'), name=payload.name, - content=b64encode(content_bytes).decode(), + content=payload.content['bytes'], ) # Interface-only payload @@ -156,14 +152,12 @@ def decode_payload(self, filter_values: bool | None = None, ) -> DecodedPayload: try: - if payload.blockType == DEPRECATED_TYPE_INT: - content_bytes = b64decode(payload.content) - content = {'actualId': int.from_bytes(content_bytes, 'little')} + if payload.blockType == lookup.BlockType.Value('Deprecated'): return DecodedPayload( blockId=payload.blockId, - blockType=DEPRECATED_TYPE_STR, + blockType='Deprecated', name=payload.name, - content=content, + content={'bytes': payload.content}, ) # First, try to find an object lookup diff --git a/brewblox_devcon_spark/datastore_blocks.py b/brewblox_devcon_spark/datastore_blocks.py index fc3b0cf9..07b711f9 100644 --- a/brewblox_devcon_spark/datastore_blocks.py +++ b/brewblox_devcon_spark/datastore_blocks.py @@ -5,12 +5,54 @@ from contextvars import ContextVar from bidict import OnDup, OnDupAction, bidict +from httpx import AsyncClient + +from . import const, state_machine, utils +from .models import DatastoreSingleQuery, TwinKeyEntriesBox LOGGER = logging.getLogger(__name__) CV: ContextVar[bidict[str, int]] = ContextVar('datastore_blocks.bidict') +async def extract_legacy_redis_block_names() -> list[tuple[str, int]]: # pragma: no cover + """ + Block names were historically stored in Redis. + To migrate the stored block names to the controller we must do a one-time + load of the old name table. + The Redis naming table is removed after reading to prevent repeated migrations. + """ + config = utils.get_config() + state = state_machine.CV.get() + client = AsyncClient(base_url=config.datastore_url) + + # Simulation services are identified by service name. + # This prevents data conflicts when a simulation service + # is reconfigured to start interacting with a controller. + desc = state.desc() + if desc.connection_kind == 'SIM': + device_name = f'simulator__{config.name}' + elif desc.connection_kind == 'MOCK': + device_name = f'mock__{config.name}' + else: + device_name = desc.controller.device.device_id + + data: list[tuple[str, int]] = [] + + try: + query = DatastoreSingleQuery(id=f'{device_name}-blocks-db', + namespace=const.SERVICE_NAMESPACE) + content = query.model_dump(mode='json') + resp = await utils.httpx_retry(lambda: client.post('/get', json=content)) + box = TwinKeyEntriesBox.model_validate_json(resp.text) + data = [entry.keys for entry in box.value.data] + await client.post('/delete', json=content) + except Exception: + pass + + return data + + def setup(): bd = bidict() bd.on_dup = OnDup(key=OnDupAction.DROP_OLD, diff --git a/brewblox_devcon_spark/models.py b/brewblox_devcon_spark/models.py index 4791104a..690e550a 100644 --- a/brewblox_devcon_spark/models.py +++ b/brewblox_devcon_spark/models.py @@ -614,7 +614,7 @@ class StoredTimezoneSettingsBox(DatastoreSingleValueBox): class DatastoreEvent(BaseModel): changed: list[DatastoreValue] = Field(default_factory=list) - deleted: list[DatastoreValue] = Field(default_factory=list) + deleted: list[str] = Field(default_factory=list) class HistoryEvent(BaseModel): diff --git a/brewblox_devcon_spark/synchronization.py b/brewblox_devcon_spark/synchronization.py index 12812012..c9a51d3c 100644 --- a/brewblox_devcon_spark/synchronization.py +++ b/brewblox_devcon_spark/synchronization.py @@ -47,7 +47,7 @@ from . import (codec, command, const, datastore_blocks, datastore_settings, exceptions, state_machine, utils) from .codec.time_utils import serialize_duration -from .models import FirmwareBlock +from .models import FirmwareBlock, FirmwareBlockIdentity LOGGER = logging.getLogger(__name__) @@ -121,6 +121,18 @@ async def _sync_block_store(self): for block in blocks: self.block_store[block.id] = block.nid + # Check if redis still contains a name table for this controller's blocks + # If it does, attempt to load block names + # This is a one-time migration. The redis table is removed after reading. + for entry in await datastore_blocks.extract_legacy_redis_block_names(): # pragma: no cover + sid, nid = entry + LOGGER.info(f'Renaming block to legacy name: {sid=}, {nid=}') + try: + await self.commander.write_block_name(FirmwareBlockIdentity(id=sid, nid=nid)) + self.block_store[sid] = nid + except Exception as ex: + LOGGER.info(f'Failed to rename block {entry}: {utils.strex(ex)}') + @subroutine('sync controller settings') async def _sync_sysinfo(self): await self.set_sysinfo_settings() diff --git a/test/test_codec.py b/test/test_codec.py index 2a3b9f6f..f6ed8bd0 100644 --- a/test/test_codec.py +++ b/test/test_codec.py @@ -96,15 +96,15 @@ async def test_deprecated_object(): payload = cdc.encode_payload(DecodedPayload( blockId=1, - blockType='DeprecatedObject', - content={'actualId': 100}, + blockType='Deprecated', + content={'bytes': 'ZAA='}, )) assert payload.blockType == 65533 assert payload.content == 'ZAA=' payload = cdc.decode_payload(payload) - assert payload.blockType == 'DeprecatedObject' - assert payload.content == {'actualId': 100} + assert payload.blockType == 'Deprecated' + assert payload.content == {'bytes': 'ZAA='} async def test_encode_constraint(): From b8c98baeecf67c6028dac9accd427b84fb909ac3 Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Mon, 6 May 2024 14:25:29 +0200 Subject: [PATCH 04/11] version pin cryptography --- poetry.lock | 68 +++++++++++++++++++++++++------------------------- pyproject.toml | 3 ++- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/poetry.lock b/poetry.lock index 13eff2a4..a3b82d5b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -486,43 +486,43 @@ toml = ["tomli"] [[package]] name = "cryptography" -version = "42.0.4" +version = "42.0.5" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-42.0.4-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:ffc73996c4fca3d2b6c1c8c12bfd3ad00def8621da24f547626bf06441400449"}, - {file = "cryptography-42.0.4-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:db4b65b02f59035037fde0998974d84244a64c3265bdef32a827ab9b63d61b18"}, - {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dad9c385ba8ee025bb0d856714f71d7840020fe176ae0229de618f14dae7a6e2"}, - {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:69b22ab6506a3fe483d67d1ed878e1602bdd5912a134e6202c1ec672233241c1"}, - {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:e09469a2cec88fb7b078e16d4adec594414397e8879a4341c6ace96013463d5b"}, - {file = "cryptography-42.0.4-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:3e970a2119507d0b104f0a8e281521ad28fc26f2820687b3436b8c9a5fcf20d1"}, - {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:e53dc41cda40b248ebc40b83b31516487f7db95ab8ceac1f042626bc43a2f992"}, - {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:c3a5cbc620e1e17009f30dd34cb0d85c987afd21c41a74352d1719be33380885"}, - {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6bfadd884e7280df24d26f2186e4e07556a05d37393b0f220a840b083dc6a824"}, - {file = "cryptography-42.0.4-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:01911714117642a3f1792c7f376db572aadadbafcd8d75bb527166009c9f1d1b"}, - {file = "cryptography-42.0.4-cp37-abi3-win32.whl", hash = "sha256:fb0cef872d8193e487fc6bdb08559c3aa41b659a7d9be48b2e10747f47863925"}, - {file = "cryptography-42.0.4-cp37-abi3-win_amd64.whl", hash = "sha256:c1f25b252d2c87088abc8bbc4f1ecbf7c919e05508a7e8628e6875c40bc70923"}, - {file = "cryptography-42.0.4-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:15a1fb843c48b4a604663fa30af60818cd28f895572386e5f9b8a665874c26e7"}, - {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1327f280c824ff7885bdeef8578f74690e9079267c1c8bd7dc5cc5aa065ae52"}, - {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ffb03d419edcab93b4b19c22ee80c007fb2d708429cecebf1dd3258956a563a"}, - {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:1df6fcbf60560d2113b5ed90f072dc0b108d64750d4cbd46a21ec882c7aefce9"}, - {file = "cryptography-42.0.4-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:44a64043f743485925d3bcac548d05df0f9bb445c5fcca6681889c7c3ab12764"}, - {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:3c6048f217533d89f2f8f4f0fe3044bf0b2090453b7b73d0b77db47b80af8dff"}, - {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:6d0fbe73728c44ca3a241eff9aefe6496ab2656d6e7a4ea2459865f2e8613257"}, - {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:887623fe0d70f48ab3f5e4dbf234986b1329a64c066d719432d0698522749929"}, - {file = "cryptography-42.0.4-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce8613beaffc7c14f091497346ef117c1798c202b01153a8cc7b8e2ebaaf41c0"}, - {file = "cryptography-42.0.4-cp39-abi3-win32.whl", hash = "sha256:810bcf151caefc03e51a3d61e53335cd5c7316c0a105cc695f0959f2c638b129"}, - {file = "cryptography-42.0.4-cp39-abi3-win_amd64.whl", hash = "sha256:a0298bdc6e98ca21382afe914c642620370ce0470a01e1bef6dd9b5354c36854"}, - {file = "cryptography-42.0.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f8907fcf57392cd917892ae83708761c6ff3c37a8e835d7246ff0ad251d9298"}, - {file = "cryptography-42.0.4-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:12d341bd42cdb7d4937b0cabbdf2a94f949413ac4504904d0cdbdce4a22cbf88"}, - {file = "cryptography-42.0.4-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1cdcdbd117681c88d717437ada72bdd5be9de117f96e3f4d50dab3f59fd9ab20"}, - {file = "cryptography-42.0.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:0e89f7b84f421c56e7ff69f11c441ebda73b8a8e6488d322ef71746224c20fce"}, - {file = "cryptography-42.0.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f1e85a178384bf19e36779d91ff35c7617c885da487d689b05c1366f9933ad74"}, - {file = "cryptography-42.0.4-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d2a27aca5597c8a71abbe10209184e1a8e91c1fd470b5070a2ea60cafec35bcd"}, - {file = "cryptography-42.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4e36685cb634af55e0677d435d425043967ac2f3790ec652b2b88ad03b85c27b"}, - {file = "cryptography-42.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f47be41843200f7faec0683ad751e5ef11b9a56a220d57f300376cd8aba81660"}, - {file = "cryptography-42.0.4.tar.gz", hash = "sha256:831a4b37accef30cccd34fcb916a5d7b5be3cbbe27268a02832c3e450aea39cb"}, + {file = "cryptography-42.0.5-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:a30596bae9403a342c978fb47d9b0ee277699fa53bbafad14706af51fe543d16"}, + {file = "cryptography-42.0.5-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:b7ffe927ee6531c78f81aa17e684e2ff617daeba7f189f911065b2ea2d526dec"}, + {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2424ff4c4ac7f6b8177b53c17ed5d8fa74ae5955656867f5a8affaca36a27abb"}, + {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:329906dcc7b20ff3cad13c069a78124ed8247adcac44b10bea1130e36caae0b4"}, + {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:b03c2ae5d2f0fc05f9a2c0c997e1bc18c8229f392234e8a0194f202169ccd278"}, + {file = "cryptography-42.0.5-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f8837fe1d6ac4a8052a9a8ddab256bc006242696f03368a4009be7ee3075cdb7"}, + {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:0270572b8bd2c833c3981724b8ee9747b3ec96f699a9665470018594301439ee"}, + {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:b8cac287fafc4ad485b8a9b67d0ee80c66bf3574f655d3b97ef2e1082360faf1"}, + {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:16a48c23a62a2f4a285699dba2e4ff2d1cff3115b9df052cdd976a18856d8e3d"}, + {file = "cryptography-42.0.5-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2bce03af1ce5a5567ab89bd90d11e7bbdff56b8af3acbbec1faded8f44cb06da"}, + {file = "cryptography-42.0.5-cp37-abi3-win32.whl", hash = "sha256:b6cd2203306b63e41acdf39aa93b86fb566049aeb6dc489b70e34bcd07adca74"}, + {file = "cryptography-42.0.5-cp37-abi3-win_amd64.whl", hash = "sha256:98d8dc6d012b82287f2c3d26ce1d2dd130ec200c8679b6213b3c73c08b2b7940"}, + {file = "cryptography-42.0.5-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:5e6275c09d2badf57aea3afa80d975444f4be8d3bc58f7f80d2a484c6f9485c8"}, + {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4985a790f921508f36f81831817cbc03b102d643b5fcb81cd33df3fa291a1a1"}, + {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7cde5f38e614f55e28d831754e8a3bacf9ace5d1566235e39d91b35502d6936e"}, + {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:7367d7b2eca6513681127ebad53b2582911d1736dc2ffc19f2c3ae49997496bc"}, + {file = "cryptography-42.0.5-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:cd2030f6650c089aeb304cf093f3244d34745ce0cfcc39f20c6fbfe030102e2a"}, + {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:a2913c5375154b6ef2e91c10b5720ea6e21007412f6437504ffea2109b5a33d7"}, + {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:c41fb5e6a5fe9ebcd58ca3abfeb51dffb5d83d6775405305bfa8715b76521922"}, + {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:3eaafe47ec0d0ffcc9349e1708be2aaea4c6dd4978d76bf6eb0cb2c13636c6fc"}, + {file = "cryptography-42.0.5-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1b95b98b0d2af784078fa69f637135e3c317091b615cd0905f8b8a087e86fa30"}, + {file = "cryptography-42.0.5-cp39-abi3-win32.whl", hash = "sha256:1f71c10d1e88467126f0efd484bd44bca5e14c664ec2ede64c32f20875c0d413"}, + {file = "cryptography-42.0.5-cp39-abi3-win_amd64.whl", hash = "sha256:a011a644f6d7d03736214d38832e030d8268bcff4a41f728e6030325fea3e400"}, + {file = "cryptography-42.0.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9481ffe3cf013b71b2428b905c4f7a9a4f76ec03065b05ff499bb5682a8d9ad8"}, + {file = "cryptography-42.0.5-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:ba334e6e4b1d92442b75ddacc615c5476d4ad55cc29b15d590cc6b86efa487e2"}, + {file = "cryptography-42.0.5-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:ba3e4a42397c25b7ff88cdec6e2a16c2be18720f317506ee25210f6d31925f9c"}, + {file = "cryptography-42.0.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:111a0d8553afcf8eb02a4fea6ca4f59d48ddb34497aa8706a6cf536f1a5ec576"}, + {file = "cryptography-42.0.5-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:cd65d75953847815962c84a4654a84850b2bb4aed3f26fadcc1c13892e1e29f6"}, + {file = "cryptography-42.0.5-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:e807b3188f9eb0eaa7bbb579b462c5ace579f1cedb28107ce8b48a9f7ad3679e"}, + {file = "cryptography-42.0.5-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:f12764b8fffc7a123f641d7d049d382b73f96a34117e0b637b80643169cec8ac"}, + {file = "cryptography-42.0.5-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:37dd623507659e08be98eec89323469e8c7b4c1407c85112634ae3dbdb926fdd"}, + {file = "cryptography-42.0.5.tar.gz", hash = "sha256:6fe07eec95dfd477eb9530aef5bead34fec819b3aaf6c5bd6d20565da607bfe1"}, ] [package.dependencies] @@ -1866,4 +1866,4 @@ h11 = ">=0.9.0,<1" [metadata] lock-version = "2.0" python-versions = ">=3.11,<4" -content-hash = "f5f29e6adb6dde458f223534bdabddc0b70af0ae35e7a2c6e5d9bd7553e64d58" +content-hash = "a216dd3f792a5f40912d6350cf204c539bf8c341a508b2a5a368b63ec2837afa" diff --git a/pyproject.toml b/pyproject.toml index f591b285..9e87d645 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ websockets = "^12.0" httpx-ws = "^0.4.3" dnspython = "^2.4.2" bidict = "^0.23.1" +cryptography = "42.0.5" [tool.poetry.group.dev.dependencies] pytest = "*" @@ -43,7 +44,7 @@ pytest-httpx = "*" asgi-lifespan = "*" [build-system] -requires = ["poetry-core>=1.0.0"] +requires = ["poetry-core>=1.0.0", "cryptography==42.0.5"] build-backend = "poetry.core.masonry.api" [tool.pyright] From 35c11f682c39025924bb882a5a3b471057c7ec34 Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Tue, 7 May 2024 15:53:44 +0200 Subject: [PATCH 05/11] pull firmware update --- brewblox-proto | 2 +- .../codec/proto-compiled/brewblox_pb2.py | 4 ++-- .../codec/proto-compiled/command_pb2.py | 12 ++++++------ brewblox_devcon_spark/models.py | 1 + firmware.ini | 12 ++++++------ 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/brewblox-proto b/brewblox-proto index b675f617..b2691fe3 160000 --- a/brewblox-proto +++ b/brewblox-proto @@ -1 +1 @@ -Subproject commit b675f61736a5beb53a44b7b4a86c6fb2b0eea271 +Subproject commit b2691fe31095d284b728eaa50a095898b33ce4c6 diff --git a/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py index c4d934f1..8ca937d7 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/brewblox_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x62rewblox.proto\x12\x08\x62rewblox\x1a google/protobuf/descriptor.proto\x1a\x0cnanopb.proto\"|\n\x0bMessageOpts\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12(\n\x04impl\x18\t \x03(\x0e\x32\x13.brewblox.BlockTypeB\x05\x92?\x02\x10\x05\x12\x16\n\x07subtype\x18\x0b \x01(\rB\x05\x92?\x02\x38\x10:\x05\x92?\x02\x30\x01\"\xb0\x02\n\tFieldOpts\x12 \n\x04unit\x18\x01 \x01(\x0e\x32\x12.brewblox.UnitType\x12\r\n\x05scale\x18\x02 \x01(\r\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12\r\n\x05hexed\x18\x04 \x01(\x08\x12\x10\n\x08readonly\x18\x05 \x01(\x08\x12\x0e\n\x06logged\x18\x06 \x01(\x08\x12\x0e\n\x06stored\x18\x0f \x01(\x08\x12\x0e\n\x06hexstr\x18\x07 \x01(\x08\x12\x0f\n\x07ignored\x18\t \x01(\x08\x12\x10\n\x08\x62itfield\x18\n \x01(\x08\x12\x10\n\x08\x64\x61tetime\x18\x0b \x01(\x08\x12\x13\n\x0bipv4address\x18\x0c \x01(\x08\x12\x14\n\x0comit_if_zero\x18\r \x01(\x08\x12\x14\n\x0cnull_if_zero\x18\x0e \x01(\x08:\x05\x92?\x02\x30\x01*\xad\x02\n\x08UnitType\x12\n\n\x06NotSet\x10\x00\x12\x0b\n\x07\x43\x65lsius\x10\x01\x12\x12\n\x0eInverseCelsius\x10\x02\x12\n\n\x06Second\x10\x03\x12\n\n\x06Minute\x10\x04\x12\x08\n\x04Hour\x10\x05\x12\x10\n\x0c\x44\x65ltaCelsius\x10\x06\x12\x19\n\x15\x44\x65ltaCelsiusPerSecond\x10\x07\x12\x19\n\x15\x44\x65ltaCelsiusPerMinute\x10\x08\x12\x17\n\x13\x44\x65ltaCelsiusPerHour\x10\t\x12\x1a\n\x16\x44\x65ltaCelsiusMultSecond\x10\n\x12\x1a\n\x16\x44\x65ltaCelsiusMultMinute\x10\x0b\x12\x18\n\x14\x44\x65ltaCelsiusMultHour\x10\x0c\x12\x0c\n\x08MilliBar\x10\r\x12\x08\n\x04Volt\x10\x0e\x12\x07\n\x03Ohm\x10\x0f*\xa8\x0b\n\tBlockType\x12\x0b\n\x07Invalid\x10\x00\x12\x19\n\x15ProcessValueInterface\x10\x01\x12\x17\n\x13TempSensorInterface\x10\x02\x12\x1f\n\x1bSetpointSensorPairInterface\x10\x04\x12\x1b\n\x17\x41\x63tuatorAnalogInterface\x10\x05\x12\x1c\n\x18\x41\x63tuatorDigitalInterface\x10\x06\x12\x15\n\x11\x42\x61lancerInterface\x10\x07\x12\x12\n\x0eMutexInterface\x10\x08\x12\x1a\n\x16OneWireDeviceInterface\x10\t\x12\x14\n\x10IoArrayInterface\x10\n\x12\x13\n\x0f\x44S2408Interface\x10\x0b\x12\x17\n\x13OneWireBusInterface\x10\x0c\x12\x15\n\x11IoModuleInterface\x10\r\x12\x1f\n\x1bOneWireDeviceBlockInterface\x10\x0e\x12\x14\n\x10\x45nablerInterface\x10\x0f\x12\x16\n\x12\x43laimableInterface\x10\x10\x12\x15\n\x11IoDriverInterface\x10\x11\x12\x15\n\x11SetpointInterface\x10\x12\x12\x19\n\x15StoredAnalogInterface\x10\x13\x12\x1b\n\x17StoredSetpointInterface\x10\x14\x12\x1a\n\x16StoredDigitalInterface\x10\x15\x12\x1e\n\x1a\x43onstrainedAnalogInterface\x10\x16\x12 \n\x1c\x43onstrainedSetpointInterface\x10\x17\x12\x1f\n\x1b\x43onstrainedDigitalInterface\x10\x18\x12\x1c\n\x18ScanningFactoryInterface\x10\x19\x12\x1c\n\x18I2CDiscoverableInterface\x10\x1a\x12\x14\n\x10\x44igitalInterface\x10\x1b\x12\x19\n\x15\x41nalogModuleInterface\x10\x1c\x12\x08\n\x03\x41ny\x10\xff\x01\x12\x0c\n\x07SysInfo\x10\x80\x02\x12\n\n\x05Ticks\x10\x81\x02\x12\x0f\n\nOneWireBus\x10\x82\x02\x12\x0e\n\tBoardPins\x10\x83\x02\x12\x13\n\x0eTempSensorMock\x10\xad\x02\x12\x16\n\x11TempSensorOneWire\x10\xae\x02\x12\x17\n\x12SetpointSensorPair\x10\xaf\x02\x12\x08\n\x03Pid\x10\xb0\x02\x12\x17\n\x12\x41\x63tuatorAnalogMock\x10\xb1\x02\x12\x10\n\x0b\x41\x63tuatorPin\x10\xb2\x02\x12\x10\n\x0b\x41\x63tuatorPwm\x10\xb3\x02\x12\x13\n\x0e\x41\x63tuatorOffset\x10\xb4\x02\x12\r\n\x08\x42\x61lancer\x10\xb5\x02\x12\n\n\x05Mutex\x10\xb6\x02\x12\x14\n\x0fSetpointProfile\x10\xb7\x02\x12\x11\n\x0cWiFiSettings\x10\xb8\x02\x12\x12\n\rTouchSettings\x10\xb9\x02\x12\x14\n\x0f\x44isplaySettings\x10\xba\x02\x12\x0b\n\x06\x44S2413\x10\xbb\x02\x12\x14\n\x0f\x41\x63tuatorOneWire\x10\xbc\x02\x12\x0b\n\x06\x44S2408\x10\xbd\x02\x12\x14\n\x0f\x44igitalActuator\x10\xbe\x02\x12\x0f\n\nSpark3Pins\x10\xbf\x02\x12\x0f\n\nSpark2Pins\x10\xc0\x02\x12\x0f\n\nMotorValve\x10\xc1\x02\x12\x12\n\rActuatorLogic\x10\xc2\x02\x12\r\n\x08MockPins\x10\xc3\x02\x12\x14\n\x0fTempSensorCombi\x10\xc4\x02\x12\x16\n\x11OneWireGpioModule\x10\xc5\x02\x12\r\n\x08Sequence\x10\xc6\x02\x12\x17\n\x12TempSensorExternal\x10\xc8\x02\x12\x0c\n\x07\x46\x61stPwm\x10\xc9\x02\x12\x11\n\x0c\x44igitalInput\x10\xca\x02\x12\x1a\n\x15PrecisionAnalogModule\x10\xcb\x02\x12\x15\n\x10TempSensorAnalog\x10\xcc\x02\x12\x0e\n\tVariables\x10\xcd\x02\x12\x10\n\nDeprecated\x10\xfd\xff\x03:J\n\x05\x66ield\x12\x1d.google.protobuf.FieldOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x13.brewblox.FieldOptsB\x05\x92?\x02\x18\x03:L\n\x03msg\x12\x1f.google.protobuf.MessageOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x15.brewblox.MessageOptsB\x05\x92?\x02\x18\x03\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x62rewblox.proto\x12\x08\x62rewblox\x1a google/protobuf/descriptor.proto\x1a\x0cnanopb.proto\"|\n\x0bMessageOpts\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12(\n\x04impl\x18\t \x03(\x0e\x32\x13.brewblox.BlockTypeB\x05\x92?\x02\x10\x05\x12\x16\n\x07subtype\x18\x0b \x01(\rB\x05\x92?\x02\x38\x10:\x05\x92?\x02\x30\x01\"\xb0\x02\n\tFieldOpts\x12 \n\x04unit\x18\x01 \x01(\x0e\x32\x12.brewblox.UnitType\x12\r\n\x05scale\x18\x02 \x01(\r\x12$\n\x07objtype\x18\x03 \x01(\x0e\x32\x13.brewblox.BlockType\x12\r\n\x05hexed\x18\x04 \x01(\x08\x12\x10\n\x08readonly\x18\x05 \x01(\x08\x12\x0e\n\x06logged\x18\x06 \x01(\x08\x12\x0e\n\x06stored\x18\x0f \x01(\x08\x12\x0e\n\x06hexstr\x18\x07 \x01(\x08\x12\x0f\n\x07ignored\x18\t \x01(\x08\x12\x10\n\x08\x62itfield\x18\n \x01(\x08\x12\x10\n\x08\x64\x61tetime\x18\x0b \x01(\x08\x12\x13\n\x0bipv4address\x18\x0c \x01(\x08\x12\x14\n\x0comit_if_zero\x18\r \x01(\x08\x12\x14\n\x0cnull_if_zero\x18\x0e \x01(\x08:\x05\x92?\x02\x30\x01*\xad\x02\n\x08UnitType\x12\n\n\x06NotSet\x10\x00\x12\x0b\n\x07\x43\x65lsius\x10\x01\x12\x12\n\x0eInverseCelsius\x10\x02\x12\n\n\x06Second\x10\x03\x12\n\n\x06Minute\x10\x04\x12\x08\n\x04Hour\x10\x05\x12\x10\n\x0c\x44\x65ltaCelsius\x10\x06\x12\x19\n\x15\x44\x65ltaCelsiusPerSecond\x10\x07\x12\x19\n\x15\x44\x65ltaCelsiusPerMinute\x10\x08\x12\x17\n\x13\x44\x65ltaCelsiusPerHour\x10\t\x12\x1a\n\x16\x44\x65ltaCelsiusMultSecond\x10\n\x12\x1a\n\x16\x44\x65ltaCelsiusMultMinute\x10\x0b\x12\x18\n\x14\x44\x65ltaCelsiusMultHour\x10\x0c\x12\x0c\n\x08MilliBar\x10\r\x12\x08\n\x04Volt\x10\x0e\x12\x07\n\x03Ohm\x10\x0f*\xb9\x0b\n\tBlockType\x12\x0b\n\x07Invalid\x10\x00\x12\x19\n\x15ProcessValueInterface\x10\x01\x12\x17\n\x13TempSensorInterface\x10\x02\x12\x1f\n\x1bSetpointSensorPairInterface\x10\x04\x12\x1b\n\x17\x41\x63tuatorAnalogInterface\x10\x05\x12\x1c\n\x18\x41\x63tuatorDigitalInterface\x10\x06\x12\x15\n\x11\x42\x61lancerInterface\x10\x07\x12\x12\n\x0eMutexInterface\x10\x08\x12\x1a\n\x16OneWireDeviceInterface\x10\t\x12\x14\n\x10IoArrayInterface\x10\n\x12\x13\n\x0f\x44S2408Interface\x10\x0b\x12\x17\n\x13OneWireBusInterface\x10\x0c\x12\x15\n\x11IoModuleInterface\x10\r\x12\x1f\n\x1bOneWireDeviceBlockInterface\x10\x0e\x12\x14\n\x10\x45nablerInterface\x10\x0f\x12\x16\n\x12\x43laimableInterface\x10\x10\x12\x15\n\x11IoDriverInterface\x10\x11\x12\x15\n\x11SetpointInterface\x10\x12\x12\x19\n\x15StoredAnalogInterface\x10\x13\x12\x1b\n\x17StoredSetpointInterface\x10\x14\x12\x1a\n\x16StoredDigitalInterface\x10\x15\x12\x1e\n\x1a\x43onstrainedAnalogInterface\x10\x16\x12 \n\x1c\x43onstrainedSetpointInterface\x10\x17\x12\x1f\n\x1b\x43onstrainedDigitalInterface\x10\x18\x12\x1c\n\x18ScanningFactoryInterface\x10\x19\x12\x1c\n\x18I2CDiscoverableInterface\x10\x1a\x12\x14\n\x10\x44igitalInterface\x10\x1b\x12\x19\n\x15\x41nalogModuleInterface\x10\x1c\x12\x08\n\x03\x41ny\x10\xff\x01\x12\x0c\n\x07SysInfo\x10\x80\x02\x12\n\n\x05Ticks\x10\x81\x02\x12\x0f\n\nOneWireBus\x10\x82\x02\x12\x0e\n\tBoardPins\x10\x83\x02\x12\x13\n\x0eTempSensorMock\x10\xad\x02\x12\x16\n\x11TempSensorOneWire\x10\xae\x02\x12\x17\n\x12SetpointSensorPair\x10\xaf\x02\x12\x08\n\x03Pid\x10\xb0\x02\x12\x17\n\x12\x41\x63tuatorAnalogMock\x10\xb1\x02\x12\x10\n\x0b\x41\x63tuatorPin\x10\xb2\x02\x12\x10\n\x0b\x41\x63tuatorPwm\x10\xb3\x02\x12\x13\n\x0e\x41\x63tuatorOffset\x10\xb4\x02\x12\r\n\x08\x42\x61lancer\x10\xb5\x02\x12\n\n\x05Mutex\x10\xb6\x02\x12\x14\n\x0fSetpointProfile\x10\xb7\x02\x12\x11\n\x0cWiFiSettings\x10\xb8\x02\x12\x12\n\rTouchSettings\x10\xb9\x02\x12\x14\n\x0f\x44isplaySettings\x10\xba\x02\x12\x0b\n\x06\x44S2413\x10\xbb\x02\x12\x14\n\x0f\x41\x63tuatorOneWire\x10\xbc\x02\x12\x0b\n\x06\x44S2408\x10\xbd\x02\x12\x14\n\x0f\x44igitalActuator\x10\xbe\x02\x12\x0f\n\nSpark3Pins\x10\xbf\x02\x12\x0f\n\nSpark2Pins\x10\xc0\x02\x12\x0f\n\nMotorValve\x10\xc1\x02\x12\x12\n\rActuatorLogic\x10\xc2\x02\x12\r\n\x08MockPins\x10\xc3\x02\x12\x14\n\x0fTempSensorCombi\x10\xc4\x02\x12\x16\n\x11OneWireGpioModule\x10\xc5\x02\x12\r\n\x08Sequence\x10\xc6\x02\x12\x17\n\x12TempSensorExternal\x10\xc8\x02\x12\x0c\n\x07\x46\x61stPwm\x10\xc9\x02\x12\x11\n\x0c\x44igitalInput\x10\xca\x02\x12\x1a\n\x15PrecisionAnalogModule\x10\xcb\x02\x12\x15\n\x10TempSensorAnalog\x10\xcc\x02\x12\x0e\n\tVariables\x10\xcd\x02\x12\x0f\n\tCorrupted\x10\xfc\xff\x03\x12\x10\n\nDeprecated\x10\xfd\xff\x03:J\n\x05\x66ield\x12\x1d.google.protobuf.FieldOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x13.brewblox.FieldOptsB\x05\x92?\x02\x18\x03:L\n\x03msg\x12\x1f.google.protobuf.MessageOptions\x18\xd1\x86\x03 \x01(\x0b\x32\x15.brewblox.MessageOptsB\x05\x92?\x02\x18\x03\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,7 +37,7 @@ _globals['_UNITTYPE']._serialized_start=510 _globals['_UNITTYPE']._serialized_end=811 _globals['_BLOCKTYPE']._serialized_start=814 - _globals['_BLOCKTYPE']._serialized_end=2262 + _globals['_BLOCKTYPE']._serialized_end=2279 _globals['_MESSAGEOPTS']._serialized_start=76 _globals['_MESSAGEOPTS']._serialized_end=200 _globals['_FIELDOPTS']._serialized_start=203 diff --git a/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py index 62fcff64..2c2b3f91 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/command_pb2.py @@ -15,7 +15,7 @@ import nanopb_pb2 as nanopb__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rcommand.proto\x12\x07\x63ommand\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"%\n\tMaskField\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x03(\rB\x07\x92?\x04\x10\x04\x38\x10\"\xae\x01\n\x07Payload\x12\x0f\n\x07\x62lockId\x18\x01 \x01(\r\x12&\n\tblockType\x18\x02 \x01(\x0e\x32\x13.brewblox.BlockType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\t\x12#\n\x08maskMode\x18\x06 \x01(\x0e\x32\x11.command.MaskMode\x12&\n\nmaskFields\x18\x07 \x03(\x0b\x32\x12.command.MaskField\"}\n\x07Request\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12\x1f\n\x06opcode\x18\x02 \x01(\x0e\x32\x0f.command.Opcode\x12!\n\x07payload\x18\x03 \x01(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode\"\x80\x01\n\x08Response\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x12.command.ErrorCode\x12!\n\x07payload\x18\x03 \x03(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode*\xbc\x02\n\x06Opcode\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07VERSION\x10\x01\x12\x0e\n\nBLOCK_READ\x10\n\x12\x12\n\x0e\x42LOCK_READ_ALL\x10\x0b\x12\x0f\n\x0b\x42LOCK_WRITE\x10\x0c\x12\x10\n\x0c\x42LOCK_CREATE\x10\r\x12\x10\n\x0c\x42LOCK_DELETE\x10\x0e\x12\x12\n\x0e\x42LOCK_DISCOVER\x10\x0f\x12\x10\n\x0cSTORAGE_READ\x10\x14\x12\x14\n\x10STORAGE_READ_ALL\x10\x15\x12\r\n\tNAME_READ\x10\x32\x12\x11\n\rNAME_READ_ALL\x10\x33\x12\x0e\n\nNAME_WRITE\x10\x34\x12\n\n\x06REBOOT\x10\x1e\x12\x10\n\x0c\x43LEAR_BLOCKS\x10\x1f\x12\x0e\n\nCLEAR_WIFI\x10 \x12\x11\n\rFACTORY_RESET\x10!\x12\x13\n\x0f\x46IRMWARE_UPDATE\x10(*\x99\x06\n\tErrorCode\x12\x06\n\x02OK\x10\x00\x12\x11\n\rUNKNOWN_ERROR\x10\x01\x12\x12\n\x0eINVALID_OPCODE\x10\x02\x12\x15\n\x11INSUFFICIENT_HEAP\x10\x04\x12\x18\n\x14INSUFFICIENT_STORAGE\x10\x05\x12\x11\n\rNETWORK_ERROR\x10\n\x12\x16\n\x12NETWORK_READ_ERROR\x10\x0b\x12\x1a\n\x16NETWORK_DECODING_ERROR\x10\x0c\x12\x17\n\x13NETWORK_WRITE_ERROR\x10\r\x12\x1a\n\x16NETWORK_ENCODING_ERROR\x10\x0e\x12\x11\n\rSTORAGE_ERROR\x10\x14\x12\x16\n\x12STORAGE_READ_ERROR\x10\x15\x12\x1a\n\x16STORAGE_DECODING_ERROR\x10\x16\x12\x15\n\x11STORAGE_CRC_ERROR\x10\x17\x12\x17\n\x13STORAGE_WRITE_ERROR\x10\x18\x12\x1a\n\x16STORAGE_ENCODING_ERROR\x10\x19\x12\x16\n\x12\x42LOCK_NOT_WRITABLE\x10\x1e\x12\x16\n\x12\x42LOCK_NOT_READABLE\x10\x1f\x12\x17\n\x13\x42LOCK_NOT_CREATABLE\x10 \x12\x17\n\x13\x42LOCK_NOT_DELETABLE\x10!\x12\x11\n\rINVALID_BLOCK\x10(\x12\x14\n\x10INVALID_BLOCK_ID\x10)\x12\x16\n\x12INVALID_BLOCK_TYPE\x10*\x12\x19\n\x15INVALID_BLOCK_CONTENT\x10,\x12\x16\n\x12INVALID_BLOCK_NAME\x10-\x12\x18\n\x14INVALID_STORED_BLOCK\x10\x32\x12\x1b\n\x17INVALID_STORED_BLOCK_ID\x10\x33\x12\x1d\n\x19INVALID_STORED_BLOCK_TYPE\x10\x34\x12 \n\x1cINVALID_STORED_BLOCK_CONTENT\x10\x36\x12\x1d\n\x19INVALID_STORED_BLOCK_NAME\x10\x37\x12\x16\n\x12\x44UPLICATE_BLOCK_ID\x10<\x12\x18\n\x14\x44UPLICATE_BLOCK_NAME\x10=*5\n\x08MaskMode\x12\x0b\n\x07NO_MASK\x10\x00\x12\r\n\tINCLUSIVE\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*/\n\x08ReadMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06STORED\x10\x01\x12\n\n\x06LOGGED\x10\x02\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rcommand.proto\x12\x07\x63ommand\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\"%\n\tMaskField\x12\x18\n\x07\x61\x64\x64ress\x18\x02 \x03(\rB\x07\x92?\x04\x10\x04\x38\x10\"\xae\x01\n\x07Payload\x12\x0f\n\x07\x62lockId\x18\x01 \x01(\r\x12&\n\tblockType\x18\x02 \x01(\x0e\x32\x13.brewblox.BlockType\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\t\x12#\n\x08maskMode\x18\x06 \x01(\x0e\x32\x11.command.MaskMode\x12&\n\nmaskFields\x18\x07 \x03(\x0b\x32\x12.command.MaskField\"}\n\x07Request\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12\x1f\n\x06opcode\x18\x02 \x01(\x0e\x32\x0f.command.Opcode\x12!\n\x07payload\x18\x03 \x01(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode\"\x80\x01\n\x08Response\x12\r\n\x05msgId\x18\x01 \x01(\x05\x12!\n\x05\x65rror\x18\x02 \x01(\x0e\x32\x12.command.ErrorCode\x12!\n\x07payload\x18\x03 \x03(\x0b\x32\x10.command.Payload\x12\x1f\n\x04mode\x18\x04 \x01(\x0e\x32\x11.command.ReadMode*\xbc\x02\n\x06Opcode\x12\x08\n\x04NONE\x10\x00\x12\x0b\n\x07VERSION\x10\x01\x12\x0e\n\nBLOCK_READ\x10\n\x12\x12\n\x0e\x42LOCK_READ_ALL\x10\x0b\x12\x0f\n\x0b\x42LOCK_WRITE\x10\x0c\x12\x10\n\x0c\x42LOCK_CREATE\x10\r\x12\x10\n\x0c\x42LOCK_DELETE\x10\x0e\x12\x12\n\x0e\x42LOCK_DISCOVER\x10\x0f\x12\x10\n\x0cSTORAGE_READ\x10\x14\x12\x14\n\x10STORAGE_READ_ALL\x10\x15\x12\r\n\tNAME_READ\x10\x32\x12\x11\n\rNAME_READ_ALL\x10\x33\x12\x0e\n\nNAME_WRITE\x10\x34\x12\n\n\x06REBOOT\x10\x1e\x12\x10\n\x0c\x43LEAR_BLOCKS\x10\x1f\x12\x0e\n\nCLEAR_WIFI\x10 \x12\x11\n\rFACTORY_RESET\x10!\x12\x13\n\x0f\x46IRMWARE_UPDATE\x10(*\xba\x06\n\tErrorCode\x12\x06\n\x02OK\x10\x00\x12\x11\n\rUNKNOWN_ERROR\x10\x01\x12\x12\n\x0eINVALID_OPCODE\x10\x02\x12\x15\n\x11INSUFFICIENT_HEAP\x10\x04\x12\x18\n\x14INSUFFICIENT_STORAGE\x10\x05\x12\x11\n\rNETWORK_ERROR\x10\n\x12\x16\n\x12NETWORK_READ_ERROR\x10\x0b\x12\x1a\n\x16NETWORK_DECODING_ERROR\x10\x0c\x12\x17\n\x13NETWORK_WRITE_ERROR\x10\r\x12\x1a\n\x16NETWORK_ENCODING_ERROR\x10\x0e\x12\x11\n\rSTORAGE_ERROR\x10\x14\x12\x16\n\x12STORAGE_READ_ERROR\x10\x15\x12\x1a\n\x16STORAGE_DECODING_ERROR\x10\x16\x12\x15\n\x11STORAGE_CRC_ERROR\x10\x17\x12\x17\n\x13STORAGE_WRITE_ERROR\x10\x18\x12\x1a\n\x16STORAGE_ENCODING_ERROR\x10\x19\x12\x1f\n\x1bSTORAGE_OUT_OF_BOUNDS_ERROR\x10\x1a\x12\x16\n\x12\x42LOCK_NOT_WRITABLE\x10\x1e\x12\x16\n\x12\x42LOCK_NOT_READABLE\x10\x1f\x12\x17\n\x13\x42LOCK_NOT_CREATABLE\x10 \x12\x17\n\x13\x42LOCK_NOT_DELETABLE\x10!\x12\x11\n\rINVALID_BLOCK\x10(\x12\x14\n\x10INVALID_BLOCK_ID\x10)\x12\x16\n\x12INVALID_BLOCK_TYPE\x10*\x12\x19\n\x15INVALID_BLOCK_CONTENT\x10,\x12\x16\n\x12INVALID_BLOCK_NAME\x10-\x12\x18\n\x14INVALID_STORED_BLOCK\x10\x32\x12\x1b\n\x17INVALID_STORED_BLOCK_ID\x10\x33\x12\x1d\n\x19INVALID_STORED_BLOCK_TYPE\x10\x34\x12 \n\x1cINVALID_STORED_BLOCK_CONTENT\x10\x36\x12\x1d\n\x19INVALID_STORED_BLOCK_NAME\x10\x37\x12\x16\n\x12\x44UPLICATE_BLOCK_ID\x10<\x12\x18\n\x14\x44UPLICATE_BLOCK_NAME\x10=*5\n\x08MaskMode\x12\x0b\n\x07NO_MASK\x10\x00\x12\r\n\tINCLUSIVE\x10\x01\x12\r\n\tEXCLUSIVE\x10\x02*/\n\x08ReadMode\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\n\n\x06STORED\x10\x01\x12\n\n\x06LOGGED\x10\x02\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -27,11 +27,11 @@ _globals['_OPCODE']._serialized_start=531 _globals['_OPCODE']._serialized_end=847 _globals['_ERRORCODE']._serialized_start=850 - _globals['_ERRORCODE']._serialized_end=1643 - _globals['_MASKMODE']._serialized_start=1645 - _globals['_MASKMODE']._serialized_end=1698 - _globals['_READMODE']._serialized_start=1700 - _globals['_READMODE']._serialized_end=1747 + _globals['_ERRORCODE']._serialized_end=1676 + _globals['_MASKMODE']._serialized_start=1678 + _globals['_MASKMODE']._serialized_end=1731 + _globals['_READMODE']._serialized_start=1733 + _globals['_READMODE']._serialized_end=1780 _globals['_MASKFIELD']._serialized_start=56 _globals['_MASKFIELD']._serialized_end=93 _globals['_PAYLOAD']._serialized_start=96 diff --git a/brewblox_devcon_spark/models.py b/brewblox_devcon_spark/models.py index 690e550a..42d135a8 100644 --- a/brewblox_devcon_spark/models.py +++ b/brewblox_devcon_spark/models.py @@ -269,6 +269,7 @@ class ErrorCode(enum.Enum): STORAGE_CRC_ERROR = 23 STORAGE_WRITE_ERROR = 24 STORAGE_ENCODING_ERROR = 25 + STORAGE_OUT_OF_BOUNDS_ERROR = 26 # Invalid actions BLOCK_NOT_WRITABLE = 30 diff --git a/firmware.ini b/firmware.ini index 792dbd5b..8141091b 100644 --- a/firmware.ini +++ b/firmware.ini @@ -1,8 +1,8 @@ [FIRMWARE] -firmware_version=d1631e3d -firmware_date=2024-05-02 -firmware_sha=d1631e3d7eb26ff3fc5c7df6805ab01c040178c5 -proto_version=b675f617 -proto_date=2024-05-01 -proto_sha=b675f61736a5beb53a44b7b4a86c6fb2b0eea271 +firmware_version=1c9a820c +firmware_date=2024-05-07 +firmware_sha=1c9a820cc7e94fc612fbd462044b10861f427aae +proto_version=b2691fe3 +proto_date=2024-05-07 +proto_sha=b2691fe31095d284b728eaa50a095898b33ce4c6 system_version=3.2.0 From 5ab5fce35bc1191472da81dddff6221e7822dd46 Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Tue, 7 May 2024 17:30:30 +0200 Subject: [PATCH 06/11] pull proto with deprecated GPIO module fields --- brewblox-proto | 2 +- .../proto-compiled/OneWireGpioModule_pb2.py | 30 +++++++++++++++++-- firmware.ini | 8 ++--- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/brewblox-proto b/brewblox-proto index b2691fe3..b158fa1e 160000 --- a/brewblox-proto +++ b/brewblox-proto @@ -1 +1 @@ -Subproject commit b2691fe31095d284b728eaa50a095898b33ce4c6 +Subproject commit b158fa1e7a93372ce5c11215e292934d22c6b003 diff --git a/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py index e8daca3d..b5a24dde 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py @@ -16,7 +16,7 @@ import GpioModule_pb2 as GpioModule__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17OneWireGpioModule.proto\x12\x16\x62lox.OneWireGpioModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x10GpioModule.proto\"\x8f\x02\n\x05\x42lock\x12\x37\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x18.blox.GpioModule.ChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02x\x01\x12#\n\x0emodulePosition\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12 \n\x10useExternalPower\x18\x0e \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12/\n\x06status\x18\x0f \x01(\x0b\x32\x17.blox.GpioModule.StatusB\x06\x8a\xb5\x18\x02(\x01\x12&\n\x11moduleStatusClear\x18Z \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12 \n\x0b\x63learFaults\x18 \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0b\x8a\xb5\x18\x07\x18\xc5\x02J\x02\n\x0c\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17OneWireGpioModule.proto\x12\x16\x62lox.OneWireGpioModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x10GpioModule.proto\"\xf6\x05\n\x05\x42lock\x12\x37\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x18.blox.GpioModule.ChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02x\x01\x12#\n\x0emodulePosition\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12 \n\x10useExternalPower\x18\x0e \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12/\n\x06status\x18\x11 \x01(\x0b\x32\x17.blox.GpioModule.StatusB\x06\x8a\xb5\x18\x02(\x01\x12!\n\x0cmoduleStatus\x18\x03 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\"\n\rpullUpDesired\x18\x04 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12!\n\x0cPullUpStatus\x18\x05 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10PullUpWhenActive\x18\x06 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\'\n\x12PullUpWhenInactive\x18\x07 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12$\n\x0fpullDownDesired\x18\x08 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12#\n\x0ePullDownStatus\x18\t \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\'\n\x12PullDownWhenActive\x18\n \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12)\n\x14PullDownWhenInactive\x18\x0b \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12 \n\x0boverCurrent\x18\x0c \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1d\n\x08openLoad\x18\r \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12$\n\x0f\x66\x61ultsHistory5m\x18\x0f \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10\x66\x61ultsHistory60m\x18\x10 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12&\n\x11moduleStatusClear\x18Z \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12 \n\x0b\x63learFaults\x18 \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0b\x8a\xb5\x18\x07\x18\xc5\x02J\x02\n\x0c\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -31,6 +31,32 @@ _BLOCK.fields_by_name['useExternalPower']._serialized_options = b'\212\265\030\002x\001' _BLOCK.fields_by_name['status']._options = None _BLOCK.fields_by_name['status']._serialized_options = b'\212\265\030\002(\001' + _BLOCK.fields_by_name['moduleStatus']._options = None + _BLOCK.fields_by_name['moduleStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullUpDesired']._options = None + _BLOCK.fields_by_name['pullUpDesired']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['PullUpStatus']._options = None + _BLOCK.fields_by_name['PullUpStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['PullUpWhenActive']._options = None + _BLOCK.fields_by_name['PullUpWhenActive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['PullUpWhenInactive']._options = None + _BLOCK.fields_by_name['PullUpWhenInactive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullDownDesired']._options = None + _BLOCK.fields_by_name['pullDownDesired']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['PullDownStatus']._options = None + _BLOCK.fields_by_name['PullDownStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['PullDownWhenActive']._options = None + _BLOCK.fields_by_name['PullDownWhenActive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['PullDownWhenInactive']._options = None + _BLOCK.fields_by_name['PullDownWhenInactive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['overCurrent']._options = None + _BLOCK.fields_by_name['overCurrent']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['openLoad']._options = None + _BLOCK.fields_by_name['openLoad']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['faultsHistory5m']._options = None + _BLOCK.fields_by_name['faultsHistory5m']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['faultsHistory60m']._options = None + _BLOCK.fields_by_name['faultsHistory60m']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK.fields_by_name['moduleStatusClear']._options = None _BLOCK.fields_by_name['moduleStatusClear']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK.fields_by_name['clearFaults']._options = None @@ -38,5 +64,5 @@ _BLOCK._options = None _BLOCK._serialized_options = b'\212\265\030\007\030\305\002J\002\n\014' _globals['_BLOCK']._serialized_start=100 - _globals['_BLOCK']._serialized_end=371 + _globals['_BLOCK']._serialized_end=858 # @@protoc_insertion_point(module_scope) diff --git a/firmware.ini b/firmware.ini index 8141091b..f924a432 100644 --- a/firmware.ini +++ b/firmware.ini @@ -1,8 +1,8 @@ [FIRMWARE] -firmware_version=1c9a820c +firmware_version=1d50579c firmware_date=2024-05-07 -firmware_sha=1c9a820cc7e94fc612fbd462044b10861f427aae -proto_version=b2691fe3 +firmware_sha=1d50579c2d5f2cbba52aae1bac4b6c67109086c6 +proto_version=b158fa1e proto_date=2024-05-07 -proto_sha=b2691fe31095d284b728eaa50a095898b33ce4c6 +proto_sha=b158fa1e7a93372ce5c11215e292934d22c6b003 system_version=3.2.0 From ea872899ad1a397151a968744167c45957e332bf Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Tue, 7 May 2024 19:01:47 +0200 Subject: [PATCH 07/11] pull firmware with restore of values in clear_blocks --- firmware.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware.ini b/firmware.ini index f924a432..0056fc9a 100644 --- a/firmware.ini +++ b/firmware.ini @@ -1,7 +1,7 @@ [FIRMWARE] -firmware_version=1d50579c +firmware_version=f73cdc63 firmware_date=2024-05-07 -firmware_sha=1d50579c2d5f2cbba52aae1bac4b6c67109086c6 +firmware_sha=f73cdc63b75959a23ae8a7ec63f300de50aea096 proto_version=b158fa1e proto_date=2024-05-07 proto_sha=b158fa1e7a93372ce5c11215e292934d22c6b003 From b3d06bc941fc971690e0da5e16b49074bb2095db Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Tue, 7 May 2024 19:34:47 +0200 Subject: [PATCH 08/11] pull typo fix in proto --- brewblox-proto | 2 +- .../proto-compiled/OneWireGpioModule_pb2.py | 26 +++++++++---------- firmware.ini | 8 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/brewblox-proto b/brewblox-proto index b158fa1e..4be1554b 160000 --- a/brewblox-proto +++ b/brewblox-proto @@ -1 +1 @@ -Subproject commit b158fa1e7a93372ce5c11215e292934d22c6b003 +Subproject commit 4be1554bf59b05b9de7fa8c88b7df514d41dd528 diff --git a/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py b/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py index b5a24dde..6c15d768 100644 --- a/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py +++ b/brewblox_devcon_spark/codec/proto-compiled/OneWireGpioModule_pb2.py @@ -16,7 +16,7 @@ import GpioModule_pb2 as GpioModule__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17OneWireGpioModule.proto\x12\x16\x62lox.OneWireGpioModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x10GpioModule.proto\"\xf6\x05\n\x05\x42lock\x12\x37\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x18.blox.GpioModule.ChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02x\x01\x12#\n\x0emodulePosition\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12 \n\x10useExternalPower\x18\x0e \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12/\n\x06status\x18\x11 \x01(\x0b\x32\x17.blox.GpioModule.StatusB\x06\x8a\xb5\x18\x02(\x01\x12!\n\x0cmoduleStatus\x18\x03 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\"\n\rpullUpDesired\x18\x04 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12!\n\x0cPullUpStatus\x18\x05 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10PullUpWhenActive\x18\x06 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\'\n\x12PullUpWhenInactive\x18\x07 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12$\n\x0fpullDownDesired\x18\x08 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12#\n\x0ePullDownStatus\x18\t \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\'\n\x12PullDownWhenActive\x18\n \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12)\n\x14PullDownWhenInactive\x18\x0b \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12 \n\x0boverCurrent\x18\x0c \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1d\n\x08openLoad\x18\r \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12$\n\x0f\x66\x61ultsHistory5m\x18\x0f \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10\x66\x61ultsHistory60m\x18\x10 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12&\n\x11moduleStatusClear\x18Z \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12 \n\x0b\x63learFaults\x18 \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0b\x8a\xb5\x18\x07\x18\xc5\x02J\x02\n\x0c\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17OneWireGpioModule.proto\x12\x16\x62lox.OneWireGpioModule\x1a\x0e\x62rewblox.proto\x1a\x0cnanopb.proto\x1a\x10GpioModule.proto\"\xf6\x05\n\x05\x42lock\x12\x37\n\x08\x63hannels\x18\x01 \x03(\x0b\x32\x18.blox.GpioModule.ChannelB\x0b\x92?\x02\x10\x08\x8a\xb5\x18\x02x\x01\x12#\n\x0emodulePosition\x18\x02 \x01(\rB\x0b\x92?\x02\x38\x08\x8a\xb5\x18\x02x\x01\x12 \n\x10useExternalPower\x18\x0e \x01(\x08\x42\x06\x8a\xb5\x18\x02x\x01\x12/\n\x06status\x18\x11 \x01(\x0b\x32\x17.blox.GpioModule.StatusB\x06\x8a\xb5\x18\x02(\x01\x12!\n\x0cmoduleStatus\x18\x03 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\"\n\rpullUpDesired\x18\x04 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12!\n\x0cpullUpStatus\x18\x05 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10pullUpWhenActive\x18\x06 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\'\n\x12pullUpWhenInactive\x18\x07 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12$\n\x0fpullDownDesired\x18\x08 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12#\n\x0epullDownStatus\x18\t \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\'\n\x12pullDownWhenActive\x18\n \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12)\n\x14pullDownWhenInactive\x18\x0b \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12 \n\x0boverCurrent\x18\x0c \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12\x1d\n\x08openLoad\x18\r \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12$\n\x0f\x66\x61ultsHistory5m\x18\x0f \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12%\n\x10\x66\x61ultsHistory60m\x18\x10 \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12&\n\x11moduleStatusClear\x18Z \x01(\rB\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01\x12 \n\x0b\x63learFaults\x18 \x01(\x08\x42\x0b\x92?\x02\x18\x03\x8a\xb5\x18\x02H\x01:\x0b\x8a\xb5\x18\x07\x18\xc5\x02J\x02\n\x0c\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -35,20 +35,20 @@ _BLOCK.fields_by_name['moduleStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK.fields_by_name['pullUpDesired']._options = None _BLOCK.fields_by_name['pullUpDesired']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' - _BLOCK.fields_by_name['PullUpStatus']._options = None - _BLOCK.fields_by_name['PullUpStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' - _BLOCK.fields_by_name['PullUpWhenActive']._options = None - _BLOCK.fields_by_name['PullUpWhenActive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' - _BLOCK.fields_by_name['PullUpWhenInactive']._options = None - _BLOCK.fields_by_name['PullUpWhenInactive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullUpStatus']._options = None + _BLOCK.fields_by_name['pullUpStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullUpWhenActive']._options = None + _BLOCK.fields_by_name['pullUpWhenActive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullUpWhenInactive']._options = None + _BLOCK.fields_by_name['pullUpWhenInactive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK.fields_by_name['pullDownDesired']._options = None _BLOCK.fields_by_name['pullDownDesired']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' - _BLOCK.fields_by_name['PullDownStatus']._options = None - _BLOCK.fields_by_name['PullDownStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' - _BLOCK.fields_by_name['PullDownWhenActive']._options = None - _BLOCK.fields_by_name['PullDownWhenActive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' - _BLOCK.fields_by_name['PullDownWhenInactive']._options = None - _BLOCK.fields_by_name['PullDownWhenInactive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullDownStatus']._options = None + _BLOCK.fields_by_name['pullDownStatus']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullDownWhenActive']._options = None + _BLOCK.fields_by_name['pullDownWhenActive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' + _BLOCK.fields_by_name['pullDownWhenInactive']._options = None + _BLOCK.fields_by_name['pullDownWhenInactive']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK.fields_by_name['overCurrent']._options = None _BLOCK.fields_by_name['overCurrent']._serialized_options = b'\222?\002\030\003\212\265\030\002H\001' _BLOCK.fields_by_name['openLoad']._options = None diff --git a/firmware.ini b/firmware.ini index 0056fc9a..38fb0216 100644 --- a/firmware.ini +++ b/firmware.ini @@ -1,8 +1,8 @@ [FIRMWARE] -firmware_version=f73cdc63 +firmware_version=358b96b8 firmware_date=2024-05-07 -firmware_sha=f73cdc63b75959a23ae8a7ec63f300de50aea096 -proto_version=b158fa1e +firmware_sha=358b96b89e2b42c4dec056b1feb19a3022158d52 +proto_version=4be1554b proto_date=2024-05-07 -proto_sha=b158fa1e7a93372ce5c11215e292934d22c6b003 +proto_sha=4be1554bf59b05b9de7fa8c88b7df514d41dd528 system_version=3.2.0 From cc1b153ddb00f9f80a3e879e40c713446ebd89a7 Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Tue, 7 May 2024 20:06:38 +0200 Subject: [PATCH 09/11] Get IDs for known sys blocks before loading backup --- brewblox_devcon_spark/spark_api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/brewblox_devcon_spark/spark_api.py b/brewblox_devcon_spark/spark_api.py index 9a15eaa2..985e26f6 100644 --- a/brewblox_devcon_spark/spark_api.py +++ b/brewblox_devcon_spark/spark_api.py @@ -523,8 +523,6 @@ async def make_backup(self) -> Backup: return Backup( blocks=[block for block in blocks], - store=[{'keys': [block.id, block.nid], 'data': {}} - for block in blocks], name=None, timestamp=timestamp, firmware=controller_info.firmware, @@ -558,7 +556,7 @@ async def apply_backup(self, exported: Backup) -> BackupApplyResult: error_log = [] # First populate the datastore, to avoid unknown links - self.block_store.clear() + await self.load_block_names() for block in exported.blocks: self.block_store[block.id] = block.nid From 4fb1cb8cc3b44813320046f2a53ab9786b2f0a72 Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Wed, 8 May 2024 00:07:54 +0200 Subject: [PATCH 10/11] fix block name updates when loading backups --- brewblox_devcon_spark/spark_api.py | 107 +++++++++++++---------------- 1 file changed, 48 insertions(+), 59 deletions(-) diff --git a/brewblox_devcon_spark/spark_api.py b/brewblox_devcon_spark/spark_api.py index 985e26f6..ac2844f9 100644 --- a/brewblox_devcon_spark/spark_api.py +++ b/brewblox_devcon_spark/spark_api.py @@ -91,38 +91,32 @@ def _find_sid(self, nid: int) -> str: return sid - def _sync_block_id(self, block: FirmwareBlock): + def _sync_block_id(self, block: FirmwareBlock | FirmwareBlockIdentity): if block.id and block.nid: self.block_store[block.id] = block.nid - def _sync_all_block_ids(self, blocks: list[FirmwareBlock]): - if blocks and blocks[0].id and blocks[0].nid: - self.block_store.clear() - for block in blocks: - self.block_store[block.id] = block.nid - def _to_block_identity(self, block: FirmwareBlock) -> BlockIdentity: self._sync_block_id(block) return BlockIdentity( - id=self._find_sid(block.nid), + id=block.id or self._find_sid(block.nid), nid=block.nid, type=block.type, serviceId=self.config.name, ) - def _to_block(self, block: FirmwareBlock, find_sid=True) -> Block: - if find_sid: - self._sync_block_id(block) + def _to_block(self, block: FirmwareBlock) -> Block: + self._sync_block_id(block) + ident = self._to_block_identity(block) block = Block( - **block.model_dump(), - serviceId=self.config.name, + id=ident.id, + nid=ident.nid, + type=ident.type, + serviceId=ident.serviceId, + data=block.data, ) - if find_sid and not block.id: - block.id = self._find_sid(block.nid) - resolve_data_ids(block.data, self._find_sid) # Special case, where the API data format differs from proto-ready format @@ -131,40 +125,25 @@ def _to_block(self, block: FirmwareBlock, find_sid=True) -> Block: return block - def _to_block_list(self, blocks: list[FirmwareBlock]) -> list[Block]: - self._sync_all_block_ids(blocks) - return [self._to_block(block) for block in blocks] - - def _to_firmware_block_identity(self, block: BlockIdentity) -> FirmwareBlockIdentity: - sid = block.id - nid = block.nid - - if nid is None: + def _to_firmware_block_identity(self, block: Block | BlockIdentity) -> FirmwareBlockIdentity: + if (nid := block.nid) is None: try: - nid = self.block_store[sid] + nid = self.block_store[block.id] except KeyError: - raise exceptions.UnknownId(f'Block ID `{sid}` not found. type={block.type}') + raise exceptions.UnknownId(f'Block ID `{block.id}` not found. type={block.type}') return FirmwareBlockIdentity( - id=sid, + id=block.id, nid=nid, type=block.type, ) - def _to_firmware_block(self, block: Block, find_nid=True) -> FirmwareBlock: - sid = block.id - nid = block.nid - - if nid is None: - try: - nid = self.block_store[sid] if find_nid else 0 - except KeyError: - raise exceptions.UnknownId(f'Block ID `{sid}` not found. type={block.type}') - + def _to_firmware_block(self, block: Block) -> FirmwareBlock: + ident = self._to_firmware_block_identity(block) block = FirmwareBlock( - id=sid, - nid=nid, - type=block.type, + id=ident.id, + nid=ident.nid, + type=ident.type, data=block.data, ) @@ -357,7 +336,9 @@ async def create_block(self, block: Block) -> Block: The desired block, as present on the controller after creation. """ async with self._execute('Create block'): - block = self._to_firmware_block(block, find_nid=False) + if block.nid is None: + block.nid = 0 + block = self._to_firmware_block(block) block = await self.cmder.create_block(block) block = self._to_block(block) return block @@ -403,7 +384,7 @@ async def read_all_blocks(self) -> list[Block]: """ async with self._execute('Read all blocks'): blocks = await self.cmder.read_all_blocks() - blocks = self._to_block_list(blocks) + blocks = [self._to_block(block) for block in blocks] return blocks async def read_all_logged_blocks(self) -> list[Block]: @@ -419,7 +400,7 @@ async def read_all_logged_blocks(self) -> list[Block]: """ async with self._execute('Read all blocks (logged)'): blocks = await self.cmder.read_all_blocks(ReadMode.LOGGED) - blocks = self._to_block_list(blocks) + blocks = [self._to_block(block) for block in blocks] return blocks async def read_all_stored_blocks(self) -> list[Block]: @@ -436,7 +417,7 @@ async def read_all_stored_blocks(self) -> list[Block]: """ async with self._execute('Read all blocks (stored)'): blocks = await self.cmder.read_all_blocks(ReadMode.STORED) - blocks = self._to_block_list(blocks) + blocks = [self._to_block(block) for block in blocks] return blocks async def discover_blocks(self) -> list[Block]: @@ -452,7 +433,7 @@ async def discover_blocks(self) -> list[Block]: async with self._execute('Discover blocks'): async with self._discovery_lock: blocks = await self.cmder.discover_blocks() - blocks = self._to_block_list(blocks) + blocks = [self._to_block(block) for block in blocks] return blocks async def clear_blocks(self) -> list[BlockIdentity]: @@ -468,13 +449,12 @@ async def clear_blocks(self) -> list[BlockIdentity]: async with self._execute('Remove all blocks'): blocks = await self.cmder.clear_blocks() identities = [self._to_block_identity(v) for v in blocks] - self.block_store.clear() + await self.load_block_names() await self.cmder.write_block(FirmwareBlock( nid=const.DISPLAY_SETTINGS_NID, type='DisplaySettings', data={}, )) - await self.load_block_names() return identities async def rename_block(self, change: BlockNameChange) -> BlockIdentity: @@ -503,7 +483,9 @@ async def load_block_names(self): Load all known block names from the controller """ blocks = await self.cmder.read_all_block_names() - self._sync_all_block_ids(blocks) + self.block_store.clear() + self.block_store.update({block.id: block.nid + for block in blocks}) async def make_backup(self) -> Backup: """ @@ -555,20 +537,19 @@ async def apply_backup(self, exported: Backup) -> BackupApplyResult: await self.clear_blocks() error_log = [] - # First populate the datastore, to avoid unknown links - await self.load_block_names() - for block in exported.blocks: - self.block_store[block.id] = block.nid + # First populate the name store, to avoid unknown links + self.block_store.update({block.id: block.nid + for block in exported.blocks}) + LOGGER.debug(f'Block store with exported block names: {self.block_store}') # Now either create or write the objects, depending on whether they are system objects for block in exported.blocks: try: block = block.model_copy(deep=True) - if block.nid is not None and block.nid < const.USER_NID_START: - await self.write_block(block) + if block.nid and block.nid >= const.USER_NID_START: + await self.create_block(block) else: - # Bypass self.create_block(), to avoid meddling with store IDs - await self.cmder.create_block(self._to_firmware_block(block)) + await self.write_block(block) except Exception as ex: message = f'failed to import block. Error={utils.strex(ex)}, block={block}' @@ -614,9 +595,17 @@ async def validate(self, block: Block) -> Block: Both sid and nid may be omitted. """ async with self._execute('Validate block'): - block = self._to_firmware_block(block, find_nid=False) + sid = block.id + nid = block.nid + + block.id = None + block.nid = 0 + block = self._to_firmware_block(block) block = await self.cmder.validate(block) - block = self._to_block(block, find_sid=False) + block = self._to_block(block) + + block.id = sid + block.nid = nid return block From 6814ed8434c4d6af7ef4e452aa6a1f6d3e10d6ee Mon Sep 17 00:00:00 2001 From: Bob Steers Date: Wed, 8 May 2024 15:55:47 +0200 Subject: [PATCH 11/11] Improve concurrent backup load; pull fw develop --- brewblox-proto | 2 +- brewblox_devcon_spark/spark_api.py | 28 ++++++++++++++++++++++------ firmware.ini | 12 ++++++------ test/test_integration.py | 30 +++++++++++++++--------------- 4 files changed, 44 insertions(+), 28 deletions(-) diff --git a/brewblox-proto b/brewblox-proto index 4be1554b..cc7f7ded 160000 --- a/brewblox-proto +++ b/brewblox-proto @@ -1 +1 @@ -Subproject commit 4be1554bf59b05b9de7fa8c88b7df514d41dd528 +Subproject commit cc7f7dedb3a9b9b5a50abe8171a1d64323b43a3c diff --git a/brewblox_devcon_spark/spark_api.py b/brewblox_devcon_spark/spark_api.py index ac2844f9..abe12c1a 100644 --- a/brewblox_devcon_spark/spark_api.py +++ b/brewblox_devcon_spark/spark_api.py @@ -533,23 +533,39 @@ async def apply_backup(self, exported: Backup) -> BackupApplyResult: LOGGER.info(f'Backup timestamp = {exported.timestamp}') LOGGER.info(f'Backup firmware = {exported.firmware}') LOGGER.info(f'Backup device = {exported.device}') + LOGGER.info(f'Backup block count = {len(exported.blocks)}') await self.clear_blocks() error_log = [] - # First populate the name store, to avoid unknown links + # Populate the block store, to avoid unknown links self.block_store.update({block.id: block.nid for block in exported.blocks}) - LOGGER.debug(f'Block store with exported block names: {self.block_store}') - # Now either create or write the objects, depending on whether they are system objects + # Resolve IDs now before concurrent calls can edit the block store + resolved_blocks: list[FirmwareBlock] = [] for block in exported.blocks: try: block = block.model_copy(deep=True) - if block.nid and block.nid >= const.USER_NID_START: - await self.create_block(block) + block = self._to_firmware_block(block) + resolved_blocks.append(block) + + except Exception as ex: + message = f'failed to resolve block. Error={utils.strex(ex)}, block={block}' + error_log.append(message) + LOGGER.error(message) + + LOGGER.debug('Loading blocks from backup:') + for block in resolved_blocks: + LOGGER.debug(block) + + # Create or write blocks, depending on whether they are system blocks + for block in resolved_blocks: + try: + if block.nid >= const.USER_NID_START: + await self.cmder.create_block(block) else: - await self.write_block(block) + await self.cmder.write_block(block) except Exception as ex: message = f'failed to import block. Error={utils.strex(ex)}, block={block}' diff --git a/firmware.ini b/firmware.ini index 38fb0216..822864fa 100644 --- a/firmware.ini +++ b/firmware.ini @@ -1,8 +1,8 @@ [FIRMWARE] -firmware_version=358b96b8 -firmware_date=2024-05-07 -firmware_sha=358b96b89e2b42c4dec056b1feb19a3022158d52 -proto_version=4be1554b -proto_date=2024-05-07 -proto_sha=4be1554bf59b05b9de7fa8c88b7df514d41dd528 +firmware_version=32b34348 +firmware_date=2024-05-08 +firmware_sha=32b343483d2355dec7dff2f3fc666fe721196ff3 +proto_version=cc7f7ded +proto_date=2024-05-08 +proto_sha=cc7f7dedb3a9b9b5a50abe8171a1d64323b43a3c system_version=3.2.0 diff --git a/test/test_integration.py b/test/test_integration.py index a9d3e597..d7376ea7 100644 --- a/test/test_integration.py +++ b/test/test_integration.py @@ -16,8 +16,7 @@ DatastoreMultiQuery, DecodedPayload, EncodedMessage, EncodedPayload, ErrorCode, IntermediateRequest, - IntermediateResponse, Opcode, - TwinKeyEntry) + IntermediateResponse, Opcode) class DummmyError(BaseException): @@ -120,6 +119,7 @@ async def test_create(client: AsyncClient, block_args: Block): resp = await client.post('/blocks/create', json=block_args.model_dump()) assert resp.status_code == 500 + block_args.nid = 0 block_args.id = 'other_obj' resp = await client.post('/blocks/create', json=block_args.model_dump()) assert Block.model_validate_json(resp.text).id == block_args.id @@ -568,12 +568,8 @@ async def test_backup_save(client: AsyncClient, block_args: Block): async def test_backup_load(client: AsyncClient, spark_blocks: list[Block]): - # reverse the set, to ensure some blocks are written with invalid references - backup = Backup( - store=[TwinKeyEntry(keys=(block.id, block.nid), data={}) - for block in spark_blocks], - blocks=spark_blocks[::-1] - ) + # reverse the set, to ensure some blocks link to later blocks + backup = Backup(blocks=spark_blocks[::-1]) resp = await client.post('/blocks/backup/load', json=backup.model_dump()) assert resp.json() == {'messages': []} @@ -592,10 +588,13 @@ async def test_backup_load(client: AsyncClient, spark_blocks: list[Block]): data={}, )) - # Add an unused store alias - backup.store.append(TwinKeyEntry( - keys=('TROLOLOL', 9999), - data={})) + # Add a block that has an unknown link + backup.blocks.append(Block( + id='fantast', + nid=400, + type='SetpointSensorPair', + data={'sensorId<>': 'going to another high school'} + )) # Add a Block that will fail to be created, and should be skipped backup.blocks.append(Block( @@ -607,9 +606,10 @@ async def test_backup_load(client: AsyncClient, spark_blocks: list[Block]): resp = await client.post('/blocks/backup/load', json=backup.model_dump()) resp = resp.json()['messages'] - assert len(resp) == 2 - assert 'Groups' in resp[0] - assert 'derpface' in resp[1] + assert len(resp) == 3 + assert 'fantast' in resp[0] + assert 'Groups' in resp[1] + assert 'derpface' in resp[2] resp = await client.post('/blocks/all/read') resp_ids = ret_ids(resp.json())