aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2022-04-28 02:30:11 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2022-04-28 02:30:11 +0300
commit357d86202db77f6860b8f514e910b967ce4c3034 (patch)
treeaccd34365d7450d82544ec2b287db87549355b1a
parent59aa6065ebb3481e50c13ec6b4850448fe66186a (diff)
downloadTango-357d86202db77f6860b8f514e910b967ce4c3034.tar.gz
Tango-357d86202db77f6860b8f514e910b967ce4c3034.zip
Spool Type Firmware Notifications.
-rw-r--r--Software/PMR/Messages/Common/MessageType.proto2
-rw-r--r--Software/PMR/Messages/Connection/ConnectRequest.proto3
-rw-r--r--Software/PMR/Messages/MachineStatus/SpoolTypeChangedRequest.proto11
-rw-r--r--Software/PMR/Messages/MachineStatus/SpoolTypeChangedResponse.proto9
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs6
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs18
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs9
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs7
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs31
-rw-r--r--Software/Visual_Studio/Tango.PMR/Common/MessageType.cs47
-rw-r--r--Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs41
-rw-r--r--Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedRequest.cs161
-rw-r--r--Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedResponse.cs131
-rw-r--r--Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj4
15 files changed, 450 insertions, 32 deletions
diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto
index bf9520689..753f3392a 100644
--- a/Software/PMR/Messages/Common/MessageType.proto
+++ b/Software/PMR/Messages/Common/MessageType.proto
@@ -289,6 +289,8 @@ enum MessageType
StopMachineStatusUpdateResponse = 9003;
SetInkAutoFillingModeRequest = 9004;
SetInkAutoFillingModeResponse = 9005;
+ SpoolTypeChangedRequest = 9006;
+ SpoolTypeChangedResponse = 9007;
//Power
StartPowerDownRequest = 10000;
diff --git a/Software/PMR/Messages/Connection/ConnectRequest.proto b/Software/PMR/Messages/Connection/ConnectRequest.proto
index 5f023db76..11661bc5c 100644
--- a/Software/PMR/Messages/Connection/ConnectRequest.proto
+++ b/Software/PMR/Messages/Connection/ConnectRequest.proto
@@ -1,5 +1,7 @@
syntax = "proto3";
+import "JobSpoolType.proto";
+
package Tango.PMR.Connection;
option java_package = "com.twine.tango.pmr.connection";
@@ -7,4 +9,5 @@ message ConnectRequest
{
string Password = 1;
int64 UnixTime = 2;
+ PMR.Printing.JobSpoolType SpoolType = 3;
} \ No newline at end of file
diff --git a/Software/PMR/Messages/MachineStatus/SpoolTypeChangedRequest.proto b/Software/PMR/Messages/MachineStatus/SpoolTypeChangedRequest.proto
new file mode 100644
index 000000000..b25a90f0b
--- /dev/null
+++ b/Software/PMR/Messages/MachineStatus/SpoolTypeChangedRequest.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+
+import "JobSpoolType.proto";
+
+package Tango.PMR.MachineStatus;
+option java_package = "com.twine.tango.pmr.machinestatus";
+
+message SpoolTypeChangedRequest
+{
+ PMR.Printing.JobSpoolType SpoolType = 1;
+} \ No newline at end of file
diff --git a/Software/PMR/Messages/MachineStatus/SpoolTypeChangedResponse.proto b/Software/PMR/Messages/MachineStatus/SpoolTypeChangedResponse.proto
new file mode 100644
index 000000000..9855aa3a2
--- /dev/null
+++ b/Software/PMR/Messages/MachineStatus/SpoolTypeChangedResponse.proto
@@ -0,0 +1,9 @@
+syntax = "proto3";
+
+package Tango.PMR.MachineStatus;
+option java_package = "com.twine.tango.pmr.machinestatus";
+
+message SpoolTypeChangedResponse
+{
+
+} \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
index 770711f5d..f6630b0a3 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
@@ -47,7 +47,7 @@
<Border.Effect>
<DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
</Border.Effect>
- <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Jobs V2</TextBlock>
+ <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Jobs</TextBlock>
</Border>
<Grid Grid.Row="1">
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
index c5e4d46e7..59005509e 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/ViewModels/MainViewVM.cs
@@ -311,6 +311,7 @@ namespace Tango.PPC.MachineSettings.ViewModels
Settings.LockScreenTimeout = TimeSpan.FromMinutes(LockScreenTimeoutMinutes);
Settings.LockScreenPassword = LockScreenPassword;
Settings.DefaultRmlGuid = DefaultRML?.Guid;
+ String previousSpoolType = Settings.SpoolTypeGuid;
Settings.SpoolTypeGuid = SelectedSpoolType?.Guid;
Settings.SynchronizeJobs = SynchronizeJobs;
Settings.SynchronizeDiagnostics = SynchronizeDiagnostics;
@@ -328,6 +329,11 @@ namespace Tango.PPC.MachineSettings.ViewModels
bool isRestarting = false;
+ if (SelectedSpoolType != null && previousSpoolType != Settings.SpoolTypeGuid)
+ {
+ await MachineProvider.MachineOperator.SetSpoolType((PMR.Printing.JobSpoolType)SelectedSpoolType.Code);
+ }
+
if (_previousTimeZone.ToStringSafe() != SelectedTimeZone.ToStringSafe())
{
if (await NotificationProvider.ShowQuestion("Changing the time zone requires the application to restart. Do you wish to restart the application?"))
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 fe0de64f9..18c0f6202 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
@@ -160,6 +160,22 @@ namespace Tango.PPC.Common.Connection
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ if (Machine != null)
+ {
+ try
+ {
+ using (var db = ObservablesContext.CreateDefault())
+ {
+ var spoolType = db.SpoolTypes.FirstOrDefault(x => x.Guid == settings.SpoolTypeGuid);
+ await MachineOperator.SetSpoolType((PMR.Printing.JobSpoolType)spoolType.Code);
+ }
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error setting machine spool type before connection.");
+ }
+ }
+
if (!Machine.IsDemo)
{
if (String.IsNullOrWhiteSpace(settings.EmbeddedComPort))
@@ -210,7 +226,7 @@ namespace Tango.PPC.Common.Connection
preCheckSerialPort.Close();
fileLoggingDisabled = false;
Thread.Sleep(500); //Wait a little while to not scare the other side?..
- }
+ }
LogManager.Log($"Connecting to machine on {settings.EmbeddedComPort}...", LogCategory.Info);
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index 451ef4868..6d3c15fee 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -490,6 +490,9 @@ namespace Tango.Emulations.Emulators
case MessageType.BitResultsRequest:
HandleBitResultsRequest(MessageFactory.ParseTangoMessageFromContainer<BitResultsRequest>(container));
break;
+ case MessageType.SpoolTypeChangedRequest:
+ HandleSpoolTypeChangedRequest(MessageFactory.ParseTangoMessageFromContainer<SpoolTypeChangedRequest>(container));
+ break;
}
}
@@ -1854,6 +1857,12 @@ namespace Tango.Emulations.Emulators
await Transporter.SendResponse<BitResultsResponse>(response, request.Container.Token);
}
+ private async void HandleSpoolTypeChangedRequest(TangoMessage<SpoolTypeChangedRequest> request)
+ {
+ LogManager.Log($"Spool type changed: '{request.Message.SpoolType}'.");
+ await Transporter.SendResponse<SpoolTypeChangedResponse>(new SpoolTypeChangedResponse(), request.Container.Token);
+ }
+
#endregion
#region Public Methods
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
index 23cc4aa48..8f5dff90e 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs
@@ -569,5 +569,12 @@ namespace Tango.Integration.Operation
/// </summary>
/// <returns></returns>
Task<List<BitResultComposition>> GetBitResults(List<BL.Entities.BitType> bitTypes);
+
+ /// <summary>
+ /// Notifies the remote machine about spool type change.
+ /// If the machine is not connected the spool type will be added to the connection request.
+ /// </summary>
+ /// <param name="spoolType">Type of the spool.</param>
+ Task SetSpoolType(JobSpoolType spoolType);
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 777f0b199..049d78d9c 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -88,6 +88,7 @@ namespace Tango.Integration.Operation
private DateTime? _jobActualStartDate;
private List<Event> _emulatedEvents;
private List<BitResultComposition> _bitResults;
+ private JobSpoolType _currentSpoolType;
public static String EmbeddedLogsFolder { get; private set; }
public static String EmbeddedLogsTag { get; private set; }
@@ -1480,7 +1481,8 @@ namespace Tango.Integration.Operation
ConnectRequest request = new ConnectRequest()
{
Password = "1234",
- UnixTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds()
+ UnixTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds(),
+ SpoolType = _currentSpoolType
};
try
@@ -4426,6 +4428,33 @@ namespace Tango.Integration.Operation
return _bitResults;
}
+ /// <summary>
+ /// Notifies the remote machine about spool type change.
+ /// If the machine is not connected the spool type will be added to the connection request.
+ /// </summary>
+ /// <param name="spoolType">Type of the spool.</param>
+ public async Task SetSpoolType(JobSpoolType spoolType)
+ {
+ _currentSpoolType = spoolType;
+
+ LogManager.Log($"Spool type changed to: '{spoolType}'.");
+
+ if (IsConnected)
+ {
+ try
+ {
+ await SendRequest<SpoolTypeChangedRequest, SpoolTypeChangedResponse>(new SpoolTypeChangedRequest()
+ {
+ SpoolType = spoolType
+ });
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error changing the spool type on the machine.");
+ }
+ }
+ }
+
#endregion
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
index d6cc473a8..2612810bf 100644
--- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
+++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs
@@ -22,7 +22,7 @@ namespace Tango.PMR.Common {
static MessageTypeReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiq+QAoLTWVz",
+ "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbir7QA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ileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null));
@@ -509,6 +510,8 @@ namespace Tango.PMR.Common {
[pbr::OriginalName("StopMachineStatusUpdateResponse")] StopMachineStatusUpdateResponse = 9003,
[pbr::OriginalName("SetInkAutoFillingModeRequest")] SetInkAutoFillingModeRequest = 9004,
[pbr::OriginalName("SetInkAutoFillingModeResponse")] SetInkAutoFillingModeResponse = 9005,
+ [pbr::OriginalName("SpoolTypeChangedRequest")] SpoolTypeChangedRequest = 9006,
+ [pbr::OriginalName("SpoolTypeChangedResponse")] SpoolTypeChangedResponse = 9007,
/// <summary>
///Power
/// </summary>
diff --git a/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs b/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs
index 7d8fa8ace..0edef7665 100644
--- a/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs
+++ b/Software/Visual_Studio/Tango.PMR/Connection/ConnectRequest.cs
@@ -22,14 +22,15 @@ namespace Tango.PMR.Connection {
static ConnectRequestReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
- "ChRDb25uZWN0UmVxdWVzdC5wcm90bxIUVGFuZ28uUE1SLkNvbm5lY3Rpb24i",
- "NAoOQ29ubmVjdFJlcXVlc3QSEAoIUGFzc3dvcmQYASABKAkSEAoIVW5peFRp",
- "bWUYAiABKANCIAoeY29tLnR3aW5lLnRhbmdvLnBtci5jb25uZWN0aW9uYgZw",
- "cm90bzM="));
+ "ChRDb25uZWN0UmVxdWVzdC5wcm90bxIUVGFuZ28uUE1SLkNvbm5lY3Rpb24a",
+ "EkpvYlNwb29sVHlwZS5wcm90byJpCg5Db25uZWN0UmVxdWVzdBIQCghQYXNz",
+ "d29yZBgBIAEoCRIQCghVbml4VGltZRgCIAEoAxIzCglTcG9vbFR5cGUYAyAB",
+ "KA4yIC5UYW5nby5QTVIuUHJpbnRpbmcuSm9iU3Bvb2xUeXBlQiAKHmNvbS50",
+ "d2luZS50YW5nby5wbXIuY29ubmVjdGlvbmIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { },
+ new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.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" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Connection.ConnectRequest), global::Tango.PMR.Connection.ConnectRequest.Parser, new[]{ "Password", "UnixTime", "SpoolType" }, null, null, null)
}));
}
#endregion
@@ -62,6 +63,7 @@ namespace Tango.PMR.Connection {
public ConnectRequest(ConnectRequest other) : this() {
password_ = other.password_;
unixTime_ = other.unixTime_;
+ spoolType_ = other.spoolType_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -91,6 +93,17 @@ namespace Tango.PMR.Connection {
}
}
+ /// <summary>Field number for the "SpoolType" field.</summary>
+ public const int SpoolTypeFieldNumber = 3;
+ private global::Tango.PMR.Printing.JobSpoolType spoolType_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Printing.JobSpoolType SpoolType {
+ get { return spoolType_; }
+ set {
+ spoolType_ = value;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ConnectRequest);
@@ -106,6 +119,7 @@ namespace Tango.PMR.Connection {
}
if (Password != other.Password) return false;
if (UnixTime != other.UnixTime) return false;
+ if (SpoolType != other.SpoolType) return false;
return true;
}
@@ -114,6 +128,7 @@ namespace Tango.PMR.Connection {
int hash = 1;
if (Password.Length != 0) hash ^= Password.GetHashCode();
if (UnixTime != 0L) hash ^= UnixTime.GetHashCode();
+ if (SpoolType != 0) hash ^= SpoolType.GetHashCode();
return hash;
}
@@ -132,6 +147,10 @@ namespace Tango.PMR.Connection {
output.WriteRawTag(16);
output.WriteInt64(UnixTime);
}
+ if (SpoolType != 0) {
+ output.WriteRawTag(24);
+ output.WriteEnum((int) SpoolType);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -143,6 +162,9 @@ namespace Tango.PMR.Connection {
if (UnixTime != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(UnixTime);
}
+ if (SpoolType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SpoolType);
+ }
return size;
}
@@ -157,6 +179,9 @@ namespace Tango.PMR.Connection {
if (other.UnixTime != 0L) {
UnixTime = other.UnixTime;
}
+ if (other.SpoolType != 0) {
+ SpoolType = other.SpoolType;
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -175,6 +200,10 @@ namespace Tango.PMR.Connection {
UnixTime = input.ReadInt64();
break;
}
+ case 24: {
+ spoolType_ = (global::Tango.PMR.Printing.JobSpoolType) input.ReadEnum();
+ break;
+ }
}
}
}
diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedRequest.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedRequest.cs
new file mode 100644
index 000000000..aa4cd4039
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedRequest.cs
@@ -0,0 +1,161 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SpoolTypeChangedRequest.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.MachineStatus {
+
+ /// <summary>Holder for reflection information generated from SpoolTypeChangedRequest.proto</summary>
+ public static partial class SpoolTypeChangedRequestReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SpoolTypeChangedRequest.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SpoolTypeChangedRequestReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch1TcG9vbFR5cGVDaGFuZ2VkUmVxdWVzdC5wcm90bxIXVGFuZ28uUE1SLk1h",
+ "Y2hpbmVTdGF0dXMaEkpvYlNwb29sVHlwZS5wcm90byJOChdTcG9vbFR5cGVD",
+ "aGFuZ2VkUmVxdWVzdBIzCglTcG9vbFR5cGUYASABKA4yIC5UYW5nby5QTVIu",
+ "UHJpbnRpbmcuSm9iU3Bvb2xUeXBlQiMKIWNvbS50d2luZS50YW5nby5wbXIu",
+ "bWFjaGluZXN0YXR1c2IGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::Tango.PMR.Printing.JobSpoolTypeReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.SpoolTypeChangedRequest), global::Tango.PMR.MachineStatus.SpoolTypeChangedRequest.Parser, new[]{ "SpoolType" }, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SpoolTypeChangedRequest : pb::IMessage<SpoolTypeChangedRequest> {
+ private static readonly pb::MessageParser<SpoolTypeChangedRequest> _parser = new pb::MessageParser<SpoolTypeChangedRequest>(() => new SpoolTypeChangedRequest());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SpoolTypeChangedRequest> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.MachineStatus.SpoolTypeChangedRequestReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SpoolTypeChangedRequest() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SpoolTypeChangedRequest(SpoolTypeChangedRequest other) : this() {
+ spoolType_ = other.spoolType_;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SpoolTypeChangedRequest Clone() {
+ return new SpoolTypeChangedRequest(this);
+ }
+
+ /// <summary>Field number for the "SpoolType" field.</summary>
+ public const int SpoolTypeFieldNumber = 1;
+ private global::Tango.PMR.Printing.JobSpoolType spoolType_ = 0;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::Tango.PMR.Printing.JobSpoolType SpoolType {
+ get { return spoolType_; }
+ set {
+ spoolType_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SpoolTypeChangedRequest);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SpoolTypeChangedRequest other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (SpoolType != other.SpoolType) return false;
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (SpoolType != 0) hash ^= SpoolType.GetHashCode();
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (SpoolType != 0) {
+ output.WriteRawTag(8);
+ output.WriteEnum((int) SpoolType);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (SpoolType != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SpoolType);
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SpoolTypeChangedRequest other) {
+ if (other == null) {
+ return;
+ }
+ if (other.SpoolType != 0) {
+ SpoolType = other.SpoolType;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ case 8: {
+ spoolType_ = (global::Tango.PMR.Printing.JobSpoolType) input.ReadEnum();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedResponse.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedResponse.cs
new file mode 100644
index 000000000..a605239c3
--- /dev/null
+++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/SpoolTypeChangedResponse.cs
@@ -0,0 +1,131 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: SpoolTypeChangedResponse.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.MachineStatus {
+
+ /// <summary>Holder for reflection information generated from SpoolTypeChangedResponse.proto</summary>
+ public static partial class SpoolTypeChangedResponseReflection {
+
+ #region Descriptor
+ /// <summary>File descriptor for SpoolTypeChangedResponse.proto</summary>
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static SpoolTypeChangedResponseReflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "Ch5TcG9vbFR5cGVDaGFuZ2VkUmVzcG9uc2UucHJvdG8SF1RhbmdvLlBNUi5N",
+ "YWNoaW5lU3RhdHVzIhoKGFNwb29sVHlwZUNoYW5nZWRSZXNwb25zZUIjCiFj",
+ "b20udHdpbmUudGFuZ28ucG1yLm1hY2hpbmVzdGF0dXNiBnByb3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { },
+ new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.SpoolTypeChangedResponse), global::Tango.PMR.MachineStatus.SpoolTypeChangedResponse.Parser, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class SpoolTypeChangedResponse : pb::IMessage<SpoolTypeChangedResponse> {
+ private static readonly pb::MessageParser<SpoolTypeChangedResponse> _parser = new pb::MessageParser<SpoolTypeChangedResponse>(() => new SpoolTypeChangedResponse());
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser<SpoolTypeChangedResponse> Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::Tango.PMR.MachineStatus.SpoolTypeChangedResponseReflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SpoolTypeChangedResponse() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SpoolTypeChangedResponse(SpoolTypeChangedResponse other) : this() {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SpoolTypeChangedResponse Clone() {
+ return new SpoolTypeChangedResponse(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SpoolTypeChangedResponse);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SpoolTypeChangedResponse other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ return true;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SpoolTypeChangedResponse other) {
+ if (other == null) {
+ return;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ input.SkipLastField();
+ break;
+ }
+ }
+ }
+
+ }
+
+ #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 dc2016ae1..9577be6a9 100644
--- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
+++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj
@@ -296,6 +296,8 @@
<Compile Include="MachineStatus\SetInkAutoFillingModeRequest.cs" />
<Compile Include="MachineStatus\SetInkAutoFillingModeResponse.cs" />
<Compile Include="MachineStatus\SpoolState.cs" />
+ <Compile Include="MachineStatus\SpoolTypeChangedRequest.cs" />
+ <Compile Include="MachineStatus\SpoolTypeChangedResponse.cs" />
<Compile Include="MachineStatus\StartMachineStatusUpdateRequest.cs" />
<Compile Include="MachineStatus\StartMachineStatusUpdateResponse.cs" />
<Compile Include="MachineStatus\Status.cs" />
@@ -509,7 +511,7 @@
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file