Skip to content

Commit

Permalink
Protobuf versions (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Lesches committed May 13, 2024
1 parent 943ba6b commit c6ad777
Show file tree
Hide file tree
Showing 20 changed files with 418 additions and 47 deletions.
2 changes: 1 addition & 1 deletion Protobuf
1 change: 1 addition & 0 deletions lib/generated.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export "src/generated/gps.pb.dart";
export "src/generated/logs.pb.dart";
export "src/generated/mars.pb.dart";
export "src/generated/science.pb.dart";
export "src/generated/version.pb.dart";
export "src/generated/video.pb.dart";
export "src/generated/wrapper.pb.dart";
export "src/generated/google/protobuf/timestamp.pb.dart";
Expand Down
65 changes: 65 additions & 0 deletions lib/src/generated/arm.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;

import 'arm.pbenum.dart';
import 'version.pb.dart' as $0;

export 'arm.pbenum.dart';

Expand Down Expand Up @@ -288,6 +289,7 @@ class ArmData extends $pb.GeneratedMessage {
MotorData? base,
MotorData? shoulder,
MotorData? elbow,
$0.Version? version,
}) {
final $result = create();
if (currentPosition != null) {
Expand All @@ -305,6 +307,9 @@ class ArmData extends $pb.GeneratedMessage {
if (elbow != null) {
$result.elbow = elbow;
}
if (version != null) {
$result.version = version;
}
return $result;
}
ArmData._() : super();
Expand All @@ -317,6 +322,7 @@ class ArmData extends $pb.GeneratedMessage {
..aOM<MotorData>(3, _omitFieldNames ? '' : 'base', subBuilder: MotorData.create)
..aOM<MotorData>(4, _omitFieldNames ? '' : 'shoulder', subBuilder: MotorData.create)
..aOM<MotorData>(5, _omitFieldNames ? '' : 'elbow', subBuilder: MotorData.create)
..aOM<$0.Version>(6, _omitFieldNames ? '' : 'version', subBuilder: $0.Version.create)
..hasRequiredFields = false
;

Expand Down Expand Up @@ -395,6 +401,17 @@ class ArmData extends $pb.GeneratedMessage {
void clearElbow() => clearField(5);
@$pb.TagNumber(5)
MotorData ensureElbow() => $_ensure(4);

@$pb.TagNumber(6)
$0.Version get version => $_getN(5);
@$pb.TagNumber(6)
set version($0.Version v) { setField(6, v); }
@$pb.TagNumber(6)
$core.bool hasVersion() => $_has(5);
@$pb.TagNumber(6)
void clearVersion() => clearField(6);
@$pb.TagNumber(6)
$0.Version ensureVersion() => $_ensure(5);
}

class ArmCommand extends $pb.GeneratedMessage {
Expand All @@ -409,6 +426,7 @@ class ArmCommand extends $pb.GeneratedMessage {
$core.double? ikY,
$core.double? ikZ,
$core.bool? jab,
$0.Version? version,
}) {
final $result = create();
if (stop != null) {
Expand Down Expand Up @@ -441,6 +459,9 @@ class ArmCommand extends $pb.GeneratedMessage {
if (jab != null) {
$result.jab = jab;
}
if (version != null) {
$result.version = version;
}
return $result;
}
ArmCommand._() : super();
Expand All @@ -458,6 +479,7 @@ class ArmCommand extends $pb.GeneratedMessage {
..a<$core.double>(8, _omitFieldNames ? '' : 'ikY', $pb.PbFieldType.OF)
..a<$core.double>(9, _omitFieldNames ? '' : 'ikZ', $pb.PbFieldType.OF)
..aOB(10, _omitFieldNames ? '' : 'jab')
..aOM<$0.Version>(11, _omitFieldNames ? '' : 'version', subBuilder: $0.Version.create)
..hasRequiredFields = false
;

Expand Down Expand Up @@ -584,13 +606,25 @@ class ArmCommand extends $pb.GeneratedMessage {
$core.bool hasJab() => $_has(9);
@$pb.TagNumber(10)
void clearJab() => clearField(10);

@$pb.TagNumber(11)
$0.Version get version => $_getN(10);
@$pb.TagNumber(11)
set version($0.Version v) { setField(11, v); }
@$pb.TagNumber(11)
$core.bool hasVersion() => $_has(10);
@$pb.TagNumber(11)
void clearVersion() => clearField(11);
@$pb.TagNumber(11)
$0.Version ensureVersion() => $_ensure(10);
}

class GripperData extends $pb.GeneratedMessage {
factory GripperData({
MotorData? lift,
MotorData? rotate,
MotorData? pinch,
$0.Version? version,
}) {
final $result = create();
if (lift != null) {
Expand All @@ -602,6 +636,9 @@ class GripperData extends $pb.GeneratedMessage {
if (pinch != null) {
$result.pinch = pinch;
}
if (version != null) {
$result.version = version;
}
return $result;
}
GripperData._() : super();
Expand All @@ -612,6 +649,7 @@ class GripperData extends $pb.GeneratedMessage {
..aOM<MotorData>(1, _omitFieldNames ? '' : 'lift', subBuilder: MotorData.create)
..aOM<MotorData>(2, _omitFieldNames ? '' : 'rotate', subBuilder: MotorData.create)
..aOM<MotorData>(3, _omitFieldNames ? '' : 'pinch', subBuilder: MotorData.create)
..aOM<$0.Version>(4, _omitFieldNames ? '' : 'version', subBuilder: $0.Version.create)
..hasRequiredFields = false
;

Expand Down Expand Up @@ -668,6 +706,17 @@ class GripperData extends $pb.GeneratedMessage {
void clearPinch() => clearField(3);
@$pb.TagNumber(3)
MotorData ensurePinch() => $_ensure(2);

@$pb.TagNumber(4)
$0.Version get version => $_getN(3);
@$pb.TagNumber(4)
set version($0.Version v) { setField(4, v); }
@$pb.TagNumber(4)
$core.bool hasVersion() => $_has(3);
@$pb.TagNumber(4)
void clearVersion() => clearField(4);
@$pb.TagNumber(4)
$0.Version ensureVersion() => $_ensure(3);
}

class GripperCommand extends $pb.GeneratedMessage {
Expand All @@ -680,6 +729,7 @@ class GripperCommand extends $pb.GeneratedMessage {
$core.bool? open,
$core.bool? close,
$core.bool? spin,
$0.Version? version,
}) {
final $result = create();
if (stop != null) {
Expand All @@ -706,6 +756,9 @@ class GripperCommand extends $pb.GeneratedMessage {
if (spin != null) {
$result.spin = spin;
}
if (version != null) {
$result.version = version;
}
return $result;
}
GripperCommand._() : super();
Expand All @@ -721,6 +774,7 @@ class GripperCommand extends $pb.GeneratedMessage {
..aOB(6, _omitFieldNames ? '' : 'open')
..aOB(7, _omitFieldNames ? '' : 'close')
..aOB(8, _omitFieldNames ? '' : 'spin')
..aOM<$0.Version>(9, _omitFieldNames ? '' : 'version', subBuilder: $0.Version.create)
..hasRequiredFields = false
;

Expand Down Expand Up @@ -825,6 +879,17 @@ class GripperCommand extends $pb.GeneratedMessage {
$core.bool hasSpin() => $_has(7);
@$pb.TagNumber(8)
void clearSpin() => clearField(8);

@$pb.TagNumber(9)
$0.Version get version => $_getN(8);
@$pb.TagNumber(9)
set version($0.Version v) { setField(9, v); }
@$pb.TagNumber(9)
$core.bool hasVersion() => $_has(8);
@$pb.TagNumber(9)
void clearVersion() => clearField(9);
@$pb.TagNumber(9)
$0.Version ensureVersion() => $_ensure(8);
}


Expand Down
13 changes: 9 additions & 4 deletions lib/src/generated/arm.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const ArmData$json = {
{'1': 'base', '3': 3, '4': 1, '5': 11, '6': '.MotorData', '10': 'base'},
{'1': 'shoulder', '3': 4, '4': 1, '5': 11, '6': '.MotorData', '10': 'shoulder'},
{'1': 'elbow', '3': 5, '4': 1, '5': 11, '6': '.MotorData', '10': 'elbow'},
{'1': 'version', '3': 6, '4': 1, '5': 11, '6': '.Version', '10': 'version'},
],
};

Expand All @@ -105,7 +106,7 @@ final $typed_data.Uint8List armDataDescriptor = $convert.base64Decode(
'50UG9zaXRpb24SNAoOdGFyZ2V0UG9zaXRpb24YAiABKAsyDC5Db29yZGluYXRlc1IOdGFyZ2V0'
'UG9zaXRpb24SHgoEYmFzZRgDIAEoCzIKLk1vdG9yRGF0YVIEYmFzZRImCghzaG91bGRlchgEIA'
'EoCzIKLk1vdG9yRGF0YVIIc2hvdWxkZXISIAoFZWxib3cYBSABKAsyCi5Nb3RvckRhdGFSBWVs'
'Ym93');
'Ym93EiIKB3ZlcnNpb24YBiABKAsyCC5WZXJzaW9uUgd2ZXJzaW9u');

@$core.Deprecated('Use armCommandDescriptor instead')
const ArmCommand$json = {
Expand All @@ -121,6 +122,7 @@ const ArmCommand$json = {
{'1': 'ik_y', '3': 8, '4': 1, '5': 2, '10': 'ikY'},
{'1': 'ik_z', '3': 9, '4': 1, '5': 2, '10': 'ikZ'},
{'1': 'jab', '3': 10, '4': 1, '5': 8, '10': 'jab'},
{'1': 'version', '3': 11, '4': 1, '5': 11, '6': '.Version', '10': 'version'},
],
};

Expand All @@ -131,7 +133,8 @@ final $typed_data.Uint8List armCommandDescriptor = $convert.base64Decode(
'ZXIYBCABKAsyDS5Nb3RvckNvbW1hbmRSCHNob3VsZGVyEiMKBWVsYm93GAUgASgLMg0uTW90b3'
'JDb21tYW5kUgVlbGJvdxIwCgxncmlwcGVyX2xpZnQYBiABKAsyDS5Nb3RvckNvbW1hbmRSC2dy'
'aXBwZXJMaWZ0EhEKBGlrX3gYByABKAJSA2lrWBIRCgRpa195GAggASgCUgNpa1kSEQoEaWtfeh'
'gJIAEoAlIDaWtaEhAKA2phYhgKIAEoCFIDamFi');
'gJIAEoAlIDaWtaEhAKA2phYhgKIAEoCFIDamFiEiIKB3ZlcnNpb24YCyABKAsyCC5WZXJzaW9u'
'Ugd2ZXJzaW9u');

@$core.Deprecated('Use gripperDataDescriptor instead')
const GripperData$json = {
Expand All @@ -140,14 +143,15 @@ const GripperData$json = {
{'1': 'lift', '3': 1, '4': 1, '5': 11, '6': '.MotorData', '10': 'lift'},
{'1': 'rotate', '3': 2, '4': 1, '5': 11, '6': '.MotorData', '10': 'rotate'},
{'1': 'pinch', '3': 3, '4': 1, '5': 11, '6': '.MotorData', '10': 'pinch'},
{'1': 'version', '3': 4, '4': 1, '5': 11, '6': '.Version', '10': 'version'},
],
};

/// Descriptor for `GripperData`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List gripperDataDescriptor = $convert.base64Decode(
'CgtHcmlwcGVyRGF0YRIeCgRsaWZ0GAEgASgLMgouTW90b3JEYXRhUgRsaWZ0EiIKBnJvdGF0ZR'
'gCIAEoCzIKLk1vdG9yRGF0YVIGcm90YXRlEiAKBXBpbmNoGAMgASgLMgouTW90b3JEYXRhUgVw'
'aW5jaA==');
'aW5jaBIiCgd2ZXJzaW9uGAQgASgLMgguVmVyc2lvblIHdmVyc2lvbg==');

@$core.Deprecated('Use gripperCommandDescriptor instead')
const GripperCommand$json = {
Expand All @@ -161,6 +165,7 @@ const GripperCommand$json = {
{'1': 'open', '3': 6, '4': 1, '5': 8, '10': 'open'},
{'1': 'close', '3': 7, '4': 1, '5': 8, '10': 'close'},
{'1': 'spin', '3': 8, '4': 1, '5': 8, '10': 'spin'},
{'1': 'version', '3': 9, '4': 1, '5': 11, '6': '.Version', '10': 'version'},
],
};

Expand All @@ -170,5 +175,5 @@ final $typed_data.Uint8List gripperCommandDescriptor = $convert.base64Decode(
'IJY2FsaWJyYXRlEiEKBGxpZnQYAyABKAsyDS5Nb3RvckNvbW1hbmRSBGxpZnQSJQoGcm90YXRl'
'GAQgASgLMg0uTW90b3JDb21tYW5kUgZyb3RhdGUSIwoFcGluY2gYBSABKAsyDS5Nb3RvckNvbW'
'1hbmRSBXBpbmNoEhIKBG9wZW4YBiABKAhSBG9wZW4SFAoFY2xvc2UYByABKAhSBWNsb3NlEhIK'
'BHNwaW4YCCABKAhSBHNwaW4=');
'BHNwaW4YCCABKAhSBHNwaW4SIgoHdmVyc2lvbhgJIAEoCzIILlZlcnNpb25SB3ZlcnNpb24=');

Loading

0 comments on commit c6ad777

Please sign in to comment.