Files
unity-application/Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/Calculators/Util/Latency.cs
2023-03-12 20:34:16 +00:00

574 lines
21 KiB
C#

// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/calculators/util/latency.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Mediapipe {
/// <summary>Holder for reflection information generated from mediapipe/calculators/util/latency.proto</summary>
public static partial class LatencyReflection {
#region Descriptor
/// <summary>File descriptor for mediapipe/calculators/util/latency.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static LatencyReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CihtZWRpYXBpcGUvY2FsY3VsYXRvcnMvdXRpbC9sYXRlbmN5LnByb3RvEglt",
"ZWRpYXBpcGUiygEKDVBhY2tldExhdGVuY3kSHAoUY3VycmVudF9sYXRlbmN5",
"X3VzZWMYCCABKAMSDgoGY291bnRzGAkgAygDEhkKDW51bV9pbnRlcnZhbHMY",
"CiABKAM6AjEwEiEKEmludGVydmFsX3NpemVfdXNlYxgLIAEoAzoFMTAwMDAS",
"GAoQYXZnX2xhdGVuY3lfdXNlYxgCIAEoAxINCgVsYWJlbBgHIAEoCRIYChBz",
"dW1fbGF0ZW5jeV91c2VjGAwgASgDSgQIARACSgQIAxAH"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.PacketLatency), global::Mediapipe.PacketLatency.Parser, new[]{ "CurrentLatencyUsec", "Counts", "NumIntervals", "IntervalSizeUsec", "AvgLatencyUsec", "Label", "SumLatencyUsec" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
/// <summary>
/// Contains the latency information for a packet stream in mediapipe. The
/// following are provided
/// 1. current latency
/// 2. running average
/// 3. histogram of latencies observed
/// 4. cumulative sum of latencies observed
/// NextId: 13
/// </summary>
public sealed partial class PacketLatency : pb::IMessage<PacketLatency>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<PacketLatency> _parser = new pb::MessageParser<PacketLatency>(() => new PacketLatency());
private pb::UnknownFieldSet _unknownFields;
private int _hasBits0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<PacketLatency> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.LatencyReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public PacketLatency() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public PacketLatency(PacketLatency other) : this() {
_hasBits0 = other._hasBits0;
currentLatencyUsec_ = other.currentLatencyUsec_;
counts_ = other.counts_.Clone();
numIntervals_ = other.numIntervals_;
intervalSizeUsec_ = other.intervalSizeUsec_;
avgLatencyUsec_ = other.avgLatencyUsec_;
label_ = other.label_;
sumLatencyUsec_ = other.sumLatencyUsec_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public PacketLatency Clone() {
return new PacketLatency(this);
}
/// <summary>Field number for the "current_latency_usec" field.</summary>
public const int CurrentLatencyUsecFieldNumber = 8;
private readonly static long CurrentLatencyUsecDefaultValue = 0L;
private long currentLatencyUsec_;
/// <summary>
/// Current latency (delay in microseconds wrt a reference packet).
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long CurrentLatencyUsec {
get { if ((_hasBits0 & 2) != 0) { return currentLatencyUsec_; } else { return CurrentLatencyUsecDefaultValue; } }
set {
_hasBits0 |= 2;
currentLatencyUsec_ = value;
}
}
/// <summary>Gets whether the "current_latency_usec" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasCurrentLatencyUsec {
get { return (_hasBits0 & 2) != 0; }
}
/// <summary>Clears the value of the "current_latency_usec" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearCurrentLatencyUsec() {
_hasBits0 &= ~2;
}
/// <summary>Field number for the "counts" field.</summary>
public const int CountsFieldNumber = 9;
private static readonly pb::FieldCodec<long> _repeated_counts_codec
= pb::FieldCodec.ForInt64(72);
private readonly pbc::RepeatedField<long> counts_ = new pbc::RepeatedField<long>();
/// <summary>
/// The latency histogram which stores the count recorded for each specified
/// interval.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<long> Counts {
get { return counts_; }
}
/// <summary>Field number for the "num_intervals" field.</summary>
public const int NumIntervalsFieldNumber = 10;
private readonly static long NumIntervalsDefaultValue = 10L;
private long numIntervals_;
/// <summary>
/// Number of intervals for the latency histogram output.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long NumIntervals {
get { if ((_hasBits0 & 4) != 0) { return numIntervals_; } else { return NumIntervalsDefaultValue; } }
set {
_hasBits0 |= 4;
numIntervals_ = value;
}
}
/// <summary>Gets whether the "num_intervals" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasNumIntervals {
get { return (_hasBits0 & 4) != 0; }
}
/// <summary>Clears the value of the "num_intervals" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearNumIntervals() {
_hasBits0 &= ~4;
}
/// <summary>Field number for the "interval_size_usec" field.</summary>
public const int IntervalSizeUsecFieldNumber = 11;
private readonly static long IntervalSizeUsecDefaultValue = 10000L;
private long intervalSizeUsec_;
/// <summary>
/// Size of the histogram intervals (in microseconds). The first interval is
/// [0, interval_size_usec). The last interval extends to +inf.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long IntervalSizeUsec {
get { if ((_hasBits0 & 8) != 0) { return intervalSizeUsec_; } else { return IntervalSizeUsecDefaultValue; } }
set {
_hasBits0 |= 8;
intervalSizeUsec_ = value;
}
}
/// <summary>Gets whether the "interval_size_usec" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasIntervalSizeUsec {
get { return (_hasBits0 & 8) != 0; }
}
/// <summary>Clears the value of the "interval_size_usec" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearIntervalSizeUsec() {
_hasBits0 &= ~8;
}
/// <summary>Field number for the "avg_latency_usec" field.</summary>
public const int AvgLatencyUsecFieldNumber = 2;
private readonly static long AvgLatencyUsecDefaultValue = 0L;
private long avgLatencyUsec_;
/// <summary>
/// Running average of latencies observed so far.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long AvgLatencyUsec {
get { if ((_hasBits0 & 1) != 0) { return avgLatencyUsec_; } else { return AvgLatencyUsecDefaultValue; } }
set {
_hasBits0 |= 1;
avgLatencyUsec_ = value;
}
}
/// <summary>Gets whether the "avg_latency_usec" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasAvgLatencyUsec {
get { return (_hasBits0 & 1) != 0; }
}
/// <summary>Clears the value of the "avg_latency_usec" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearAvgLatencyUsec() {
_hasBits0 &= ~1;
}
/// <summary>Field number for the "label" field.</summary>
public const int LabelFieldNumber = 7;
private readonly static string LabelDefaultValue = "";
private string label_;
/// <summary>
/// An identifier label for the packet.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Label {
get { return label_ ?? LabelDefaultValue; }
set {
label_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Gets whether the "label" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasLabel {
get { return label_ != null; }
}
/// <summary>Clears the value of the "label" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearLabel() {
label_ = null;
}
/// <summary>Field number for the "sum_latency_usec" field.</summary>
public const int SumLatencyUsecFieldNumber = 12;
private readonly static long SumLatencyUsecDefaultValue = 0L;
private long sumLatencyUsec_;
/// <summary>
/// Cumulative sum of individual packet latencies of all the packets output so
/// far.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public long SumLatencyUsec {
get { if ((_hasBits0 & 16) != 0) { return sumLatencyUsec_; } else { return SumLatencyUsecDefaultValue; } }
set {
_hasBits0 |= 16;
sumLatencyUsec_ = value;
}
}
/// <summary>Gets whether the "sum_latency_usec" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasSumLatencyUsec {
get { return (_hasBits0 & 16) != 0; }
}
/// <summary>Clears the value of the "sum_latency_usec" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearSumLatencyUsec() {
_hasBits0 &= ~16;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as PacketLatency);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(PacketLatency other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (CurrentLatencyUsec != other.CurrentLatencyUsec) return false;
if(!counts_.Equals(other.counts_)) return false;
if (NumIntervals != other.NumIntervals) return false;
if (IntervalSizeUsec != other.IntervalSizeUsec) return false;
if (AvgLatencyUsec != other.AvgLatencyUsec) return false;
if (Label != other.Label) return false;
if (SumLatencyUsec != other.SumLatencyUsec) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (HasCurrentLatencyUsec) hash ^= CurrentLatencyUsec.GetHashCode();
hash ^= counts_.GetHashCode();
if (HasNumIntervals) hash ^= NumIntervals.GetHashCode();
if (HasIntervalSizeUsec) hash ^= IntervalSizeUsec.GetHashCode();
if (HasAvgLatencyUsec) hash ^= AvgLatencyUsec.GetHashCode();
if (HasLabel) hash ^= Label.GetHashCode();
if (HasSumLatencyUsec) hash ^= SumLatencyUsec.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (HasAvgLatencyUsec) {
output.WriteRawTag(16);
output.WriteInt64(AvgLatencyUsec);
}
if (HasLabel) {
output.WriteRawTag(58);
output.WriteString(Label);
}
if (HasCurrentLatencyUsec) {
output.WriteRawTag(64);
output.WriteInt64(CurrentLatencyUsec);
}
counts_.WriteTo(output, _repeated_counts_codec);
if (HasNumIntervals) {
output.WriteRawTag(80);
output.WriteInt64(NumIntervals);
}
if (HasIntervalSizeUsec) {
output.WriteRawTag(88);
output.WriteInt64(IntervalSizeUsec);
}
if (HasSumLatencyUsec) {
output.WriteRawTag(96);
output.WriteInt64(SumLatencyUsec);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (HasAvgLatencyUsec) {
output.WriteRawTag(16);
output.WriteInt64(AvgLatencyUsec);
}
if (HasLabel) {
output.WriteRawTag(58);
output.WriteString(Label);
}
if (HasCurrentLatencyUsec) {
output.WriteRawTag(64);
output.WriteInt64(CurrentLatencyUsec);
}
counts_.WriteTo(ref output, _repeated_counts_codec);
if (HasNumIntervals) {
output.WriteRawTag(80);
output.WriteInt64(NumIntervals);
}
if (HasIntervalSizeUsec) {
output.WriteRawTag(88);
output.WriteInt64(IntervalSizeUsec);
}
if (HasSumLatencyUsec) {
output.WriteRawTag(96);
output.WriteInt64(SumLatencyUsec);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (HasCurrentLatencyUsec) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(CurrentLatencyUsec);
}
size += counts_.CalculateSize(_repeated_counts_codec);
if (HasNumIntervals) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(NumIntervals);
}
if (HasIntervalSizeUsec) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(IntervalSizeUsec);
}
if (HasAvgLatencyUsec) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(AvgLatencyUsec);
}
if (HasLabel) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Label);
}
if (HasSumLatencyUsec) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(SumLatencyUsec);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(PacketLatency other) {
if (other == null) {
return;
}
if (other.HasCurrentLatencyUsec) {
CurrentLatencyUsec = other.CurrentLatencyUsec;
}
counts_.Add(other.counts_);
if (other.HasNumIntervals) {
NumIntervals = other.NumIntervals;
}
if (other.HasIntervalSizeUsec) {
IntervalSizeUsec = other.IntervalSizeUsec;
}
if (other.HasAvgLatencyUsec) {
AvgLatencyUsec = other.AvgLatencyUsec;
}
if (other.HasLabel) {
Label = other.Label;
}
if (other.HasSumLatencyUsec) {
SumLatencyUsec = other.SumLatencyUsec;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 16: {
AvgLatencyUsec = input.ReadInt64();
break;
}
case 58: {
Label = input.ReadString();
break;
}
case 64: {
CurrentLatencyUsec = input.ReadInt64();
break;
}
case 74:
case 72: {
counts_.AddEntriesFrom(input, _repeated_counts_codec);
break;
}
case 80: {
NumIntervals = input.ReadInt64();
break;
}
case 88: {
IntervalSizeUsec = input.ReadInt64();
break;
}
case 96: {
SumLatencyUsec = input.ReadInt64();
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 16: {
AvgLatencyUsec = input.ReadInt64();
break;
}
case 58: {
Label = input.ReadString();
break;
}
case 64: {
CurrentLatencyUsec = input.ReadInt64();
break;
}
case 74:
case 72: {
counts_.AddEntriesFrom(ref input, _repeated_counts_codec);
break;
}
case 80: {
NumIntervals = input.ReadInt64();
break;
}
case 88: {
IntervalSizeUsec = input.ReadInt64();
break;
}
case 96: {
SumLatencyUsec = input.ReadInt64();
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code