diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-03-10 03:59:31 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-03-10 03:59:31 +0200 |
| commit | d1d28d68564d0a76021944ba1e2993ffb3eaba61 (patch) | |
| tree | c0068878c600b48edccca9e824d6b9c41674cbee /Software/Visual_Studio/Tango.PMR | |
| parent | dff40538d054551a74034b473f9f0e0c3590bcd0 (diff) | |
| download | Tango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.tar.gz Tango-d1d28d68564d0a76021944ba1e2993ffb3eaba61.zip | |
Bit completed except updated BIT types.
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR')
3 files changed, 72 insertions, 22 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs index b0e0ce5e7..5660696df 100644 --- a/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResult.cs @@ -23,14 +23,15 @@ namespace Tango.PMR.Diagnostics { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "Cg9CaXRSZXN1bHQucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGljcxoNQml0", - "VHlwZS5wcm90byJhCglCaXRSZXN1bHQSLwoHQml0VHlwZRgBIAEoDjIeLlRh", - "bmdvLlBNUi5EaWFnbm9zdGljcy5CaXRUeXBlEg4KBlBhc3NlZBgCIAEoCBIT", - "CgtEZXNjcmlwdGlvbhgDIAEoCUIhCh9jb20udHdpbmUudGFuZ28ucG1yLmRp", - "YWdub3N0aWNzYgZwcm90bzM=")); + "VHlwZS5wcm90bxoVQml0UmVzdWx0U3RhdHVzLnByb3RvIokBCglCaXRSZXN1", + "bHQSLwoHQml0VHlwZRgBIAEoDjIeLlRhbmdvLlBNUi5EaWFnbm9zdGljcy5C", + "aXRUeXBlEjYKBlN0YXR1cxgCIAEoDjImLlRhbmdvLlBNUi5EaWFnbm9zdGlj", + "cy5CaXRSZXN1bHRTdGF0dXMSEwoLRGVzY3JpcHRpb24YAyABKAlCIQofY29t", + "LnR3aW5lLnRhbmdvLnBtci5kaWFnbm9zdGljc2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.BitTypeReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.BitTypeReflection.Descriptor, global::Tango.PMR.Diagnostics.BitResultStatusReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.BitResult), global::Tango.PMR.Diagnostics.BitResult.Parser, new[]{ "BitType", "Passed", "Description" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.BitResult), global::Tango.PMR.Diagnostics.BitResult.Parser, new[]{ "BitType", "Status", "Description" }, null, null, null) })); } #endregion @@ -62,7 +63,7 @@ namespace Tango.PMR.Diagnostics { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public BitResult(BitResult other) : this() { bitType_ = other.bitType_; - passed_ = other.passed_; + status_ = other.status_; description_ = other.description_; } @@ -82,14 +83,14 @@ namespace Tango.PMR.Diagnostics { } } - /// <summary>Field number for the "Passed" field.</summary> - public const int PassedFieldNumber = 2; - private bool passed_; + /// <summary>Field number for the "Status" field.</summary> + public const int StatusFieldNumber = 2; + private global::Tango.PMR.Diagnostics.BitResultStatus status_ = 0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Passed { - get { return passed_; } + public global::Tango.PMR.Diagnostics.BitResultStatus Status { + get { return status_; } set { - passed_ = value; + status_ = value; } } @@ -118,7 +119,7 @@ namespace Tango.PMR.Diagnostics { return true; } if (BitType != other.BitType) return false; - if (Passed != other.Passed) return false; + if (Status != other.Status) return false; if (Description != other.Description) return false; return true; } @@ -127,7 +128,7 @@ namespace Tango.PMR.Diagnostics { public override int GetHashCode() { int hash = 1; if (BitType != 0) hash ^= BitType.GetHashCode(); - if (Passed != false) hash ^= Passed.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); if (Description.Length != 0) hash ^= Description.GetHashCode(); return hash; } @@ -143,9 +144,9 @@ namespace Tango.PMR.Diagnostics { output.WriteRawTag(8); output.WriteEnum((int) BitType); } - if (Passed != false) { + if (Status != 0) { output.WriteRawTag(16); - output.WriteBool(Passed); + output.WriteEnum((int) Status); } if (Description.Length != 0) { output.WriteRawTag(26); @@ -159,8 +160,8 @@ namespace Tango.PMR.Diagnostics { if (BitType != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) BitType); } - if (Passed != false) { - size += 1 + 1; + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); } if (Description.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); @@ -176,8 +177,8 @@ namespace Tango.PMR.Diagnostics { if (other.BitType != 0) { BitType = other.BitType; } - if (other.Passed != false) { - Passed = other.Passed; + if (other.Status != 0) { + Status = other.Status; } if (other.Description.Length != 0) { Description = other.Description; @@ -197,7 +198,7 @@ namespace Tango.PMR.Diagnostics { break; } case 16: { - Passed = input.ReadBool(); + status_ = (global::Tango.PMR.Diagnostics.BitResultStatus) input.ReadEnum(); break; } case 26: { diff --git a/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResultStatus.cs b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResultStatus.cs new file mode 100644 index 000000000..2abeab630 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Diagnostics/BitResultStatus.cs @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: BitResultStatus.proto +#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 Tango.PMR.Diagnostics { + + /// <summary>Holder for reflection information generated from BitResultStatus.proto</summary> + public static partial class BitResultStatusReflection { + + #region Descriptor + /// <summary>File descriptor for BitResultStatus.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static BitResultStatusReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChVCaXRSZXN1bHRTdGF0dXMucHJvdG8SFVRhbmdvLlBNUi5EaWFnbm9zdGlj", + "cypDCg9CaXRSZXN1bHRTdGF0dXMSCwoHUGVuZGluZxAAEgoKBlBhc3NlZBAB", + "EgoKBkZhaWxlZBACEgsKB1dhcm5pbmcQA0IhCh9jb20udHdpbmUudGFuZ28u", + "cG1yLmRpYWdub3N0aWNzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Diagnostics.BitResultStatus), }, null)); + } + #endregion + + } + #region Enums + public enum BitResultStatus { + [pbr::OriginalName("Pending")] Pending = 0, + [pbr::OriginalName("Passed")] Passed = 1, + [pbr::OriginalName("Failed")] Failed = 2, + [pbr::OriginalName("Warning")] Warning = 3, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index f54e0aa49..ec9e31f76 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -107,6 +107,7 @@ <Compile Include="Diagnostics\BitResult.cs" /> <Compile Include="Diagnostics\BitResultsRequest.cs" /> <Compile Include="Diagnostics\BitResultsResponse.cs" /> + <Compile Include="Diagnostics\BitResultStatus.cs" /> <Compile Include="Diagnostics\BitType.cs" /> <Compile Include="Diagnostics\Cartridge.cs" /> <Compile Include="Diagnostics\CartridgeAction.cs" /> |
