001// Code generated by protocol buffer compiler. Do not edit! 002package org.photonvision.proto; 003 004import java.io.IOException; 005import org.wpilib.math.proto.ProtobufGeometry3dDescriptor; 006import org.wpilib.math.proto.ProtobufTransform3d; 007import us.hebi.quickbuf.Descriptors; 008import us.hebi.quickbuf.FieldName; 009import us.hebi.quickbuf.InvalidProtocolBufferException; 010import us.hebi.quickbuf.JsonSink; 011import us.hebi.quickbuf.JsonSource; 012import us.hebi.quickbuf.MessageFactory; 013import us.hebi.quickbuf.ProtoMessage; 014import us.hebi.quickbuf.ProtoSink; 015import us.hebi.quickbuf.ProtoSource; 016import us.hebi.quickbuf.ProtoUtil; 017import us.hebi.quickbuf.RepeatedByte; 018import us.hebi.quickbuf.RepeatedDouble; 019import us.hebi.quickbuf.RepeatedInt; 020import us.hebi.quickbuf.RepeatedMessage; 021import us.hebi.quickbuf.Utf8String; 022 023public final class Photon { 024 private static final RepeatedByte descriptorData = ProtoUtil.decodeBase64(5431, 025 "CgxwaG90b24ucHJvdG8SEnBob3RvbnZpc2lvbi5wcm90bxoQZ2VvbWV0cnkzZC5wcm90byIyChRQcm90" + 026 "b2J1ZlRhcmdldENvcm5lchIMCgF4GAEgASgBUgF4EgwKAXkYAiABKAFSAXkiigIKEVByb3RvYnVmUE5Q" + 027 "UmVzdWx0EjIKBGJlc3QYAiABKAsyHi53cGkucHJvdG8uUHJvdG9idWZUcmFuc2Zvcm0zZFIEYmVzdBIm" + 028 "Cg9iZXN0X3JlcHJval9lcnIYAyABKAFSDWJlc3RSZXByb2pFcnISNQoDYWx0GAQgASgLMh4ud3BpLnBy" + 029 "b3RvLlByb3RvYnVmVHJhbnNmb3JtM2RIAFIDYWx0iAEBEikKDmFsdF9yZXByb2pfZXJyGAUgASgBSAFS" + 030 "DGFsdFJlcHJvakVycogBARIcCglhbWJpZ3VpdHkYBiABKAFSCWFtYmlndWl0eUIGCgRfYWx0QhEKD19h" + 031 "bHRfcmVwcm9qX2VyciKYAQocUHJvdG9idWZNdWx0aVRhcmdldFBOUFJlc3VsdBJMCg5lc3RpbWF0ZWRf" + 032 "cG9zZRgBIAEoCzIlLnBob3RvbnZpc2lvbi5wcm90by5Qcm90b2J1ZlBOUFJlc3VsdFINZXN0aW1hdGVk" + 033 "UG9zZRIqChFmaWR1Y2lhbF9pZHNfdXNlZBgCIAMoBVIPZmlkdWNpYWxJZHNVc2VkIuMEChtQcm90b2J1" + 034 "ZlBob3RvblRyYWNrZWRUYXJnZXQSEAoDeWF3GAEgASgBUgN5YXcSFAoFcGl0Y2gYAiABKAFSBXBpdGNo" + 035 "EhIKBGFyZWEYAyABKAFSBGFyZWESEgoEc2tldxgEIAEoAVIEc2tldxIfCgtmaWR1Y2lhbF9pZBgFIAEo" + 036 "BVIKZmlkdWNpYWxJZBJRChViZXN0X2NhbWVyYV90b190YXJnZXQYBiABKAsyHi53cGkucHJvdG8uUHJv" + 037 "dG9idWZUcmFuc2Zvcm0zZFISYmVzdENhbWVyYVRvVGFyZ2V0Ek8KFGFsdF9jYW1lcmFfdG9fdGFyZ2V0" + 038 "GAcgASgLMh4ud3BpLnByb3RvLlByb3RvYnVmVHJhbnNmb3JtM2RSEWFsdENhbWVyYVRvVGFyZ2V0EiUK" + 039 "DnBvc2VfYW1iaWd1aXR5GAggASgBUg1wb3NlQW1iaWd1aXR5ElsKFW1pbl9hcmVhX3JlY3RfY29ybmVy" + 040 "cxgJIAMoCzIoLnBob3RvbnZpc2lvbi5wcm90by5Qcm90b2J1ZlRhcmdldENvcm5lclISbWluQXJlYVJl" + 041 "Y3RDb3JuZXJzElMKEGRldGVjdGVkX2Nvcm5lcnMYCiADKAsyKC5waG90b252aXNpb24ucHJvdG8uUHJv" + 042 "dG9idWZUYXJnZXRDb3JuZXJSD2RldGVjdGVkQ29ybmVycxIoChBvYmpfZGV0ZWN0aW9uX2lkGAsgASgF" + 043 "Ug5vYmpEZXRlY3Rpb25JZBIsChJvYmpfZGV0ZWN0aW9uX2NvbmYYDCABKAJSEG9iakRldGVjdGlvbkNv" + 044 "bmYi4wMKHFByb3RvYnVmUGhvdG9uUGlwZWxpbmVSZXN1bHQSIQoKbGF0ZW5jeV9tcxgBIAEoAUICGAFS", 045 "CWxhdGVuY3lNcxJJCgd0YXJnZXRzGAIgAygLMi8ucGhvdG9udmlzaW9uLnByb3RvLlByb3RvYnVmUGhv" + 046 "dG9uVHJhY2tlZFRhcmdldFIHdGFyZ2V0cxJlChNtdWx0aV90YXJnZXRfcmVzdWx0GAMgASgLMjAucGhv" + 047 "dG9udmlzaW9uLnByb3RvLlByb3RvYnVmTXVsdGlUYXJnZXRQTlBSZXN1bHRIAFIRbXVsdGlUYXJnZXRS" + 048 "ZXN1bHSIAQESHwoLc2VxdWVuY2VfaWQYBCABKANSCnNlcXVlbmNlSWQSOAoYY2FwdHVyZV90aW1lc3Rh" + 049 "bXBfbWljcm9zGAUgASgDUhZjYXB0dXJlVGltZXN0YW1wTWljcm9zEj0KG250X3B1Ymxpc2hfdGltZXN0" + 050 "YW1wX21pY3JvcxgGIAEoA1IYbnRQdWJsaXNoVGltZXN0YW1wTWljcm9zEjwKG3RpbWVfc2luY2VfbGFz" + 051 "dF9wb25nX21pY3JvcxgHIAEoA1IXdGltZVNpbmNlTGFzdFBvbmdNaWNyb3NCFgoUX211bHRpX3Rhcmdl" + 052 "dF9yZXN1bHQiwQMKFVByb3RvYnVmRGV2aWNlTWV0cmljcxIZCghjcHVfdGVtcBgBIAEoAVIHY3B1VGVt" + 053 "cBIZCghjcHVfdXRpbBgCIAEoAVIHY3B1VXRpbBIXCgdjcHVfdGhyGAMgASgJUgZjcHVUaHISFwoHcmFt" + 054 "X21lbRgEIAEoAVIGcmFtTWVtEhkKCHJhbV91dGlsGAUgASgBUgdyYW1VdGlsEhcKB2dwdV9tZW0YBiAB" + 055 "KAFSBmdwdU1lbRIgCgxncHVfbWVtX3V0aWwYByABKAFSCmdwdU1lbVV0aWwSIgoNZGlza191dGlsX3Bj" + 056 "dBgIIAEoAVILZGlza1V0aWxQY3QSGwoJbnB1X3VzYWdlGAkgAygBUghucHVVc2FnZRIdCgppcF9hZGRy" + 057 "ZXNzGAogASgJUglpcEFkZHJlc3MSFgoGdXB0aW1lGAsgASgBUgZ1cHRpbWUSIgoNc2VudF9iaXRfcmF0" + 058 "ZRgMIAEoAVILc2VudEJpdFJhdGUSIgoNcmVjdl9iaXRfcmF0ZRgNIAEoAVILcmVjdkJpdFJhdGUSKgoR" + 059 "ZGlza191c2FibGVfc3BhY2UYDiABKAFSD2Rpc2tVc2FibGVTcGFjZUIYChZvcmcucGhvdG9udmlzaW9u" + 060 "LnByb3RvSvIZCgYSBBEAVgEKmgUKAQwSAxEAEjKPBQogQ29weXJpZ2h0IChDKSBQaG90b24gVmlzaW9u" + 061 "LgoKIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOiB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBh" + 062 "bmQvb3IgbW9kaWZ5CiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBM" + 063 "aWNlbnNlIGFzIHB1Ymxpc2hlZCBieQogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgZWl0aGVy" + 064 "IHZlcnNpb24gMyBvZiB0aGUgTGljZW5zZSwgb3IKIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZl", 065 "cnNpb24uCgogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2ls" + 066 "bCBiZSB1c2VmdWwsCiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1w" + 067 "bGllZCB3YXJyYW50eSBvZgogTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxB" + 068 "UiBQVVJQT1NFLiAgU2VlIHRoZQogR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0" + 069 "YWlscy4KCiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQ" + 070 "dWJsaWMgTGljZW5zZQogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW0uICBJZiBub3QsIHNlZSA8aHR0cHM6" + 071 "Ly93d3cuZ251Lm9yZy9saWNlbnNlcy8+LgoKCAoBAhIDEwAbCgkKAgMAEgMVABoKCAoBCBIDFwAvCgkK" + 072 "AggBEgMXAC8KCgoCBAASBBkAHAEKCgoDBAABEgMZCBwKCwoEBAACABIDGgIPCgwKBQQAAgAFEgMaAggK" + 073 "DAoFBAACAAESAxoJCgoMCgUEAAIAAxIDGg0OCgsKBAQAAgESAxsCDwoMCgUEAAIBBRIDGwIICgwKBQQA" + 074 "AgEBEgMbCQoKDAoFBAACAQMSAxsNDgoKCgIEARIEHgAkAQoKCgMEAQESAx4IGQoLCgQEAQIAEgMfAikK" + 075 "DAoFBAECAAYSAx8CHwoMCgUEAQIAARIDHyAkCgwKBQQBAgADEgMfJygKCwoEBAECARIDIAIdCgwKBQQB" + 076 "AgEFEgMgAggKDAoFBAECAQESAyAJGAoMCgUEAQIBAxIDIBscCgsKBAQBAgISAyECMQoMCgUEAQICBBID" + 077 "IQIKCgwKBQQBAgIGEgMhCygKDAoFBAECAgESAyEpLAoMCgUEAQICAxIDIS8wCgsKBAQBAgMSAyICJQoM" + 078 "CgUEAQIDBBIDIgIKCgwKBQQBAgMFEgMiCxEKDAoFBAECAwESAyISIAoMCgUEAQIDAxIDIiMkCgsKBAQB" + 079 "AgQSAyMCFwoMCgUEAQIEBRIDIwIICgwKBQQBAgQBEgMjCRIKDAoFBAECBAMSAyMVFgoKCgIEAhIEJgAp" + 080 "AQoKCgMEAgESAyYIJAoLCgQEAgIAEgMnAicKDAoFBAICAAYSAycCEwoMCgUEAgIAARIDJxQiCgwKBQQC" + 081 "AgADEgMnJSYKCwoEBAICARIDKAInCgwKBQQCAgEEEgMoAgoKDAoFBAICAQUSAygLEAoMCgUEAgIBARID" + 082 "KBEiCgwKBQQCAgEDEgMoJSYKCgoCBAMSBCsAOQEKCgoDBAMBEgMrCCMKCwoEBAMCABIDLAIRCgwKBQQD" + 083 "AgAFEgMsAggKDAoFBAMCAAESAywJDAoMCgUEAwIAAxIDLA8QCgsKBAQDAgESAy0CEwoMCgUEAwIBBRID" + 084 "LQIICgwKBQQDAgEBEgMtCQ4KDAoFBAMCAQMSAy0REgoLCgQEAwICEgMuAhIKDAoFBAMCAgUSAy4CCAoM", 085 "CgUEAwICARIDLgkNCgwKBQQDAgIDEgMuEBEKCwoEBAMCAxIDLwISCgwKBQQDAgMFEgMvAggKDAoFBAMC" + 086 "AwESAy8JDQoMCgUEAwIDAxIDLxARCgsKBAQDAgQSAzACGAoMCgUEAwIEBRIDMAIHCgwKBQQDAgQBEgMw" + 087 "CBMKDAoFBAMCBAMSAzAWFwoLCgQEAwIFEgMxAjoKDAoFBAMCBQYSAzECHwoMCgUEAwIFARIDMSA1CgwK" + 088 "BQQDAgUDEgMxODkKCwoEBAMCBhIDMgI5CgwKBQQDAgYGEgMyAh8KDAoFBAMCBgESAzIgNAoMCgUEAwIG" + 089 "AxIDMjc4CgsKBAQDAgcSAzMCHAoMCgUEAwIHBRIDMwIICgwKBQQDAgcBEgMzCRcKDAoFBAMCBwMSAzMa" + 090 "GwoLCgQEAwIIEgM0AjoKDAoFBAMCCAQSAzQCCgoMCgUEAwIIBhIDNAsfCgwKBQQDAggBEgM0IDUKDAoF" + 091 "BAMCCAMSAzQ4OQoLCgQEAwIJEgM1AjYKDAoFBAMCCQQSAzUCCgoMCgUEAwIJBhIDNQsfCgwKBQQDAgkB" + 092 "EgM1IDAKDAoFBAMCCQMSAzUzNQoLCgQEAwIKEgM3Ah4KDAoFBAMCCgUSAzcCBwoMCgUEAwIKARIDNwgY" + 093 "CgwKBQQDAgoDEgM3Gx0KCwoEBAMCCxIDOAIgCgwKBQQDAgsFEgM4AgcKDAoFBAMCCwESAzgIGgoMCgUE" + 094 "AwILAxIDOB0fCgoKAgQEEgQ7AEUBCgoKAwQEARIDOwgkCgsKBAQEAgASAzwCLAoMCgUEBAIABRIDPAII" + 095 "CgwKBQQEAgABEgM8CRMKDAoFBAQCAAMSAzwWFwoMCgUEBAIACBIDPBgrCg0KBgQEAgAIAxIDPBkqCgsK" + 096 "BAQEAgESAz4CMwoMCgUEBAIBBBIDPgIKCgwKBQQEAgEGEgM+CyYKDAoFBAQCAQESAz4nLgoMCgUEBAIB" + 097 "AxIDPjEyCgsKBAQEAgISAz8CQAoMCgUEBAICBBIDPwIKCgwKBQQEAgIGEgM/CycKDAoFBAQCAgESAz8o" + 098 "OwoMCgUEBAICAxIDPz4/CgsKBAQEAgMSA0ECGAoMCgUEBAIDBRIDQQIHCgwKBQQEAgMBEgNBCBMKDAoF" + 099 "BAQCAwMSA0EWFwoLCgQEBAIEEgNCAiUKDAoFBAQCBAUSA0ICBwoMCgUEBAIEARIDQgggCgwKBQQEAgQD" + 100 "EgNCIyQKCwoEBAQCBRIDQwIoCgwKBQQEAgUFEgNDAgcKDAoFBAQCBQESA0MIIwoMCgUEBAIFAxIDQyYn" + 101 "CgsKBAQEAgYSA0QCKAoMCgUEBAIGBRIDRAIHCgwKBQQEAgYBEgNECCMKDAoFBAQCBgMSA0QmJwoKCgIE" + 102 "BRIERwBWAQoKCgMEBQESA0cIHQoLCgQEBQIAEgNIAhYKDAoFBAUCAAUSA0gCCAoMCgUEBQIAARIDSAkR" + 103 "CgwKBQQFAgADEgNIFBUKCwoEBAUCARIDSQIWCgwKBQQFAgEFEgNJAggKDAoFBAUCAQESA0kJEQoMCgUE" + 104 "BQIBAxIDSRQVCgsKBAQFAgISA0oCFQoMCgUEBQICBRIDSgIICgwKBQQFAgIBEgNKCRAKDAoFBAUCAgMS", 105 "A0oTFAoLCgQEBQIDEgNLAhUKDAoFBAUCAwUSA0sCCAoMCgUEBQIDARIDSwkQCgwKBQQFAgMDEgNLExQK" + 106 "CwoEBAUCBBIDTAIWCgwKBQQFAgQFEgNMAggKDAoFBAUCBAESA0wJEQoMCgUEBQIEAxIDTBQVCgsKBAQF" + 107 "AgUSA00CFQoMCgUEBQIFBRIDTQIICgwKBQQFAgUBEgNNCRAKDAoFBAUCBQMSA00TFAoLCgQEBQIGEgNO" + 108 "AhoKDAoFBAUCBgUSA04CCAoMCgUEBQIGARIDTgkVCgwKBQQFAgYDEgNOGBkKCwoEBAUCBxIDTwIbCgwK" + 109 "BQQFAgcFEgNPAggKDAoFBAUCBwESA08JFgoMCgUEBQIHAxIDTxkaCgsKBAQFAggSA1ACIAoMCgUEBQII" + 110 "BBIDUAIKCgwKBQQFAggFEgNQCxEKDAoFBAUCCAESA1ASGwoMCgUEBQIIAxIDUB4fCgsKBAQFAgkSA1EC" + 111 "GQoMCgUEBQIJBRIDUQIICgwKBQQFAgkBEgNRCRMKDAoFBAUCCQMSA1EWGAoLCgQEBQIKEgNSAhUKDAoF" + 112 "BAUCCgUSA1ICCAoMCgUEBQIKARIDUgkPCgwKBQQFAgoDEgNSEhQKCwoEBAUCCxIDUwIcCgwKBQQFAgsF" + 113 "EgNTAggKDAoFBAUCCwESA1MJFgoMCgUEBQILAxIDUxkbCgsKBAQFAgwSA1QCHAoMCgUEBQIMBRIDVAII" + 114 "CgwKBQQFAgwBEgNUCRYKDAoFBAUCDAMSA1QZGwoLCgQEBQINEgNVAiAKDAoFBAUCDQUSA1UCCAoMCgUE" + 115 "BQINARIDVQkaCgwKBQQFAg0DEgNVHR9iBnByb3RvMw=="); 116 117 static final Descriptors.FileDescriptor descriptor = Descriptors.FileDescriptor.internalBuildGeneratedFileFrom("photon.proto", "photonvision.proto", descriptorData, ProtobufGeometry3dDescriptor.getDescriptor()); 118 119 static final Descriptors.Descriptor photonvision_proto_ProtobufTargetCorner_descriptor = descriptor.internalContainedType(54, 50, "ProtobufTargetCorner", "photonvision.proto.ProtobufTargetCorner"); 120 121 static final Descriptors.Descriptor photonvision_proto_ProtobufPNPResult_descriptor = descriptor.internalContainedType(107, 266, "ProtobufPNPResult", "photonvision.proto.ProtobufPNPResult"); 122 123 static final Descriptors.Descriptor photonvision_proto_ProtobufMultiTargetPNPResult_descriptor = descriptor.internalContainedType(376, 152, "ProtobufMultiTargetPNPResult", "photonvision.proto.ProtobufMultiTargetPNPResult"); 124 125 static final Descriptors.Descriptor photonvision_proto_ProtobufPhotonTrackedTarget_descriptor = descriptor.internalContainedType(531, 611, "ProtobufPhotonTrackedTarget", "photonvision.proto.ProtobufPhotonTrackedTarget"); 126 127 static final Descriptors.Descriptor photonvision_proto_ProtobufPhotonPipelineResult_descriptor = descriptor.internalContainedType(1145, 483, "ProtobufPhotonPipelineResult", "photonvision.proto.ProtobufPhotonPipelineResult"); 128 129 static final Descriptors.Descriptor photonvision_proto_ProtobufDeviceMetrics_descriptor = descriptor.internalContainedType(1631, 449, "ProtobufDeviceMetrics", "photonvision.proto.ProtobufDeviceMetrics"); 130 131 /** 132 * @return this proto file's descriptor. 133 */ 134 public static Descriptors.FileDescriptor getDescriptor() { 135 return descriptor; 136 } 137 138 /** 139 * Protobuf type {@code ProtobufTargetCorner} 140 */ 141 public static final class ProtobufTargetCorner extends ProtoMessage<ProtobufTargetCorner> implements Cloneable { 142 private static final long serialVersionUID = 0L; 143 144 /** 145 * <code>optional double x = 1;</code> 146 */ 147 private double x; 148 149 /** 150 * <code>optional double y = 2;</code> 151 */ 152 private double y; 153 154 private ProtobufTargetCorner() { 155 } 156 157 /** 158 * @return a new empty instance of {@code ProtobufTargetCorner} 159 */ 160 public static ProtobufTargetCorner newInstance() { 161 return new ProtobufTargetCorner(); 162 } 163 164 /** 165 * <code>optional double x = 1;</code> 166 * @return whether the x field is set 167 */ 168 public boolean hasX() { 169 return (bitField0_ & 0x00000001) != 0; 170 } 171 172 /** 173 * <code>optional double x = 1;</code> 174 * @return this 175 */ 176 public ProtobufTargetCorner clearX() { 177 bitField0_ &= ~0x00000001; 178 x = 0D; 179 return this; 180 } 181 182 /** 183 * <code>optional double x = 1;</code> 184 * @return the x 185 */ 186 public double getX() { 187 return x; 188 } 189 190 /** 191 * <code>optional double x = 1;</code> 192 * @param value the x to set 193 * @return this 194 */ 195 public ProtobufTargetCorner setX(final double value) { 196 bitField0_ |= 0x00000001; 197 x = value; 198 return this; 199 } 200 201 /** 202 * <code>optional double y = 2;</code> 203 * @return whether the y field is set 204 */ 205 public boolean hasY() { 206 return (bitField0_ & 0x00000002) != 0; 207 } 208 209 /** 210 * <code>optional double y = 2;</code> 211 * @return this 212 */ 213 public ProtobufTargetCorner clearY() { 214 bitField0_ &= ~0x00000002; 215 y = 0D; 216 return this; 217 } 218 219 /** 220 * <code>optional double y = 2;</code> 221 * @return the y 222 */ 223 public double getY() { 224 return y; 225 } 226 227 /** 228 * <code>optional double y = 2;</code> 229 * @param value the y to set 230 * @return this 231 */ 232 public ProtobufTargetCorner setY(final double value) { 233 bitField0_ |= 0x00000002; 234 y = value; 235 return this; 236 } 237 238 @Override 239 public ProtobufTargetCorner copyFrom(final ProtobufTargetCorner other) { 240 cachedSize = other.cachedSize; 241 if ((bitField0_ | other.bitField0_) != 0) { 242 bitField0_ = other.bitField0_; 243 x = other.x; 244 y = other.y; 245 } 246 return this; 247 } 248 249 @Override 250 public ProtobufTargetCorner mergeFrom(final ProtobufTargetCorner other) { 251 if (other.isEmpty()) { 252 return this; 253 } 254 cachedSize = -1; 255 if (other.hasX()) { 256 setX(other.x); 257 } 258 if (other.hasY()) { 259 setY(other.y); 260 } 261 return this; 262 } 263 264 @Override 265 public ProtobufTargetCorner clear() { 266 if (isEmpty()) { 267 return this; 268 } 269 cachedSize = -1; 270 bitField0_ = 0; 271 x = 0D; 272 y = 0D; 273 return this; 274 } 275 276 @Override 277 public ProtobufTargetCorner clearQuick() { 278 if (isEmpty()) { 279 return this; 280 } 281 cachedSize = -1; 282 bitField0_ = 0; 283 return this; 284 } 285 286 @Override 287 public boolean equals(Object o) { 288 if (o == this) { 289 return true; 290 } 291 if (!(o instanceof ProtobufTargetCorner)) { 292 return false; 293 } 294 ProtobufTargetCorner other = (ProtobufTargetCorner) o; 295 return bitField0_ == other.bitField0_ 296 && (!hasX() || ProtoUtil.isEqual(x, other.x)) 297 && (!hasY() || ProtoUtil.isEqual(y, other.y)); 298 } 299 300 @Override 301 public void writeTo(final ProtoSink output) throws IOException { 302 if ((bitField0_ & 0x00000001) != 0) { 303 output.writeRawByte((byte) 9); 304 output.writeDoubleNoTag(x); 305 } 306 if ((bitField0_ & 0x00000002) != 0) { 307 output.writeRawByte((byte) 17); 308 output.writeDoubleNoTag(y); 309 } 310 } 311 312 @Override 313 protected int computeSerializedSize() { 314 int size = 0; 315 if ((bitField0_ & 0x00000001) != 0) { 316 size += 9; 317 } 318 if ((bitField0_ & 0x00000002) != 0) { 319 size += 9; 320 } 321 return size; 322 } 323 324 @Override 325 @SuppressWarnings("fallthrough") 326 public ProtobufTargetCorner mergeFrom(final ProtoSource input) throws IOException { 327 // Enabled Fall-Through Optimization (QuickBuffers) 328 int tag = input.readTag(); 329 while (true) { 330 switch (tag) { 331 case 9: { 332 // x 333 x = input.readDouble(); 334 bitField0_ |= 0x00000001; 335 tag = input.readTag(); 336 if (tag != 17) { 337 break; 338 } 339 } 340 case 17: { 341 // y 342 y = input.readDouble(); 343 bitField0_ |= 0x00000002; 344 tag = input.readTag(); 345 if (tag != 0) { 346 break; 347 } 348 } 349 case 0: { 350 return this; 351 } 352 default: { 353 if (!input.skipField(tag)) { 354 return this; 355 } 356 tag = input.readTag(); 357 break; 358 } 359 } 360 } 361 } 362 363 @Override 364 public void writeTo(final JsonSink output) throws IOException { 365 output.beginObject(); 366 if ((bitField0_ & 0x00000001) != 0) { 367 output.writeDouble(FieldNames.x, x); 368 } 369 if ((bitField0_ & 0x00000002) != 0) { 370 output.writeDouble(FieldNames.y, y); 371 } 372 output.endObject(); 373 } 374 375 @Override 376 public ProtobufTargetCorner mergeFrom(final JsonSource input) throws IOException { 377 if (!input.beginObject()) { 378 return this; 379 } 380 while (!input.isAtEnd()) { 381 switch (input.readFieldHash()) { 382 case 120: { 383 if (input.isAtField(FieldNames.x)) { 384 if (!input.trySkipNullValue()) { 385 x = input.readDouble(); 386 bitField0_ |= 0x00000001; 387 } 388 } else { 389 input.skipUnknownField(); 390 } 391 break; 392 } 393 case 121: { 394 if (input.isAtField(FieldNames.y)) { 395 if (!input.trySkipNullValue()) { 396 y = input.readDouble(); 397 bitField0_ |= 0x00000002; 398 } 399 } else { 400 input.skipUnknownField(); 401 } 402 break; 403 } 404 default: { 405 input.skipUnknownField(); 406 break; 407 } 408 } 409 } 410 input.endObject(); 411 return this; 412 } 413 414 @Override 415 public ProtobufTargetCorner clone() { 416 return new ProtobufTargetCorner().copyFrom(this); 417 } 418 419 @Override 420 public boolean isEmpty() { 421 return ((bitField0_) == 0); 422 } 423 424 public static ProtobufTargetCorner parseFrom(final byte[] data) throws 425 InvalidProtocolBufferException { 426 return ProtoMessage.mergeFrom(new ProtobufTargetCorner(), data).checkInitialized(); 427 } 428 429 public static ProtobufTargetCorner parseFrom(final ProtoSource input) throws IOException { 430 return ProtoMessage.mergeFrom(new ProtobufTargetCorner(), input).checkInitialized(); 431 } 432 433 public static ProtobufTargetCorner parseFrom(final JsonSource input) throws IOException { 434 return ProtoMessage.mergeFrom(new ProtobufTargetCorner(), input).checkInitialized(); 435 } 436 437 /** 438 * @return factory for creating ProtobufTargetCorner messages 439 */ 440 public static MessageFactory<ProtobufTargetCorner> getFactory() { 441 return ProtobufTargetCornerFactory.INSTANCE; 442 } 443 444 /** 445 * @return this type's descriptor. 446 */ 447 public static Descriptors.Descriptor getDescriptor() { 448 return Photon.photonvision_proto_ProtobufTargetCorner_descriptor; 449 } 450 451 private enum ProtobufTargetCornerFactory implements MessageFactory<ProtobufTargetCorner> { 452 INSTANCE; 453 454 @Override 455 public ProtobufTargetCorner create() { 456 return ProtobufTargetCorner.newInstance(); 457 } 458 } 459 460 /** 461 * Contains name constants used for serializing JSON 462 */ 463 static class FieldNames { 464 static final FieldName x = FieldName.forField("x"); 465 466 static final FieldName y = FieldName.forField("y"); 467 } 468 } 469 470 /** 471 * Protobuf type {@code ProtobufPNPResult} 472 */ 473 public static final class ProtobufPNPResult extends ProtoMessage<ProtobufPNPResult> implements Cloneable { 474 private static final long serialVersionUID = 0L; 475 476 /** 477 * <code>optional double best_reproj_err = 3;</code> 478 */ 479 private double bestReprojErr; 480 481 /** 482 * <code>optional double alt_reproj_err = 5;</code> 483 */ 484 private double altReprojErr; 485 486 /** 487 * <code>optional double ambiguity = 6;</code> 488 */ 489 private double ambiguity; 490 491 /** 492 * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code> 493 */ 494 private final ProtobufTransform3d best = ProtobufTransform3d.newInstance(); 495 496 /** 497 * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code> 498 */ 499 private final ProtobufTransform3d alt = ProtobufTransform3d.newInstance(); 500 501 private ProtobufPNPResult() { 502 } 503 504 /** 505 * @return a new empty instance of {@code ProtobufPNPResult} 506 */ 507 public static ProtobufPNPResult newInstance() { 508 return new ProtobufPNPResult(); 509 } 510 511 /** 512 * <code>optional double best_reproj_err = 3;</code> 513 * @return whether the bestReprojErr field is set 514 */ 515 public boolean hasBestReprojErr() { 516 return (bitField0_ & 0x00000004) != 0; 517 } 518 519 /** 520 * <code>optional double best_reproj_err = 3;</code> 521 * @return this 522 */ 523 public ProtobufPNPResult clearBestReprojErr() { 524 bitField0_ &= ~0x00000004; 525 bestReprojErr = 0D; 526 return this; 527 } 528 529 /** 530 * <code>optional double best_reproj_err = 3;</code> 531 * @return the bestReprojErr 532 */ 533 public double getBestReprojErr() { 534 return bestReprojErr; 535 } 536 537 /** 538 * <code>optional double best_reproj_err = 3;</code> 539 * @param value the bestReprojErr to set 540 * @return this 541 */ 542 public ProtobufPNPResult setBestReprojErr(final double value) { 543 bitField0_ |= 0x00000004; 544 bestReprojErr = value; 545 return this; 546 } 547 548 /** 549 * <code>optional double alt_reproj_err = 5;</code> 550 * @return whether the altReprojErr field is set 551 */ 552 public boolean hasAltReprojErr() { 553 return (bitField0_ & 0x00000001) != 0; 554 } 555 556 /** 557 * <code>optional double alt_reproj_err = 5;</code> 558 * @return this 559 */ 560 public ProtobufPNPResult clearAltReprojErr() { 561 bitField0_ &= ~0x00000001; 562 altReprojErr = 0D; 563 return this; 564 } 565 566 /** 567 * <code>optional double alt_reproj_err = 5;</code> 568 * @return the altReprojErr 569 */ 570 public double getAltReprojErr() { 571 return altReprojErr; 572 } 573 574 /** 575 * <code>optional double alt_reproj_err = 5;</code> 576 * @param value the altReprojErr to set 577 * @return this 578 */ 579 public ProtobufPNPResult setAltReprojErr(final double value) { 580 bitField0_ |= 0x00000001; 581 altReprojErr = value; 582 return this; 583 } 584 585 /** 586 * <code>optional double ambiguity = 6;</code> 587 * @return whether the ambiguity field is set 588 */ 589 public boolean hasAmbiguity() { 590 return (bitField0_ & 0x00000008) != 0; 591 } 592 593 /** 594 * <code>optional double ambiguity = 6;</code> 595 * @return this 596 */ 597 public ProtobufPNPResult clearAmbiguity() { 598 bitField0_ &= ~0x00000008; 599 ambiguity = 0D; 600 return this; 601 } 602 603 /** 604 * <code>optional double ambiguity = 6;</code> 605 * @return the ambiguity 606 */ 607 public double getAmbiguity() { 608 return ambiguity; 609 } 610 611 /** 612 * <code>optional double ambiguity = 6;</code> 613 * @param value the ambiguity to set 614 * @return this 615 */ 616 public ProtobufPNPResult setAmbiguity(final double value) { 617 bitField0_ |= 0x00000008; 618 ambiguity = value; 619 return this; 620 } 621 622 /** 623 * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code> 624 * @return whether the best field is set 625 */ 626 public boolean hasBest() { 627 return (bitField0_ & 0x00000010) != 0; 628 } 629 630 /** 631 * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code> 632 * @return this 633 */ 634 public ProtobufPNPResult clearBest() { 635 bitField0_ &= ~0x00000010; 636 best.clear(); 637 return this; 638 } 639 640 /** 641 * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code> 642 * 643 * This method returns the internal storage object without modifying any has state. 644 * The returned object should not be modified and be treated as read-only. 645 * 646 * Use {@link #getMutableBest()} if you want to modify it. 647 * 648 * @return internal storage object for reading 649 */ 650 public ProtobufTransform3d getBest() { 651 return best; 652 } 653 654 /** 655 * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code> 656 * 657 * This method returns the internal storage object and sets the corresponding 658 * has state. The returned object will become part of this message and its 659 * contents may be modified as long as the has state is not cleared. 660 * 661 * @return internal storage object for modifications 662 */ 663 public ProtobufTransform3d getMutableBest() { 664 bitField0_ |= 0x00000010; 665 return best; 666 } 667 668 /** 669 * <code>optional .wpi.proto.ProtobufTransform3d best = 2;</code> 670 * @param value the best to set 671 * @return this 672 */ 673 public ProtobufPNPResult setBest(final ProtobufTransform3d value) { 674 bitField0_ |= 0x00000010; 675 best.copyFrom(value); 676 return this; 677 } 678 679 /** 680 * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code> 681 * @return whether the alt field is set 682 */ 683 public boolean hasAlt() { 684 return (bitField0_ & 0x00000002) != 0; 685 } 686 687 /** 688 * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code> 689 * @return this 690 */ 691 public ProtobufPNPResult clearAlt() { 692 bitField0_ &= ~0x00000002; 693 alt.clear(); 694 return this; 695 } 696 697 /** 698 * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code> 699 * 700 * This method returns the internal storage object without modifying any has state. 701 * The returned object should not be modified and be treated as read-only. 702 * 703 * Use {@link #getMutableAlt()} if you want to modify it. 704 * 705 * @return internal storage object for reading 706 */ 707 public ProtobufTransform3d getAlt() { 708 return alt; 709 } 710 711 /** 712 * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code> 713 * 714 * This method returns the internal storage object and sets the corresponding 715 * has state. The returned object will become part of this message and its 716 * contents may be modified as long as the has state is not cleared. 717 * 718 * @return internal storage object for modifications 719 */ 720 public ProtobufTransform3d getMutableAlt() { 721 bitField0_ |= 0x00000002; 722 return alt; 723 } 724 725 /** 726 * <code>optional .wpi.proto.ProtobufTransform3d alt = 4;</code> 727 * @param value the alt to set 728 * @return this 729 */ 730 public ProtobufPNPResult setAlt(final ProtobufTransform3d value) { 731 bitField0_ |= 0x00000002; 732 alt.copyFrom(value); 733 return this; 734 } 735 736 @Override 737 public ProtobufPNPResult copyFrom(final ProtobufPNPResult other) { 738 cachedSize = other.cachedSize; 739 if ((bitField0_ | other.bitField0_) != 0) { 740 bitField0_ = other.bitField0_; 741 bestReprojErr = other.bestReprojErr; 742 altReprojErr = other.altReprojErr; 743 ambiguity = other.ambiguity; 744 best.copyFrom(other.best); 745 alt.copyFrom(other.alt); 746 } 747 return this; 748 } 749 750 @Override 751 public ProtobufPNPResult mergeFrom(final ProtobufPNPResult other) { 752 if (other.isEmpty()) { 753 return this; 754 } 755 cachedSize = -1; 756 if (other.hasBestReprojErr()) { 757 setBestReprojErr(other.bestReprojErr); 758 } 759 if (other.hasAltReprojErr()) { 760 setAltReprojErr(other.altReprojErr); 761 } 762 if (other.hasAmbiguity()) { 763 setAmbiguity(other.ambiguity); 764 } 765 if (other.hasBest()) { 766 getMutableBest().mergeFrom(other.best); 767 } 768 if (other.hasAlt()) { 769 getMutableAlt().mergeFrom(other.alt); 770 } 771 return this; 772 } 773 774 @Override 775 public ProtobufPNPResult clear() { 776 if (isEmpty()) { 777 return this; 778 } 779 cachedSize = -1; 780 bitField0_ = 0; 781 bestReprojErr = 0D; 782 altReprojErr = 0D; 783 ambiguity = 0D; 784 best.clear(); 785 alt.clear(); 786 return this; 787 } 788 789 @Override 790 public ProtobufPNPResult clearQuick() { 791 if (isEmpty()) { 792 return this; 793 } 794 cachedSize = -1; 795 bitField0_ = 0; 796 best.clearQuick(); 797 alt.clearQuick(); 798 return this; 799 } 800 801 @Override 802 public boolean equals(Object o) { 803 if (o == this) { 804 return true; 805 } 806 if (!(o instanceof ProtobufPNPResult)) { 807 return false; 808 } 809 ProtobufPNPResult other = (ProtobufPNPResult) o; 810 return bitField0_ == other.bitField0_ 811 && (!hasBestReprojErr() || ProtoUtil.isEqual(bestReprojErr, other.bestReprojErr)) 812 && (!hasAltReprojErr() || ProtoUtil.isEqual(altReprojErr, other.altReprojErr)) 813 && (!hasAmbiguity() || ProtoUtil.isEqual(ambiguity, other.ambiguity)) 814 && (!hasBest() || best.equals(other.best)) 815 && (!hasAlt() || alt.equals(other.alt)); 816 } 817 818 @Override 819 public void writeTo(final ProtoSink output) throws IOException { 820 if ((bitField0_ & 0x00000004) != 0) { 821 output.writeRawByte((byte) 25); 822 output.writeDoubleNoTag(bestReprojErr); 823 } 824 if ((bitField0_ & 0x00000001) != 0) { 825 output.writeRawByte((byte) 41); 826 output.writeDoubleNoTag(altReprojErr); 827 } 828 if ((bitField0_ & 0x00000008) != 0) { 829 output.writeRawByte((byte) 49); 830 output.writeDoubleNoTag(ambiguity); 831 } 832 if ((bitField0_ & 0x00000010) != 0) { 833 output.writeRawByte((byte) 18); 834 output.writeMessageNoTag(best); 835 } 836 if ((bitField0_ & 0x00000002) != 0) { 837 output.writeRawByte((byte) 34); 838 output.writeMessageNoTag(alt); 839 } 840 } 841 842 @Override 843 protected int computeSerializedSize() { 844 int size = 0; 845 if ((bitField0_ & 0x00000004) != 0) { 846 size += 9; 847 } 848 if ((bitField0_ & 0x00000001) != 0) { 849 size += 9; 850 } 851 if ((bitField0_ & 0x00000008) != 0) { 852 size += 9; 853 } 854 if ((bitField0_ & 0x00000010) != 0) { 855 size += 1 + ProtoSink.computeMessageSizeNoTag(best); 856 } 857 if ((bitField0_ & 0x00000002) != 0) { 858 size += 1 + ProtoSink.computeMessageSizeNoTag(alt); 859 } 860 return size; 861 } 862 863 @Override 864 @SuppressWarnings("fallthrough") 865 public ProtobufPNPResult mergeFrom(final ProtoSource input) throws IOException { 866 // Enabled Fall-Through Optimization (QuickBuffers) 867 int tag = input.readTag(); 868 while (true) { 869 switch (tag) { 870 case 25: { 871 // bestReprojErr 872 bestReprojErr = input.readDouble(); 873 bitField0_ |= 0x00000004; 874 tag = input.readTag(); 875 if (tag != 41) { 876 break; 877 } 878 } 879 case 41: { 880 // altReprojErr 881 altReprojErr = input.readDouble(); 882 bitField0_ |= 0x00000001; 883 tag = input.readTag(); 884 if (tag != 49) { 885 break; 886 } 887 } 888 case 49: { 889 // ambiguity 890 ambiguity = input.readDouble(); 891 bitField0_ |= 0x00000008; 892 tag = input.readTag(); 893 if (tag != 18) { 894 break; 895 } 896 } 897 case 18: { 898 // best 899 input.readMessage(best); 900 bitField0_ |= 0x00000010; 901 tag = input.readTag(); 902 if (tag != 34) { 903 break; 904 } 905 } 906 case 34: { 907 // alt 908 input.readMessage(alt); 909 bitField0_ |= 0x00000002; 910 tag = input.readTag(); 911 if (tag != 0) { 912 break; 913 } 914 } 915 case 0: { 916 return this; 917 } 918 default: { 919 if (!input.skipField(tag)) { 920 return this; 921 } 922 tag = input.readTag(); 923 break; 924 } 925 } 926 } 927 } 928 929 @Override 930 public void writeTo(final JsonSink output) throws IOException { 931 output.beginObject(); 932 if ((bitField0_ & 0x00000004) != 0) { 933 output.writeDouble(FieldNames.bestReprojErr, bestReprojErr); 934 } 935 if ((bitField0_ & 0x00000001) != 0) { 936 output.writeDouble(FieldNames.altReprojErr, altReprojErr); 937 } 938 if ((bitField0_ & 0x00000008) != 0) { 939 output.writeDouble(FieldNames.ambiguity, ambiguity); 940 } 941 if ((bitField0_ & 0x00000010) != 0) { 942 output.writeMessage(FieldNames.best, best); 943 } 944 if ((bitField0_ & 0x00000002) != 0) { 945 output.writeMessage(FieldNames.alt, alt); 946 } 947 output.endObject(); 948 } 949 950 @Override 951 public ProtobufPNPResult mergeFrom(final JsonSource input) throws IOException { 952 if (!input.beginObject()) { 953 return this; 954 } 955 while (!input.isAtEnd()) { 956 switch (input.readFieldHash()) { 957 case 1385456049: 958 case 1893923313: { 959 if (input.isAtField(FieldNames.bestReprojErr)) { 960 if (!input.trySkipNullValue()) { 961 bestReprojErr = input.readDouble(); 962 bitField0_ |= 0x00000004; 963 } 964 } else { 965 input.skipUnknownField(); 966 } 967 break; 968 } 969 case -748393588: 970 case -36177652: { 971 if (input.isAtField(FieldNames.altReprojErr)) { 972 if (!input.trySkipNullValue()) { 973 altReprojErr = input.readDouble(); 974 bitField0_ |= 0x00000001; 975 } 976 } else { 977 input.skipUnknownField(); 978 } 979 break; 980 } 981 case 1644162925: { 982 if (input.isAtField(FieldNames.ambiguity)) { 983 if (!input.trySkipNullValue()) { 984 ambiguity = input.readDouble(); 985 bitField0_ |= 0x00000008; 986 } 987 } else { 988 input.skipUnknownField(); 989 } 990 break; 991 } 992 case 3020260: { 993 if (input.isAtField(FieldNames.best)) { 994 if (!input.trySkipNullValue()) { 995 input.readMessage(best); 996 bitField0_ |= 0x00000010; 997 } 998 } else { 999 input.skipUnknownField(); 1000 } 1001 break; 1002 } 1003 case 96681: { 1004 if (input.isAtField(FieldNames.alt)) { 1005 if (!input.trySkipNullValue()) { 1006 input.readMessage(alt); 1007 bitField0_ |= 0x00000002; 1008 } 1009 } else { 1010 input.skipUnknownField(); 1011 } 1012 break; 1013 } 1014 default: { 1015 input.skipUnknownField(); 1016 break; 1017 } 1018 } 1019 } 1020 input.endObject(); 1021 return this; 1022 } 1023 1024 @Override 1025 public ProtobufPNPResult clone() { 1026 return new ProtobufPNPResult().copyFrom(this); 1027 } 1028 1029 @Override 1030 public boolean isEmpty() { 1031 return ((bitField0_) == 0); 1032 } 1033 1034 public static ProtobufPNPResult parseFrom(final byte[] data) throws 1035 InvalidProtocolBufferException { 1036 return ProtoMessage.mergeFrom(new ProtobufPNPResult(), data).checkInitialized(); 1037 } 1038 1039 public static ProtobufPNPResult parseFrom(final ProtoSource input) throws IOException { 1040 return ProtoMessage.mergeFrom(new ProtobufPNPResult(), input).checkInitialized(); 1041 } 1042 1043 public static ProtobufPNPResult parseFrom(final JsonSource input) throws IOException { 1044 return ProtoMessage.mergeFrom(new ProtobufPNPResult(), input).checkInitialized(); 1045 } 1046 1047 /** 1048 * @return factory for creating ProtobufPNPResult messages 1049 */ 1050 public static MessageFactory<ProtobufPNPResult> getFactory() { 1051 return ProtobufPNPResultFactory.INSTANCE; 1052 } 1053 1054 /** 1055 * @return this type's descriptor. 1056 */ 1057 public static Descriptors.Descriptor getDescriptor() { 1058 return Photon.photonvision_proto_ProtobufPNPResult_descriptor; 1059 } 1060 1061 private enum ProtobufPNPResultFactory implements MessageFactory<ProtobufPNPResult> { 1062 INSTANCE; 1063 1064 @Override 1065 public ProtobufPNPResult create() { 1066 return ProtobufPNPResult.newInstance(); 1067 } 1068 } 1069 1070 /** 1071 * Contains name constants used for serializing JSON 1072 */ 1073 static class FieldNames { 1074 static final FieldName bestReprojErr = FieldName.forField("bestReprojErr", "best_reproj_err"); 1075 1076 static final FieldName altReprojErr = FieldName.forField("altReprojErr", "alt_reproj_err"); 1077 1078 static final FieldName ambiguity = FieldName.forField("ambiguity"); 1079 1080 static final FieldName best = FieldName.forField("best"); 1081 1082 static final FieldName alt = FieldName.forField("alt"); 1083 } 1084 } 1085 1086 /** 1087 * Protobuf type {@code ProtobufMultiTargetPNPResult} 1088 */ 1089 public static final class ProtobufMultiTargetPNPResult extends ProtoMessage<ProtobufMultiTargetPNPResult> implements Cloneable { 1090 private static final long serialVersionUID = 0L; 1091 1092 /** 1093 * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code> 1094 */ 1095 private final ProtobufPNPResult estimatedPose = ProtobufPNPResult.newInstance(); 1096 1097 /** 1098 * <code>repeated int32 fiducial_ids_used = 2;</code> 1099 */ 1100 private final RepeatedInt fiducialIdsUsed = RepeatedInt.newEmptyInstance(); 1101 1102 private ProtobufMultiTargetPNPResult() { 1103 } 1104 1105 /** 1106 * @return a new empty instance of {@code ProtobufMultiTargetPNPResult} 1107 */ 1108 public static ProtobufMultiTargetPNPResult newInstance() { 1109 return new ProtobufMultiTargetPNPResult(); 1110 } 1111 1112 /** 1113 * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code> 1114 * @return whether the estimatedPose field is set 1115 */ 1116 public boolean hasEstimatedPose() { 1117 return (bitField0_ & 0x00000001) != 0; 1118 } 1119 1120 /** 1121 * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code> 1122 * @return this 1123 */ 1124 public ProtobufMultiTargetPNPResult clearEstimatedPose() { 1125 bitField0_ &= ~0x00000001; 1126 estimatedPose.clear(); 1127 return this; 1128 } 1129 1130 /** 1131 * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code> 1132 * 1133 * This method returns the internal storage object without modifying any has state. 1134 * The returned object should not be modified and be treated as read-only. 1135 * 1136 * Use {@link #getMutableEstimatedPose()} if you want to modify it. 1137 * 1138 * @return internal storage object for reading 1139 */ 1140 public ProtobufPNPResult getEstimatedPose() { 1141 return estimatedPose; 1142 } 1143 1144 /** 1145 * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code> 1146 * 1147 * This method returns the internal storage object and sets the corresponding 1148 * has state. The returned object will become part of this message and its 1149 * contents may be modified as long as the has state is not cleared. 1150 * 1151 * @return internal storage object for modifications 1152 */ 1153 public ProtobufPNPResult getMutableEstimatedPose() { 1154 bitField0_ |= 0x00000001; 1155 return estimatedPose; 1156 } 1157 1158 /** 1159 * <code>optional .photonvision.proto.ProtobufPNPResult estimated_pose = 1;</code> 1160 * @param value the estimatedPose to set 1161 * @return this 1162 */ 1163 public ProtobufMultiTargetPNPResult setEstimatedPose(final ProtobufPNPResult value) { 1164 bitField0_ |= 0x00000001; 1165 estimatedPose.copyFrom(value); 1166 return this; 1167 } 1168 1169 /** 1170 * <code>repeated int32 fiducial_ids_used = 2;</code> 1171 * @return whether the fiducialIdsUsed field is set 1172 */ 1173 public boolean hasFiducialIdsUsed() { 1174 return (bitField0_ & 0x00000002) != 0; 1175 } 1176 1177 /** 1178 * <code>repeated int32 fiducial_ids_used = 2;</code> 1179 * @return this 1180 */ 1181 public ProtobufMultiTargetPNPResult clearFiducialIdsUsed() { 1182 bitField0_ &= ~0x00000002; 1183 fiducialIdsUsed.clear(); 1184 return this; 1185 } 1186 1187 /** 1188 * <code>repeated int32 fiducial_ids_used = 2;</code> 1189 * 1190 * This method returns the internal storage object without modifying any has state. 1191 * The returned object should not be modified and be treated as read-only. 1192 * 1193 * Use {@link #getMutableFiducialIdsUsed()} if you want to modify it. 1194 * 1195 * @return internal storage object for reading 1196 */ 1197 public RepeatedInt getFiducialIdsUsed() { 1198 return fiducialIdsUsed; 1199 } 1200 1201 /** 1202 * <code>repeated int32 fiducial_ids_used = 2;</code> 1203 * 1204 * This method returns the internal storage object and sets the corresponding 1205 * has state. The returned object will become part of this message and its 1206 * contents may be modified as long as the has state is not cleared. 1207 * 1208 * @return internal storage object for modifications 1209 */ 1210 public RepeatedInt getMutableFiducialIdsUsed() { 1211 bitField0_ |= 0x00000002; 1212 return fiducialIdsUsed; 1213 } 1214 1215 /** 1216 * <code>repeated int32 fiducial_ids_used = 2;</code> 1217 * @param value the fiducialIdsUsed to add 1218 * @return this 1219 */ 1220 public ProtobufMultiTargetPNPResult addFiducialIdsUsed(final int value) { 1221 bitField0_ |= 0x00000002; 1222 fiducialIdsUsed.add(value); 1223 return this; 1224 } 1225 1226 /** 1227 * <code>repeated int32 fiducial_ids_used = 2;</code> 1228 * @param values the fiducialIdsUsed to add 1229 * @return this 1230 */ 1231 public ProtobufMultiTargetPNPResult addAllFiducialIdsUsed(final int... values) { 1232 bitField0_ |= 0x00000002; 1233 fiducialIdsUsed.addAll(values); 1234 return this; 1235 } 1236 1237 @Override 1238 public ProtobufMultiTargetPNPResult copyFrom(final ProtobufMultiTargetPNPResult other) { 1239 cachedSize = other.cachedSize; 1240 if ((bitField0_ | other.bitField0_) != 0) { 1241 bitField0_ = other.bitField0_; 1242 estimatedPose.copyFrom(other.estimatedPose); 1243 fiducialIdsUsed.copyFrom(other.fiducialIdsUsed); 1244 } 1245 return this; 1246 } 1247 1248 @Override 1249 public ProtobufMultiTargetPNPResult mergeFrom(final ProtobufMultiTargetPNPResult other) { 1250 if (other.isEmpty()) { 1251 return this; 1252 } 1253 cachedSize = -1; 1254 if (other.hasEstimatedPose()) { 1255 getMutableEstimatedPose().mergeFrom(other.estimatedPose); 1256 } 1257 if (other.hasFiducialIdsUsed()) { 1258 getMutableFiducialIdsUsed().addAll(other.fiducialIdsUsed); 1259 } 1260 return this; 1261 } 1262 1263 @Override 1264 public ProtobufMultiTargetPNPResult clear() { 1265 if (isEmpty()) { 1266 return this; 1267 } 1268 cachedSize = -1; 1269 bitField0_ = 0; 1270 estimatedPose.clear(); 1271 fiducialIdsUsed.clear(); 1272 return this; 1273 } 1274 1275 @Override 1276 public ProtobufMultiTargetPNPResult clearQuick() { 1277 if (isEmpty()) { 1278 return this; 1279 } 1280 cachedSize = -1; 1281 bitField0_ = 0; 1282 estimatedPose.clearQuick(); 1283 fiducialIdsUsed.clear(); 1284 return this; 1285 } 1286 1287 @Override 1288 public boolean equals(Object o) { 1289 if (o == this) { 1290 return true; 1291 } 1292 if (!(o instanceof ProtobufMultiTargetPNPResult)) { 1293 return false; 1294 } 1295 ProtobufMultiTargetPNPResult other = (ProtobufMultiTargetPNPResult) o; 1296 return bitField0_ == other.bitField0_ 1297 && (!hasEstimatedPose() || estimatedPose.equals(other.estimatedPose)) 1298 && (!hasFiducialIdsUsed() || fiducialIdsUsed.equals(other.fiducialIdsUsed)); 1299 } 1300 1301 @Override 1302 public void writeTo(final ProtoSink output) throws IOException { 1303 if ((bitField0_ & 0x00000001) != 0) { 1304 output.writeRawByte((byte) 10); 1305 output.writeMessageNoTag(estimatedPose); 1306 } 1307 if ((bitField0_ & 0x00000002) != 0) { 1308 for (int i = 0; i < fiducialIdsUsed.length(); i++) { 1309 output.writeRawByte((byte) 16); 1310 output.writeInt32NoTag(fiducialIdsUsed.array()[i]); 1311 } 1312 } 1313 } 1314 1315 @Override 1316 protected int computeSerializedSize() { 1317 int size = 0; 1318 if ((bitField0_ & 0x00000001) != 0) { 1319 size += 1 + ProtoSink.computeMessageSizeNoTag(estimatedPose); 1320 } 1321 if ((bitField0_ & 0x00000002) != 0) { 1322 size += (1 * fiducialIdsUsed.length()) + ProtoSink.computeRepeatedInt32SizeNoTag(fiducialIdsUsed); 1323 } 1324 return size; 1325 } 1326 1327 @Override 1328 @SuppressWarnings("fallthrough") 1329 public ProtobufMultiTargetPNPResult mergeFrom(final ProtoSource input) throws IOException { 1330 // Enabled Fall-Through Optimization (QuickBuffers) 1331 int tag = input.readTag(); 1332 while (true) { 1333 switch (tag) { 1334 case 10: { 1335 // estimatedPose 1336 input.readMessage(estimatedPose); 1337 bitField0_ |= 0x00000001; 1338 tag = input.readTag(); 1339 if (tag != 18) { 1340 break; 1341 } 1342 } 1343 case 18: { 1344 // fiducialIdsUsed [packed=true] 1345 input.readPackedInt32(fiducialIdsUsed, tag); 1346 bitField0_ |= 0x00000002; 1347 tag = input.readTag(); 1348 if (tag != 0) { 1349 break; 1350 } 1351 } 1352 case 0: { 1353 return this; 1354 } 1355 default: { 1356 if (!input.skipField(tag)) { 1357 return this; 1358 } 1359 tag = input.readTag(); 1360 break; 1361 } 1362 case 16: { 1363 // fiducialIdsUsed [packed=false] 1364 tag = input.readRepeatedInt32(fiducialIdsUsed, tag); 1365 bitField0_ |= 0x00000002; 1366 break; 1367 } 1368 } 1369 } 1370 } 1371 1372 @Override 1373 public void writeTo(final JsonSink output) throws IOException { 1374 output.beginObject(); 1375 if ((bitField0_ & 0x00000001) != 0) { 1376 output.writeMessage(FieldNames.estimatedPose, estimatedPose); 1377 } 1378 if ((bitField0_ & 0x00000002) != 0) { 1379 output.writeRepeatedInt32(FieldNames.fiducialIdsUsed, fiducialIdsUsed); 1380 } 1381 output.endObject(); 1382 } 1383 1384 @Override 1385 public ProtobufMultiTargetPNPResult mergeFrom(final JsonSource input) throws IOException { 1386 if (!input.beginObject()) { 1387 return this; 1388 } 1389 while (!input.isAtEnd()) { 1390 switch (input.readFieldHash()) { 1391 case 1611140845: 1392 case -1580362060: { 1393 if (input.isAtField(FieldNames.estimatedPose)) { 1394 if (!input.trySkipNullValue()) { 1395 input.readMessage(estimatedPose); 1396 bitField0_ |= 0x00000001; 1397 } 1398 } else { 1399 input.skipUnknownField(); 1400 } 1401 break; 1402 } 1403 case -1358357200: 1404 case -283141570: { 1405 if (input.isAtField(FieldNames.fiducialIdsUsed)) { 1406 if (!input.trySkipNullValue()) { 1407 input.readRepeatedInt32(fiducialIdsUsed); 1408 bitField0_ |= 0x00000002; 1409 } 1410 } else { 1411 input.skipUnknownField(); 1412 } 1413 break; 1414 } 1415 default: { 1416 input.skipUnknownField(); 1417 break; 1418 } 1419 } 1420 } 1421 input.endObject(); 1422 return this; 1423 } 1424 1425 @Override 1426 public ProtobufMultiTargetPNPResult clone() { 1427 return new ProtobufMultiTargetPNPResult().copyFrom(this); 1428 } 1429 1430 @Override 1431 public boolean isEmpty() { 1432 return ((bitField0_) == 0); 1433 } 1434 1435 public static ProtobufMultiTargetPNPResult parseFrom(final byte[] data) throws 1436 InvalidProtocolBufferException { 1437 return ProtoMessage.mergeFrom(new ProtobufMultiTargetPNPResult(), data).checkInitialized(); 1438 } 1439 1440 public static ProtobufMultiTargetPNPResult parseFrom(final ProtoSource input) throws 1441 IOException { 1442 return ProtoMessage.mergeFrom(new ProtobufMultiTargetPNPResult(), input).checkInitialized(); 1443 } 1444 1445 public static ProtobufMultiTargetPNPResult parseFrom(final JsonSource input) throws 1446 IOException { 1447 return ProtoMessage.mergeFrom(new ProtobufMultiTargetPNPResult(), input).checkInitialized(); 1448 } 1449 1450 /** 1451 * @return factory for creating ProtobufMultiTargetPNPResult messages 1452 */ 1453 public static MessageFactory<ProtobufMultiTargetPNPResult> getFactory() { 1454 return ProtobufMultiTargetPNPResultFactory.INSTANCE; 1455 } 1456 1457 /** 1458 * @return this type's descriptor. 1459 */ 1460 public static Descriptors.Descriptor getDescriptor() { 1461 return Photon.photonvision_proto_ProtobufMultiTargetPNPResult_descriptor; 1462 } 1463 1464 private enum ProtobufMultiTargetPNPResultFactory implements MessageFactory<ProtobufMultiTargetPNPResult> { 1465 INSTANCE; 1466 1467 @Override 1468 public ProtobufMultiTargetPNPResult create() { 1469 return ProtobufMultiTargetPNPResult.newInstance(); 1470 } 1471 } 1472 1473 /** 1474 * Contains name constants used for serializing JSON 1475 */ 1476 static class FieldNames { 1477 static final FieldName estimatedPose = FieldName.forField("estimatedPose", "estimated_pose"); 1478 1479 static final FieldName fiducialIdsUsed = FieldName.forField("fiducialIdsUsed", "fiducial_ids_used"); 1480 } 1481 } 1482 1483 /** 1484 * Protobuf type {@code ProtobufPhotonTrackedTarget} 1485 */ 1486 public static final class ProtobufPhotonTrackedTarget extends ProtoMessage<ProtobufPhotonTrackedTarget> implements Cloneable { 1487 private static final long serialVersionUID = 0L; 1488 1489 /** 1490 * <code>optional double yaw = 1;</code> 1491 */ 1492 private double yaw; 1493 1494 /** 1495 * <code>optional double pitch = 2;</code> 1496 */ 1497 private double pitch; 1498 1499 /** 1500 * <code>optional double area = 3;</code> 1501 */ 1502 private double area; 1503 1504 /** 1505 * <code>optional double skew = 4;</code> 1506 */ 1507 private double skew; 1508 1509 /** 1510 * <code>optional double pose_ambiguity = 8;</code> 1511 */ 1512 private double poseAmbiguity; 1513 1514 /** 1515 * <code>optional float obj_detection_conf = 12;</code> 1516 */ 1517 private float objDetectionConf; 1518 1519 /** 1520 * <code>optional int32 fiducial_id = 5;</code> 1521 */ 1522 private int fiducialId; 1523 1524 /** 1525 * <code>optional int32 obj_detection_id = 11;</code> 1526 */ 1527 private int objDetectionId; 1528 1529 /** 1530 * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code> 1531 */ 1532 private final ProtobufTransform3d bestCameraToTarget = ProtobufTransform3d.newInstance(); 1533 1534 /** 1535 * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code> 1536 */ 1537 private final ProtobufTransform3d altCameraToTarget = ProtobufTransform3d.newInstance(); 1538 1539 /** 1540 * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code> 1541 */ 1542 private final RepeatedMessage<ProtobufTargetCorner> minAreaRectCorners = RepeatedMessage.newEmptyInstance(ProtobufTargetCorner.getFactory()); 1543 1544 /** 1545 * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code> 1546 */ 1547 private final RepeatedMessage<ProtobufTargetCorner> detectedCorners = RepeatedMessage.newEmptyInstance(ProtobufTargetCorner.getFactory()); 1548 1549 private ProtobufPhotonTrackedTarget() { 1550 } 1551 1552 /** 1553 * @return a new empty instance of {@code ProtobufPhotonTrackedTarget} 1554 */ 1555 public static ProtobufPhotonTrackedTarget newInstance() { 1556 return new ProtobufPhotonTrackedTarget(); 1557 } 1558 1559 /** 1560 * <code>optional double yaw = 1;</code> 1561 * @return whether the yaw field is set 1562 */ 1563 public boolean hasYaw() { 1564 return (bitField0_ & 0x00000001) != 0; 1565 } 1566 1567 /** 1568 * <code>optional double yaw = 1;</code> 1569 * @return this 1570 */ 1571 public ProtobufPhotonTrackedTarget clearYaw() { 1572 bitField0_ &= ~0x00000001; 1573 yaw = 0D; 1574 return this; 1575 } 1576 1577 /** 1578 * <code>optional double yaw = 1;</code> 1579 * @return the yaw 1580 */ 1581 public double getYaw() { 1582 return yaw; 1583 } 1584 1585 /** 1586 * <code>optional double yaw = 1;</code> 1587 * @param value the yaw to set 1588 * @return this 1589 */ 1590 public ProtobufPhotonTrackedTarget setYaw(final double value) { 1591 bitField0_ |= 0x00000001; 1592 yaw = value; 1593 return this; 1594 } 1595 1596 /** 1597 * <code>optional double pitch = 2;</code> 1598 * @return whether the pitch field is set 1599 */ 1600 public boolean hasPitch() { 1601 return (bitField0_ & 0x00000002) != 0; 1602 } 1603 1604 /** 1605 * <code>optional double pitch = 2;</code> 1606 * @return this 1607 */ 1608 public ProtobufPhotonTrackedTarget clearPitch() { 1609 bitField0_ &= ~0x00000002; 1610 pitch = 0D; 1611 return this; 1612 } 1613 1614 /** 1615 * <code>optional double pitch = 2;</code> 1616 * @return the pitch 1617 */ 1618 public double getPitch() { 1619 return pitch; 1620 } 1621 1622 /** 1623 * <code>optional double pitch = 2;</code> 1624 * @param value the pitch to set 1625 * @return this 1626 */ 1627 public ProtobufPhotonTrackedTarget setPitch(final double value) { 1628 bitField0_ |= 0x00000002; 1629 pitch = value; 1630 return this; 1631 } 1632 1633 /** 1634 * <code>optional double area = 3;</code> 1635 * @return whether the area field is set 1636 */ 1637 public boolean hasArea() { 1638 return (bitField0_ & 0x00000004) != 0; 1639 } 1640 1641 /** 1642 * <code>optional double area = 3;</code> 1643 * @return this 1644 */ 1645 public ProtobufPhotonTrackedTarget clearArea() { 1646 bitField0_ &= ~0x00000004; 1647 area = 0D; 1648 return this; 1649 } 1650 1651 /** 1652 * <code>optional double area = 3;</code> 1653 * @return the area 1654 */ 1655 public double getArea() { 1656 return area; 1657 } 1658 1659 /** 1660 * <code>optional double area = 3;</code> 1661 * @param value the area to set 1662 * @return this 1663 */ 1664 public ProtobufPhotonTrackedTarget setArea(final double value) { 1665 bitField0_ |= 0x00000004; 1666 area = value; 1667 return this; 1668 } 1669 1670 /** 1671 * <code>optional double skew = 4;</code> 1672 * @return whether the skew field is set 1673 */ 1674 public boolean hasSkew() { 1675 return (bitField0_ & 0x00000008) != 0; 1676 } 1677 1678 /** 1679 * <code>optional double skew = 4;</code> 1680 * @return this 1681 */ 1682 public ProtobufPhotonTrackedTarget clearSkew() { 1683 bitField0_ &= ~0x00000008; 1684 skew = 0D; 1685 return this; 1686 } 1687 1688 /** 1689 * <code>optional double skew = 4;</code> 1690 * @return the skew 1691 */ 1692 public double getSkew() { 1693 return skew; 1694 } 1695 1696 /** 1697 * <code>optional double skew = 4;</code> 1698 * @param value the skew to set 1699 * @return this 1700 */ 1701 public ProtobufPhotonTrackedTarget setSkew(final double value) { 1702 bitField0_ |= 0x00000008; 1703 skew = value; 1704 return this; 1705 } 1706 1707 /** 1708 * <code>optional double pose_ambiguity = 8;</code> 1709 * @return whether the poseAmbiguity field is set 1710 */ 1711 public boolean hasPoseAmbiguity() { 1712 return (bitField0_ & 0x00000010) != 0; 1713 } 1714 1715 /** 1716 * <code>optional double pose_ambiguity = 8;</code> 1717 * @return this 1718 */ 1719 public ProtobufPhotonTrackedTarget clearPoseAmbiguity() { 1720 bitField0_ &= ~0x00000010; 1721 poseAmbiguity = 0D; 1722 return this; 1723 } 1724 1725 /** 1726 * <code>optional double pose_ambiguity = 8;</code> 1727 * @return the poseAmbiguity 1728 */ 1729 public double getPoseAmbiguity() { 1730 return poseAmbiguity; 1731 } 1732 1733 /** 1734 * <code>optional double pose_ambiguity = 8;</code> 1735 * @param value the poseAmbiguity to set 1736 * @return this 1737 */ 1738 public ProtobufPhotonTrackedTarget setPoseAmbiguity(final double value) { 1739 bitField0_ |= 0x00000010; 1740 poseAmbiguity = value; 1741 return this; 1742 } 1743 1744 /** 1745 * <code>optional float obj_detection_conf = 12;</code> 1746 * @return whether the objDetectionConf field is set 1747 */ 1748 public boolean hasObjDetectionConf() { 1749 return (bitField0_ & 0x00000020) != 0; 1750 } 1751 1752 /** 1753 * <code>optional float obj_detection_conf = 12;</code> 1754 * @return this 1755 */ 1756 public ProtobufPhotonTrackedTarget clearObjDetectionConf() { 1757 bitField0_ &= ~0x00000020; 1758 objDetectionConf = 0F; 1759 return this; 1760 } 1761 1762 /** 1763 * <code>optional float obj_detection_conf = 12;</code> 1764 * @return the objDetectionConf 1765 */ 1766 public float getObjDetectionConf() { 1767 return objDetectionConf; 1768 } 1769 1770 /** 1771 * <code>optional float obj_detection_conf = 12;</code> 1772 * @param value the objDetectionConf to set 1773 * @return this 1774 */ 1775 public ProtobufPhotonTrackedTarget setObjDetectionConf(final float value) { 1776 bitField0_ |= 0x00000020; 1777 objDetectionConf = value; 1778 return this; 1779 } 1780 1781 /** 1782 * <code>optional int32 fiducial_id = 5;</code> 1783 * @return whether the fiducialId field is set 1784 */ 1785 public boolean hasFiducialId() { 1786 return (bitField0_ & 0x00000040) != 0; 1787 } 1788 1789 /** 1790 * <code>optional int32 fiducial_id = 5;</code> 1791 * @return this 1792 */ 1793 public ProtobufPhotonTrackedTarget clearFiducialId() { 1794 bitField0_ &= ~0x00000040; 1795 fiducialId = 0; 1796 return this; 1797 } 1798 1799 /** 1800 * <code>optional int32 fiducial_id = 5;</code> 1801 * @return the fiducialId 1802 */ 1803 public int getFiducialId() { 1804 return fiducialId; 1805 } 1806 1807 /** 1808 * <code>optional int32 fiducial_id = 5;</code> 1809 * @param value the fiducialId to set 1810 * @return this 1811 */ 1812 public ProtobufPhotonTrackedTarget setFiducialId(final int value) { 1813 bitField0_ |= 0x00000040; 1814 fiducialId = value; 1815 return this; 1816 } 1817 1818 /** 1819 * <code>optional int32 obj_detection_id = 11;</code> 1820 * @return whether the objDetectionId field is set 1821 */ 1822 public boolean hasObjDetectionId() { 1823 return (bitField0_ & 0x00000080) != 0; 1824 } 1825 1826 /** 1827 * <code>optional int32 obj_detection_id = 11;</code> 1828 * @return this 1829 */ 1830 public ProtobufPhotonTrackedTarget clearObjDetectionId() { 1831 bitField0_ &= ~0x00000080; 1832 objDetectionId = 0; 1833 return this; 1834 } 1835 1836 /** 1837 * <code>optional int32 obj_detection_id = 11;</code> 1838 * @return the objDetectionId 1839 */ 1840 public int getObjDetectionId() { 1841 return objDetectionId; 1842 } 1843 1844 /** 1845 * <code>optional int32 obj_detection_id = 11;</code> 1846 * @param value the objDetectionId to set 1847 * @return this 1848 */ 1849 public ProtobufPhotonTrackedTarget setObjDetectionId(final int value) { 1850 bitField0_ |= 0x00000080; 1851 objDetectionId = value; 1852 return this; 1853 } 1854 1855 /** 1856 * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code> 1857 * @return whether the bestCameraToTarget field is set 1858 */ 1859 public boolean hasBestCameraToTarget() { 1860 return (bitField0_ & 0x00000100) != 0; 1861 } 1862 1863 /** 1864 * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code> 1865 * @return this 1866 */ 1867 public ProtobufPhotonTrackedTarget clearBestCameraToTarget() { 1868 bitField0_ &= ~0x00000100; 1869 bestCameraToTarget.clear(); 1870 return this; 1871 } 1872 1873 /** 1874 * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code> 1875 * 1876 * This method returns the internal storage object without modifying any has state. 1877 * The returned object should not be modified and be treated as read-only. 1878 * 1879 * Use {@link #getMutableBestCameraToTarget()} if you want to modify it. 1880 * 1881 * @return internal storage object for reading 1882 */ 1883 public ProtobufTransform3d getBestCameraToTarget() { 1884 return bestCameraToTarget; 1885 } 1886 1887 /** 1888 * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code> 1889 * 1890 * This method returns the internal storage object and sets the corresponding 1891 * has state. The returned object will become part of this message and its 1892 * contents may be modified as long as the has state is not cleared. 1893 * 1894 * @return internal storage object for modifications 1895 */ 1896 public ProtobufTransform3d getMutableBestCameraToTarget() { 1897 bitField0_ |= 0x00000100; 1898 return bestCameraToTarget; 1899 } 1900 1901 /** 1902 * <code>optional .wpi.proto.ProtobufTransform3d best_camera_to_target = 6;</code> 1903 * @param value the bestCameraToTarget to set 1904 * @return this 1905 */ 1906 public ProtobufPhotonTrackedTarget setBestCameraToTarget(final ProtobufTransform3d value) { 1907 bitField0_ |= 0x00000100; 1908 bestCameraToTarget.copyFrom(value); 1909 return this; 1910 } 1911 1912 /** 1913 * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code> 1914 * @return whether the altCameraToTarget field is set 1915 */ 1916 public boolean hasAltCameraToTarget() { 1917 return (bitField0_ & 0x00000200) != 0; 1918 } 1919 1920 /** 1921 * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code> 1922 * @return this 1923 */ 1924 public ProtobufPhotonTrackedTarget clearAltCameraToTarget() { 1925 bitField0_ &= ~0x00000200; 1926 altCameraToTarget.clear(); 1927 return this; 1928 } 1929 1930 /** 1931 * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code> 1932 * 1933 * This method returns the internal storage object without modifying any has state. 1934 * The returned object should not be modified and be treated as read-only. 1935 * 1936 * Use {@link #getMutableAltCameraToTarget()} if you want to modify it. 1937 * 1938 * @return internal storage object for reading 1939 */ 1940 public ProtobufTransform3d getAltCameraToTarget() { 1941 return altCameraToTarget; 1942 } 1943 1944 /** 1945 * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code> 1946 * 1947 * This method returns the internal storage object and sets the corresponding 1948 * has state. The returned object will become part of this message and its 1949 * contents may be modified as long as the has state is not cleared. 1950 * 1951 * @return internal storage object for modifications 1952 */ 1953 public ProtobufTransform3d getMutableAltCameraToTarget() { 1954 bitField0_ |= 0x00000200; 1955 return altCameraToTarget; 1956 } 1957 1958 /** 1959 * <code>optional .wpi.proto.ProtobufTransform3d alt_camera_to_target = 7;</code> 1960 * @param value the altCameraToTarget to set 1961 * @return this 1962 */ 1963 public ProtobufPhotonTrackedTarget setAltCameraToTarget(final ProtobufTransform3d value) { 1964 bitField0_ |= 0x00000200; 1965 altCameraToTarget.copyFrom(value); 1966 return this; 1967 } 1968 1969 /** 1970 * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code> 1971 * @return whether the minAreaRectCorners field is set 1972 */ 1973 public boolean hasMinAreaRectCorners() { 1974 return (bitField0_ & 0x00000400) != 0; 1975 } 1976 1977 /** 1978 * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code> 1979 * @return this 1980 */ 1981 public ProtobufPhotonTrackedTarget clearMinAreaRectCorners() { 1982 bitField0_ &= ~0x00000400; 1983 minAreaRectCorners.clear(); 1984 return this; 1985 } 1986 1987 /** 1988 * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code> 1989 * 1990 * This method returns the internal storage object without modifying any has state. 1991 * The returned object should not be modified and be treated as read-only. 1992 * 1993 * Use {@link #getMutableMinAreaRectCorners()} if you want to modify it. 1994 * 1995 * @return internal storage object for reading 1996 */ 1997 public RepeatedMessage<ProtobufTargetCorner> getMinAreaRectCorners() { 1998 return minAreaRectCorners; 1999 } 2000 2001 /** 2002 * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code> 2003 * 2004 * This method returns the internal storage object and sets the corresponding 2005 * has state. The returned object will become part of this message and its 2006 * contents may be modified as long as the has state is not cleared. 2007 * 2008 * @return internal storage object for modifications 2009 */ 2010 public RepeatedMessage<ProtobufTargetCorner> getMutableMinAreaRectCorners() { 2011 bitField0_ |= 0x00000400; 2012 return minAreaRectCorners; 2013 } 2014 2015 /** 2016 * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code> 2017 * @param value the minAreaRectCorners to add 2018 * @return this 2019 */ 2020 public ProtobufPhotonTrackedTarget addMinAreaRectCorners(final ProtobufTargetCorner value) { 2021 bitField0_ |= 0x00000400; 2022 minAreaRectCorners.add(value); 2023 return this; 2024 } 2025 2026 /** 2027 * <code>repeated .photonvision.proto.ProtobufTargetCorner min_area_rect_corners = 9;</code> 2028 * @param values the minAreaRectCorners to add 2029 * @return this 2030 */ 2031 public ProtobufPhotonTrackedTarget addAllMinAreaRectCorners( 2032 final ProtobufTargetCorner... values) { 2033 bitField0_ |= 0x00000400; 2034 minAreaRectCorners.addAll(values); 2035 return this; 2036 } 2037 2038 /** 2039 * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code> 2040 * @return whether the detectedCorners field is set 2041 */ 2042 public boolean hasDetectedCorners() { 2043 return (bitField0_ & 0x00000800) != 0; 2044 } 2045 2046 /** 2047 * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code> 2048 * @return this 2049 */ 2050 public ProtobufPhotonTrackedTarget clearDetectedCorners() { 2051 bitField0_ &= ~0x00000800; 2052 detectedCorners.clear(); 2053 return this; 2054 } 2055 2056 /** 2057 * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code> 2058 * 2059 * This method returns the internal storage object without modifying any has state. 2060 * The returned object should not be modified and be treated as read-only. 2061 * 2062 * Use {@link #getMutableDetectedCorners()} if you want to modify it. 2063 * 2064 * @return internal storage object for reading 2065 */ 2066 public RepeatedMessage<ProtobufTargetCorner> getDetectedCorners() { 2067 return detectedCorners; 2068 } 2069 2070 /** 2071 * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code> 2072 * 2073 * This method returns the internal storage object and sets the corresponding 2074 * has state. The returned object will become part of this message and its 2075 * contents may be modified as long as the has state is not cleared. 2076 * 2077 * @return internal storage object for modifications 2078 */ 2079 public RepeatedMessage<ProtobufTargetCorner> getMutableDetectedCorners() { 2080 bitField0_ |= 0x00000800; 2081 return detectedCorners; 2082 } 2083 2084 /** 2085 * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code> 2086 * @param value the detectedCorners to add 2087 * @return this 2088 */ 2089 public ProtobufPhotonTrackedTarget addDetectedCorners(final ProtobufTargetCorner value) { 2090 bitField0_ |= 0x00000800; 2091 detectedCorners.add(value); 2092 return this; 2093 } 2094 2095 /** 2096 * <code>repeated .photonvision.proto.ProtobufTargetCorner detected_corners = 10;</code> 2097 * @param values the detectedCorners to add 2098 * @return this 2099 */ 2100 public ProtobufPhotonTrackedTarget addAllDetectedCorners(final ProtobufTargetCorner... values) { 2101 bitField0_ |= 0x00000800; 2102 detectedCorners.addAll(values); 2103 return this; 2104 } 2105 2106 @Override 2107 public ProtobufPhotonTrackedTarget copyFrom(final ProtobufPhotonTrackedTarget other) { 2108 cachedSize = other.cachedSize; 2109 if ((bitField0_ | other.bitField0_) != 0) { 2110 bitField0_ = other.bitField0_; 2111 yaw = other.yaw; 2112 pitch = other.pitch; 2113 area = other.area; 2114 skew = other.skew; 2115 poseAmbiguity = other.poseAmbiguity; 2116 objDetectionConf = other.objDetectionConf; 2117 fiducialId = other.fiducialId; 2118 objDetectionId = other.objDetectionId; 2119 bestCameraToTarget.copyFrom(other.bestCameraToTarget); 2120 altCameraToTarget.copyFrom(other.altCameraToTarget); 2121 minAreaRectCorners.copyFrom(other.minAreaRectCorners); 2122 detectedCorners.copyFrom(other.detectedCorners); 2123 } 2124 return this; 2125 } 2126 2127 @Override 2128 public ProtobufPhotonTrackedTarget mergeFrom(final ProtobufPhotonTrackedTarget other) { 2129 if (other.isEmpty()) { 2130 return this; 2131 } 2132 cachedSize = -1; 2133 if (other.hasYaw()) { 2134 setYaw(other.yaw); 2135 } 2136 if (other.hasPitch()) { 2137 setPitch(other.pitch); 2138 } 2139 if (other.hasArea()) { 2140 setArea(other.area); 2141 } 2142 if (other.hasSkew()) { 2143 setSkew(other.skew); 2144 } 2145 if (other.hasPoseAmbiguity()) { 2146 setPoseAmbiguity(other.poseAmbiguity); 2147 } 2148 if (other.hasObjDetectionConf()) { 2149 setObjDetectionConf(other.objDetectionConf); 2150 } 2151 if (other.hasFiducialId()) { 2152 setFiducialId(other.fiducialId); 2153 } 2154 if (other.hasObjDetectionId()) { 2155 setObjDetectionId(other.objDetectionId); 2156 } 2157 if (other.hasBestCameraToTarget()) { 2158 getMutableBestCameraToTarget().mergeFrom(other.bestCameraToTarget); 2159 } 2160 if (other.hasAltCameraToTarget()) { 2161 getMutableAltCameraToTarget().mergeFrom(other.altCameraToTarget); 2162 } 2163 if (other.hasMinAreaRectCorners()) { 2164 getMutableMinAreaRectCorners().addAll(other.minAreaRectCorners); 2165 } 2166 if (other.hasDetectedCorners()) { 2167 getMutableDetectedCorners().addAll(other.detectedCorners); 2168 } 2169 return this; 2170 } 2171 2172 @Override 2173 public ProtobufPhotonTrackedTarget clear() { 2174 if (isEmpty()) { 2175 return this; 2176 } 2177 cachedSize = -1; 2178 bitField0_ = 0; 2179 yaw = 0D; 2180 pitch = 0D; 2181 area = 0D; 2182 skew = 0D; 2183 poseAmbiguity = 0D; 2184 objDetectionConf = 0F; 2185 fiducialId = 0; 2186 objDetectionId = 0; 2187 bestCameraToTarget.clear(); 2188 altCameraToTarget.clear(); 2189 minAreaRectCorners.clear(); 2190 detectedCorners.clear(); 2191 return this; 2192 } 2193 2194 @Override 2195 public ProtobufPhotonTrackedTarget clearQuick() { 2196 if (isEmpty()) { 2197 return this; 2198 } 2199 cachedSize = -1; 2200 bitField0_ = 0; 2201 bestCameraToTarget.clearQuick(); 2202 altCameraToTarget.clearQuick(); 2203 minAreaRectCorners.clearQuick(); 2204 detectedCorners.clearQuick(); 2205 return this; 2206 } 2207 2208 @Override 2209 public boolean equals(Object o) { 2210 if (o == this) { 2211 return true; 2212 } 2213 if (!(o instanceof ProtobufPhotonTrackedTarget)) { 2214 return false; 2215 } 2216 ProtobufPhotonTrackedTarget other = (ProtobufPhotonTrackedTarget) o; 2217 return bitField0_ == other.bitField0_ 2218 && (!hasYaw() || ProtoUtil.isEqual(yaw, other.yaw)) 2219 && (!hasPitch() || ProtoUtil.isEqual(pitch, other.pitch)) 2220 && (!hasArea() || ProtoUtil.isEqual(area, other.area)) 2221 && (!hasSkew() || ProtoUtil.isEqual(skew, other.skew)) 2222 && (!hasPoseAmbiguity() || ProtoUtil.isEqual(poseAmbiguity, other.poseAmbiguity)) 2223 && (!hasObjDetectionConf() || ProtoUtil.isEqual(objDetectionConf, other.objDetectionConf)) 2224 && (!hasFiducialId() || fiducialId == other.fiducialId) 2225 && (!hasObjDetectionId() || objDetectionId == other.objDetectionId) 2226 && (!hasBestCameraToTarget() || bestCameraToTarget.equals(other.bestCameraToTarget)) 2227 && (!hasAltCameraToTarget() || altCameraToTarget.equals(other.altCameraToTarget)) 2228 && (!hasMinAreaRectCorners() || minAreaRectCorners.equals(other.minAreaRectCorners)) 2229 && (!hasDetectedCorners() || detectedCorners.equals(other.detectedCorners)); 2230 } 2231 2232 @Override 2233 public void writeTo(final ProtoSink output) throws IOException { 2234 if ((bitField0_ & 0x00000001) != 0) { 2235 output.writeRawByte((byte) 9); 2236 output.writeDoubleNoTag(yaw); 2237 } 2238 if ((bitField0_ & 0x00000002) != 0) { 2239 output.writeRawByte((byte) 17); 2240 output.writeDoubleNoTag(pitch); 2241 } 2242 if ((bitField0_ & 0x00000004) != 0) { 2243 output.writeRawByte((byte) 25); 2244 output.writeDoubleNoTag(area); 2245 } 2246 if ((bitField0_ & 0x00000008) != 0) { 2247 output.writeRawByte((byte) 33); 2248 output.writeDoubleNoTag(skew); 2249 } 2250 if ((bitField0_ & 0x00000010) != 0) { 2251 output.writeRawByte((byte) 65); 2252 output.writeDoubleNoTag(poseAmbiguity); 2253 } 2254 if ((bitField0_ & 0x00000020) != 0) { 2255 output.writeRawByte((byte) 101); 2256 output.writeFloatNoTag(objDetectionConf); 2257 } 2258 if ((bitField0_ & 0x00000040) != 0) { 2259 output.writeRawByte((byte) 40); 2260 output.writeInt32NoTag(fiducialId); 2261 } 2262 if ((bitField0_ & 0x00000080) != 0) { 2263 output.writeRawByte((byte) 88); 2264 output.writeInt32NoTag(objDetectionId); 2265 } 2266 if ((bitField0_ & 0x00000100) != 0) { 2267 output.writeRawByte((byte) 50); 2268 output.writeMessageNoTag(bestCameraToTarget); 2269 } 2270 if ((bitField0_ & 0x00000200) != 0) { 2271 output.writeRawByte((byte) 58); 2272 output.writeMessageNoTag(altCameraToTarget); 2273 } 2274 if ((bitField0_ & 0x00000400) != 0) { 2275 for (int i = 0; i < minAreaRectCorners.length(); i++) { 2276 output.writeRawByte((byte) 74); 2277 output.writeMessageNoTag(minAreaRectCorners.get(i)); 2278 } 2279 } 2280 if ((bitField0_ & 0x00000800) != 0) { 2281 for (int i = 0; i < detectedCorners.length(); i++) { 2282 output.writeRawByte((byte) 82); 2283 output.writeMessageNoTag(detectedCorners.get(i)); 2284 } 2285 } 2286 } 2287 2288 @Override 2289 protected int computeSerializedSize() { 2290 int size = 0; 2291 if ((bitField0_ & 0x00000001) != 0) { 2292 size += 9; 2293 } 2294 if ((bitField0_ & 0x00000002) != 0) { 2295 size += 9; 2296 } 2297 if ((bitField0_ & 0x00000004) != 0) { 2298 size += 9; 2299 } 2300 if ((bitField0_ & 0x00000008) != 0) { 2301 size += 9; 2302 } 2303 if ((bitField0_ & 0x00000010) != 0) { 2304 size += 9; 2305 } 2306 if ((bitField0_ & 0x00000020) != 0) { 2307 size += 5; 2308 } 2309 if ((bitField0_ & 0x00000040) != 0) { 2310 size += 1 + ProtoSink.computeInt32SizeNoTag(fiducialId); 2311 } 2312 if ((bitField0_ & 0x00000080) != 0) { 2313 size += 1 + ProtoSink.computeInt32SizeNoTag(objDetectionId); 2314 } 2315 if ((bitField0_ & 0x00000100) != 0) { 2316 size += 1 + ProtoSink.computeMessageSizeNoTag(bestCameraToTarget); 2317 } 2318 if ((bitField0_ & 0x00000200) != 0) { 2319 size += 1 + ProtoSink.computeMessageSizeNoTag(altCameraToTarget); 2320 } 2321 if ((bitField0_ & 0x00000400) != 0) { 2322 size += (1 * minAreaRectCorners.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(minAreaRectCorners); 2323 } 2324 if ((bitField0_ & 0x00000800) != 0) { 2325 size += (1 * detectedCorners.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(detectedCorners); 2326 } 2327 return size; 2328 } 2329 2330 @Override 2331 @SuppressWarnings("fallthrough") 2332 public ProtobufPhotonTrackedTarget mergeFrom(final ProtoSource input) throws IOException { 2333 // Enabled Fall-Through Optimization (QuickBuffers) 2334 int tag = input.readTag(); 2335 while (true) { 2336 switch (tag) { 2337 case 9: { 2338 // yaw 2339 yaw = input.readDouble(); 2340 bitField0_ |= 0x00000001; 2341 tag = input.readTag(); 2342 if (tag != 17) { 2343 break; 2344 } 2345 } 2346 case 17: { 2347 // pitch 2348 pitch = input.readDouble(); 2349 bitField0_ |= 0x00000002; 2350 tag = input.readTag(); 2351 if (tag != 25) { 2352 break; 2353 } 2354 } 2355 case 25: { 2356 // area 2357 area = input.readDouble(); 2358 bitField0_ |= 0x00000004; 2359 tag = input.readTag(); 2360 if (tag != 33) { 2361 break; 2362 } 2363 } 2364 case 33: { 2365 // skew 2366 skew = input.readDouble(); 2367 bitField0_ |= 0x00000008; 2368 tag = input.readTag(); 2369 if (tag != 65) { 2370 break; 2371 } 2372 } 2373 case 65: { 2374 // poseAmbiguity 2375 poseAmbiguity = input.readDouble(); 2376 bitField0_ |= 0x00000010; 2377 tag = input.readTag(); 2378 if (tag != 101) { 2379 break; 2380 } 2381 } 2382 case 101: { 2383 // objDetectionConf 2384 objDetectionConf = input.readFloat(); 2385 bitField0_ |= 0x00000020; 2386 tag = input.readTag(); 2387 if (tag != 40) { 2388 break; 2389 } 2390 } 2391 case 40: { 2392 // fiducialId 2393 fiducialId = input.readInt32(); 2394 bitField0_ |= 0x00000040; 2395 tag = input.readTag(); 2396 if (tag != 88) { 2397 break; 2398 } 2399 } 2400 case 88: { 2401 // objDetectionId 2402 objDetectionId = input.readInt32(); 2403 bitField0_ |= 0x00000080; 2404 tag = input.readTag(); 2405 if (tag != 50) { 2406 break; 2407 } 2408 } 2409 case 50: { 2410 // bestCameraToTarget 2411 input.readMessage(bestCameraToTarget); 2412 bitField0_ |= 0x00000100; 2413 tag = input.readTag(); 2414 if (tag != 58) { 2415 break; 2416 } 2417 } 2418 case 58: { 2419 // altCameraToTarget 2420 input.readMessage(altCameraToTarget); 2421 bitField0_ |= 0x00000200; 2422 tag = input.readTag(); 2423 if (tag != 74) { 2424 break; 2425 } 2426 } 2427 case 74: { 2428 // minAreaRectCorners 2429 tag = input.readRepeatedMessage(minAreaRectCorners, tag); 2430 bitField0_ |= 0x00000400; 2431 if (tag != 82) { 2432 break; 2433 } 2434 } 2435 case 82: { 2436 // detectedCorners 2437 tag = input.readRepeatedMessage(detectedCorners, tag); 2438 bitField0_ |= 0x00000800; 2439 if (tag != 0) { 2440 break; 2441 } 2442 } 2443 case 0: { 2444 return this; 2445 } 2446 default: { 2447 if (!input.skipField(tag)) { 2448 return this; 2449 } 2450 tag = input.readTag(); 2451 break; 2452 } 2453 } 2454 } 2455 } 2456 2457 @Override 2458 public void writeTo(final JsonSink output) throws IOException { 2459 output.beginObject(); 2460 if ((bitField0_ & 0x00000001) != 0) { 2461 output.writeDouble(FieldNames.yaw, yaw); 2462 } 2463 if ((bitField0_ & 0x00000002) != 0) { 2464 output.writeDouble(FieldNames.pitch, pitch); 2465 } 2466 if ((bitField0_ & 0x00000004) != 0) { 2467 output.writeDouble(FieldNames.area, area); 2468 } 2469 if ((bitField0_ & 0x00000008) != 0) { 2470 output.writeDouble(FieldNames.skew, skew); 2471 } 2472 if ((bitField0_ & 0x00000010) != 0) { 2473 output.writeDouble(FieldNames.poseAmbiguity, poseAmbiguity); 2474 } 2475 if ((bitField0_ & 0x00000020) != 0) { 2476 output.writeFloat(FieldNames.objDetectionConf, objDetectionConf); 2477 } 2478 if ((bitField0_ & 0x00000040) != 0) { 2479 output.writeInt32(FieldNames.fiducialId, fiducialId); 2480 } 2481 if ((bitField0_ & 0x00000080) != 0) { 2482 output.writeInt32(FieldNames.objDetectionId, objDetectionId); 2483 } 2484 if ((bitField0_ & 0x00000100) != 0) { 2485 output.writeMessage(FieldNames.bestCameraToTarget, bestCameraToTarget); 2486 } 2487 if ((bitField0_ & 0x00000200) != 0) { 2488 output.writeMessage(FieldNames.altCameraToTarget, altCameraToTarget); 2489 } 2490 if ((bitField0_ & 0x00000400) != 0) { 2491 output.writeRepeatedMessage(FieldNames.minAreaRectCorners, minAreaRectCorners); 2492 } 2493 if ((bitField0_ & 0x00000800) != 0) { 2494 output.writeRepeatedMessage(FieldNames.detectedCorners, detectedCorners); 2495 } 2496 output.endObject(); 2497 } 2498 2499 @Override 2500 public ProtobufPhotonTrackedTarget mergeFrom(final JsonSource input) throws IOException { 2501 if (!input.beginObject()) { 2502 return this; 2503 } 2504 while (!input.isAtEnd()) { 2505 switch (input.readFieldHash()) { 2506 case 119407: { 2507 if (input.isAtField(FieldNames.yaw)) { 2508 if (!input.trySkipNullValue()) { 2509 yaw = input.readDouble(); 2510 bitField0_ |= 0x00000001; 2511 } 2512 } else { 2513 input.skipUnknownField(); 2514 } 2515 break; 2516 } 2517 case 106677056: { 2518 if (input.isAtField(FieldNames.pitch)) { 2519 if (!input.trySkipNullValue()) { 2520 pitch = input.readDouble(); 2521 bitField0_ |= 0x00000002; 2522 } 2523 } else { 2524 input.skipUnknownField(); 2525 } 2526 break; 2527 } 2528 case 3002509: { 2529 if (input.isAtField(FieldNames.area)) { 2530 if (!input.trySkipNullValue()) { 2531 area = input.readDouble(); 2532 bitField0_ |= 0x00000004; 2533 } 2534 } else { 2535 input.skipUnknownField(); 2536 } 2537 break; 2538 } 2539 case 3532042: { 2540 if (input.isAtField(FieldNames.skew)) { 2541 if (!input.trySkipNullValue()) { 2542 skew = input.readDouble(); 2543 bitField0_ |= 0x00000008; 2544 } 2545 } else { 2546 input.skipUnknownField(); 2547 } 2548 break; 2549 } 2550 case -863925796: 2551 case 2015412543: { 2552 if (input.isAtField(FieldNames.poseAmbiguity)) { 2553 if (!input.trySkipNullValue()) { 2554 poseAmbiguity = input.readDouble(); 2555 bitField0_ |= 0x00000010; 2556 } 2557 } else { 2558 input.skipUnknownField(); 2559 } 2560 break; 2561 } 2562 case -719868014: 2563 case 1574878438: { 2564 if (input.isAtField(FieldNames.objDetectionConf)) { 2565 if (!input.trySkipNullValue()) { 2566 objDetectionConf = input.readFloat(); 2567 bitField0_ |= 0x00000020; 2568 } 2569 } else { 2570 input.skipUnknownField(); 2571 } 2572 break; 2573 } 2574 case -1788324448: 2575 case 396538357: { 2576 if (input.isAtField(FieldNames.fiducialId)) { 2577 if (!input.trySkipNullValue()) { 2578 fiducialId = input.readInt32(); 2579 bitField0_ |= 0x00000040; 2580 } 2581 } else { 2582 input.skipUnknownField(); 2583 } 2584 break; 2585 } 2586 case -966110967: 2587 case 175940445: { 2588 if (input.isAtField(FieldNames.objDetectionId)) { 2589 if (!input.trySkipNullValue()) { 2590 objDetectionId = input.readInt32(); 2591 bitField0_ |= 0x00000080; 2592 } 2593 } else { 2594 input.skipUnknownField(); 2595 } 2596 break; 2597 } 2598 case 832264501: 2599 case 1280922678: { 2600 if (input.isAtField(FieldNames.bestCameraToTarget)) { 2601 if (!input.trySkipNullValue()) { 2602 input.readMessage(bestCameraToTarget); 2603 bitField0_ |= 0x00000100; 2604 } 2605 } else { 2606 input.skipUnknownField(); 2607 } 2608 break; 2609 } 2610 case -2078392262: 2611 case 1000035089: { 2612 if (input.isAtField(FieldNames.altCameraToTarget)) { 2613 if (!input.trySkipNullValue()) { 2614 input.readMessage(altCameraToTarget); 2615 bitField0_ |= 0x00000200; 2616 } 2617 } else { 2618 input.skipUnknownField(); 2619 } 2620 break; 2621 } 2622 case 886128315: 2623 case -694043864: { 2624 if (input.isAtField(FieldNames.minAreaRectCorners)) { 2625 if (!input.trySkipNullValue()) { 2626 input.readRepeatedMessage(minAreaRectCorners); 2627 bitField0_ |= 0x00000400; 2628 } 2629 } else { 2630 input.skipUnknownField(); 2631 } 2632 break; 2633 } 2634 case 1199465436: 2635 case -2059275263: { 2636 if (input.isAtField(FieldNames.detectedCorners)) { 2637 if (!input.trySkipNullValue()) { 2638 input.readRepeatedMessage(detectedCorners); 2639 bitField0_ |= 0x00000800; 2640 } 2641 } else { 2642 input.skipUnknownField(); 2643 } 2644 break; 2645 } 2646 default: { 2647 input.skipUnknownField(); 2648 break; 2649 } 2650 } 2651 } 2652 input.endObject(); 2653 return this; 2654 } 2655 2656 @Override 2657 public ProtobufPhotonTrackedTarget clone() { 2658 return new ProtobufPhotonTrackedTarget().copyFrom(this); 2659 } 2660 2661 @Override 2662 public boolean isEmpty() { 2663 return ((bitField0_) == 0); 2664 } 2665 2666 public static ProtobufPhotonTrackedTarget parseFrom(final byte[] data) throws 2667 InvalidProtocolBufferException { 2668 return ProtoMessage.mergeFrom(new ProtobufPhotonTrackedTarget(), data).checkInitialized(); 2669 } 2670 2671 public static ProtobufPhotonTrackedTarget parseFrom(final ProtoSource input) throws 2672 IOException { 2673 return ProtoMessage.mergeFrom(new ProtobufPhotonTrackedTarget(), input).checkInitialized(); 2674 } 2675 2676 public static ProtobufPhotonTrackedTarget parseFrom(final JsonSource input) throws IOException { 2677 return ProtoMessage.mergeFrom(new ProtobufPhotonTrackedTarget(), input).checkInitialized(); 2678 } 2679 2680 /** 2681 * @return factory for creating ProtobufPhotonTrackedTarget messages 2682 */ 2683 public static MessageFactory<ProtobufPhotonTrackedTarget> getFactory() { 2684 return ProtobufPhotonTrackedTargetFactory.INSTANCE; 2685 } 2686 2687 /** 2688 * @return this type's descriptor. 2689 */ 2690 public static Descriptors.Descriptor getDescriptor() { 2691 return Photon.photonvision_proto_ProtobufPhotonTrackedTarget_descriptor; 2692 } 2693 2694 private enum ProtobufPhotonTrackedTargetFactory implements MessageFactory<ProtobufPhotonTrackedTarget> { 2695 INSTANCE; 2696 2697 @Override 2698 public ProtobufPhotonTrackedTarget create() { 2699 return ProtobufPhotonTrackedTarget.newInstance(); 2700 } 2701 } 2702 2703 /** 2704 * Contains name constants used for serializing JSON 2705 */ 2706 static class FieldNames { 2707 static final FieldName yaw = FieldName.forField("yaw"); 2708 2709 static final FieldName pitch = FieldName.forField("pitch"); 2710 2711 static final FieldName area = FieldName.forField("area"); 2712 2713 static final FieldName skew = FieldName.forField("skew"); 2714 2715 static final FieldName poseAmbiguity = FieldName.forField("poseAmbiguity", "pose_ambiguity"); 2716 2717 static final FieldName objDetectionConf = FieldName.forField("objDetectionConf", "obj_detection_conf"); 2718 2719 static final FieldName fiducialId = FieldName.forField("fiducialId", "fiducial_id"); 2720 2721 static final FieldName objDetectionId = FieldName.forField("objDetectionId", "obj_detection_id"); 2722 2723 static final FieldName bestCameraToTarget = FieldName.forField("bestCameraToTarget", "best_camera_to_target"); 2724 2725 static final FieldName altCameraToTarget = FieldName.forField("altCameraToTarget", "alt_camera_to_target"); 2726 2727 static final FieldName minAreaRectCorners = FieldName.forField("minAreaRectCorners", "min_area_rect_corners"); 2728 2729 static final FieldName detectedCorners = FieldName.forField("detectedCorners", "detected_corners"); 2730 } 2731 } 2732 2733 /** 2734 * Protobuf type {@code ProtobufPhotonPipelineResult} 2735 */ 2736 public static final class ProtobufPhotonPipelineResult extends ProtoMessage<ProtobufPhotonPipelineResult> implements Cloneable { 2737 private static final long serialVersionUID = 0L; 2738 2739 /** 2740 * <code>optional double latency_ms = 1;</code> 2741 */ 2742 private double latencyMs; 2743 2744 /** 2745 * <code>optional int64 sequence_id = 4;</code> 2746 */ 2747 private long sequenceId; 2748 2749 /** 2750 * <code>optional int64 capture_timestamp_micros = 5;</code> 2751 */ 2752 private long captureTimestampMicros; 2753 2754 /** 2755 * <code>optional int64 nt_publish_timestamp_micros = 6;</code> 2756 */ 2757 private long ntPublishTimestampMicros; 2758 2759 /** 2760 * <code>optional int64 time_since_last_pong_micros = 7;</code> 2761 */ 2762 private long timeSinceLastPongMicros; 2763 2764 /** 2765 * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code> 2766 */ 2767 private final ProtobufMultiTargetPNPResult multiTargetResult = ProtobufMultiTargetPNPResult.newInstance(); 2768 2769 /** 2770 * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code> 2771 */ 2772 private final RepeatedMessage<ProtobufPhotonTrackedTarget> targets = RepeatedMessage.newEmptyInstance(ProtobufPhotonTrackedTarget.getFactory()); 2773 2774 private ProtobufPhotonPipelineResult() { 2775 } 2776 2777 /** 2778 * @return a new empty instance of {@code ProtobufPhotonPipelineResult} 2779 */ 2780 public static ProtobufPhotonPipelineResult newInstance() { 2781 return new ProtobufPhotonPipelineResult(); 2782 } 2783 2784 /** 2785 * <code>optional double latency_ms = 1;</code> 2786 * @return whether the latencyMs field is set 2787 */ 2788 @Deprecated 2789 public boolean hasLatencyMs() { 2790 return (bitField0_ & 0x00000002) != 0; 2791 } 2792 2793 /** 2794 * <code>optional double latency_ms = 1;</code> 2795 * @return this 2796 */ 2797 @Deprecated 2798 public ProtobufPhotonPipelineResult clearLatencyMs() { 2799 bitField0_ &= ~0x00000002; 2800 latencyMs = 0D; 2801 return this; 2802 } 2803 2804 /** 2805 * <code>optional double latency_ms = 1;</code> 2806 * @return the latencyMs 2807 */ 2808 @Deprecated 2809 public double getLatencyMs() { 2810 return latencyMs; 2811 } 2812 2813 /** 2814 * <code>optional double latency_ms = 1;</code> 2815 * @param value the latencyMs to set 2816 * @return this 2817 */ 2818 @Deprecated 2819 public ProtobufPhotonPipelineResult setLatencyMs(final double value) { 2820 bitField0_ |= 0x00000002; 2821 latencyMs = value; 2822 return this; 2823 } 2824 2825 /** 2826 * <code>optional int64 sequence_id = 4;</code> 2827 * @return whether the sequenceId field is set 2828 */ 2829 public boolean hasSequenceId() { 2830 return (bitField0_ & 0x00000004) != 0; 2831 } 2832 2833 /** 2834 * <code>optional int64 sequence_id = 4;</code> 2835 * @return this 2836 */ 2837 public ProtobufPhotonPipelineResult clearSequenceId() { 2838 bitField0_ &= ~0x00000004; 2839 sequenceId = 0L; 2840 return this; 2841 } 2842 2843 /** 2844 * <code>optional int64 sequence_id = 4;</code> 2845 * @return the sequenceId 2846 */ 2847 public long getSequenceId() { 2848 return sequenceId; 2849 } 2850 2851 /** 2852 * <code>optional int64 sequence_id = 4;</code> 2853 * @param value the sequenceId to set 2854 * @return this 2855 */ 2856 public ProtobufPhotonPipelineResult setSequenceId(final long value) { 2857 bitField0_ |= 0x00000004; 2858 sequenceId = value; 2859 return this; 2860 } 2861 2862 /** 2863 * <code>optional int64 capture_timestamp_micros = 5;</code> 2864 * @return whether the captureTimestampMicros field is set 2865 */ 2866 public boolean hasCaptureTimestampMicros() { 2867 return (bitField0_ & 0x00000008) != 0; 2868 } 2869 2870 /** 2871 * <code>optional int64 capture_timestamp_micros = 5;</code> 2872 * @return this 2873 */ 2874 public ProtobufPhotonPipelineResult clearCaptureTimestampMicros() { 2875 bitField0_ &= ~0x00000008; 2876 captureTimestampMicros = 0L; 2877 return this; 2878 } 2879 2880 /** 2881 * <code>optional int64 capture_timestamp_micros = 5;</code> 2882 * @return the captureTimestampMicros 2883 */ 2884 public long getCaptureTimestampMicros() { 2885 return captureTimestampMicros; 2886 } 2887 2888 /** 2889 * <code>optional int64 capture_timestamp_micros = 5;</code> 2890 * @param value the captureTimestampMicros to set 2891 * @return this 2892 */ 2893 public ProtobufPhotonPipelineResult setCaptureTimestampMicros(final long value) { 2894 bitField0_ |= 0x00000008; 2895 captureTimestampMicros = value; 2896 return this; 2897 } 2898 2899 /** 2900 * <code>optional int64 nt_publish_timestamp_micros = 6;</code> 2901 * @return whether the ntPublishTimestampMicros field is set 2902 */ 2903 public boolean hasNtPublishTimestampMicros() { 2904 return (bitField0_ & 0x00000010) != 0; 2905 } 2906 2907 /** 2908 * <code>optional int64 nt_publish_timestamp_micros = 6;</code> 2909 * @return this 2910 */ 2911 public ProtobufPhotonPipelineResult clearNtPublishTimestampMicros() { 2912 bitField0_ &= ~0x00000010; 2913 ntPublishTimestampMicros = 0L; 2914 return this; 2915 } 2916 2917 /** 2918 * <code>optional int64 nt_publish_timestamp_micros = 6;</code> 2919 * @return the ntPublishTimestampMicros 2920 */ 2921 public long getNtPublishTimestampMicros() { 2922 return ntPublishTimestampMicros; 2923 } 2924 2925 /** 2926 * <code>optional int64 nt_publish_timestamp_micros = 6;</code> 2927 * @param value the ntPublishTimestampMicros to set 2928 * @return this 2929 */ 2930 public ProtobufPhotonPipelineResult setNtPublishTimestampMicros(final long value) { 2931 bitField0_ |= 0x00000010; 2932 ntPublishTimestampMicros = value; 2933 return this; 2934 } 2935 2936 /** 2937 * <code>optional int64 time_since_last_pong_micros = 7;</code> 2938 * @return whether the timeSinceLastPongMicros field is set 2939 */ 2940 public boolean hasTimeSinceLastPongMicros() { 2941 return (bitField0_ & 0x00000020) != 0; 2942 } 2943 2944 /** 2945 * <code>optional int64 time_since_last_pong_micros = 7;</code> 2946 * @return this 2947 */ 2948 public ProtobufPhotonPipelineResult clearTimeSinceLastPongMicros() { 2949 bitField0_ &= ~0x00000020; 2950 timeSinceLastPongMicros = 0L; 2951 return this; 2952 } 2953 2954 /** 2955 * <code>optional int64 time_since_last_pong_micros = 7;</code> 2956 * @return the timeSinceLastPongMicros 2957 */ 2958 public long getTimeSinceLastPongMicros() { 2959 return timeSinceLastPongMicros; 2960 } 2961 2962 /** 2963 * <code>optional int64 time_since_last_pong_micros = 7;</code> 2964 * @param value the timeSinceLastPongMicros to set 2965 * @return this 2966 */ 2967 public ProtobufPhotonPipelineResult setTimeSinceLastPongMicros(final long value) { 2968 bitField0_ |= 0x00000020; 2969 timeSinceLastPongMicros = value; 2970 return this; 2971 } 2972 2973 /** 2974 * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code> 2975 * @return whether the multiTargetResult field is set 2976 */ 2977 public boolean hasMultiTargetResult() { 2978 return (bitField0_ & 0x00000001) != 0; 2979 } 2980 2981 /** 2982 * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code> 2983 * @return this 2984 */ 2985 public ProtobufPhotonPipelineResult clearMultiTargetResult() { 2986 bitField0_ &= ~0x00000001; 2987 multiTargetResult.clear(); 2988 return this; 2989 } 2990 2991 /** 2992 * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code> 2993 * 2994 * This method returns the internal storage object without modifying any has state. 2995 * The returned object should not be modified and be treated as read-only. 2996 * 2997 * Use {@link #getMutableMultiTargetResult()} if you want to modify it. 2998 * 2999 * @return internal storage object for reading 3000 */ 3001 public ProtobufMultiTargetPNPResult getMultiTargetResult() { 3002 return multiTargetResult; 3003 } 3004 3005 /** 3006 * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code> 3007 * 3008 * This method returns the internal storage object and sets the corresponding 3009 * has state. The returned object will become part of this message and its 3010 * contents may be modified as long as the has state is not cleared. 3011 * 3012 * @return internal storage object for modifications 3013 */ 3014 public ProtobufMultiTargetPNPResult getMutableMultiTargetResult() { 3015 bitField0_ |= 0x00000001; 3016 return multiTargetResult; 3017 } 3018 3019 /** 3020 * <code>optional .photonvision.proto.ProtobufMultiTargetPNPResult multi_target_result = 3;</code> 3021 * @param value the multiTargetResult to set 3022 * @return this 3023 */ 3024 public ProtobufPhotonPipelineResult setMultiTargetResult( 3025 final ProtobufMultiTargetPNPResult value) { 3026 bitField0_ |= 0x00000001; 3027 multiTargetResult.copyFrom(value); 3028 return this; 3029 } 3030 3031 /** 3032 * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code> 3033 * @return whether the targets field is set 3034 */ 3035 public boolean hasTargets() { 3036 return (bitField0_ & 0x00000040) != 0; 3037 } 3038 3039 /** 3040 * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code> 3041 * @return this 3042 */ 3043 public ProtobufPhotonPipelineResult clearTargets() { 3044 bitField0_ &= ~0x00000040; 3045 targets.clear(); 3046 return this; 3047 } 3048 3049 /** 3050 * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code> 3051 * 3052 * This method returns the internal storage object without modifying any has state. 3053 * The returned object should not be modified and be treated as read-only. 3054 * 3055 * Use {@link #getMutableTargets()} if you want to modify it. 3056 * 3057 * @return internal storage object for reading 3058 */ 3059 public RepeatedMessage<ProtobufPhotonTrackedTarget> getTargets() { 3060 return targets; 3061 } 3062 3063 /** 3064 * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code> 3065 * 3066 * This method returns the internal storage object and sets the corresponding 3067 * has state. The returned object will become part of this message and its 3068 * contents may be modified as long as the has state is not cleared. 3069 * 3070 * @return internal storage object for modifications 3071 */ 3072 public RepeatedMessage<ProtobufPhotonTrackedTarget> getMutableTargets() { 3073 bitField0_ |= 0x00000040; 3074 return targets; 3075 } 3076 3077 /** 3078 * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code> 3079 * @param value the targets to add 3080 * @return this 3081 */ 3082 public ProtobufPhotonPipelineResult addTargets(final ProtobufPhotonTrackedTarget value) { 3083 bitField0_ |= 0x00000040; 3084 targets.add(value); 3085 return this; 3086 } 3087 3088 /** 3089 * <code>repeated .photonvision.proto.ProtobufPhotonTrackedTarget targets = 2;</code> 3090 * @param values the targets to add 3091 * @return this 3092 */ 3093 public ProtobufPhotonPipelineResult addAllTargets(final ProtobufPhotonTrackedTarget... values) { 3094 bitField0_ |= 0x00000040; 3095 targets.addAll(values); 3096 return this; 3097 } 3098 3099 @Override 3100 public ProtobufPhotonPipelineResult copyFrom(final ProtobufPhotonPipelineResult other) { 3101 cachedSize = other.cachedSize; 3102 if ((bitField0_ | other.bitField0_) != 0) { 3103 bitField0_ = other.bitField0_; 3104 latencyMs = other.latencyMs; 3105 sequenceId = other.sequenceId; 3106 captureTimestampMicros = other.captureTimestampMicros; 3107 ntPublishTimestampMicros = other.ntPublishTimestampMicros; 3108 timeSinceLastPongMicros = other.timeSinceLastPongMicros; 3109 multiTargetResult.copyFrom(other.multiTargetResult); 3110 targets.copyFrom(other.targets); 3111 } 3112 return this; 3113 } 3114 3115 @Override 3116 public ProtobufPhotonPipelineResult mergeFrom(final ProtobufPhotonPipelineResult other) { 3117 if (other.isEmpty()) { 3118 return this; 3119 } 3120 cachedSize = -1; 3121 if (other.hasLatencyMs()) { 3122 setLatencyMs(other.latencyMs); 3123 } 3124 if (other.hasSequenceId()) { 3125 setSequenceId(other.sequenceId); 3126 } 3127 if (other.hasCaptureTimestampMicros()) { 3128 setCaptureTimestampMicros(other.captureTimestampMicros); 3129 } 3130 if (other.hasNtPublishTimestampMicros()) { 3131 setNtPublishTimestampMicros(other.ntPublishTimestampMicros); 3132 } 3133 if (other.hasTimeSinceLastPongMicros()) { 3134 setTimeSinceLastPongMicros(other.timeSinceLastPongMicros); 3135 } 3136 if (other.hasMultiTargetResult()) { 3137 getMutableMultiTargetResult().mergeFrom(other.multiTargetResult); 3138 } 3139 if (other.hasTargets()) { 3140 getMutableTargets().addAll(other.targets); 3141 } 3142 return this; 3143 } 3144 3145 @Override 3146 public ProtobufPhotonPipelineResult clear() { 3147 if (isEmpty()) { 3148 return this; 3149 } 3150 cachedSize = -1; 3151 bitField0_ = 0; 3152 latencyMs = 0D; 3153 sequenceId = 0L; 3154 captureTimestampMicros = 0L; 3155 ntPublishTimestampMicros = 0L; 3156 timeSinceLastPongMicros = 0L; 3157 multiTargetResult.clear(); 3158 targets.clear(); 3159 return this; 3160 } 3161 3162 @Override 3163 public ProtobufPhotonPipelineResult clearQuick() { 3164 if (isEmpty()) { 3165 return this; 3166 } 3167 cachedSize = -1; 3168 bitField0_ = 0; 3169 multiTargetResult.clearQuick(); 3170 targets.clearQuick(); 3171 return this; 3172 } 3173 3174 @Override 3175 public boolean equals(Object o) { 3176 if (o == this) { 3177 return true; 3178 } 3179 if (!(o instanceof ProtobufPhotonPipelineResult)) { 3180 return false; 3181 } 3182 ProtobufPhotonPipelineResult other = (ProtobufPhotonPipelineResult) o; 3183 return bitField0_ == other.bitField0_ 3184 && (!hasLatencyMs() || ProtoUtil.isEqual(latencyMs, other.latencyMs)) 3185 && (!hasSequenceId() || sequenceId == other.sequenceId) 3186 && (!hasCaptureTimestampMicros() || captureTimestampMicros == other.captureTimestampMicros) 3187 && (!hasNtPublishTimestampMicros() || ntPublishTimestampMicros == other.ntPublishTimestampMicros) 3188 && (!hasTimeSinceLastPongMicros() || timeSinceLastPongMicros == other.timeSinceLastPongMicros) 3189 && (!hasMultiTargetResult() || multiTargetResult.equals(other.multiTargetResult)) 3190 && (!hasTargets() || targets.equals(other.targets)); 3191 } 3192 3193 @Override 3194 public void writeTo(final ProtoSink output) throws IOException { 3195 if ((bitField0_ & 0x00000002) != 0) { 3196 output.writeRawByte((byte) 9); 3197 output.writeDoubleNoTag(latencyMs); 3198 } 3199 if ((bitField0_ & 0x00000004) != 0) { 3200 output.writeRawByte((byte) 32); 3201 output.writeInt64NoTag(sequenceId); 3202 } 3203 if ((bitField0_ & 0x00000008) != 0) { 3204 output.writeRawByte((byte) 40); 3205 output.writeInt64NoTag(captureTimestampMicros); 3206 } 3207 if ((bitField0_ & 0x00000010) != 0) { 3208 output.writeRawByte((byte) 48); 3209 output.writeInt64NoTag(ntPublishTimestampMicros); 3210 } 3211 if ((bitField0_ & 0x00000020) != 0) { 3212 output.writeRawByte((byte) 56); 3213 output.writeInt64NoTag(timeSinceLastPongMicros); 3214 } 3215 if ((bitField0_ & 0x00000001) != 0) { 3216 output.writeRawByte((byte) 26); 3217 output.writeMessageNoTag(multiTargetResult); 3218 } 3219 if ((bitField0_ & 0x00000040) != 0) { 3220 for (int i = 0; i < targets.length(); i++) { 3221 output.writeRawByte((byte) 18); 3222 output.writeMessageNoTag(targets.get(i)); 3223 } 3224 } 3225 } 3226 3227 @Override 3228 protected int computeSerializedSize() { 3229 int size = 0; 3230 if ((bitField0_ & 0x00000002) != 0) { 3231 size += 9; 3232 } 3233 if ((bitField0_ & 0x00000004) != 0) { 3234 size += 1 + ProtoSink.computeInt64SizeNoTag(sequenceId); 3235 } 3236 if ((bitField0_ & 0x00000008) != 0) { 3237 size += 1 + ProtoSink.computeInt64SizeNoTag(captureTimestampMicros); 3238 } 3239 if ((bitField0_ & 0x00000010) != 0) { 3240 size += 1 + ProtoSink.computeInt64SizeNoTag(ntPublishTimestampMicros); 3241 } 3242 if ((bitField0_ & 0x00000020) != 0) { 3243 size += 1 + ProtoSink.computeInt64SizeNoTag(timeSinceLastPongMicros); 3244 } 3245 if ((bitField0_ & 0x00000001) != 0) { 3246 size += 1 + ProtoSink.computeMessageSizeNoTag(multiTargetResult); 3247 } 3248 if ((bitField0_ & 0x00000040) != 0) { 3249 size += (1 * targets.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(targets); 3250 } 3251 return size; 3252 } 3253 3254 @Override 3255 @SuppressWarnings("fallthrough") 3256 public ProtobufPhotonPipelineResult mergeFrom(final ProtoSource input) throws IOException { 3257 // Enabled Fall-Through Optimization (QuickBuffers) 3258 int tag = input.readTag(); 3259 while (true) { 3260 switch (tag) { 3261 case 9: { 3262 // latencyMs 3263 latencyMs = input.readDouble(); 3264 bitField0_ |= 0x00000002; 3265 tag = input.readTag(); 3266 if (tag != 32) { 3267 break; 3268 } 3269 } 3270 case 32: { 3271 // sequenceId 3272 sequenceId = input.readInt64(); 3273 bitField0_ |= 0x00000004; 3274 tag = input.readTag(); 3275 if (tag != 40) { 3276 break; 3277 } 3278 } 3279 case 40: { 3280 // captureTimestampMicros 3281 captureTimestampMicros = input.readInt64(); 3282 bitField0_ |= 0x00000008; 3283 tag = input.readTag(); 3284 if (tag != 48) { 3285 break; 3286 } 3287 } 3288 case 48: { 3289 // ntPublishTimestampMicros 3290 ntPublishTimestampMicros = input.readInt64(); 3291 bitField0_ |= 0x00000010; 3292 tag = input.readTag(); 3293 if (tag != 56) { 3294 break; 3295 } 3296 } 3297 case 56: { 3298 // timeSinceLastPongMicros 3299 timeSinceLastPongMicros = input.readInt64(); 3300 bitField0_ |= 0x00000020; 3301 tag = input.readTag(); 3302 if (tag != 26) { 3303 break; 3304 } 3305 } 3306 case 26: { 3307 // multiTargetResult 3308 input.readMessage(multiTargetResult); 3309 bitField0_ |= 0x00000001; 3310 tag = input.readTag(); 3311 if (tag != 18) { 3312 break; 3313 } 3314 } 3315 case 18: { 3316 // targets 3317 tag = input.readRepeatedMessage(targets, tag); 3318 bitField0_ |= 0x00000040; 3319 if (tag != 0) { 3320 break; 3321 } 3322 } 3323 case 0: { 3324 return this; 3325 } 3326 default: { 3327 if (!input.skipField(tag)) { 3328 return this; 3329 } 3330 tag = input.readTag(); 3331 break; 3332 } 3333 } 3334 } 3335 } 3336 3337 @Override 3338 public void writeTo(final JsonSink output) throws IOException { 3339 output.beginObject(); 3340 if ((bitField0_ & 0x00000002) != 0) { 3341 output.writeDouble(FieldNames.latencyMs, latencyMs); 3342 } 3343 if ((bitField0_ & 0x00000004) != 0) { 3344 output.writeInt64(FieldNames.sequenceId, sequenceId); 3345 } 3346 if ((bitField0_ & 0x00000008) != 0) { 3347 output.writeInt64(FieldNames.captureTimestampMicros, captureTimestampMicros); 3348 } 3349 if ((bitField0_ & 0x00000010) != 0) { 3350 output.writeInt64(FieldNames.ntPublishTimestampMicros, ntPublishTimestampMicros); 3351 } 3352 if ((bitField0_ & 0x00000020) != 0) { 3353 output.writeInt64(FieldNames.timeSinceLastPongMicros, timeSinceLastPongMicros); 3354 } 3355 if ((bitField0_ & 0x00000001) != 0) { 3356 output.writeMessage(FieldNames.multiTargetResult, multiTargetResult); 3357 } 3358 if ((bitField0_ & 0x00000040) != 0) { 3359 output.writeRepeatedMessage(FieldNames.targets, targets); 3360 } 3361 output.endObject(); 3362 } 3363 3364 @Override 3365 public ProtobufPhotonPipelineResult mergeFrom(final JsonSource input) throws IOException { 3366 if (!input.beginObject()) { 3367 return this; 3368 } 3369 while (!input.isAtEnd()) { 3370 switch (input.readFieldHash()) { 3371 case -1810231484: 3372 case -282583929: { 3373 if (input.isAtField(FieldNames.latencyMs)) { 3374 if (!input.trySkipNullValue()) { 3375 latencyMs = input.readDouble(); 3376 bitField0_ |= 0x00000002; 3377 } 3378 } else { 3379 input.skipUnknownField(); 3380 } 3381 break; 3382 } 3383 case -164522820: 3384 case -805218727: { 3385 if (input.isAtField(FieldNames.sequenceId)) { 3386 if (!input.trySkipNullValue()) { 3387 sequenceId = input.readInt64(); 3388 bitField0_ |= 0x00000004; 3389 } 3390 } else { 3391 input.skipUnknownField(); 3392 } 3393 break; 3394 } 3395 case 1984545471: 3396 case -668239535: { 3397 if (input.isAtField(FieldNames.captureTimestampMicros)) { 3398 if (!input.trySkipNullValue()) { 3399 captureTimestampMicros = input.readInt64(); 3400 bitField0_ |= 0x00000008; 3401 } 3402 } else { 3403 input.skipUnknownField(); 3404 } 3405 break; 3406 } 3407 case 64029500: 3408 case 1963802369: { 3409 if (input.isAtField(FieldNames.ntPublishTimestampMicros)) { 3410 if (!input.trySkipNullValue()) { 3411 ntPublishTimestampMicros = input.readInt64(); 3412 bitField0_ |= 0x00000010; 3413 } 3414 } else { 3415 input.skipUnknownField(); 3416 } 3417 break; 3418 } 3419 case -1600036534: 3420 case -1422845884: { 3421 if (input.isAtField(FieldNames.timeSinceLastPongMicros)) { 3422 if (!input.trySkipNullValue()) { 3423 timeSinceLastPongMicros = input.readInt64(); 3424 bitField0_ |= 0x00000020; 3425 } 3426 } else { 3427 input.skipUnknownField(); 3428 } 3429 break; 3430 } 3431 case 1809256679: 3432 case -501273083: { 3433 if (input.isAtField(FieldNames.multiTargetResult)) { 3434 if (!input.trySkipNullValue()) { 3435 input.readMessage(multiTargetResult); 3436 bitField0_ |= 0x00000001; 3437 } 3438 } else { 3439 input.skipUnknownField(); 3440 } 3441 break; 3442 } 3443 case -1538277118: { 3444 if (input.isAtField(FieldNames.targets)) { 3445 if (!input.trySkipNullValue()) { 3446 input.readRepeatedMessage(targets); 3447 bitField0_ |= 0x00000040; 3448 } 3449 } else { 3450 input.skipUnknownField(); 3451 } 3452 break; 3453 } 3454 default: { 3455 input.skipUnknownField(); 3456 break; 3457 } 3458 } 3459 } 3460 input.endObject(); 3461 return this; 3462 } 3463 3464 @Override 3465 public ProtobufPhotonPipelineResult clone() { 3466 return new ProtobufPhotonPipelineResult().copyFrom(this); 3467 } 3468 3469 @Override 3470 public boolean isEmpty() { 3471 return ((bitField0_) == 0); 3472 } 3473 3474 public static ProtobufPhotonPipelineResult parseFrom(final byte[] data) throws 3475 InvalidProtocolBufferException { 3476 return ProtoMessage.mergeFrom(new ProtobufPhotonPipelineResult(), data).checkInitialized(); 3477 } 3478 3479 public static ProtobufPhotonPipelineResult parseFrom(final ProtoSource input) throws 3480 IOException { 3481 return ProtoMessage.mergeFrom(new ProtobufPhotonPipelineResult(), input).checkInitialized(); 3482 } 3483 3484 public static ProtobufPhotonPipelineResult parseFrom(final JsonSource input) throws 3485 IOException { 3486 return ProtoMessage.mergeFrom(new ProtobufPhotonPipelineResult(), input).checkInitialized(); 3487 } 3488 3489 /** 3490 * @return factory for creating ProtobufPhotonPipelineResult messages 3491 */ 3492 public static MessageFactory<ProtobufPhotonPipelineResult> getFactory() { 3493 return ProtobufPhotonPipelineResultFactory.INSTANCE; 3494 } 3495 3496 /** 3497 * @return this type's descriptor. 3498 */ 3499 public static Descriptors.Descriptor getDescriptor() { 3500 return Photon.photonvision_proto_ProtobufPhotonPipelineResult_descriptor; 3501 } 3502 3503 private enum ProtobufPhotonPipelineResultFactory implements MessageFactory<ProtobufPhotonPipelineResult> { 3504 INSTANCE; 3505 3506 @Override 3507 public ProtobufPhotonPipelineResult create() { 3508 return ProtobufPhotonPipelineResult.newInstance(); 3509 } 3510 } 3511 3512 /** 3513 * Contains name constants used for serializing JSON 3514 */ 3515 static class FieldNames { 3516 static final FieldName latencyMs = FieldName.forField("latencyMs", "latency_ms"); 3517 3518 static final FieldName sequenceId = FieldName.forField("sequenceId", "sequence_id"); 3519 3520 static final FieldName captureTimestampMicros = FieldName.forField("captureTimestampMicros", "capture_timestamp_micros"); 3521 3522 static final FieldName ntPublishTimestampMicros = FieldName.forField("ntPublishTimestampMicros", "nt_publish_timestamp_micros"); 3523 3524 static final FieldName timeSinceLastPongMicros = FieldName.forField("timeSinceLastPongMicros", "time_since_last_pong_micros"); 3525 3526 static final FieldName multiTargetResult = FieldName.forField("multiTargetResult", "multi_target_result"); 3527 3528 static final FieldName targets = FieldName.forField("targets"); 3529 } 3530 } 3531 3532 /** 3533 * Protobuf type {@code ProtobufDeviceMetrics} 3534 */ 3535 public static final class ProtobufDeviceMetrics extends ProtoMessage<ProtobufDeviceMetrics> implements Cloneable { 3536 private static final long serialVersionUID = 0L; 3537 3538 /** 3539 * <code>optional double cpu_temp = 1;</code> 3540 */ 3541 private double cpuTemp; 3542 3543 /** 3544 * <code>optional double cpu_util = 2;</code> 3545 */ 3546 private double cpuUtil; 3547 3548 /** 3549 * <code>optional double ram_mem = 4;</code> 3550 */ 3551 private double ramMem; 3552 3553 /** 3554 * <code>optional double ram_util = 5;</code> 3555 */ 3556 private double ramUtil; 3557 3558 /** 3559 * <code>optional double gpu_mem = 6;</code> 3560 */ 3561 private double gpuMem; 3562 3563 /** 3564 * <code>optional double gpu_mem_util = 7;</code> 3565 */ 3566 private double gpuMemUtil; 3567 3568 /** 3569 * <code>optional double disk_util_pct = 8;</code> 3570 */ 3571 private double diskUtilPct; 3572 3573 /** 3574 * <code>optional double uptime = 11;</code> 3575 */ 3576 private double uptime; 3577 3578 /** 3579 * <code>optional double sent_bit_rate = 12;</code> 3580 */ 3581 private double sentBitRate; 3582 3583 /** 3584 * <code>optional double recv_bit_rate = 13;</code> 3585 */ 3586 private double recvBitRate; 3587 3588 /** 3589 * <code>optional double disk_usable_space = 14;</code> 3590 */ 3591 private double diskUsableSpace; 3592 3593 /** 3594 * <code>optional string cpu_thr = 3;</code> 3595 */ 3596 private final Utf8String cpuThr = Utf8String.newEmptyInstance(); 3597 3598 /** 3599 * <code>optional string ip_address = 10;</code> 3600 */ 3601 private final Utf8String ipAddress = Utf8String.newEmptyInstance(); 3602 3603 /** 3604 * <code>repeated double npu_usage = 9;</code> 3605 */ 3606 private final RepeatedDouble npuUsage = RepeatedDouble.newEmptyInstance(); 3607 3608 private ProtobufDeviceMetrics() { 3609 } 3610 3611 /** 3612 * @return a new empty instance of {@code ProtobufDeviceMetrics} 3613 */ 3614 public static ProtobufDeviceMetrics newInstance() { 3615 return new ProtobufDeviceMetrics(); 3616 } 3617 3618 /** 3619 * <code>optional double cpu_temp = 1;</code> 3620 * @return whether the cpuTemp field is set 3621 */ 3622 public boolean hasCpuTemp() { 3623 return (bitField0_ & 0x00000001) != 0; 3624 } 3625 3626 /** 3627 * <code>optional double cpu_temp = 1;</code> 3628 * @return this 3629 */ 3630 public ProtobufDeviceMetrics clearCpuTemp() { 3631 bitField0_ &= ~0x00000001; 3632 cpuTemp = 0D; 3633 return this; 3634 } 3635 3636 /** 3637 * <code>optional double cpu_temp = 1;</code> 3638 * @return the cpuTemp 3639 */ 3640 public double getCpuTemp() { 3641 return cpuTemp; 3642 } 3643 3644 /** 3645 * <code>optional double cpu_temp = 1;</code> 3646 * @param value the cpuTemp to set 3647 * @return this 3648 */ 3649 public ProtobufDeviceMetrics setCpuTemp(final double value) { 3650 bitField0_ |= 0x00000001; 3651 cpuTemp = value; 3652 return this; 3653 } 3654 3655 /** 3656 * <code>optional double cpu_util = 2;</code> 3657 * @return whether the cpuUtil field is set 3658 */ 3659 public boolean hasCpuUtil() { 3660 return (bitField0_ & 0x00000002) != 0; 3661 } 3662 3663 /** 3664 * <code>optional double cpu_util = 2;</code> 3665 * @return this 3666 */ 3667 public ProtobufDeviceMetrics clearCpuUtil() { 3668 bitField0_ &= ~0x00000002; 3669 cpuUtil = 0D; 3670 return this; 3671 } 3672 3673 /** 3674 * <code>optional double cpu_util = 2;</code> 3675 * @return the cpuUtil 3676 */ 3677 public double getCpuUtil() { 3678 return cpuUtil; 3679 } 3680 3681 /** 3682 * <code>optional double cpu_util = 2;</code> 3683 * @param value the cpuUtil to set 3684 * @return this 3685 */ 3686 public ProtobufDeviceMetrics setCpuUtil(final double value) { 3687 bitField0_ |= 0x00000002; 3688 cpuUtil = value; 3689 return this; 3690 } 3691 3692 /** 3693 * <code>optional double ram_mem = 4;</code> 3694 * @return whether the ramMem field is set 3695 */ 3696 public boolean hasRamMem() { 3697 return (bitField0_ & 0x00000004) != 0; 3698 } 3699 3700 /** 3701 * <code>optional double ram_mem = 4;</code> 3702 * @return this 3703 */ 3704 public ProtobufDeviceMetrics clearRamMem() { 3705 bitField0_ &= ~0x00000004; 3706 ramMem = 0D; 3707 return this; 3708 } 3709 3710 /** 3711 * <code>optional double ram_mem = 4;</code> 3712 * @return the ramMem 3713 */ 3714 public double getRamMem() { 3715 return ramMem; 3716 } 3717 3718 /** 3719 * <code>optional double ram_mem = 4;</code> 3720 * @param value the ramMem to set 3721 * @return this 3722 */ 3723 public ProtobufDeviceMetrics setRamMem(final double value) { 3724 bitField0_ |= 0x00000004; 3725 ramMem = value; 3726 return this; 3727 } 3728 3729 /** 3730 * <code>optional double ram_util = 5;</code> 3731 * @return whether the ramUtil field is set 3732 */ 3733 public boolean hasRamUtil() { 3734 return (bitField0_ & 0x00000008) != 0; 3735 } 3736 3737 /** 3738 * <code>optional double ram_util = 5;</code> 3739 * @return this 3740 */ 3741 public ProtobufDeviceMetrics clearRamUtil() { 3742 bitField0_ &= ~0x00000008; 3743 ramUtil = 0D; 3744 return this; 3745 } 3746 3747 /** 3748 * <code>optional double ram_util = 5;</code> 3749 * @return the ramUtil 3750 */ 3751 public double getRamUtil() { 3752 return ramUtil; 3753 } 3754 3755 /** 3756 * <code>optional double ram_util = 5;</code> 3757 * @param value the ramUtil to set 3758 * @return this 3759 */ 3760 public ProtobufDeviceMetrics setRamUtil(final double value) { 3761 bitField0_ |= 0x00000008; 3762 ramUtil = value; 3763 return this; 3764 } 3765 3766 /** 3767 * <code>optional double gpu_mem = 6;</code> 3768 * @return whether the gpuMem field is set 3769 */ 3770 public boolean hasGpuMem() { 3771 return (bitField0_ & 0x00000010) != 0; 3772 } 3773 3774 /** 3775 * <code>optional double gpu_mem = 6;</code> 3776 * @return this 3777 */ 3778 public ProtobufDeviceMetrics clearGpuMem() { 3779 bitField0_ &= ~0x00000010; 3780 gpuMem = 0D; 3781 return this; 3782 } 3783 3784 /** 3785 * <code>optional double gpu_mem = 6;</code> 3786 * @return the gpuMem 3787 */ 3788 public double getGpuMem() { 3789 return gpuMem; 3790 } 3791 3792 /** 3793 * <code>optional double gpu_mem = 6;</code> 3794 * @param value the gpuMem to set 3795 * @return this 3796 */ 3797 public ProtobufDeviceMetrics setGpuMem(final double value) { 3798 bitField0_ |= 0x00000010; 3799 gpuMem = value; 3800 return this; 3801 } 3802 3803 /** 3804 * <code>optional double gpu_mem_util = 7;</code> 3805 * @return whether the gpuMemUtil field is set 3806 */ 3807 public boolean hasGpuMemUtil() { 3808 return (bitField0_ & 0x00000020) != 0; 3809 } 3810 3811 /** 3812 * <code>optional double gpu_mem_util = 7;</code> 3813 * @return this 3814 */ 3815 public ProtobufDeviceMetrics clearGpuMemUtil() { 3816 bitField0_ &= ~0x00000020; 3817 gpuMemUtil = 0D; 3818 return this; 3819 } 3820 3821 /** 3822 * <code>optional double gpu_mem_util = 7;</code> 3823 * @return the gpuMemUtil 3824 */ 3825 public double getGpuMemUtil() { 3826 return gpuMemUtil; 3827 } 3828 3829 /** 3830 * <code>optional double gpu_mem_util = 7;</code> 3831 * @param value the gpuMemUtil to set 3832 * @return this 3833 */ 3834 public ProtobufDeviceMetrics setGpuMemUtil(final double value) { 3835 bitField0_ |= 0x00000020; 3836 gpuMemUtil = value; 3837 return this; 3838 } 3839 3840 /** 3841 * <code>optional double disk_util_pct = 8;</code> 3842 * @return whether the diskUtilPct field is set 3843 */ 3844 public boolean hasDiskUtilPct() { 3845 return (bitField0_ & 0x00000040) != 0; 3846 } 3847 3848 /** 3849 * <code>optional double disk_util_pct = 8;</code> 3850 * @return this 3851 */ 3852 public ProtobufDeviceMetrics clearDiskUtilPct() { 3853 bitField0_ &= ~0x00000040; 3854 diskUtilPct = 0D; 3855 return this; 3856 } 3857 3858 /** 3859 * <code>optional double disk_util_pct = 8;</code> 3860 * @return the diskUtilPct 3861 */ 3862 public double getDiskUtilPct() { 3863 return diskUtilPct; 3864 } 3865 3866 /** 3867 * <code>optional double disk_util_pct = 8;</code> 3868 * @param value the diskUtilPct to set 3869 * @return this 3870 */ 3871 public ProtobufDeviceMetrics setDiskUtilPct(final double value) { 3872 bitField0_ |= 0x00000040; 3873 diskUtilPct = value; 3874 return this; 3875 } 3876 3877 /** 3878 * <code>optional double uptime = 11;</code> 3879 * @return whether the uptime field is set 3880 */ 3881 public boolean hasUptime() { 3882 return (bitField0_ & 0x00000080) != 0; 3883 } 3884 3885 /** 3886 * <code>optional double uptime = 11;</code> 3887 * @return this 3888 */ 3889 public ProtobufDeviceMetrics clearUptime() { 3890 bitField0_ &= ~0x00000080; 3891 uptime = 0D; 3892 return this; 3893 } 3894 3895 /** 3896 * <code>optional double uptime = 11;</code> 3897 * @return the uptime 3898 */ 3899 public double getUptime() { 3900 return uptime; 3901 } 3902 3903 /** 3904 * <code>optional double uptime = 11;</code> 3905 * @param value the uptime to set 3906 * @return this 3907 */ 3908 public ProtobufDeviceMetrics setUptime(final double value) { 3909 bitField0_ |= 0x00000080; 3910 uptime = value; 3911 return this; 3912 } 3913 3914 /** 3915 * <code>optional double sent_bit_rate = 12;</code> 3916 * @return whether the sentBitRate field is set 3917 */ 3918 public boolean hasSentBitRate() { 3919 return (bitField0_ & 0x00000100) != 0; 3920 } 3921 3922 /** 3923 * <code>optional double sent_bit_rate = 12;</code> 3924 * @return this 3925 */ 3926 public ProtobufDeviceMetrics clearSentBitRate() { 3927 bitField0_ &= ~0x00000100; 3928 sentBitRate = 0D; 3929 return this; 3930 } 3931 3932 /** 3933 * <code>optional double sent_bit_rate = 12;</code> 3934 * @return the sentBitRate 3935 */ 3936 public double getSentBitRate() { 3937 return sentBitRate; 3938 } 3939 3940 /** 3941 * <code>optional double sent_bit_rate = 12;</code> 3942 * @param value the sentBitRate to set 3943 * @return this 3944 */ 3945 public ProtobufDeviceMetrics setSentBitRate(final double value) { 3946 bitField0_ |= 0x00000100; 3947 sentBitRate = value; 3948 return this; 3949 } 3950 3951 /** 3952 * <code>optional double recv_bit_rate = 13;</code> 3953 * @return whether the recvBitRate field is set 3954 */ 3955 public boolean hasRecvBitRate() { 3956 return (bitField0_ & 0x00000200) != 0; 3957 } 3958 3959 /** 3960 * <code>optional double recv_bit_rate = 13;</code> 3961 * @return this 3962 */ 3963 public ProtobufDeviceMetrics clearRecvBitRate() { 3964 bitField0_ &= ~0x00000200; 3965 recvBitRate = 0D; 3966 return this; 3967 } 3968 3969 /** 3970 * <code>optional double recv_bit_rate = 13;</code> 3971 * @return the recvBitRate 3972 */ 3973 public double getRecvBitRate() { 3974 return recvBitRate; 3975 } 3976 3977 /** 3978 * <code>optional double recv_bit_rate = 13;</code> 3979 * @param value the recvBitRate to set 3980 * @return this 3981 */ 3982 public ProtobufDeviceMetrics setRecvBitRate(final double value) { 3983 bitField0_ |= 0x00000200; 3984 recvBitRate = value; 3985 return this; 3986 } 3987 3988 /** 3989 * <code>optional double disk_usable_space = 14;</code> 3990 * @return whether the diskUsableSpace field is set 3991 */ 3992 public boolean hasDiskUsableSpace() { 3993 return (bitField0_ & 0x00000400) != 0; 3994 } 3995 3996 /** 3997 * <code>optional double disk_usable_space = 14;</code> 3998 * @return this 3999 */ 4000 public ProtobufDeviceMetrics clearDiskUsableSpace() { 4001 bitField0_ &= ~0x00000400; 4002 diskUsableSpace = 0D; 4003 return this; 4004 } 4005 4006 /** 4007 * <code>optional double disk_usable_space = 14;</code> 4008 * @return the diskUsableSpace 4009 */ 4010 public double getDiskUsableSpace() { 4011 return diskUsableSpace; 4012 } 4013 4014 /** 4015 * <code>optional double disk_usable_space = 14;</code> 4016 * @param value the diskUsableSpace to set 4017 * @return this 4018 */ 4019 public ProtobufDeviceMetrics setDiskUsableSpace(final double value) { 4020 bitField0_ |= 0x00000400; 4021 diskUsableSpace = value; 4022 return this; 4023 } 4024 4025 /** 4026 * <code>optional string cpu_thr = 3;</code> 4027 * @return whether the cpuThr field is set 4028 */ 4029 public boolean hasCpuThr() { 4030 return (bitField0_ & 0x00000800) != 0; 4031 } 4032 4033 /** 4034 * <code>optional string cpu_thr = 3;</code> 4035 * @return this 4036 */ 4037 public ProtobufDeviceMetrics clearCpuThr() { 4038 bitField0_ &= ~0x00000800; 4039 cpuThr.clear(); 4040 return this; 4041 } 4042 4043 /** 4044 * <code>optional string cpu_thr = 3;</code> 4045 * @return the cpuThr 4046 */ 4047 public String getCpuThr() { 4048 return cpuThr.getString(); 4049 } 4050 4051 /** 4052 * <code>optional string cpu_thr = 3;</code> 4053 * @return internal {@code Utf8String} representation of cpuThr for reading 4054 */ 4055 public Utf8String getCpuThrBytes() { 4056 return this.cpuThr; 4057 } 4058 4059 /** 4060 * <code>optional string cpu_thr = 3;</code> 4061 * @return internal {@code Utf8String} representation of cpuThr for modifications 4062 */ 4063 public Utf8String getMutableCpuThrBytes() { 4064 bitField0_ |= 0x00000800; 4065 return this.cpuThr; 4066 } 4067 4068 /** 4069 * <code>optional string cpu_thr = 3;</code> 4070 * @param value the cpuThr to set 4071 * @return this 4072 */ 4073 public ProtobufDeviceMetrics setCpuThr(final CharSequence value) { 4074 bitField0_ |= 0x00000800; 4075 cpuThr.copyFrom(value); 4076 return this; 4077 } 4078 4079 /** 4080 * <code>optional string cpu_thr = 3;</code> 4081 * @param value the cpuThr to set 4082 * @return this 4083 */ 4084 public ProtobufDeviceMetrics setCpuThr(final Utf8String value) { 4085 bitField0_ |= 0x00000800; 4086 cpuThr.copyFrom(value); 4087 return this; 4088 } 4089 4090 /** 4091 * <code>optional string ip_address = 10;</code> 4092 * @return whether the ipAddress field is set 4093 */ 4094 public boolean hasIpAddress() { 4095 return (bitField0_ & 0x00001000) != 0; 4096 } 4097 4098 /** 4099 * <code>optional string ip_address = 10;</code> 4100 * @return this 4101 */ 4102 public ProtobufDeviceMetrics clearIpAddress() { 4103 bitField0_ &= ~0x00001000; 4104 ipAddress.clear(); 4105 return this; 4106 } 4107 4108 /** 4109 * <code>optional string ip_address = 10;</code> 4110 * @return the ipAddress 4111 */ 4112 public String getIpAddress() { 4113 return ipAddress.getString(); 4114 } 4115 4116 /** 4117 * <code>optional string ip_address = 10;</code> 4118 * @return internal {@code Utf8String} representation of ipAddress for reading 4119 */ 4120 public Utf8String getIpAddressBytes() { 4121 return this.ipAddress; 4122 } 4123 4124 /** 4125 * <code>optional string ip_address = 10;</code> 4126 * @return internal {@code Utf8String} representation of ipAddress for modifications 4127 */ 4128 public Utf8String getMutableIpAddressBytes() { 4129 bitField0_ |= 0x00001000; 4130 return this.ipAddress; 4131 } 4132 4133 /** 4134 * <code>optional string ip_address = 10;</code> 4135 * @param value the ipAddress to set 4136 * @return this 4137 */ 4138 public ProtobufDeviceMetrics setIpAddress(final CharSequence value) { 4139 bitField0_ |= 0x00001000; 4140 ipAddress.copyFrom(value); 4141 return this; 4142 } 4143 4144 /** 4145 * <code>optional string ip_address = 10;</code> 4146 * @param value the ipAddress to set 4147 * @return this 4148 */ 4149 public ProtobufDeviceMetrics setIpAddress(final Utf8String value) { 4150 bitField0_ |= 0x00001000; 4151 ipAddress.copyFrom(value); 4152 return this; 4153 } 4154 4155 /** 4156 * <code>repeated double npu_usage = 9;</code> 4157 * @return whether the npuUsage field is set 4158 */ 4159 public boolean hasNpuUsage() { 4160 return (bitField0_ & 0x00002000) != 0; 4161 } 4162 4163 /** 4164 * <code>repeated double npu_usage = 9;</code> 4165 * @return this 4166 */ 4167 public ProtobufDeviceMetrics clearNpuUsage() { 4168 bitField0_ &= ~0x00002000; 4169 npuUsage.clear(); 4170 return this; 4171 } 4172 4173 /** 4174 * <code>repeated double npu_usage = 9;</code> 4175 * 4176 * This method returns the internal storage object without modifying any has state. 4177 * The returned object should not be modified and be treated as read-only. 4178 * 4179 * Use {@link #getMutableNpuUsage()} if you want to modify it. 4180 * 4181 * @return internal storage object for reading 4182 */ 4183 public RepeatedDouble getNpuUsage() { 4184 return npuUsage; 4185 } 4186 4187 /** 4188 * <code>repeated double npu_usage = 9;</code> 4189 * 4190 * This method returns the internal storage object and sets the corresponding 4191 * has state. The returned object will become part of this message and its 4192 * contents may be modified as long as the has state is not cleared. 4193 * 4194 * @return internal storage object for modifications 4195 */ 4196 public RepeatedDouble getMutableNpuUsage() { 4197 bitField0_ |= 0x00002000; 4198 return npuUsage; 4199 } 4200 4201 /** 4202 * <code>repeated double npu_usage = 9;</code> 4203 * @param value the npuUsage to add 4204 * @return this 4205 */ 4206 public ProtobufDeviceMetrics addNpuUsage(final double value) { 4207 bitField0_ |= 0x00002000; 4208 npuUsage.add(value); 4209 return this; 4210 } 4211 4212 /** 4213 * <code>repeated double npu_usage = 9;</code> 4214 * @param values the npuUsage to add 4215 * @return this 4216 */ 4217 public ProtobufDeviceMetrics addAllNpuUsage(final double... values) { 4218 bitField0_ |= 0x00002000; 4219 npuUsage.addAll(values); 4220 return this; 4221 } 4222 4223 @Override 4224 public ProtobufDeviceMetrics copyFrom(final ProtobufDeviceMetrics other) { 4225 cachedSize = other.cachedSize; 4226 if ((bitField0_ | other.bitField0_) != 0) { 4227 bitField0_ = other.bitField0_; 4228 cpuTemp = other.cpuTemp; 4229 cpuUtil = other.cpuUtil; 4230 ramMem = other.ramMem; 4231 ramUtil = other.ramUtil; 4232 gpuMem = other.gpuMem; 4233 gpuMemUtil = other.gpuMemUtil; 4234 diskUtilPct = other.diskUtilPct; 4235 uptime = other.uptime; 4236 sentBitRate = other.sentBitRate; 4237 recvBitRate = other.recvBitRate; 4238 diskUsableSpace = other.diskUsableSpace; 4239 cpuThr.copyFrom(other.cpuThr); 4240 ipAddress.copyFrom(other.ipAddress); 4241 npuUsage.copyFrom(other.npuUsage); 4242 } 4243 return this; 4244 } 4245 4246 @Override 4247 public ProtobufDeviceMetrics mergeFrom(final ProtobufDeviceMetrics other) { 4248 if (other.isEmpty()) { 4249 return this; 4250 } 4251 cachedSize = -1; 4252 if (other.hasCpuTemp()) { 4253 setCpuTemp(other.cpuTemp); 4254 } 4255 if (other.hasCpuUtil()) { 4256 setCpuUtil(other.cpuUtil); 4257 } 4258 if (other.hasRamMem()) { 4259 setRamMem(other.ramMem); 4260 } 4261 if (other.hasRamUtil()) { 4262 setRamUtil(other.ramUtil); 4263 } 4264 if (other.hasGpuMem()) { 4265 setGpuMem(other.gpuMem); 4266 } 4267 if (other.hasGpuMemUtil()) { 4268 setGpuMemUtil(other.gpuMemUtil); 4269 } 4270 if (other.hasDiskUtilPct()) { 4271 setDiskUtilPct(other.diskUtilPct); 4272 } 4273 if (other.hasUptime()) { 4274 setUptime(other.uptime); 4275 } 4276 if (other.hasSentBitRate()) { 4277 setSentBitRate(other.sentBitRate); 4278 } 4279 if (other.hasRecvBitRate()) { 4280 setRecvBitRate(other.recvBitRate); 4281 } 4282 if (other.hasDiskUsableSpace()) { 4283 setDiskUsableSpace(other.diskUsableSpace); 4284 } 4285 if (other.hasCpuThr()) { 4286 getMutableCpuThrBytes().copyFrom(other.cpuThr); 4287 } 4288 if (other.hasIpAddress()) { 4289 getMutableIpAddressBytes().copyFrom(other.ipAddress); 4290 } 4291 if (other.hasNpuUsage()) { 4292 getMutableNpuUsage().addAll(other.npuUsage); 4293 } 4294 return this; 4295 } 4296 4297 @Override 4298 public ProtobufDeviceMetrics clear() { 4299 if (isEmpty()) { 4300 return this; 4301 } 4302 cachedSize = -1; 4303 bitField0_ = 0; 4304 cpuTemp = 0D; 4305 cpuUtil = 0D; 4306 ramMem = 0D; 4307 ramUtil = 0D; 4308 gpuMem = 0D; 4309 gpuMemUtil = 0D; 4310 diskUtilPct = 0D; 4311 uptime = 0D; 4312 sentBitRate = 0D; 4313 recvBitRate = 0D; 4314 diskUsableSpace = 0D; 4315 cpuThr.clear(); 4316 ipAddress.clear(); 4317 npuUsage.clear(); 4318 return this; 4319 } 4320 4321 @Override 4322 public ProtobufDeviceMetrics clearQuick() { 4323 if (isEmpty()) { 4324 return this; 4325 } 4326 cachedSize = -1; 4327 bitField0_ = 0; 4328 cpuThr.clear(); 4329 ipAddress.clear(); 4330 npuUsage.clear(); 4331 return this; 4332 } 4333 4334 @Override 4335 public boolean equals(Object o) { 4336 if (o == this) { 4337 return true; 4338 } 4339 if (!(o instanceof ProtobufDeviceMetrics)) { 4340 return false; 4341 } 4342 ProtobufDeviceMetrics other = (ProtobufDeviceMetrics) o; 4343 return bitField0_ == other.bitField0_ 4344 && (!hasCpuTemp() || ProtoUtil.isEqual(cpuTemp, other.cpuTemp)) 4345 && (!hasCpuUtil() || ProtoUtil.isEqual(cpuUtil, other.cpuUtil)) 4346 && (!hasRamMem() || ProtoUtil.isEqual(ramMem, other.ramMem)) 4347 && (!hasRamUtil() || ProtoUtil.isEqual(ramUtil, other.ramUtil)) 4348 && (!hasGpuMem() || ProtoUtil.isEqual(gpuMem, other.gpuMem)) 4349 && (!hasGpuMemUtil() || ProtoUtil.isEqual(gpuMemUtil, other.gpuMemUtil)) 4350 && (!hasDiskUtilPct() || ProtoUtil.isEqual(diskUtilPct, other.diskUtilPct)) 4351 && (!hasUptime() || ProtoUtil.isEqual(uptime, other.uptime)) 4352 && (!hasSentBitRate() || ProtoUtil.isEqual(sentBitRate, other.sentBitRate)) 4353 && (!hasRecvBitRate() || ProtoUtil.isEqual(recvBitRate, other.recvBitRate)) 4354 && (!hasDiskUsableSpace() || ProtoUtil.isEqual(diskUsableSpace, other.diskUsableSpace)) 4355 && (!hasCpuThr() || cpuThr.equals(other.cpuThr)) 4356 && (!hasIpAddress() || ipAddress.equals(other.ipAddress)) 4357 && (!hasNpuUsage() || npuUsage.equals(other.npuUsage)); 4358 } 4359 4360 @Override 4361 public void writeTo(final ProtoSink output) throws IOException { 4362 if ((bitField0_ & 0x00000001) != 0) { 4363 output.writeRawByte((byte) 9); 4364 output.writeDoubleNoTag(cpuTemp); 4365 } 4366 if ((bitField0_ & 0x00000002) != 0) { 4367 output.writeRawByte((byte) 17); 4368 output.writeDoubleNoTag(cpuUtil); 4369 } 4370 if ((bitField0_ & 0x00000004) != 0) { 4371 output.writeRawByte((byte) 33); 4372 output.writeDoubleNoTag(ramMem); 4373 } 4374 if ((bitField0_ & 0x00000008) != 0) { 4375 output.writeRawByte((byte) 41); 4376 output.writeDoubleNoTag(ramUtil); 4377 } 4378 if ((bitField0_ & 0x00000010) != 0) { 4379 output.writeRawByte((byte) 49); 4380 output.writeDoubleNoTag(gpuMem); 4381 } 4382 if ((bitField0_ & 0x00000020) != 0) { 4383 output.writeRawByte((byte) 57); 4384 output.writeDoubleNoTag(gpuMemUtil); 4385 } 4386 if ((bitField0_ & 0x00000040) != 0) { 4387 output.writeRawByte((byte) 65); 4388 output.writeDoubleNoTag(diskUtilPct); 4389 } 4390 if ((bitField0_ & 0x00000080) != 0) { 4391 output.writeRawByte((byte) 89); 4392 output.writeDoubleNoTag(uptime); 4393 } 4394 if ((bitField0_ & 0x00000100) != 0) { 4395 output.writeRawByte((byte) 97); 4396 output.writeDoubleNoTag(sentBitRate); 4397 } 4398 if ((bitField0_ & 0x00000200) != 0) { 4399 output.writeRawByte((byte) 105); 4400 output.writeDoubleNoTag(recvBitRate); 4401 } 4402 if ((bitField0_ & 0x00000400) != 0) { 4403 output.writeRawByte((byte) 113); 4404 output.writeDoubleNoTag(diskUsableSpace); 4405 } 4406 if ((bitField0_ & 0x00000800) != 0) { 4407 output.writeRawByte((byte) 26); 4408 output.writeStringNoTag(cpuThr); 4409 } 4410 if ((bitField0_ & 0x00001000) != 0) { 4411 output.writeRawByte((byte) 82); 4412 output.writeStringNoTag(ipAddress); 4413 } 4414 if ((bitField0_ & 0x00002000) != 0) { 4415 for (int i = 0; i < npuUsage.length(); i++) { 4416 output.writeRawByte((byte) 73); 4417 output.writeDoubleNoTag(npuUsage.array()[i]); 4418 } 4419 } 4420 } 4421 4422 @Override 4423 protected int computeSerializedSize() { 4424 int size = 0; 4425 if ((bitField0_ & 0x00000001) != 0) { 4426 size += 9; 4427 } 4428 if ((bitField0_ & 0x00000002) != 0) { 4429 size += 9; 4430 } 4431 if ((bitField0_ & 0x00000004) != 0) { 4432 size += 9; 4433 } 4434 if ((bitField0_ & 0x00000008) != 0) { 4435 size += 9; 4436 } 4437 if ((bitField0_ & 0x00000010) != 0) { 4438 size += 9; 4439 } 4440 if ((bitField0_ & 0x00000020) != 0) { 4441 size += 9; 4442 } 4443 if ((bitField0_ & 0x00000040) != 0) { 4444 size += 9; 4445 } 4446 if ((bitField0_ & 0x00000080) != 0) { 4447 size += 9; 4448 } 4449 if ((bitField0_ & 0x00000100) != 0) { 4450 size += 9; 4451 } 4452 if ((bitField0_ & 0x00000200) != 0) { 4453 size += 9; 4454 } 4455 if ((bitField0_ & 0x00000400) != 0) { 4456 size += 9; 4457 } 4458 if ((bitField0_ & 0x00000800) != 0) { 4459 size += 1 + ProtoSink.computeStringSizeNoTag(cpuThr); 4460 } 4461 if ((bitField0_ & 0x00001000) != 0) { 4462 size += 1 + ProtoSink.computeStringSizeNoTag(ipAddress); 4463 } 4464 if ((bitField0_ & 0x00002000) != 0) { 4465 size += (1 + 8) * npuUsage.length(); 4466 } 4467 return size; 4468 } 4469 4470 @Override 4471 @SuppressWarnings("fallthrough") 4472 public ProtobufDeviceMetrics mergeFrom(final ProtoSource input) throws IOException { 4473 // Enabled Fall-Through Optimization (QuickBuffers) 4474 int tag = input.readTag(); 4475 while (true) { 4476 switch (tag) { 4477 case 9: { 4478 // cpuTemp 4479 cpuTemp = input.readDouble(); 4480 bitField0_ |= 0x00000001; 4481 tag = input.readTag(); 4482 if (tag != 17) { 4483 break; 4484 } 4485 } 4486 case 17: { 4487 // cpuUtil 4488 cpuUtil = input.readDouble(); 4489 bitField0_ |= 0x00000002; 4490 tag = input.readTag(); 4491 if (tag != 33) { 4492 break; 4493 } 4494 } 4495 case 33: { 4496 // ramMem 4497 ramMem = input.readDouble(); 4498 bitField0_ |= 0x00000004; 4499 tag = input.readTag(); 4500 if (tag != 41) { 4501 break; 4502 } 4503 } 4504 case 41: { 4505 // ramUtil 4506 ramUtil = input.readDouble(); 4507 bitField0_ |= 0x00000008; 4508 tag = input.readTag(); 4509 if (tag != 49) { 4510 break; 4511 } 4512 } 4513 case 49: { 4514 // gpuMem 4515 gpuMem = input.readDouble(); 4516 bitField0_ |= 0x00000010; 4517 tag = input.readTag(); 4518 if (tag != 57) { 4519 break; 4520 } 4521 } 4522 case 57: { 4523 // gpuMemUtil 4524 gpuMemUtil = input.readDouble(); 4525 bitField0_ |= 0x00000020; 4526 tag = input.readTag(); 4527 if (tag != 65) { 4528 break; 4529 } 4530 } 4531 case 65: { 4532 // diskUtilPct 4533 diskUtilPct = input.readDouble(); 4534 bitField0_ |= 0x00000040; 4535 tag = input.readTag(); 4536 if (tag != 89) { 4537 break; 4538 } 4539 } 4540 case 89: { 4541 // uptime 4542 uptime = input.readDouble(); 4543 bitField0_ |= 0x00000080; 4544 tag = input.readTag(); 4545 if (tag != 97) { 4546 break; 4547 } 4548 } 4549 case 97: { 4550 // sentBitRate 4551 sentBitRate = input.readDouble(); 4552 bitField0_ |= 0x00000100; 4553 tag = input.readTag(); 4554 if (tag != 105) { 4555 break; 4556 } 4557 } 4558 case 105: { 4559 // recvBitRate 4560 recvBitRate = input.readDouble(); 4561 bitField0_ |= 0x00000200; 4562 tag = input.readTag(); 4563 if (tag != 113) { 4564 break; 4565 } 4566 } 4567 case 113: { 4568 // diskUsableSpace 4569 diskUsableSpace = input.readDouble(); 4570 bitField0_ |= 0x00000400; 4571 tag = input.readTag(); 4572 if (tag != 26) { 4573 break; 4574 } 4575 } 4576 case 26: { 4577 // cpuThr 4578 input.readString(cpuThr); 4579 bitField0_ |= 0x00000800; 4580 tag = input.readTag(); 4581 if (tag != 82) { 4582 break; 4583 } 4584 } 4585 case 82: { 4586 // ipAddress 4587 input.readString(ipAddress); 4588 bitField0_ |= 0x00001000; 4589 tag = input.readTag(); 4590 if (tag != 74) { 4591 break; 4592 } 4593 } 4594 case 74: { 4595 // npuUsage [packed=true] 4596 input.readPackedDouble(npuUsage); 4597 bitField0_ |= 0x00002000; 4598 tag = input.readTag(); 4599 if (tag != 0) { 4600 break; 4601 } 4602 } 4603 case 0: { 4604 return this; 4605 } 4606 default: { 4607 if (!input.skipField(tag)) { 4608 return this; 4609 } 4610 tag = input.readTag(); 4611 break; 4612 } 4613 case 73: { 4614 // npuUsage [packed=false] 4615 tag = input.readRepeatedDouble(npuUsage, tag); 4616 bitField0_ |= 0x00002000; 4617 break; 4618 } 4619 } 4620 } 4621 } 4622 4623 @Override 4624 public void writeTo(final JsonSink output) throws IOException { 4625 output.beginObject(); 4626 if ((bitField0_ & 0x00000001) != 0) { 4627 output.writeDouble(FieldNames.cpuTemp, cpuTemp); 4628 } 4629 if ((bitField0_ & 0x00000002) != 0) { 4630 output.writeDouble(FieldNames.cpuUtil, cpuUtil); 4631 } 4632 if ((bitField0_ & 0x00000004) != 0) { 4633 output.writeDouble(FieldNames.ramMem, ramMem); 4634 } 4635 if ((bitField0_ & 0x00000008) != 0) { 4636 output.writeDouble(FieldNames.ramUtil, ramUtil); 4637 } 4638 if ((bitField0_ & 0x00000010) != 0) { 4639 output.writeDouble(FieldNames.gpuMem, gpuMem); 4640 } 4641 if ((bitField0_ & 0x00000020) != 0) { 4642 output.writeDouble(FieldNames.gpuMemUtil, gpuMemUtil); 4643 } 4644 if ((bitField0_ & 0x00000040) != 0) { 4645 output.writeDouble(FieldNames.diskUtilPct, diskUtilPct); 4646 } 4647 if ((bitField0_ & 0x00000080) != 0) { 4648 output.writeDouble(FieldNames.uptime, uptime); 4649 } 4650 if ((bitField0_ & 0x00000100) != 0) { 4651 output.writeDouble(FieldNames.sentBitRate, sentBitRate); 4652 } 4653 if ((bitField0_ & 0x00000200) != 0) { 4654 output.writeDouble(FieldNames.recvBitRate, recvBitRate); 4655 } 4656 if ((bitField0_ & 0x00000400) != 0) { 4657 output.writeDouble(FieldNames.diskUsableSpace, diskUsableSpace); 4658 } 4659 if ((bitField0_ & 0x00000800) != 0) { 4660 output.writeString(FieldNames.cpuThr, cpuThr); 4661 } 4662 if ((bitField0_ & 0x00001000) != 0) { 4663 output.writeString(FieldNames.ipAddress, ipAddress); 4664 } 4665 if ((bitField0_ & 0x00002000) != 0) { 4666 output.writeRepeatedDouble(FieldNames.npuUsage, npuUsage); 4667 } 4668 output.endObject(); 4669 } 4670 4671 @Override 4672 public ProtobufDeviceMetrics mergeFrom(final JsonSource input) throws IOException { 4673 if (!input.beginObject()) { 4674 return this; 4675 } 4676 while (!input.isAtEnd()) { 4677 switch (input.readFieldHash()) { 4678 case 985671068: 4679 case 501629963: { 4680 if (input.isAtField(FieldNames.cpuTemp)) { 4681 if (!input.trySkipNullValue()) { 4682 cpuTemp = input.readDouble(); 4683 bitField0_ |= 0x00000001; 4684 } 4685 } else { 4686 input.skipUnknownField(); 4687 } 4688 break; 4689 } 4690 case 985715146: 4691 case 501674041: { 4692 if (input.isAtField(FieldNames.cpuUtil)) { 4693 if (!input.trySkipNullValue()) { 4694 cpuUtil = input.readDouble(); 4695 bitField0_ |= 0x00000002; 4696 } 4697 } else { 4698 input.skipUnknownField(); 4699 } 4700 break; 4701 } 4702 case -938338089: 4703 case 976834100: { 4704 if (input.isAtField(FieldNames.ramMem)) { 4705 if (!input.trySkipNullValue()) { 4706 ramMem = input.readDouble(); 4707 bitField0_ |= 0x00000004; 4708 } 4709 } else { 4710 input.skipUnknownField(); 4711 } 4712 break; 4713 } 4714 case 976543040: 4715 case 217338755: { 4716 if (input.isAtField(FieldNames.ramUtil)) { 4717 if (!input.trySkipNullValue()) { 4718 ramUtil = input.readDouble(); 4719 bitField0_ |= 0x00000008; 4720 } 4721 } else { 4722 input.skipUnknownField(); 4723 } 4724 break; 4725 } 4726 case -1239167607: 4727 case 241053634: { 4728 if (input.isAtField(FieldNames.gpuMem)) { 4729 if (!input.trySkipNullValue()) { 4730 gpuMem = input.readDouble(); 4731 bitField0_ |= 0x00000010; 4732 } 4733 } else { 4734 input.skipUnknownField(); 4735 } 4736 break; 4737 } 4738 case 1026049323: 4739 case -1062927777: { 4740 if (input.isAtField(FieldNames.gpuMemUtil)) { 4741 if (!input.trySkipNullValue()) { 4742 gpuMemUtil = input.readDouble(); 4743 bitField0_ |= 0x00000020; 4744 } 4745 } else { 4746 input.skipUnknownField(); 4747 } 4748 break; 4749 } 4750 case -1112628958: 4751 case -2123947130: { 4752 if (input.isAtField(FieldNames.diskUtilPct)) { 4753 if (!input.trySkipNullValue()) { 4754 diskUtilPct = input.readDouble(); 4755 bitField0_ |= 0x00000040; 4756 } 4757 } else { 4758 input.skipUnknownField(); 4759 } 4760 break; 4761 } 4762 case -838362136: { 4763 if (input.isAtField(FieldNames.uptime)) { 4764 if (!input.trySkipNullValue()) { 4765 uptime = input.readDouble(); 4766 bitField0_ |= 0x00000080; 4767 } 4768 } else { 4769 input.skipUnknownField(); 4770 } 4771 break; 4772 } 4773 case 1748466901: 4774 case 552015257: { 4775 if (input.isAtField(FieldNames.sentBitRate)) { 4776 if (!input.trySkipNullValue()) { 4777 sentBitRate = input.readDouble(); 4778 bitField0_ |= 0x00000100; 4779 } 4780 } else { 4781 input.skipUnknownField(); 4782 } 4783 break; 4784 } 4785 case 1143234247: 4786 case -1255980277: { 4787 if (input.isAtField(FieldNames.recvBitRate)) { 4788 if (!input.trySkipNullValue()) { 4789 recvBitRate = input.readDouble(); 4790 bitField0_ |= 0x00000200; 4791 } 4792 } else { 4793 input.skipUnknownField(); 4794 } 4795 break; 4796 } 4797 case 991436049: 4798 case 1652490849: { 4799 if (input.isAtField(FieldNames.diskUsableSpace)) { 4800 if (!input.trySkipNullValue()) { 4801 diskUsableSpace = input.readDouble(); 4802 bitField0_ |= 0x00000400; 4803 } 4804 } else { 4805 input.skipUnknownField(); 4806 } 4807 break; 4808 } 4809 case -1353677386: 4810 case 986013031: { 4811 if (input.isAtField(FieldNames.cpuThr)) { 4812 if (!input.trySkipNullValue()) { 4813 input.readString(cpuThr); 4814 bitField0_ |= 0x00000800; 4815 } 4816 } else { 4817 input.skipUnknownField(); 4818 } 4819 break; 4820 } 4821 case 1634032845: 4822 case 1480014044: { 4823 if (input.isAtField(FieldNames.ipAddress)) { 4824 if (!input.trySkipNullValue()) { 4825 input.readString(ipAddress); 4826 bitField0_ |= 0x00001000; 4827 } 4828 } else { 4829 input.skipUnknownField(); 4830 } 4831 break; 4832 } 4833 case -1811561874: 4834 case -35174059: { 4835 if (input.isAtField(FieldNames.npuUsage)) { 4836 if (!input.trySkipNullValue()) { 4837 input.readRepeatedDouble(npuUsage); 4838 bitField0_ |= 0x00002000; 4839 } 4840 } else { 4841 input.skipUnknownField(); 4842 } 4843 break; 4844 } 4845 default: { 4846 input.skipUnknownField(); 4847 break; 4848 } 4849 } 4850 } 4851 input.endObject(); 4852 return this; 4853 } 4854 4855 @Override 4856 public ProtobufDeviceMetrics clone() { 4857 return new ProtobufDeviceMetrics().copyFrom(this); 4858 } 4859 4860 @Override 4861 public boolean isEmpty() { 4862 return ((bitField0_) == 0); 4863 } 4864 4865 public static ProtobufDeviceMetrics parseFrom(final byte[] data) throws 4866 InvalidProtocolBufferException { 4867 return ProtoMessage.mergeFrom(new ProtobufDeviceMetrics(), data).checkInitialized(); 4868 } 4869 4870 public static ProtobufDeviceMetrics parseFrom(final ProtoSource input) throws IOException { 4871 return ProtoMessage.mergeFrom(new ProtobufDeviceMetrics(), input).checkInitialized(); 4872 } 4873 4874 public static ProtobufDeviceMetrics parseFrom(final JsonSource input) throws IOException { 4875 return ProtoMessage.mergeFrom(new ProtobufDeviceMetrics(), input).checkInitialized(); 4876 } 4877 4878 /** 4879 * @return factory for creating ProtobufDeviceMetrics messages 4880 */ 4881 public static MessageFactory<ProtobufDeviceMetrics> getFactory() { 4882 return ProtobufDeviceMetricsFactory.INSTANCE; 4883 } 4884 4885 /** 4886 * @return this type's descriptor. 4887 */ 4888 public static Descriptors.Descriptor getDescriptor() { 4889 return Photon.photonvision_proto_ProtobufDeviceMetrics_descriptor; 4890 } 4891 4892 private enum ProtobufDeviceMetricsFactory implements MessageFactory<ProtobufDeviceMetrics> { 4893 INSTANCE; 4894 4895 @Override 4896 public ProtobufDeviceMetrics create() { 4897 return ProtobufDeviceMetrics.newInstance(); 4898 } 4899 } 4900 4901 /** 4902 * Contains name constants used for serializing JSON 4903 */ 4904 static class FieldNames { 4905 static final FieldName cpuTemp = FieldName.forField("cpuTemp", "cpu_temp"); 4906 4907 static final FieldName cpuUtil = FieldName.forField("cpuUtil", "cpu_util"); 4908 4909 static final FieldName ramMem = FieldName.forField("ramMem", "ram_mem"); 4910 4911 static final FieldName ramUtil = FieldName.forField("ramUtil", "ram_util"); 4912 4913 static final FieldName gpuMem = FieldName.forField("gpuMem", "gpu_mem"); 4914 4915 static final FieldName gpuMemUtil = FieldName.forField("gpuMemUtil", "gpu_mem_util"); 4916 4917 static final FieldName diskUtilPct = FieldName.forField("diskUtilPct", "disk_util_pct"); 4918 4919 static final FieldName uptime = FieldName.forField("uptime"); 4920 4921 static final FieldName sentBitRate = FieldName.forField("sentBitRate", "sent_bit_rate"); 4922 4923 static final FieldName recvBitRate = FieldName.forField("recvBitRate", "recv_bit_rate"); 4924 4925 static final FieldName diskUsableSpace = FieldName.forField("diskUsableSpace", "disk_usable_space"); 4926 4927 static final FieldName cpuThr = FieldName.forField("cpuThr", "cpu_thr"); 4928 4929 static final FieldName ipAddress = FieldName.forField("ipAddress", "ip_address"); 4930 4931 static final FieldName npuUsage = FieldName.forField("npuUsage", "npu_usage"); 4932 } 4933 } 4934}