diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-08-15 17:29:25 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-08-15 17:29:25 +0300 |
| commit | ca9a080e283819b40c424d17332a18423ff6dcb1 (patch) | |
| tree | e26beedc04a704cdf1d09e73f05bfc631fc9cee1 /Software | |
| parent | 68f0b285920d9c17189522916c6f0e783629bc9a (diff) | |
| download | Tango-ca9a080e283819b40c424d17332a18423ff6dcb1.tar.gz Tango-ca9a080e283819b40c424d17332a18423ff6dcb1.zip | |
Implemented basic machine status support.
Diffstat (limited to 'Software')
29 files changed, 2095 insertions, 11 deletions
diff --git a/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs b/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs index 7238dcf58..366b110d5 100644 --- a/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs +++ b/Software/PMR/Messages/.settings/com.google.eclipse.protobuf.Protobuf.prefs @@ -1,4 +1,4 @@ eclipse.preferences.version=1 -paths.directoryPaths=${workspace_loc\:/${project}/Common},${workspace_loc\:/${project}/Jobs},${workspace_loc\:/${project}/Printing},${workspace_loc\:/${project}/ColorLab},${workspace_loc\:/${project}/Diagnostics},${workspace_loc\:/${project}/Debugging},${workspace_loc\:/${project}/Hardware},${workspace_loc\:/${project}/Embroidery},${workspace_loc\:/${project}/Connection},${workspace_loc\:/${project}/Integration},${workspace_loc\:/${project}/IO},${workspace_loc\:/${project}/Exports},${workspace_loc\:/${project}/FirmwareUpgrade},${workspace_loc\:/${project}/EmbeddedParameters},${workspace_loc\:/${project}/TCC} +paths.directoryPaths=${workspace_loc\:/${project}/Common},${workspace_loc\:/${project}/Jobs},${workspace_loc\:/${project}/Printing},${workspace_loc\:/${project}/ColorLab},${workspace_loc\:/${project}/Diagnostics},${workspace_loc\:/${project}/Debugging},${workspace_loc\:/${project}/Hardware},${workspace_loc\:/${project}/Embroidery},${workspace_loc\:/${project}/Connection},${workspace_loc\:/${project}/Integration},${workspace_loc\:/${project}/IO},${workspace_loc\:/${project}/Exports},${workspace_loc\:/${project}/FirmwareUpgrade},${workspace_loc\:/${project}/EmbeddedParameters},${workspace_loc\:/${project}/TCC},${workspace_loc\:/${project}/MachineStatus} paths.filesInMultipleDirectories=true paths.filesInOneDirectoryOnly=false diff --git a/Software/PMR/Messages/Common/MessageType.proto b/Software/PMR/Messages/Common/MessageType.proto index 7afa4b56f..342cf2d5c 100644 --- a/Software/PMR/Messages/Common/MessageType.proto +++ b/Software/PMR/Messages/Common/MessageType.proto @@ -253,4 +253,10 @@ enum MessageType DispenserDataResponse = 8001; MidTankDataSetupRequest = 8002; MidTankDataSetupResponse = 8003; + + //Machine Status + StartMachineStatusUpdateRequest = 9000; + StartMachineStatusUpdateResponse = 9001; + StopMachineStatusUpdateRequest = 9002; + StopMachineStatusUpdateResponse = 9003; } diff --git a/Software/PMR/Messages/MachineStatus/IDSPackLevel.proto b/Software/PMR/Messages/MachineStatus/IDSPackLevel.proto new file mode 100644 index 000000000..1ebed9a51 --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/IDSPackLevel.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message IDSPackLevel +{ + int32 Index = 1; + int32 DispenserLevel = 2; + int32 MidTankLevel = 3; +}
\ No newline at end of file diff --git a/Software/PMR/Messages/MachineStatus/MachineState.proto b/Software/PMR/Messages/MachineStatus/MachineState.proto new file mode 100644 index 000000000..0e84b8aaf --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/MachineState.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +enum MachineState +{ + Initializing = 0; + Ready = 1; + Sleep = 2; + Error = 3; + PowerOff = 4; + PreparingJob = 5; + RunningJob = 6; +} diff --git a/Software/PMR/Messages/MachineStatus/MachineStatus.proto b/Software/PMR/Messages/MachineStatus/MachineStatus.proto new file mode 100644 index 000000000..dde725ee2 --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/MachineStatus.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +import "MachineState.proto"; +import "IDSPackLevel.proto"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message MachineStatus +{ + MachineState State = 1; + repeated IDSPackLevel IDSPacksLevels = 2; +}
\ No newline at end of file diff --git a/Software/PMR/Messages/MachineStatus/StartMachineStatusUpdateRequest.proto b/Software/PMR/Messages/MachineStatus/StartMachineStatusUpdateRequest.proto new file mode 100644 index 000000000..ebd0ffd7b --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/StartMachineStatusUpdateRequest.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message StartMachineStatusUpdateRequest +{ + +}
\ No newline at end of file diff --git a/Software/PMR/Messages/MachineStatus/StartMachineStatusUpdateResponse.proto b/Software/PMR/Messages/MachineStatus/StartMachineStatusUpdateResponse.proto new file mode 100644 index 000000000..22bd248fe --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/StartMachineStatusUpdateResponse.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +import "MachineStatus.proto"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message StartMachineStatusUpdateResponse +{ + MachineStatus Status = 1; +}
\ No newline at end of file diff --git a/Software/PMR/Messages/MachineStatus/StopMachineStatusUpdateRequest.proto b/Software/PMR/Messages/MachineStatus/StopMachineStatusUpdateRequest.proto new file mode 100644 index 000000000..384558773 --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/StopMachineStatusUpdateRequest.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message StopMachineStatusUpdateRequest +{ + +}
\ No newline at end of file diff --git a/Software/PMR/Messages/MachineStatus/StopMachineStatusUpdateResponse.proto b/Software/PMR/Messages/MachineStatus/StopMachineStatusUpdateResponse.proto new file mode 100644 index 000000000..137db8a2e --- /dev/null +++ b/Software/PMR/Messages/MachineStatus/StopMachineStatusUpdateResponse.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package Tango.PMR.MachineStatus; +option java_package = "com.twine.tango.pmr.machinestatus"; + +message StopMachineStatusUpdateResponse +{ + +}
\ 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 46a7eeb62..cd432538c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs @@ -78,6 +78,7 @@ namespace Tango.PPC.Common.Connection MachineOperator.EnableEventsNotification = true; MachineOperator.EnableJobResume = true; MachineOperator.UseKeepAlive = true; + MachineOperator.EnableMachineStatusUpdates = true; MachineOperator.EnableDiagnostics = false; MachineOperator.EnableEmbeddedDebugging = false; MachineOperator.FirmwareUpgradeMode = Integration.Upgrade.FirmwareUpgradeModes.DFU | Integration.Upgrade.FirmwareUpgradeModes.TFP_PACKAGE; @@ -263,6 +264,7 @@ namespace Tango.PPC.Common.Connection machineOperator.EnableDiagnostics = false; machineOperator.EnableEmbeddedDebugging = false; machineOperator.EnableEventsNotification = false; + machineOperator.EnableMachineStatusUpdates = false; machineOperator.EnableJobResume = false; LogManager.Default.Log("Starting machine connection procedure..."); diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 61cca98ce..0a219b824 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -31,6 +31,7 @@ using Tango.Integration.Operation; using Tango.PMR.FirmwareUpgrade; using System.Diagnostics; using Tango.Core.ExtensionMethods; +using Tango.PMR.MachineStatus; namespace Tango.Emulations.Emulators { @@ -66,6 +67,7 @@ namespace Tango.Emulations.Emulators private bool _diagnostics_enabled; private bool _debug_logs_enabled; private bool _events_enabled; + private bool _machine_updates_enabled; private List<SetBlowerStateRequest> _blower_states; private List<ValveState> _valveStates; private JobTicket _current_job_ticket; @@ -99,6 +101,8 @@ namespace Tango.Emulations.Emulators } } + public MachineStatus MachineStatus { get; set; } + #endregion #region Constructors @@ -134,6 +138,19 @@ namespace Tango.Emulations.Emulators private void Init() { + MachineStatus = new MachineStatus(); + MachineStatus.State = MachineState.Ready; + + for (int i = 0; i < 8; i++) + { + MachineStatus.IDSPacksLevels.Add(new IDSPackLevel() + { + Index = i, + DispenserLevel = 130000000, + MidTankLevel = 2500, + }); + } + EventsStates = MachineEventState.GetAllEventsStates(); _valveStates = new List<ValveState>(); @@ -254,6 +271,12 @@ namespace Tango.Emulations.Emulators case MessageType.StopEventsNotificationRequest: HandleStopEventsNotificationRequest(MessageFactory.ParseTangoMessageFromContainer<StopEventsNotificationRequest>(container)); break; + case MessageType.StartMachineStatusUpdateRequest: + HandleStartMachineStatusUpdateRequest(MessageFactory.ParseTangoMessageFromContainer<StartMachineStatusUpdateRequest>(container)); + break; + case MessageType.StopMachineStatusUpdateRequest: + HandleStopMachineStatusUpdateRequest(MessageFactory.ParseTangoMessageFromContainer<StopMachineStatusUpdateRequest>(container)); + break; case MessageType.JobRequest: HandleJobRequest(MessageFactory.ParseTangoMessageFromContainer<JobRequest>(container)); break; @@ -517,6 +540,32 @@ namespace Tango.Emulations.Emulators Transporter.SendResponse<StopEventsNotificationResponse>(new StopEventsNotificationResponse(), request.Container.Token); } + private void HandleStartMachineStatusUpdateRequest(TangoMessage<StartMachineStatusUpdateRequest> request) + { + _machine_updates_enabled = true; + + var cancelToken = CreateCancelToken(); + + Task.Factory.StartNew(() => + { + while (_machine_updates_enabled && Transporter.State == TransportComponentState.Connected && !cancelToken.Canceled) + { + var res = new StartMachineStatusUpdateResponse(); + res.Status = MachineStatus; + + Transporter.SendResponse<StartMachineStatusUpdateResponse>(res, request.Container.Token); + + Thread.Sleep(1000); + } + }); + } + + private void HandleStopMachineStatusUpdateRequest(TangoMessage<StopMachineStatusUpdateRequest> request) + { + _machine_updates_enabled = false; + Transporter.SendResponse<StopMachineStatusUpdateResponse>(new StopMachineStatusUpdateResponse(), request.Container.Token); + } + private void HandleStartDebugLogRequest(TangoMessage<StartDebugLogRequest> request) { _debug_logs_enabled = true; diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs index 410afd7fe..648046bd2 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeService.cs @@ -20,6 +20,7 @@ using Tango.PMR.Debugging; using System.Security.Authentication; using Tango.Settings; using Tango.Core.ExtensionMethods; +using Tango.PMR.MachineStatus; namespace Tango.Integration.ExternalBridge { @@ -33,6 +34,7 @@ namespace Tango.Integration.ExternalBridge private int _discovery_port = 8888; //Will be overridden by settings in constructor.. private int _external_bridge_port = 1984; //Will be overridden by settings in constructor.. private String _eventsNotificationsToken; + private String _machineStatusUpdateToken; private String _diagnosticsNotificationToken; private String _debugLogsNotificationToken; private bool _resend_diagnostics_and_debug; @@ -447,6 +449,7 @@ namespace Tango.Integration.ExternalBridge protected async virtual void OnClientDisconnected() { _eventsNotificationsToken = null; + _machineStatusUpdateToken = null; _diagnosticsNotificationToken = null; _debugLogsNotificationToken = null; IsInSession = false; @@ -501,6 +504,14 @@ namespace Tango.Integration.ExternalBridge SendResponse(container); } } + if (container.Type == MessageType.StartMachineStatusUpdateResponse) + { + if (_machineStatusUpdateToken != null) + { + container.Token = _machineStatusUpdateToken; + SendResponse(container); + } + } else if (container.Type == MessageType.StartDiagnosticsResponse) { if (_diagnosticsNotificationToken != null) @@ -539,6 +550,10 @@ namespace Tango.Integration.ExternalBridge _messageHandlers.Add(MessageType.StartEventsNotificationRequest, OnStartEventsNotificationRequest); _messageHandlers.Add(MessageType.StopEventsNotificationRequest, OnStopEventsNotificationRequest); + //Machine Status + _messageHandlers.Add(MessageType.StartMachineStatusUpdateRequest, OnStartMachineStatusUpdateRequest); + _messageHandlers.Add(MessageType.StopMachineStatusUpdateRequest, OnStopMachineStatusUpdateRequest); + //Diagnostics _messageHandlers.Add(MessageType.StartDiagnosticsRequest, OnStartDiagnosticsRequest); @@ -719,6 +734,22 @@ namespace Tango.Integration.ExternalBridge } } + protected virtual void OnStartMachineStatusUpdateRequest(MessageContainer container) + { + _machineStatusUpdateToken = container.Token; + SendResponse<StartMachineStatusUpdateResponse>(new StartMachineStatusUpdateResponse(), container.Token); + } + + protected virtual void OnStopMachineStatusUpdateRequest(MessageContainer container) + { + if (_machineStatusUpdateToken != null) + { + SendResponse<StartMachineStatusUpdateResponse>(new StartMachineStatusUpdateResponse(), _machineStatusUpdateToken, true); + _machineStatusUpdateToken = null; + SendResponse<StopMachineStatusUpdateResponse>(new StopMachineStatusUpdateResponse(), container.Token); + } + } + protected virtual void OnStartDiagnosticsRequest(MessageContainer container) { if (_diagnosticsNotificationToken == null) diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs index 2839c2df1..ef00133df 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/ExternalBridgeTcpClient.cs @@ -132,6 +132,7 @@ namespace Tango.Integration.ExternalBridge OnEnableEmbeddedDebuggingChanged(EnableEmbeddedDebugging); OnEnableEventsNotification(EnableEventsNotification); OnEnableApplicationLogsChanged(EnableApplicationLogs); + OnEnableMachineStatusUpdatesChanged(EnableMachineStatusUpdates); } } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs index d5f55c0d8..89c947764 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/IMachineOperator.cs @@ -22,6 +22,7 @@ using Tango.PMR.IO; using Tango.PMR.FirmwareUpgrade; using Tango.Integration.JobRuns; using Tango.Integration.Emergency; +using Tango.PMR.MachineStatus; namespace Tango.Integration.Operation { @@ -47,6 +48,11 @@ namespace Tango.Integration.Operation MachineStatuses Status { get; } /// <summary> + /// Gets the machine embedded device status. + /// </summary> + MachineStatus MachineStatus { get; } + + /// <summary> /// Gets or sets the firmware upgrade mode. /// </summary> FirmwareUpgradeModes FirmwareUpgradeMode { get; set; } @@ -157,6 +163,11 @@ namespace Tango.Integration.Operation event EventHandler<StartDebugLogResponse> DebugLogAvailable; /// <summary> + /// Occurs when machine embedded device status has changed. + /// </summary> + event EventHandler<MachineStatus> MachineStatusChanged; + + /// <summary> /// Gets or sets a value indicating whether direct the embedded device to send diagnostics messages. /// </summary> bool EnableDiagnostics { get; set; } @@ -177,6 +188,11 @@ namespace Tango.Integration.Operation bool EnableJobResume { get; set; } /// <summary> + /// Gets or sets a value indicating whether to direct the embedded device to update about status changes. + /// </summary> + bool EnableMachineStatusUpdates { get; set; } + + /// <summary> /// Gets the last process parameters table sent to the embedded device. /// </summary> ProcessParametersTable CurrentProcessParameters { get; } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index e4307920a..558953ccb 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -37,6 +37,7 @@ using Tango.FirmwareUpdateLib; using Tango.Core.ExtensionMethods; using Tango.ColorConversion; using Tango.Integration.Emergency; +using Tango.PMR.MachineStatus; namespace Tango.Integration.Operation { @@ -54,6 +55,7 @@ namespace Tango.Integration.Operation private bool _diagnosticsSent; private bool _eventsSent; private bool _debugSent; + private bool _machineStatusSent; private EmbeddedLogItem _last_embedded_debug_log; private static RunningJobStatus _last_job_status; @@ -89,6 +91,7 @@ namespace Tango.Integration.Operation JobRunsLogger = new BasicJobRunsLogger(this); JobRunsLogger.Start(); EnableEventsNotification = true; + EnableMachineStatusUpdates = true; EnableJobResume = true; LogEmbeddedDebuggingToFile = true; FirmwareUpgradeMode = FirmwareUpgradeModes.DFU | FirmwareUpgradeModes.TFP_PACKAGE; @@ -130,6 +133,11 @@ namespace Tango.Integration.Operation public event EventHandler<StartDebugLogResponse> DebugLogAvailable; /// <summary> + /// Occurs when machine embedded device status has changed. + /// </summary> + public event EventHandler<MachineStatus> MachineStatusChanged; + + /// <summary> /// Occurs when a request has been sent. /// </summary> public event EventHandler<IMessage> RequestSent; @@ -211,7 +219,7 @@ namespace Tango.Integration.Operation { _status = value; RaisePropertyChangedAuto(); - OnMachineStatusChanged(value); + OnStatusChanged(value); RaisePropertyChanged(nameof(IsPrinting)); RaisePropertyChanged(nameof(CanPrint)); LogManager.Log("Machine operator status changed: " + _status); @@ -219,6 +227,16 @@ namespace Tango.Integration.Operation } } + private MachineStatus _machineStatus; + /// <summary> + /// Gets the machine embedded device status. + /// </summary> + public MachineStatus MachineStatus + { + get { return _machineStatus; } + set { _machineStatus = value; RaisePropertyChangedAuto(); } + } + /// <summary> /// Gets or sets the firmware upgrade mode. /// </summary> @@ -330,6 +348,24 @@ namespace Tango.Integration.Operation } } + private bool _enableMachineStatusUpdates; + /// <summary> + /// Gets or sets a value indicating whether to direct the embedded device to update about status changes. + /// </summary> + public bool EnableMachineStatusUpdates + { + get { return _enableMachineStatusUpdates; } + set + { + if (_enableMachineStatusUpdates != value) + { + _enableMachineStatusUpdates = value; + RaisePropertyChangedAuto(); + OnEnableMachineStatusUpdatesChanged(value); + } + } + } + private bool _enableJobResume; /// <summary> /// Gets or sets a value indicating whether to check whether a job is in progress after connection was successful. @@ -538,7 +574,7 @@ namespace Tango.Integration.Operation /// Called when the enable embedded debugging has been changed /// </summary> /// <param name="value">if set to <c>true</c> [value].</param> - protected async void OnEnableEmbeddedDebuggingChanged(bool value) + protected virtual async void OnEnableEmbeddedDebuggingChanged(bool value) { if (value && State == TransportComponentState.Connected && !_debugSent) { @@ -599,6 +635,69 @@ namespace Tango.Integration.Operation } /// <summary> + /// Called when the enable machine status updates has been changed. + /// </summary> + /// <param name="value">if set to <c>true</c> [value].</param> + protected virtual async void OnEnableMachineStatusUpdatesChanged(bool value) + { + if (value && State == TransportComponentState.Connected && !_machineStatusSent) + { + var request = new StartMachineStatusUpdateRequest(); + + bool responseLogged = false; + _machineStatusSent = true; + + SendContinuousRequest<StartMachineStatusUpdateRequest, StartMachineStatusUpdateResponse>(request).ObserveOn(new NewThreadScheduler()).Subscribe( + (response) => + { + OnMachineStatusChanged(response); + + if (!responseLogged) + { + LogResponseReceived(response.Message); + responseLogged = true; + } + }, + (ex) => + { + _machineStatusSent = false; + + if (!(ex is ContinuousResponseAbortedException)) + { + LogRequestFailed(request, ex); + } + }, + () => + { + _machineStatusSent = false; + LogManager.Log("Machine status update response completed!?", LogCategory.Warning); + }); + + LogRequestSent(request); + } + else if (_machineStatusSent) + { + _machineStatusSent = false; + + if (State == TransportComponentState.Connected) + { + var req = new StopMachineStatusUpdateRequest(); + + try + { + LogRequestSent(req); + var res = await SendRequest<StopMachineStatusUpdateRequest, StopMachineStatusUpdateResponse>(req); + LogResponseReceived(res.Message); + } + catch (Exception ex) + { + LogRequestFailed(req, ex); + } + } + } + } + + /// <summary> /// Invokes the <see cref="DiagnosticsDataAvailable"/> event. /// </summary> /// <param name="data">The sensors data.</param> @@ -650,6 +749,16 @@ namespace Tango.Integration.Operation } /// <summary> + /// Called when the machine status has been update + /// </summary> + /// <param name="response">The response.</param> + protected virtual void OnMachineStatusChanged(StartMachineStatusUpdateResponse response) + { + MachineStatus = response.Status; + MachineStatusChanged?.Invoke(this, MachineStatus); + } + + /// <summary> /// Called when the request has been sent /// </summary> /// <param name="response">The request.</param> @@ -689,7 +798,7 @@ namespace Tango.Integration.Operation /// Called when the machine status has been changed /// </summary> /// <param name="status">The status.</param> - protected virtual void OnMachineStatusChanged(MachineStatuses status) + protected virtual void OnStatusChanged(MachineStatuses status) { StatusChanged?.Invoke(this, status); } @@ -786,10 +895,12 @@ namespace Tango.Integration.Operation _diagnosticsSent = false; _eventsSent = false; _debugSent = false; + _machineStatusSent = false; OnEnableDiagnosticsChanged(EnableDiagnostics); OnEnableEmbeddedDebuggingChanged(EnableEmbeddedDebugging); OnEnableEventsNotification(EnableEventsNotification); + OnEnableMachineStatusUpdatesChanged(EnableMachineStatusUpdates); if (EnableJobResume) { @@ -1157,6 +1268,34 @@ namespace Tango.Integration.Operation }); } + private void ValidateJobLiquidQuantity(JobTicket ticket, ProcessParametersTable processParameters, Configuration configuration) + { + Dictionary<int, double> liquidQuantities = new Dictionary<int, double>(); + + int packIndex = 0; + + foreach (var item in configuration.NoneEmptyIdsPacks.OrderBy(x => x.PackIndex)) + { + liquidQuantities.Add(packIndex++, 0); + } + + for (int segmentIndex = 0; segmentIndex < ticket.Segments.Count; segmentIndex++) + { + var segment = ticket.Segments[segmentIndex]; + + for (int stopIndex = 0; stopIndex < segment.BrushStops.Count; stopIndex++) + { + var stop = segment.BrushStops[stopIndex]; + //var position = segment. + + //foreach (var dispenser in stop.Dispensers) + //{ + + //} + } + } + } + #endregion #region Public Methods @@ -1485,6 +1624,8 @@ namespace Tango.Integration.Operation ticket.Segments.AddRange(segs); } + ValidateJobLiquidQuantity(ticket, processParameters, job.Machine.Configuration); + request.JobTicket = ticket.Clone(); request.JobTicket.UploadStrategy = JobUploadStrategy; diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index 04e2c5e2f..3884dab3c 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( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirZMAoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbiquMgoLTWVz", "c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj", "dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n", "cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jlc3BvbnNlEAYSHAoYU3R1YkNh", @@ -161,8 +161,12 @@ namespace Tango.PMR.Common { "ZXF1ZXN0EOw2EhwKF1ZhbGlkYXRlVmVyc2lvblJlc3BvbnNlEO02EhsKFkFj", "dGl2YXRlVmVyc2lvblJlcXVlc3QQ7jYSHAoXQWN0aXZhdGVWZXJzaW9uUmVz", "cG9uc2UQ7zYSGQoURGlzcGVuc2VyRGF0YVJlcXVlc3QQwD4SGgoVRGlzcGVu", - "c2VyRGF0YVJlc3BvbnNlEME+QhwKGmNvbS50d2luZS50YW5nby5wbXIuY29t", - "bW9uYgZwcm90bzM=")); + "c2VyRGF0YVJlc3BvbnNlEME+EhwKF01pZFRhbmtEYXRhU2V0dXBSZXF1ZXN0", + "EMI+Eh0KGE1pZFRhbmtEYXRhU2V0dXBSZXNwb25zZRDDPhIkCh9TdGFydE1h", + "Y2hpbmVTdGF0dXNVcGRhdGVSZXF1ZXN0EKhGEiUKIFN0YXJ0TWFjaGluZVN0", + "YXR1c1VwZGF0ZVJlc3BvbnNlEKlGEiMKHlN0b3BNYWNoaW5lU3RhdHVzVXBk", + "YXRlUmVxdWVzdBCqRhIkCh9TdG9wTWFjaGluZVN0YXR1c1VwZGF0ZVJlc3Bv", + "bnNlEKtGQhwKGmNvbS50d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -423,6 +427,15 @@ namespace Tango.PMR.Common { /// </summary> [pbr::OriginalName("DispenserDataRequest")] DispenserDataRequest = 8000, [pbr::OriginalName("DispenserDataResponse")] DispenserDataResponse = 8001, + [pbr::OriginalName("MidTankDataSetupRequest")] MidTankDataSetupRequest = 8002, + [pbr::OriginalName("MidTankDataSetupResponse")] MidTankDataSetupResponse = 8003, + /// <summary> + ///Machine Status + /// </summary> + [pbr::OriginalName("StartMachineStatusUpdateRequest")] StartMachineStatusUpdateRequest = 9000, + [pbr::OriginalName("StartMachineStatusUpdateResponse")] StartMachineStatusUpdateResponse = 9001, + [pbr::OriginalName("StopMachineStatusUpdateRequest")] StopMachineStatusUpdateRequest = 9002, + [pbr::OriginalName("StopMachineStatusUpdateResponse")] StopMachineStatusUpdateResponse = 9003, } #endregion diff --git a/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankData.cs b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankData.cs new file mode 100644 index 000000000..76edbed01 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankData.cs @@ -0,0 +1,216 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MidTankData.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.EmbeddedParameters { + + /// <summary>Holder for reflection information generated from MidTankData.proto</summary> + public static partial class MidTankDataReflection { + + #region Descriptor + /// <summary>File descriptor for MidTankData.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MidTankDataReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChFNaWRUYW5rRGF0YS5wcm90bxIcVGFuZ28uUE1SLkVtYmVkZGVkUGFyYW1l", + "dGVycyJICgtNaWRUYW5rRGF0YRIRCglNaWRUYW5rSWQYASABKA0SFgoOSW5p", + "dGlhbE9mZnNldEEYAiABKAESDgoGU2xvcGVCGAMgASgBQigKJmNvbS50d2lu", + "ZS50YW5nby5wbXIuZW1iZWRkZWRwYXJhbWV0ZXJzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.EmbeddedParameters.MidTankData), global::Tango.PMR.EmbeddedParameters.MidTankData.Parser, new[]{ "MidTankId", "InitialOffsetA", "SlopeB" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class MidTankData : pb::IMessage<MidTankData> { + private static readonly pb::MessageParser<MidTankData> _parser = new pb::MessageParser<MidTankData>(() => new MidTankData()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<MidTankData> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.EmbeddedParameters.MidTankDataReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankData(MidTankData other) : this() { + midTankId_ = other.midTankId_; + initialOffsetA_ = other.initialOffsetA_; + slopeB_ = other.slopeB_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankData Clone() { + return new MidTankData(this); + } + + /// <summary>Field number for the "MidTankId" field.</summary> + public const int MidTankIdFieldNumber = 1; + private uint midTankId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MidTankId { + get { return midTankId_; } + set { + midTankId_ = value; + } + } + + /// <summary>Field number for the "InitialOffsetA" field.</summary> + public const int InitialOffsetAFieldNumber = 2; + private double initialOffsetA_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double InitialOffsetA { + get { return initialOffsetA_; } + set { + initialOffsetA_ = value; + } + } + + /// <summary>Field number for the "SlopeB" field.</summary> + public const int SlopeBFieldNumber = 3; + private double slopeB_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double SlopeB { + get { return slopeB_; } + set { + slopeB_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MidTankData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MidTankData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MidTankId != other.MidTankId) return false; + if (InitialOffsetA != other.InitialOffsetA) return false; + if (SlopeB != other.SlopeB) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MidTankId != 0) hash ^= MidTankId.GetHashCode(); + if (InitialOffsetA != 0D) hash ^= InitialOffsetA.GetHashCode(); + if (SlopeB != 0D) hash ^= SlopeB.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 (MidTankId != 0) { + output.WriteRawTag(8); + output.WriteUInt32(MidTankId); + } + if (InitialOffsetA != 0D) { + output.WriteRawTag(17); + output.WriteDouble(InitialOffsetA); + } + if (SlopeB != 0D) { + output.WriteRawTag(25); + output.WriteDouble(SlopeB); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MidTankId != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MidTankId); + } + if (InitialOffsetA != 0D) { + size += 1 + 8; + } + if (SlopeB != 0D) { + size += 1 + 8; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MidTankData other) { + if (other == null) { + return; + } + if (other.MidTankId != 0) { + MidTankId = other.MidTankId; + } + if (other.InitialOffsetA != 0D) { + InitialOffsetA = other.InitialOffsetA; + } + if (other.SlopeB != 0D) { + SlopeB = other.SlopeB; + } + } + + [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: { + MidTankId = input.ReadUInt32(); + break; + } + case 17: { + InitialOffsetA = input.ReadDouble(); + break; + } + case 25: { + SlopeB = input.ReadDouble(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankDataSetupRequest.cs b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankDataSetupRequest.cs new file mode 100644 index 000000000..bd6633e6a --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankDataSetupRequest.cs @@ -0,0 +1,153 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MidTankDataSetupRequest.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.EmbeddedParameters { + + /// <summary>Holder for reflection information generated from MidTankDataSetupRequest.proto</summary> + public static partial class MidTankDataSetupRequestReflection { + + #region Descriptor + /// <summary>File descriptor for MidTankDataSetupRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MidTankDataSetupRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch1NaWRUYW5rRGF0YVNldHVwUmVxdWVzdC5wcm90bxIcVGFuZ28uUE1SLkVt", + "YmVkZGVkUGFyYW1ldGVycxoRTWlkVGFua0RhdGEucHJvdG8iWQoXTWlkVGFu", + "a0RhdGFTZXR1cFJlcXVlc3QSPgoLTWlkVGFua0luZm8YASADKAsyKS5UYW5n", + "by5QTVIuRW1iZWRkZWRQYXJhbWV0ZXJzLk1pZFRhbmtEYXRhQigKJmNvbS50", + "d2luZS50YW5nby5wbXIuZW1iZWRkZWRwYXJhbWV0ZXJzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.EmbeddedParameters.MidTankDataReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.EmbeddedParameters.MidTankDataSetupRequest), global::Tango.PMR.EmbeddedParameters.MidTankDataSetupRequest.Parser, new[]{ "MidTankInfo" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class MidTankDataSetupRequest : pb::IMessage<MidTankDataSetupRequest> { + private static readonly pb::MessageParser<MidTankDataSetupRequest> _parser = new pb::MessageParser<MidTankDataSetupRequest>(() => new MidTankDataSetupRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<MidTankDataSetupRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.EmbeddedParameters.MidTankDataSetupRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankDataSetupRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankDataSetupRequest(MidTankDataSetupRequest other) : this() { + midTankInfo_ = other.midTankInfo_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankDataSetupRequest Clone() { + return new MidTankDataSetupRequest(this); + } + + /// <summary>Field number for the "MidTankInfo" field.</summary> + public const int MidTankInfoFieldNumber = 1; + private static readonly pb::FieldCodec<global::Tango.PMR.EmbeddedParameters.MidTankData> _repeated_midTankInfo_codec + = pb::FieldCodec.ForMessage(10, global::Tango.PMR.EmbeddedParameters.MidTankData.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.EmbeddedParameters.MidTankData> midTankInfo_ = new pbc::RepeatedField<global::Tango.PMR.EmbeddedParameters.MidTankData>(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.EmbeddedParameters.MidTankData> MidTankInfo { + get { return midTankInfo_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MidTankDataSetupRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MidTankDataSetupRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!midTankInfo_.Equals(other.midTankInfo_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= midTankInfo_.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) { + midTankInfo_.WriteTo(output, _repeated_midTankInfo_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += midTankInfo_.CalculateSize(_repeated_midTankInfo_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MidTankDataSetupRequest other) { + if (other == null) { + return; + } + midTankInfo_.Add(other.midTankInfo_); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + midTankInfo_.AddEntriesFrom(input, _repeated_midTankInfo_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankDataSetupResponse.cs b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankDataSetupResponse.cs new file mode 100644 index 000000000..81ebb5e33 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/EmbeddedParameters/MidTankDataSetupResponse.cs @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MidTankDataSetupResponse.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.EmbeddedParameters { + + /// <summary>Holder for reflection information generated from MidTankDataSetupResponse.proto</summary> + public static partial class MidTankDataSetupResponseReflection { + + #region Descriptor + /// <summary>File descriptor for MidTankDataSetupResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MidTankDataSetupResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch5NaWRUYW5rRGF0YVNldHVwUmVzcG9uc2UucHJvdG8SHFRhbmdvLlBNUi5F", + "bWJlZGRlZFBhcmFtZXRlcnMiGgoYTWlkVGFua0RhdGFTZXR1cFJlc3BvbnNl", + "QigKJmNvbS50d2luZS50YW5nby5wbXIuZW1iZWRkZWRwYXJhbWV0ZXJzYgZw", + "cm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.EmbeddedParameters.MidTankDataSetupResponse), global::Tango.PMR.EmbeddedParameters.MidTankDataSetupResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class MidTankDataSetupResponse : pb::IMessage<MidTankDataSetupResponse> { + private static readonly pb::MessageParser<MidTankDataSetupResponse> _parser = new pb::MessageParser<MidTankDataSetupResponse>(() => new MidTankDataSetupResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<MidTankDataSetupResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.EmbeddedParameters.MidTankDataSetupResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankDataSetupResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankDataSetupResponse(MidTankDataSetupResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MidTankDataSetupResponse Clone() { + return new MidTankDataSetupResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MidTankDataSetupResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MidTankDataSetupResponse 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(MidTankDataSetupResponse 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/MachineStatus/IDSPackLevel.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/IDSPackLevel.cs new file mode 100644 index 000000000..007a72214 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/IDSPackLevel.cs @@ -0,0 +1,216 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: IDSPackLevel.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 IDSPackLevel.proto</summary> + public static partial class IDSPackLevelReflection { + + #region Descriptor + /// <summary>File descriptor for IDSPackLevel.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static IDSPackLevelReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChJJRFNQYWNrTGV2ZWwucHJvdG8SF1RhbmdvLlBNUi5NYWNoaW5lU3RhdHVz", + "IksKDElEU1BhY2tMZXZlbBINCgVJbmRleBgBIAEoBRIWCg5EaXNwZW5zZXJM", + "ZXZlbBgCIAEoBRIUCgxNaWRUYW5rTGV2ZWwYAyABKAVCIwohY29tLnR3aW5l", + "LnRhbmdvLnBtci5tYWNoaW5lc3RhdHVzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.IDSPackLevel), global::Tango.PMR.MachineStatus.IDSPackLevel.Parser, new[]{ "Index", "DispenserLevel", "MidTankLevel" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class IDSPackLevel : pb::IMessage<IDSPackLevel> { + private static readonly pb::MessageParser<IDSPackLevel> _parser = new pb::MessageParser<IDSPackLevel>(() => new IDSPackLevel()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<IDSPackLevel> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.IDSPackLevelReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IDSPackLevel() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IDSPackLevel(IDSPackLevel other) : this() { + index_ = other.index_; + dispenserLevel_ = other.dispenserLevel_; + midTankLevel_ = other.midTankLevel_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IDSPackLevel Clone() { + return new IDSPackLevel(this); + } + + /// <summary>Field number for the "Index" field.</summary> + public const int IndexFieldNumber = 1; + private int index_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Index { + get { return index_; } + set { + index_ = value; + } + } + + /// <summary>Field number for the "DispenserLevel" field.</summary> + public const int DispenserLevelFieldNumber = 2; + private int dispenserLevel_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int DispenserLevel { + get { return dispenserLevel_; } + set { + dispenserLevel_ = value; + } + } + + /// <summary>Field number for the "MidTankLevel" field.</summary> + public const int MidTankLevelFieldNumber = 3; + private int midTankLevel_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MidTankLevel { + get { return midTankLevel_; } + set { + midTankLevel_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as IDSPackLevel); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(IDSPackLevel other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Index != other.Index) return false; + if (DispenserLevel != other.DispenserLevel) return false; + if (MidTankLevel != other.MidTankLevel) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Index != 0) hash ^= Index.GetHashCode(); + if (DispenserLevel != 0) hash ^= DispenserLevel.GetHashCode(); + if (MidTankLevel != 0) hash ^= MidTankLevel.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 (Index != 0) { + output.WriteRawTag(8); + output.WriteInt32(Index); + } + if (DispenserLevel != 0) { + output.WriteRawTag(16); + output.WriteInt32(DispenserLevel); + } + if (MidTankLevel != 0) { + output.WriteRawTag(24); + output.WriteInt32(MidTankLevel); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Index != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Index); + } + if (DispenserLevel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(DispenserLevel); + } + if (MidTankLevel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MidTankLevel); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(IDSPackLevel other) { + if (other == null) { + return; + } + if (other.Index != 0) { + Index = other.Index; + } + if (other.DispenserLevel != 0) { + DispenserLevel = other.DispenserLevel; + } + if (other.MidTankLevel != 0) { + MidTankLevel = other.MidTankLevel; + } + } + + [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: { + Index = input.ReadInt32(); + break; + } + case 16: { + DispenserLevel = input.ReadInt32(); + break; + } + case 24: { + MidTankLevel = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineState.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineState.cs new file mode 100644 index 000000000..9e3725f20 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineState.cs @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MachineState.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 MachineState.proto</summary> + public static partial class MachineStateReflection { + + #region Descriptor + /// <summary>File descriptor for MachineState.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MachineStateReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChJNYWNoaW5lU3RhdGUucHJvdG8SF1RhbmdvLlBNUi5NYWNoaW5lU3RhdHVz", + "KnEKDE1hY2hpbmVTdGF0ZRIQCgxJbml0aWFsaXppbmcQABIJCgVSZWFkeRAB", + "EgkKBVNsZWVwEAISCQoFRXJyb3IQAxIMCghQb3dlck9mZhAEEhAKDFByZXBh", + "cmluZ0pvYhAFEg4KClJ1bm5pbmdKb2IQBkIjCiFjb20udHdpbmUudGFuZ28u", + "cG1yLm1hY2hpbmVzdGF0dXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.MachineStatus.MachineState), }, null)); + } + #endregion + + } + #region Enums + public enum MachineState { + [pbr::OriginalName("Initializing")] Initializing = 0, + [pbr::OriginalName("Ready")] Ready = 1, + [pbr::OriginalName("Sleep")] Sleep = 2, + [pbr::OriginalName("Error")] Error = 3, + [pbr::OriginalName("PowerOff")] PowerOff = 4, + [pbr::OriginalName("PreparingJob")] PreparingJob = 5, + [pbr::OriginalName("RunningJob")] RunningJob = 6, + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineStatus.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineStatus.cs new file mode 100644 index 000000000..413789202 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/MachineStatus.cs @@ -0,0 +1,182 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: MachineStatus.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 MachineStatus.proto</summary> + public static partial class MachineStatusReflection { + + #region Descriptor + /// <summary>File descriptor for MachineStatus.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MachineStatusReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChNNYWNoaW5lU3RhdHVzLnByb3RvEhdUYW5nby5QTVIuTWFjaGluZVN0YXR1", + "cxoSTWFjaGluZVN0YXRlLnByb3RvGhJJRFNQYWNrTGV2ZWwucHJvdG8ihAEK", + "DU1hY2hpbmVTdGF0dXMSNAoFU3RhdGUYASABKA4yJS5UYW5nby5QTVIuTWFj", + "aGluZVN0YXR1cy5NYWNoaW5lU3RhdGUSPQoOSURTUGFja3NMZXZlbHMYAiAD", + "KAsyJS5UYW5nby5QTVIuTWFjaGluZVN0YXR1cy5JRFNQYWNrTGV2ZWxCIwoh", + "Y29tLnR3aW5lLnRhbmdvLnBtci5tYWNoaW5lc3RhdHVzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.MachineStatus.MachineStateReflection.Descriptor, global::Tango.PMR.MachineStatus.IDSPackLevelReflection.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" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class MachineStatus : pb::IMessage<MachineStatus> { + private static readonly pb::MessageParser<MachineStatus> _parser = new pb::MessageParser<MachineStatus>(() => new MachineStatus()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<MachineStatus> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.MachineStatusReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MachineStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MachineStatus(MachineStatus other) : this() { + state_ = other.state_; + iDSPacksLevels_ = other.iDSPacksLevels_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MachineStatus Clone() { + return new MachineStatus(this); + } + + /// <summary>Field number for the "State" field.</summary> + public const int StateFieldNumber = 1; + private global::Tango.PMR.MachineStatus.MachineState state_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.MachineStatus.MachineState State { + get { return state_; } + set { + state_ = value; + } + } + + /// <summary>Field number for the "IDSPacksLevels" field.</summary> + public const int IDSPacksLevelsFieldNumber = 2; + private static readonly pb::FieldCodec<global::Tango.PMR.MachineStatus.IDSPackLevel> _repeated_iDSPacksLevels_codec + = pb::FieldCodec.ForMessage(18, global::Tango.PMR.MachineStatus.IDSPackLevel.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.MachineStatus.IDSPackLevel> iDSPacksLevels_ = new pbc::RepeatedField<global::Tango.PMR.MachineStatus.IDSPackLevel>(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.MachineStatus.IDSPackLevel> IDSPacksLevels { + get { return iDSPacksLevels_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MachineStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MachineStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (State != other.State) return false; + if(!iDSPacksLevels_.Equals(other.iDSPacksLevels_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (State != 0) hash ^= State.GetHashCode(); + hash ^= iDSPacksLevels_.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 (State != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + iDSPacksLevels_.WriteTo(output, _repeated_iDSPacksLevels_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (State != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + size += iDSPacksLevels_.CalculateSize(_repeated_iDSPacksLevels_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MachineStatus other) { + if (other == null) { + return; + } + if (other.State != 0) { + State = other.State; + } + iDSPacksLevels_.Add(other.iDSPacksLevels_); + } + + [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: { + state_ = (global::Tango.PMR.MachineStatus.MachineState) input.ReadEnum(); + break; + } + case 18: { + iDSPacksLevels_.AddEntriesFrom(input, _repeated_iDSPacksLevels_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/StartMachineStatusUpdateRequest.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/StartMachineStatusUpdateRequest.cs new file mode 100644 index 000000000..7570ae181 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/StartMachineStatusUpdateRequest.cs @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StartMachineStatusUpdateRequest.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 StartMachineStatusUpdateRequest.proto</summary> + public static partial class StartMachineStatusUpdateRequestReflection { + + #region Descriptor + /// <summary>File descriptor for StartMachineStatusUpdateRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StartMachineStatusUpdateRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiVTdGFydE1hY2hpbmVTdGF0dXNVcGRhdGVSZXF1ZXN0LnByb3RvEhdUYW5n", + "by5QTVIuTWFjaGluZVN0YXR1cyIhCh9TdGFydE1hY2hpbmVTdGF0dXNVcGRh", + "dGVSZXF1ZXN0QiMKIWNvbS50d2luZS50YW5nby5wbXIubWFjaGluZXN0YXR1", + "c2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.StartMachineStatusUpdateRequest), global::Tango.PMR.MachineStatus.StartMachineStatusUpdateRequest.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StartMachineStatusUpdateRequest : pb::IMessage<StartMachineStatusUpdateRequest> { + private static readonly pb::MessageParser<StartMachineStatusUpdateRequest> _parser = new pb::MessageParser<StartMachineStatusUpdateRequest>(() => new StartMachineStatusUpdateRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StartMachineStatusUpdateRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.StartMachineStatusUpdateRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StartMachineStatusUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StartMachineStatusUpdateRequest(StartMachineStatusUpdateRequest other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StartMachineStatusUpdateRequest Clone() { + return new StartMachineStatusUpdateRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StartMachineStatusUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StartMachineStatusUpdateRequest 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(StartMachineStatusUpdateRequest 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/MachineStatus/StartMachineStatusUpdateResponse.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/StartMachineStatusUpdateResponse.cs new file mode 100644 index 000000000..7f2a4ff94 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/StartMachineStatusUpdateResponse.cs @@ -0,0 +1,167 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StartMachineStatusUpdateResponse.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 StartMachineStatusUpdateResponse.proto</summary> + public static partial class StartMachineStatusUpdateResponseReflection { + + #region Descriptor + /// <summary>File descriptor for StartMachineStatusUpdateResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StartMachineStatusUpdateResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiZTdGFydE1hY2hpbmVTdGF0dXNVcGRhdGVSZXNwb25zZS5wcm90bxIXVGFu", + "Z28uUE1SLk1hY2hpbmVTdGF0dXMaE01hY2hpbmVTdGF0dXMucHJvdG8iWgog", + "U3RhcnRNYWNoaW5lU3RhdHVzVXBkYXRlUmVzcG9uc2USNgoGU3RhdHVzGAEg", + "ASgLMiYuVGFuZ28uUE1SLk1hY2hpbmVTdGF0dXMuTWFjaGluZVN0YXR1c0Ij", + "CiFjb20udHdpbmUudGFuZ28ucG1yLm1hY2hpbmVzdGF0dXNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.MachineStatus.MachineStatusReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.StartMachineStatusUpdateResponse), global::Tango.PMR.MachineStatus.StartMachineStatusUpdateResponse.Parser, new[]{ "Status" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StartMachineStatusUpdateResponse : pb::IMessage<StartMachineStatusUpdateResponse> { + private static readonly pb::MessageParser<StartMachineStatusUpdateResponse> _parser = new pb::MessageParser<StartMachineStatusUpdateResponse>(() => new StartMachineStatusUpdateResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StartMachineStatusUpdateResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.StartMachineStatusUpdateResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StartMachineStatusUpdateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StartMachineStatusUpdateResponse(StartMachineStatusUpdateResponse other) : this() { + Status = other.status_ != null ? other.Status.Clone() : null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StartMachineStatusUpdateResponse Clone() { + return new StartMachineStatusUpdateResponse(this); + } + + /// <summary>Field number for the "Status" field.</summary> + public const int StatusFieldNumber = 1; + private global::Tango.PMR.MachineStatus.MachineStatus status_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.MachineStatus.MachineStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StartMachineStatusUpdateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StartMachineStatusUpdateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Status, other.Status)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (status_ != null) hash ^= Status.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 (status_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Status); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (status_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Status); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StartMachineStatusUpdateResponse other) { + if (other == null) { + return; + } + if (other.status_ != null) { + if (status_ == null) { + status_ = new global::Tango.PMR.MachineStatus.MachineStatus(); + } + Status.MergeFrom(other.Status); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 10: { + if (status_ == null) { + status_ = new global::Tango.PMR.MachineStatus.MachineStatus(); + } + input.ReadMessage(status_); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/Status.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/Status.cs new file mode 100644 index 000000000..b21ab8011 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/Status.cs @@ -0,0 +1,182 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Status.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 Status.proto</summary> + public static partial class StatusReflection { + + #region Descriptor + /// <summary>File descriptor for Status.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StatusReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CgxTdGF0dXMucHJvdG8SF1RhbmdvLlBNUi5NYWNoaW5lU3RhdHVzGhJNYWNo", + "aW5lU3RhdGUucHJvdG8aEklEU1BhY2tMZXZlbC5wcm90byJ9CgZTdGF0dXMS", + "NAoFU3RhdGUYASABKA4yJS5UYW5nby5QTVIuTWFjaGluZVN0YXR1cy5NYWNo", + "aW5lU3RhdGUSPQoOSURTUGFja3NMZXZlbHMYAiADKAsyJS5UYW5nby5QTVIu", + "TWFjaGluZVN0YXR1cy5JRFNQYWNrTGV2ZWxCIwohY29tLnR3aW5lLnRhbmdv", + "LnBtci5tYWNoaW5lc3RhdHVzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tango.PMR.MachineStatus.MachineStateReflection.Descriptor, global::Tango.PMR.MachineStatus.IDSPackLevelReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.Status), global::Tango.PMR.MachineStatus.Status.Parser, new[]{ "State", "IDSPacksLevels" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class Status : pb::IMessage<Status> { + private static readonly pb::MessageParser<Status> _parser = new pb::MessageParser<Status>(() => new Status()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<Status> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.StatusReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Status() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Status(Status other) : this() { + state_ = other.state_; + iDSPacksLevels_ = other.iDSPacksLevels_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Status Clone() { + return new Status(this); + } + + /// <summary>Field number for the "State" field.</summary> + public const int StateFieldNumber = 1; + private global::Tango.PMR.MachineStatus.MachineState state_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tango.PMR.MachineStatus.MachineState State { + get { return state_; } + set { + state_ = value; + } + } + + /// <summary>Field number for the "IDSPacksLevels" field.</summary> + public const int IDSPacksLevelsFieldNumber = 2; + private static readonly pb::FieldCodec<global::Tango.PMR.MachineStatus.IDSPackLevel> _repeated_iDSPacksLevels_codec + = pb::FieldCodec.ForMessage(18, global::Tango.PMR.MachineStatus.IDSPackLevel.Parser); + private readonly pbc::RepeatedField<global::Tango.PMR.MachineStatus.IDSPackLevel> iDSPacksLevels_ = new pbc::RepeatedField<global::Tango.PMR.MachineStatus.IDSPackLevel>(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<global::Tango.PMR.MachineStatus.IDSPackLevel> IDSPacksLevels { + get { return iDSPacksLevels_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Status); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Status other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (State != other.State) return false; + if(!iDSPacksLevels_.Equals(other.iDSPacksLevels_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (State != 0) hash ^= State.GetHashCode(); + hash ^= iDSPacksLevels_.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 (State != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) State); + } + iDSPacksLevels_.WriteTo(output, _repeated_iDSPacksLevels_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (State != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State); + } + size += iDSPacksLevels_.CalculateSize(_repeated_iDSPacksLevels_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Status other) { + if (other == null) { + return; + } + if (other.State != 0) { + State = other.State; + } + iDSPacksLevels_.Add(other.iDSPacksLevels_); + } + + [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: { + state_ = (global::Tango.PMR.MachineStatus.MachineState) input.ReadEnum(); + break; + } + case 18: { + iDSPacksLevels_.AddEntriesFrom(input, _repeated_iDSPacksLevels_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/MachineStatus/StopMachineStatusUpdateRequest.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/StopMachineStatusUpdateRequest.cs new file mode 100644 index 000000000..d7fd64c92 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/StopMachineStatusUpdateRequest.cs @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StopMachineStatusUpdateRequest.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 StopMachineStatusUpdateRequest.proto</summary> + public static partial class StopMachineStatusUpdateRequestReflection { + + #region Descriptor + /// <summary>File descriptor for StopMachineStatusUpdateRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StopMachineStatusUpdateRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiRTdG9wTWFjaGluZVN0YXR1c1VwZGF0ZVJlcXVlc3QucHJvdG8SF1Rhbmdv", + "LlBNUi5NYWNoaW5lU3RhdHVzIiAKHlN0b3BNYWNoaW5lU3RhdHVzVXBkYXRl", + "UmVxdWVzdEIjCiFjb20udHdpbmUudGFuZ28ucG1yLm1hY2hpbmVzdGF0dXNi", + "BnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.StopMachineStatusUpdateRequest), global::Tango.PMR.MachineStatus.StopMachineStatusUpdateRequest.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StopMachineStatusUpdateRequest : pb::IMessage<StopMachineStatusUpdateRequest> { + private static readonly pb::MessageParser<StopMachineStatusUpdateRequest> _parser = new pb::MessageParser<StopMachineStatusUpdateRequest>(() => new StopMachineStatusUpdateRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StopMachineStatusUpdateRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.StopMachineStatusUpdateRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StopMachineStatusUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StopMachineStatusUpdateRequest(StopMachineStatusUpdateRequest other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StopMachineStatusUpdateRequest Clone() { + return new StopMachineStatusUpdateRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StopMachineStatusUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StopMachineStatusUpdateRequest 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(StopMachineStatusUpdateRequest 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/MachineStatus/StopMachineStatusUpdateResponse.cs b/Software/Visual_Studio/Tango.PMR/MachineStatus/StopMachineStatusUpdateResponse.cs new file mode 100644 index 000000000..9e2ae8f63 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/MachineStatus/StopMachineStatusUpdateResponse.cs @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StopMachineStatusUpdateResponse.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 StopMachineStatusUpdateResponse.proto</summary> + public static partial class StopMachineStatusUpdateResponseReflection { + + #region Descriptor + /// <summary>File descriptor for StopMachineStatusUpdateResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StopMachineStatusUpdateResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiVTdG9wTWFjaGluZVN0YXR1c1VwZGF0ZVJlc3BvbnNlLnByb3RvEhdUYW5n", + "by5QTVIuTWFjaGluZVN0YXR1cyIhCh9TdG9wTWFjaGluZVN0YXR1c1VwZGF0", + "ZVJlc3BvbnNlQiMKIWNvbS50d2luZS50YW5nby5wbXIubWFjaGluZXN0YXR1", + "c2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.MachineStatus.StopMachineStatusUpdateResponse), global::Tango.PMR.MachineStatus.StopMachineStatusUpdateResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StopMachineStatusUpdateResponse : pb::IMessage<StopMachineStatusUpdateResponse> { + private static readonly pb::MessageParser<StopMachineStatusUpdateResponse> _parser = new pb::MessageParser<StopMachineStatusUpdateResponse>(() => new StopMachineStatusUpdateResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StopMachineStatusUpdateResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.MachineStatus.StopMachineStatusUpdateResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StopMachineStatusUpdateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StopMachineStatusUpdateResponse(StopMachineStatusUpdateResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StopMachineStatusUpdateResponse Clone() { + return new StopMachineStatusUpdateResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StopMachineStatusUpdateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StopMachineStatusUpdateResponse 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(StopMachineStatusUpdateResponse 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 8502b506d..fcbc410fb 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -153,6 +153,9 @@ <Compile Include="EmbeddedParameters\DispenserDataRequest.cs" /> <Compile Include="EmbeddedParameters\DispenserDataResponse.cs" /> <Compile Include="EmbeddedParameters\DispenserRunningData.cs" /> + <Compile Include="EmbeddedParameters\MidTankData.cs" /> + <Compile Include="EmbeddedParameters\MidTankDataSetupRequest.cs" /> + <Compile Include="EmbeddedParameters\MidTankDataSetupResponse.cs" /> <Compile Include="Embroidery\AnalyzeInput.cs" /> <Compile Include="Embroidery\AnalyzeOutput.cs" /> <Compile Include="Embroidery\ConvertFileInput.cs" /> @@ -233,6 +236,14 @@ <Compile Include="IO\KillProcessRequest.cs" /> <Compile Include="IO\KillProcessResponse.cs" /> <Compile Include="ITangoMessage.cs" /> + <Compile Include="MachineStatus\IDSPackLevel.cs" /> + <Compile Include="MachineStatus\MachineState.cs" /> + <Compile Include="MachineStatus\MachineStatus.cs" /> + <Compile Include="MachineStatus\StartMachineStatusUpdateRequest.cs" /> + <Compile Include="MachineStatus\StartMachineStatusUpdateResponse.cs" /> + <Compile Include="MachineStatus\Status.cs" /> + <Compile Include="MachineStatus\StopMachineStatusUpdateRequest.cs" /> + <Compile Include="MachineStatus\StopMachineStatusUpdateResponse.cs" /> <Compile Include="MessageFactory.cs" /> <Compile Include="NativePMR.cs" /> <Compile Include="Printing\AbortJobRequest.cs" /> @@ -289,7 +300,7 @@ </PropertyGroup> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml index 68ca150d6..f9252d970 100644 --- a/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml @@ -10,7 +10,7 @@ xmlns:vm="clr-namespace:Tango.MachineEM.UI.ViewModels" xmlns:local="clr-namespace:Tango.MachineEM.UI.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1000" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" > + d:DesignHeight="720" d:DesignWidth="1200" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" > <UserControl.Resources> <converters:BooleanInverseConverter x:Key="BooleanInverseConverter"></converters:BooleanInverseConverter> @@ -64,7 +64,7 @@ <ListBox BorderThickness="0" Background="#66000000" Margin="10 10 10 40" ItemsSource="{Binding Emulator.EventsStates}" FontSize="11"> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> - + </Style> </ListBox.ItemContainerStyle> <ListBox.ItemTemplate> @@ -179,8 +179,49 @@ <SolidColorBrush Color="#151515" Opacity="0.8" /> </Grid.Background> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="5"> + <ToggleButton Style="{StaticResource AccentedSquareButtonStyle}" BorderThickness="0" x:Name="toggleLevels" MinWidth="140" Margin="5 5 20 5"> + <StackPanel Orientation="Horizontal"> + <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">STATUS</TextBlock> + <fa:ImageAwesome Icon="ChevronDown" Width="16" Foreground="White"></fa:ImageAwesome> + </StackPanel> + </ToggleButton> + <Popup IsOpen="{Binding ElementName=toggleLevels,Path=IsChecked}" StaysOpen="True"> + <Border Padding="10"> + <StackPanel> + <TextBlock Foreground="Red">IDS Packs Levels</TextBlock> + <ScrollViewer Height="400" HorizontalScrollBarVisibility="Disabled"> + <ItemsControl Margin="0 5 0 0" ItemsSource="{Binding Emulator.MachineStatus.IDSPacksLevels}"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Margin="0 5"> + <TextBlock> + <Run Text="Index: "></Run> + <Run Text="{Binding Index}"></Run> + </TextBlock> + + <TextBlock> + <Run Text="Dispenser Level (nl): "></Run> + <Run Text="{Binding ElementName=sliderDispenser,Path=Value}"></Run> + </TextBlock> + + <Slider x:Name="sliderDispenser" Orientation="Horizontal" Minimum="0" Maximum="130000000" Value="{Binding DispenserLevel}"></Slider> + + <TextBlock> + <Run Text="MidTank Level (ml): "></Run> + <Run Text="{Binding ElementName=sliderMidTank,Path=Value}"></Run> + </TextBlock> + + <Slider x:Name="sliderMidTank" Orientation="Horizontal" Minimum="0" Maximum="2500" Value="{Binding MidTankLevel}"></Slider> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </ScrollViewer> + </StackPanel> + </Border> + </Popup> <CheckBox Margin="0 0 20 0" VerticalAlignment="Center" IsChecked="{Binding Emulator.EmulateCorruption}" Foreground="Red">Emulate Corruption</CheckBox> - <CheckBox Margin="0 0 20 0" VerticalAlignment="Center" IsChecked="{Binding Emulator.PerformNativeRoundTrip}">Perform Native RoundTrip</CheckBox> + <CheckBox Margin="0 0 20 0" VerticalAlignment="Center" IsChecked="{Binding Emulator.PerformNativeRoundTrip}">Perform Native RoundTrip</CheckBox> <ComboBox IsEnabled="{Binding Emulator.IsStarted,Converter={StaticResource BooleanInverseConverter}}" MinWidth="140" Margin="5" BorderThickness="0" ItemsSource="{Binding Ports}" SelectedItem="{Binding SelectedPort}"></ComboBox> <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ClearCommand}"> <StackPanel Orientation="Horizontal"> |
