From 5f8a6184e8c0b6de2e61fd9845378eb4324c50a6 Mon Sep 17 00:00:00 2001 From: Roy Date: Mon, 6 Feb 2023 19:47:59 +0200 Subject: Machine Type Connection, Discovery Handling. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes Software/PMR/Messages/Common/MachineType.proto | 10 ++ .../PMR/Messages/Connection/ConnectRequest.proto | 2 + .../ExternalBridgeUdpDiscoveryPacket.proto | 3 + .../Connection/DefaultMachineProvider.cs | 2 + .../Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs | 8 + .../Visual_Studio/Tango.BL/Entities/Machine.cs | 14 ++ .../Visual_Studio/Tango.BL/Entities/MachineBase.cs | 38 +++++ .../Tango.BL/Enumerations/MachineTypes.cs | 17 ++ Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 3 +- .../Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs | 1 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 3 + .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 190 ++++++++++----------- .../ExternalBridge/ExternalBridgeScanner.cs | 4 + .../ExternalBridge/ExternalBridgeService.cs | 4 +- .../ExternalBridge/Web/MachineInfo.cs | 1 + .../Operation/IMachineOperator.cs | 6 + .../Tango.Integration/Operation/MachineOperator.cs | 8 +- .../Visual_Studio/Tango.PMR/Common/MachineType.cs | 45 +++++ .../Tango.PMR/Connection/ConnectRequest.cs | 42 ++++- .../ExternalBridgeUdpDiscoveryPacket.cs | 41 ++++- Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj | 3 +- .../Configurations/ProvisionMachine.xml | Bin 82334 -> 82642 bytes .../SQLExaminer/Configurations/UpdateMachine.xml | Bin 84274 -> 84582 bytes .../Tango.Transport/Discovery/TcpValidationInfo.cs | 1 + 26 files changed, 335 insertions(+), 111 deletions(-) create mode 100644 Software/PMR/Messages/Common/MachineType.proto create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/MachineTypes.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Common/MachineType.cs diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 89eb98fa5..0c6b719f7 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 85da53042..c083d262b 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/PMR/Messages/Common/MachineType.proto b/Software/PMR/Messages/Common/MachineType.proto new file mode 100644 index 000000000..8f80120f0 --- /dev/null +++ b/Software/PMR/Messages/Common/MachineType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package Tango.PMR.Common; +option java_package = "com.twine.tango.pmr.common"; + +enum MachineType +{ + TS1800 = 0; + Eureka = 1; +} diff --git a/Software/PMR/Messages/Connection/ConnectRequest.proto b/Software/PMR/Messages/Connection/ConnectRequest.proto index 11661bc5c..a672aeb3f 100644 --- a/Software/PMR/Messages/Connection/ConnectRequest.proto +++ b/Software/PMR/Messages/Connection/ConnectRequest.proto @@ -1,6 +1,7 @@ syntax = "proto3"; import "JobSpoolType.proto"; +import "MachineType.proto"; package Tango.PMR.Connection; option java_package = "com.twine.tango.pmr.connection"; @@ -10,4 +11,5 @@ message ConnectRequest string Password = 1; int64 UnixTime = 2; PMR.Printing.JobSpoolType SpoolType = 3; + PMR.Common.MachineType MachineType = 4; } \ No newline at end of file diff --git a/Software/PMR/Messages/Integration/ExternalBridgeUdpDiscoveryPacket.proto b/Software/PMR/Messages/Integration/ExternalBridgeUdpDiscoveryPacket.proto index 9a65d3818..414052552 100644 --- a/Software/PMR/Messages/Integration/ExternalBridgeUdpDiscoveryPacket.proto +++ b/Software/PMR/Messages/Integration/ExternalBridgeUdpDiscoveryPacket.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "MachineType.proto"; + package Tango.PMR.Integration; option java_package = "com.twine.tango.pmr.integration"; @@ -8,4 +10,5 @@ message ExternalBridgeUdpDiscoveryPacket string Time = 1; string SerialNumber = 2; string Guid = 3; + PMR.Common.MachineType MachineType = 4; } \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs index 2b3bc2a99..bef18e15b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -320,6 +320,8 @@ namespace Tango.PPC.Common.Connection { LogManager.Log("First machine entry found. Machine serial number is: " + Machine.SerialNumber + "."); + MachineOperator.MachineType = Machine.Type; + if (Machine.IsDemo) { LogManager.Log("Machine is in demo mode. Changing firmware upgrade mode to TFP package only."); diff --git a/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs index f6a97c88e..48974eb96 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/MachineDTOBase.cs @@ -301,5 +301,13 @@ namespace Tango.BL.DTO get; set; } + /// + /// machine type + /// + public Int32 MachineType + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs index b82738db8..4e998bdc9 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs @@ -90,6 +90,20 @@ namespace Tango.BL.Entities } } + [NotMapped] + [JsonIgnore] + public MachineTypes Type + { + get + { + return (MachineTypes)MachineType; + } + set + { + MachineType = value.ToInt32(); + } + } + #endregion protected override void RaisePropertyChanged(string propName) diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs index b56e59174..dcd84d9eb 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs @@ -81,6 +81,8 @@ namespace Tango.BL.Entities public event EventHandler VersionTagChanged; + public event EventHandler MachineTypeChanged; + public event EventHandler> CatsChanged; public event EventHandler> ColorProcessParametersChanged; @@ -1037,6 +1039,33 @@ namespace Tango.BL.Entities } } + protected Int32 _machinetype; + + /// + /// Gets or sets the machinebase machine type. + /// + + [Column("MACHINE_TYPE")] + + public Int32 MachineType + { + get + { + return _machinetype; + } + + set + { + if (_machinetype != value) + { + _machinetype = value; + + OnMachineTypeChanged(value); + + } + } + } + protected SynchronizedObservableCollection _cats; /// @@ -1601,6 +1630,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(VersionTag)); } + /// + /// Called when the MachineType has changed. + /// + protected virtual void OnMachineTypeChanged(Int32 machinetype) + { + MachineTypeChanged?.Invoke(this, machinetype); + RaisePropertyChanged(nameof(MachineType)); + } + /// /// Called when the Cats has changed. /// diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/MachineTypes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/MachineTypes.cs new file mode 100644 index 000000000..ff5104b9b --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/MachineTypes.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Enumerations +{ + public enum MachineTypes + { + [Description("TS-1800")] + TS1800 = 0, + [Description("Eureka")] + Eureka = 1, + } +} diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index d00304e0e..659565224 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -596,6 +596,7 @@ + @@ -832,7 +833,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs index 98b65c77c..415ecaf50 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs @@ -66,6 +66,7 @@ namespace Tango.DAL.Remote.DB public bool LIGHT_INKS_INSTALLED { get; set; } public bool BTSR_INSTALLED { get; set; } public string VERSION_TAG { get; set; } + public int MACHINE_TYPE { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CATS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index d28d22849..889a6ded6 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -963,6 +963,7 @@ + @@ -6597,6 +6598,7 @@ + @@ -9997,6 +9999,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 88fc1b92d..1d22ffc93 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,102 +5,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs index da55a13d3..a2b0d0f5b 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeScanner.cs @@ -14,6 +14,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using Tango.BL.Entities; +using Tango.BL.Enumerations; using Tango.Core; using Tango.Core.Helpers; using Tango.Integration.ExternalBridge.Web; @@ -288,6 +289,7 @@ namespace Tango.Integration.ExternalBridge if (newMachine != null) { + newMachine.MachineType = (MachineTypes)discoveryPacket.MachineType; LogManager.Log("Found a new machine via TCP " + newMachine.SerialNumber); ThreadsHelper.InvokeUINow(() => @@ -346,6 +348,7 @@ namespace Tango.Integration.ExternalBridge if (newMachine != null) { + newMachine.MachineType = knownMachine.Type; LogManager.Log("Found a new machine via SignalR " + newMachine.SerialNumber); ThreadsHelper.InvokeUINow(() => @@ -429,6 +432,7 @@ namespace Tango.Integration.ExternalBridge if (newMachine != null) { + newMachine.MachineType = (MachineTypes)info.MachineType; LogManager.Log("Found a new machine via IP Address" + newMachine.SerialNumber); ThreadsHelper.InvokeUINow(() => diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs index ae7cace31..ef66275cf 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs @@ -237,10 +237,11 @@ namespace Tango.Integration.ExternalBridge { SerialNumber = Machine.SerialNumber, Guid = Machine.Guid, + MachineType = (PMR.Common.MachineType)Machine.MachineType }) { MulticastGroupAddress = _multicastAddress, - TcpValidationInfo = new TcpValidationInfo() { Guid = Machine.Guid, SerialNumber = Machine.SerialNumber } + TcpValidationInfo = new TcpValidationInfo() { Guid = Machine.Guid, SerialNumber = Machine.SerialNumber, MachineType = Machine.MachineType } }; _discoveryService.BeforeBroadcasting -= _discoverySevice_BeforeBroadcasting; @@ -642,6 +643,7 @@ namespace Tango.Integration.ExternalBridge { SerialNumber = Machine.SerialNumber, Organization = Machine.Organization.Name, + MachineType = Machine.MachineType }); _isSignalRConnected = true; diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Web/MachineInfo.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/Web/MachineInfo.cs index cccc24c35..5e70be977 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Web/MachineInfo.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/Web/MachineInfo.cs @@ -13,6 +13,7 @@ namespace Tango.Integration.ExternalBridge.Web public String SerialNumber { get; set; } public String Organization { get; set; } public String IPAddress { get; set; } + public int MachineType { get; set; } public MachineInfo() { diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs index ca00f2891..5db477b6b 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -26,6 +26,7 @@ using Tango.PMR.MachineStatus; using Tango.PMR.ThreadLoading; using Tango.PMR.Power; using Tango.PMR.IFS; +using Tango.BL.Enumerations; namespace Tango.Integration.Operation { @@ -60,6 +61,11 @@ namespace Tango.Integration.Operation /// MachineStatuses Status { get; } + /// + /// Gets or sets the type of the machine. + /// + MachineTypes MachineType { get; set; } + /// /// Gets a value indicating whether the machine is connected and status is not disconnected. /// diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 005121b88..9c94363df 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -664,6 +664,11 @@ namespace Tango.Integration.Operation /// public bool IsSpoolReplaced { get; private set; } + /// + /// Gets or sets the type of the machine. + /// + public MachineTypes MachineType { get; set; } + #endregion #region Virtual Methods @@ -1499,7 +1504,8 @@ namespace Tango.Integration.Operation { Password = "1234", UnixTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(), - SpoolType = _currentSpoolType + SpoolType = _currentSpoolType, + MachineType = (PMR.Common.MachineType)MachineType, }; try diff --git a/Software/Visual_Studio/Tango.PMR/Common/MachineType.cs b/Software/Visual_Studio/Tango.PMR/Common/MachineType.cs new file mode 100644 index 000000000..4ef97d168 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Common/MachineType.cs @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MachineType.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.Common { + + /// Holder for reflection information generated from MachineType.proto + public static partial class MachineTypeReflection { + + #region Descriptor + /// File descriptor for MachineType.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MachineTypeReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChFNYWNoaW5lVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiolCgtNYWNo", + "aW5lVHlwZRIKCgZUUzE4MDAQABIKCgZFdXJla2EQAUIcChpjb20udHdpbmUu", + "dGFuZ28ucG1yLmNvbW1vbmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MachineType), }, null)); + } + #endregion + + } + #region Enums + public enum MachineType { + [pbr::OriginalName("TS1800")] Ts1800 = 0, + [pbr::OriginalName("Eureka")] Eureka = 1, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs b/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs index 0edef7665..d62d5dbc5 100644 --- a/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs +++ b/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs @@ -23,14 +23,16 @@ namespace Tango.PMR.Connection { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChRDb25uZWN0UmVxdWVzdC5wcm90bxIUVGFuZ28uUE1SLkNvbm5lY3Rpb24a", - "EkpvYlNwb29sVHlwZS5wcm90byJpCg5Db25uZWN0UmVxdWVzdBIQCghQYXNz", - "d29yZBgBIAEoCRIQCghVbml4VGltZRgCIAEoAxIzCglTcG9vbFR5cGUYAyAB", - "KA4yIC5UYW5nby5QTVIuUHJpbnRpbmcuSm9iU3Bvb2xUeXBlQiAKHmNvbS50", - "d2luZS50YW5nby5wbXIuY29ubmVjdGlvbmIGcHJvdG8z")); + "EkpvYlNwb29sVHlwZS5wcm90bxoRTWFjaGluZVR5cGUucHJvdG8inQEKDkNv", + "bm5lY3RSZXF1ZXN0EhAKCFBhc3N3b3JkGAEgASgJEhAKCFVuaXhUaW1lGAIg", + "ASgDEjMKCVNwb29sVHlwZRgDIAEoDjIgLlRhbmdvLlBNUi5QcmludGluZy5K", + "b2JTcG9vbFR5cGUSMgoLTWFjaGluZVR5cGUYBCABKA4yHS5UYW5nby5QTVIu", + "Q29tbW9uLk1hY2hpbmVUeXBlQiAKHmNvbS50d2luZS50YW5nby5wbXIuY29u", + "bmVjdGlvbmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.Descriptor, global::Tango.PMR.Common.MachineTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Connection.ConnectRequest), global::Tango.PMR.Connection.ConnectRequest.Parser, new[]{ "Password", "UnixTime", "SpoolType" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Connection.ConnectRequest), global::Tango.PMR.Connection.ConnectRequest.Parser, new[]{ "Password", "UnixTime", "SpoolType", "MachineType" }, null, null, null) })); } #endregion @@ -64,6 +66,7 @@ namespace Tango.PMR.Connection { password_ = other.password_; unixTime_ = other.unixTime_; spoolType_ = other.spoolType_; + machineType_ = other.machineType_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -104,6 +107,17 @@ namespace Tango.PMR.Connection { } } + /// Field number for the "MachineType" field. + public const int MachineTypeFieldNumber = 4; + private global::Tango.PMR.Common.MachineType machineType_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Common.MachineType MachineType { + get { return machineType_; } + set { + machineType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as ConnectRequest); @@ -120,6 +134,7 @@ namespace Tango.PMR.Connection { if (Password != other.Password) return false; if (UnixTime != other.UnixTime) return false; if (SpoolType != other.SpoolType) return false; + if (MachineType != other.MachineType) return false; return true; } @@ -129,6 +144,7 @@ namespace Tango.PMR.Connection { if (Password.Length != 0) hash ^= Password.GetHashCode(); if (UnixTime != 0L) hash ^= UnixTime.GetHashCode(); if (SpoolType != 0) hash ^= SpoolType.GetHashCode(); + if (MachineType != 0) hash ^= MachineType.GetHashCode(); return hash; } @@ -151,6 +167,10 @@ namespace Tango.PMR.Connection { output.WriteRawTag(24); output.WriteEnum((int) SpoolType); } + if (MachineType != 0) { + output.WriteRawTag(32); + output.WriteEnum((int) MachineType); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -165,6 +185,9 @@ namespace Tango.PMR.Connection { if (SpoolType != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SpoolType); } + if (MachineType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MachineType); + } return size; } @@ -182,6 +205,9 @@ namespace Tango.PMR.Connection { if (other.SpoolType != 0) { SpoolType = other.SpoolType; } + if (other.MachineType != 0) { + MachineType = other.MachineType; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -204,6 +230,10 @@ namespace Tango.PMR.Connection { spoolType_ = (global::Tango.PMR.Printing.JobSpoolType) input.ReadEnum(); break; } + case 32: { + machineType_ = (global::Tango.PMR.Common.MachineType) input.ReadEnum(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Integration/ExternalBridgeUdpDiscoveryPacket.cs b/Software/Visual_Studio/Tango.PMR/Integration/ExternalBridgeUdpDiscoveryPacket.cs index 309f95be3..21563b570 100644 --- a/Software/Visual_Studio/Tango.PMR/Integration/ExternalBridgeUdpDiscoveryPacket.cs +++ b/Software/Visual_Studio/Tango.PMR/Integration/ExternalBridgeUdpDiscoveryPacket.cs @@ -23,14 +23,15 @@ namespace Tango.PMR.Integration { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CiZFeHRlcm5hbEJyaWRnZVVkcERpc2NvdmVyeVBhY2tldC5wcm90bxIVVGFu", - "Z28uUE1SLkludGVncmF0aW9uIlQKIEV4dGVybmFsQnJpZGdlVWRwRGlzY292", - "ZXJ5UGFja2V0EgwKBFRpbWUYASABKAkSFAoMU2VyaWFsTnVtYmVyGAIgASgJ", - "EgwKBEd1aWQYAyABKAlCIQofY29tLnR3aW5lLnRhbmdvLnBtci5pbnRlZ3Jh", - "dGlvbmIGcHJvdG8z")); + "Z28uUE1SLkludGVncmF0aW9uGhFNYWNoaW5lVHlwZS5wcm90byKIAQogRXh0", + "ZXJuYWxCcmlkZ2VVZHBEaXNjb3ZlcnlQYWNrZXQSDAoEVGltZRgBIAEoCRIU", + "CgxTZXJpYWxOdW1iZXIYAiABKAkSDAoER3VpZBgDIAEoCRIyCgtNYWNoaW5l", + "VHlwZRgEIAEoDjIdLlRhbmdvLlBNUi5Db21tb24uTWFjaGluZVR5cGVCIQof", + "Y29tLnR3aW5lLnRhbmdvLnBtci5pbnRlZ3JhdGlvbmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, + new pbr::FileDescriptor[] { global::Tango.PMR.Common.MachineTypeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Integration.ExternalBridgeUdpDiscoveryPacket), global::Tango.PMR.Integration.ExternalBridgeUdpDiscoveryPacket.Parser, new[]{ "Time", "SerialNumber", "Guid" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Integration.ExternalBridgeUdpDiscoveryPacket), global::Tango.PMR.Integration.ExternalBridgeUdpDiscoveryPacket.Parser, new[]{ "Time", "SerialNumber", "Guid", "MachineType" }, null, null, null) })); } #endregion @@ -64,6 +65,7 @@ namespace Tango.PMR.Integration { time_ = other.time_; serialNumber_ = other.serialNumber_; guid_ = other.guid_; + machineType_ = other.machineType_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -104,6 +106,17 @@ namespace Tango.PMR.Integration { } } + /// Field number for the "MachineType" field. + public const int MachineTypeFieldNumber = 4; + private global::Tango.PMR.Common.MachineType machineType_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.Common.MachineType MachineType { + get { return machineType_; } + set { + machineType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as ExternalBridgeUdpDiscoveryPacket); @@ -120,6 +133,7 @@ namespace Tango.PMR.Integration { if (Time != other.Time) return false; if (SerialNumber != other.SerialNumber) return false; if (Guid != other.Guid) return false; + if (MachineType != other.MachineType) return false; return true; } @@ -129,6 +143,7 @@ namespace Tango.PMR.Integration { if (Time.Length != 0) hash ^= Time.GetHashCode(); if (SerialNumber.Length != 0) hash ^= SerialNumber.GetHashCode(); if (Guid.Length != 0) hash ^= Guid.GetHashCode(); + if (MachineType != 0) hash ^= MachineType.GetHashCode(); return hash; } @@ -151,6 +166,10 @@ namespace Tango.PMR.Integration { output.WriteRawTag(26); output.WriteString(Guid); } + if (MachineType != 0) { + output.WriteRawTag(32); + output.WriteEnum((int) MachineType); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -165,6 +184,9 @@ namespace Tango.PMR.Integration { if (Guid.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Guid); } + if (MachineType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MachineType); + } return size; } @@ -182,6 +204,9 @@ namespace Tango.PMR.Integration { if (other.Guid.Length != 0) { Guid = other.Guid; } + if (other.MachineType != 0) { + MachineType = other.MachineType; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -204,6 +229,10 @@ namespace Tango.PMR.Integration { Guid = input.ReadString(); break; } + case 32: { + machineType_ = (global::Tango.PMR.Common.MachineType) input.ReadEnum(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj index 50c0966c3..9490c118b 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -79,6 +79,7 @@ + @@ -516,7 +517,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml index 4ff9dcbd2..f260ea416 100644 Binary files a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml and b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/ProvisionMachine.xml differ diff --git a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml index b2fe8b33f..fae15d85e 100644 Binary files a/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml and b/Software/Visual_Studio/Tango.SQLExaminer/SQLExaminer/Configurations/UpdateMachine.xml differ diff --git a/Software/Visual_Studio/Tango.Transport/Discovery/TcpValidationInfo.cs b/Software/Visual_Studio/Tango.Transport/Discovery/TcpValidationInfo.cs index 8dd3aedf0..70559ebd4 100644 --- a/Software/Visual_Studio/Tango.Transport/Discovery/TcpValidationInfo.cs +++ b/Software/Visual_Studio/Tango.Transport/Discovery/TcpValidationInfo.cs @@ -10,5 +10,6 @@ namespace Tango.Transport.Discovery { public String SerialNumber { get; set; } public String Guid { get; set; } + public int MachineType { get; set; } } } -- cgit v1.3.1