From 79cc4b56962ca4a508be501f7f2fb42938a3a073 Mon Sep 17 00:00:00 2001 From: Roy Date: Tue, 23 May 2023 10:42:06 +0300 Subject: Added BTSR, Dancers. Winders to Machine Status in PMR. --- .../Tango.PMR/MachineStatus/MachineStatus.cs | 73 ++++++++++++++++++++-- 1 file changed, 69 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/Tango.PMR') diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineStatus.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineStatus.cs index a50669c26..78301db82 100644 --- a/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineStatus.cs +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineStatus.cs @@ -24,17 +24,19 @@ namespace Tango.PMR.MachineStatus { string.Concat( "ChNNYWNoaW5lU3RhdHVzLnByb3RvEhdUYW5nby5QTVIuTWFjaGluZVN0YXR1", "cxoSTWFjaGluZVN0YXRlLnByb3RvGhJJRFNQYWNrTGV2ZWwucHJvdG8aEFNw", - "b29sU3RhdGUucHJvdG8i+AEKDU1hY2hpbmVTdGF0dXMSNAoFU3RhdGUYASAB", + "b29sU3RhdGUucHJvdG8ivgIKDU1hY2hpbmVTdGF0dXMSNAoFU3RhdGUYASAB", "KA4yJS5UYW5nby5QTVIuTWFjaGluZVN0YXR1cy5NYWNoaW5lU3RhdGUSPQoO", "SURTUGFja3NMZXZlbHMYAiADKAsyJS5UYW5nby5QTVIuTWFjaGluZVN0YXR1", "cy5JRFNQYWNrTGV2ZWwSGgoST3ZlcmFsbFRlbXBlcmF0dXJlGAMgASgBEjcK", "ClNwb29sU3RhdGUYBCABKA4yIy5UYW5nby5QTVIuTWFjaGluZVN0YXR1cy5T", - "cG9vbFN0YXRlEh0KFUF1dG9JbmtGaWxsaW5nRW5hYmxlZBgFIAEoCEIjCiFj", - "b20udHdpbmUudGFuZ28ucG1yLm1hY2hpbmVzdGF0dXNiBnByb3RvMw==")); + "cG9vbFN0YXRlEh0KFUF1dG9JbmtGaWxsaW5nRW5hYmxlZBgFIAEoCBIUCgxC", + "dHNyc0luRXJyb3IYCiADKAgSFgoORGFuY2Vyc0luRXJyb3IYCyADKAgSFgoO", + "V2luZGVyc0luRXJyb3IYDCADKAhCIwohY29tLnR3aW5lLnRhbmdvLnBtci5t", + "YWNoaW5lc3RhdHVzYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.MachineStatus.MachineStateReflection.Descriptor, global::Tango.PMR.MachineStatus.IDSPackLevelReflection.Descriptor, global::Tango.PMR.MachineStatus.SpoolStateReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.MachineStatus), global::Tango.PMR.MachineStatus.MachineStatus.Parser, new[]{ "State", "IDSPacksLevels", "OverallTemperature", "SpoolState", "AutoInkFillingEnabled" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.MachineStatus), global::Tango.PMR.MachineStatus.MachineStatus.Parser, new[]{ "State", "IDSPacksLevels", "OverallTemperature", "SpoolState", "AutoInkFillingEnabled", "BtsrsInError", "DancersInError", "WindersInError" }, null, null, null) })); } #endregion @@ -70,6 +72,9 @@ namespace Tango.PMR.MachineStatus { overallTemperature_ = other.overallTemperature_; spoolState_ = other.spoolState_; autoInkFillingEnabled_ = other.autoInkFillingEnabled_; + btsrsInError_ = other.btsrsInError_.Clone(); + dancersInError_ = other.dancersInError_.Clone(); + windersInError_ = other.windersInError_.Clone(); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -131,6 +136,36 @@ namespace Tango.PMR.MachineStatus { } } + /// Field number for the "BtsrsInError" field. + public const int BtsrsInErrorFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_btsrsInError_codec + = pb::FieldCodec.ForBool(82); + private readonly pbc::RepeatedField btsrsInError_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField BtsrsInError { + get { return btsrsInError_; } + } + + /// Field number for the "DancersInError" field. + public const int DancersInErrorFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_dancersInError_codec + = pb::FieldCodec.ForBool(90); + private readonly pbc::RepeatedField dancersInError_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField DancersInError { + get { return dancersInError_; } + } + + /// Field number for the "WindersInError" field. + public const int WindersInErrorFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_windersInError_codec + = pb::FieldCodec.ForBool(98); + private readonly pbc::RepeatedField windersInError_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField WindersInError { + get { return windersInError_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as MachineStatus); @@ -149,6 +184,9 @@ namespace Tango.PMR.MachineStatus { if (OverallTemperature != other.OverallTemperature) return false; if (SpoolState != other.SpoolState) return false; if (AutoInkFillingEnabled != other.AutoInkFillingEnabled) return false; + if(!btsrsInError_.Equals(other.btsrsInError_)) return false; + if(!dancersInError_.Equals(other.dancersInError_)) return false; + if(!windersInError_.Equals(other.windersInError_)) return false; return true; } @@ -160,6 +198,9 @@ namespace Tango.PMR.MachineStatus { if (OverallTemperature != 0D) hash ^= OverallTemperature.GetHashCode(); if (SpoolState != 0) hash ^= SpoolState.GetHashCode(); if (AutoInkFillingEnabled != false) hash ^= AutoInkFillingEnabled.GetHashCode(); + hash ^= btsrsInError_.GetHashCode(); + hash ^= dancersInError_.GetHashCode(); + hash ^= windersInError_.GetHashCode(); return hash; } @@ -187,6 +228,9 @@ namespace Tango.PMR.MachineStatus { output.WriteRawTag(40); output.WriteBool(AutoInkFillingEnabled); } + btsrsInError_.WriteTo(output, _repeated_btsrsInError_codec); + dancersInError_.WriteTo(output, _repeated_dancersInError_codec); + windersInError_.WriteTo(output, _repeated_windersInError_codec); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -205,6 +249,9 @@ namespace Tango.PMR.MachineStatus { if (AutoInkFillingEnabled != false) { size += 1 + 1; } + size += btsrsInError_.CalculateSize(_repeated_btsrsInError_codec); + size += dancersInError_.CalculateSize(_repeated_dancersInError_codec); + size += windersInError_.CalculateSize(_repeated_windersInError_codec); return size; } @@ -226,6 +273,9 @@ namespace Tango.PMR.MachineStatus { if (other.AutoInkFillingEnabled != false) { AutoInkFillingEnabled = other.AutoInkFillingEnabled; } + btsrsInError_.Add(other.btsrsInError_); + dancersInError_.Add(other.dancersInError_); + windersInError_.Add(other.windersInError_); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -256,6 +306,21 @@ namespace Tango.PMR.MachineStatus { AutoInkFillingEnabled = input.ReadBool(); break; } + case 82: + case 80: { + btsrsInError_.AddEntriesFrom(input, _repeated_btsrsInError_codec); + break; + } + case 90: + case 88: { + dancersInError_.AddEntriesFrom(input, _repeated_dancersInError_codec); + break; + } + case 98: + case 96: { + windersInError_.AddEntriesFrom(input, _repeated_windersInError_codec); + break; + } } } } -- cgit v1.3.1