diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-03 18:01:27 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-03 18:01:27 +0300 |
| commit | 69343c64b63e2ae675332df10a8ad786cbda7094 (patch) | |
| tree | 4d6510feaeeba2adad0e2257586ffe1582b2831d /Software/Visual_Studio | |
| parent | 34b3f33ec9ccb682c430b3c9e206507d0a396e1c (diff) | |
| download | Tango-69343c64b63e2ae675332df10a8ad786cbda7094.tar.gz Tango-69343c64b63e2ae675332df10a8ad786cbda7094.zip | |
Implemented RemoteRunner!
Diffstat (limited to 'Software/Visual_Studio')
45 files changed, 2929 insertions, 114 deletions
diff --git a/Software/Visual_Studio/Resources/RemoteRunnerExeTest.exe b/Software/Visual_Studio/Resources/RemoteRunnerExeTest.exe Binary files differnew file mode 100644 index 000000000..fe8efcf24 --- /dev/null +++ b/Software/Visual_Studio/Resources/RemoteRunnerExeTest.exe diff --git a/Software/Visual_Studio/Resources/RemoteRunnerExeTest.zip b/Software/Visual_Studio/Resources/RemoteRunnerExeTest.zip Binary files differnew file mode 100644 index 000000000..0e08d407e --- /dev/null +++ b/Software/Visual_Studio/Resources/RemoteRunnerExeTest.zip diff --git a/Software/Visual_Studio/Tango.PMR/Common/ErrorCode.cs b/Software/Visual_Studio/Tango.PMR/Common/ErrorCode.cs index d25920bc4..4f34854ac 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/ErrorCode.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/ErrorCode.cs @@ -22,10 +22,13 @@ namespace Tango.PMR.Common { static ErrorCodeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cg9FcnJvckNvZGUucHJvdG8SEFRhbmdvLlBNUi5Db21tb24qXwoJRXJyb3JD", - "b2RlEggKBE5PTkUQABILCgdCQURfQ1JDEAESHgoaSU5WQUxJRF9ESUdJVEFM", - "X1BJTl9OVU1CRVIQAhIbChdVTkFVVEhPUklaRURfQ09OTkVDVElPThADQhwK", - "GmNvbS50d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM=")); + "Cg9FcnJvckNvZGUucHJvdG8SEFRhbmdvLlBNUi5Db21tb24q1wEKCUVycm9y", + "Q29kZRIICgROT05FEAASEQoNR0VORVJBTF9FUlJPUhABEgsKB0JBRF9DUkMQ", + "AhIeChpJTlZBTElEX0RJR0lUQUxfUElOX05VTUJFUhADEhsKF1VOQVVUSE9S", + "SVpFRF9DT05ORUNUSU9OEAQSFgoRSU5WQUxJRF9VUExPQURfSUQQ6AcSEwoO", + "RklMRV9OT1RfRk9VTkQQ6QcSFwoSSU5WQUxJRF9QUk9DRVNTX0lEEOoHEh0K", + "GEZJTEVfTEVOR1RIX09VVF9PRl9SQU5HRRDrB0IcChpjb20udHdpbmUudGFu", + "Z28ucG1yLmNvbW1vbmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.ErrorCode), }, null)); @@ -35,16 +38,36 @@ namespace Tango.PMR.Common { } #region Enums public enum ErrorCode { + /// <summary> + ///General (Needs to be organized) + /// </summary> [pbr::OriginalName("NONE")] None = 0, - [pbr::OriginalName("BAD_CRC")] BadCrc = 1, + [pbr::OriginalName("GENERAL_ERROR")] GeneralError = 1, + [pbr::OriginalName("BAD_CRC")] BadCrc = 2, /// <summary> ///Can be returned by SetDigitalOutResponse. /// </summary> - [pbr::OriginalName("INVALID_DIGITAL_PIN_NUMBER")] InvalidDigitalPinNumber = 2, + [pbr::OriginalName("INVALID_DIGITAL_PIN_NUMBER")] InvalidDigitalPinNumber = 3, /// <summary> ///Should be returned if no ConnectionRequest with a valid password was made. /// </summary> - [pbr::OriginalName("UNAUTHORIZED_CONNECTION")] UnauthorizedConnection = 3, + [pbr::OriginalName("UNAUTHORIZED_CONNECTION")] UnauthorizedConnection = 4, + /// <summary> + ///IO + /// </summary> + [pbr::OriginalName("INVALID_UPLOAD_ID")] InvalidUploadId = 1000, + /// <summary> + ///Returned by ExecuteProcessResponse when the FileName was not found. + /// </summary> + [pbr::OriginalName("FILE_NOT_FOUND")] FileNotFound = 1001, + /// <summary> + ///Returned by KillProcessResponse when the process id was not found. + /// </summary> + [pbr::OriginalName("INVALID_PROCESS_ID")] InvalidProcessId = 1002, + /// <summary> + ///Returned by FileChunkUploadResponse when the uploaded file size exceeds the expected Length from FileUploadRequest. + /// </summary> + [pbr::OriginalName("FILE_LENGTH_OUT_OF_RANGE")] FileLengthOutOfRange = 1003, } #endregion diff --git a/Software/Visual_Studio/Tango.PMR/Common/ErrorResponse.cs b/Software/Visual_Studio/Tango.PMR/Common/ErrorResponse.cs new file mode 100644 index 000000000..7536d976e --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Common/ErrorResponse.cs @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ErrorResponse.proto +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tango.PMR.Common { + + /// <summary>Holder for reflection information generated from ErrorResponse.proto</summary> + public static partial class ErrorResponseReflection { + + #region Descriptor + /// <summary>File descriptor for ErrorResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ErrorResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChNFcnJvclJlc3BvbnNlLnByb3RvEhBUYW5nby5QTVIuQ29tbW9uIg8KDUVy", + "cm9yUmVzcG9uc2VCHAoaY29tLnR3aW5lLnRhbmdvLnBtci5jb21tb25iBnBy", + "b3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Common.ErrorResponse), global::Tango.PMR.Common.ErrorResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class ErrorResponse : pb::IMessage<ErrorResponse> { + private static readonly pb::MessageParser<ErrorResponse> _parser = new pb::MessageParser<ErrorResponse>(() => new ErrorResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<ErrorResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Common.ErrorResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ErrorResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ErrorResponse(ErrorResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ErrorResponse Clone() { + return new ErrorResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ErrorResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ErrorResponse 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(ErrorResponse 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/Common/MessageContainer.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageContainer.cs index 29a6c2372..4b5772642 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/MessageContainer.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/MessageContainer.cs @@ -23,16 +23,17 @@ namespace Tango.PMR.Common { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChZNZXNzYWdlQ29udGFpbmVyLnByb3RvEhBUYW5nby5QTVIuQ29tbW9uGhFN", - "ZXNzYWdlVHlwZS5wcm90bxoPRXJyb3JDb2RlLnByb3RvIrwBChBNZXNzYWdl", + "ZXNzYWdlVHlwZS5wcm90bxoPRXJyb3JDb2RlLnByb3RvItIBChBNZXNzYWdl", "Q29udGFpbmVyEisKBFR5cGUYASABKA4yHS5UYW5nby5QTVIuQ29tbW9uLk1l", "c3NhZ2VUeXBlEg0KBVRva2VuGAIgASgJEhIKCkNvbnRpbnVvdXMYAyABKAgS", "EQoJQ29tcGxldGVkGAQgASgIEgwKBERhdGEYBSABKAwSCwoDQ1JDGAYgASgN", - "EioKBUVycm9yGAcgASgOMhsuVGFuZ28uUE1SLkNvbW1vbi5FcnJvckNvZGVC", - "HAoaY29tLnR3aW5lLnRhbmdvLnBtci5jb21tb25iBnByb3RvMw==")); + "EioKBUVycm9yGAcgASgOMhsuVGFuZ28uUE1SLkNvbW1vbi5FcnJvckNvZGUS", + "FAoMRXJyb3JNZXNzYWdlGAggASgJQhwKGmNvbS50d2luZS50YW5nby5wbXIu", + "Y29tbW9uYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tango.PMR.Common.MessageTypeReflection.Descriptor, global::Tango.PMR.Common.ErrorCodeReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Common.MessageContainer), global::Tango.PMR.Common.MessageContainer.Parser, new[]{ "Type", "Token", "Continuous", "Completed", "Data", "CRC", "Error" }, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Common.MessageContainer), global::Tango.PMR.Common.MessageContainer.Parser, new[]{ "Type", "Token", "Continuous", "Completed", "Data", "CRC", "Error", "ErrorMessage" }, null, null, null) })); } #endregion @@ -70,6 +71,7 @@ namespace Tango.PMR.Common { data_ = other.data_; cRC_ = other.cRC_; error_ = other.error_; + errorMessage_ = other.errorMessage_; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -154,6 +156,17 @@ namespace Tango.PMR.Common { } } + /// <summary>Field number for the "ErrorMessage" field.</summary> + public const int ErrorMessageFieldNumber = 8; + private string errorMessage_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string ErrorMessage { + get { return errorMessage_; } + set { + errorMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as MessageContainer); @@ -174,6 +187,7 @@ namespace Tango.PMR.Common { if (Data != other.Data) return false; if (CRC != other.CRC) return false; if (Error != other.Error) return false; + if (ErrorMessage != other.ErrorMessage) return false; return true; } @@ -187,6 +201,7 @@ namespace Tango.PMR.Common { if (Data.Length != 0) hash ^= Data.GetHashCode(); if (CRC != 0) hash ^= CRC.GetHashCode(); if (Error != 0) hash ^= Error.GetHashCode(); + if (ErrorMessage.Length != 0) hash ^= ErrorMessage.GetHashCode(); return hash; } @@ -225,6 +240,10 @@ namespace Tango.PMR.Common { output.WriteRawTag(56); output.WriteEnum((int) Error); } + if (ErrorMessage.Length != 0) { + output.WriteRawTag(66); + output.WriteString(ErrorMessage); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -251,6 +270,9 @@ namespace Tango.PMR.Common { if (Error != 0) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Error); } + if (ErrorMessage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ErrorMessage); + } return size; } @@ -280,6 +302,9 @@ namespace Tango.PMR.Common { if (other.Error != 0) { Error = other.Error; } + if (other.ErrorMessage.Length != 0) { + ErrorMessage = other.ErrorMessage; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -318,6 +343,10 @@ namespace Tango.PMR.Common { error_ = (global::Tango.PMR.Common.ErrorCode) input.ReadEnum(); break; } + case 66: { + ErrorMessage = input.ReadString(); + break; + } } } } diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index 51828d50f..e2420a3b1 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs @@ -22,102 +22,107 @@ namespace Tango.PMR.Common { static MessageTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbir+IAoLTWVz", - "c2FnZVR5cGUSCAoETm9uZRAAEhQKEENhbGN1bGF0ZVJlcXVlc3QQAxIVChFD", - "YWxjdWxhdGVSZXNwb25zZRAEEhMKD1Byb2dyZXNzUmVxdWVzdBAFEhQKEFBy", - "b2dyZXNzUmVzcG9uc2UQBhIcChhTdHViQ2FydHJpZGdlUmVhZFJlcXVlc3QQ", - "BxIdChlTdHViQ2FydHJpZGdlUmVhZFJlc3BvbnNlEAgSHQoZU3R1YkNhcnRy", - "aWRnZVdyaXRlUmVxdWVzdBAJEh4KGlN0dWJD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0UmVzcG9uc2UQ", + "iycSFQoQS2VlcEFsaXZlUmVxdWVzdBDwLhIWChFLZWVwQWxpdmVSZXNwb25z", + "ZRDxLhITCg5Db25uZWN0UmVxdWVzdBDyLhIUCg9Db25uZWN0UmVzcG9uc2UQ", + "8y4SFgoRRGlzY29ubmVjdFJlcXVlc3QQ9C4SFwoSRGlzY29ubmVjdFJlc3Bv", + "bnNlEPUuEhYKEUZpbGVVcGxvYWRSZXF1ZXN0ENg2EhcKEkZpbGVVcGxvYWRS", + "ZXNwb25zZRDZNhIbChZGaWxlQ2h1bmtVcGxvYWRSZXF1ZXN0ENo2EhwKF0Zp", + "bGVDaHVua1VwbG9hZFJlc3BvbnNlENs2EhoKFUV4ZWN1dGVQcm9jZXNzUmVx", + "dWVzdBDcNhIbChZFeGVjdXRlUHJvY2Vzc1Jlc3BvbnNlEN02EhcKEktpbGxQ", + "cm9jZXNzUmVxdWVzdBDeNhIYChNLaWxsUHJvY2Vzc1Jlc3BvbnNlEN82QhwK", + "GmNvbS50d2luZS50YW5nby5wbXIuY29tbW9uYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -132,6 +137,10 @@ namespace Tango.PMR.Common { /// </summary> [pbr::OriginalName("None")] None = 0, /// <summary> + ///Common + /// </summary> + [pbr::OriginalName("ErrorResponse")] ErrorResponse = 1, + /// <summary> ///Stubs /// </summary> [pbr::OriginalName("CalculateRequest")] CalculateRequest = 3, @@ -300,6 +309,17 @@ namespace Tango.PMR.Common { [pbr::OriginalName("ConnectResponse")] ConnectResponse = 6003, [pbr::OriginalName("DisconnectRequest")] DisconnectRequest = 6004, [pbr::OriginalName("DisconnectResponse")] DisconnectResponse = 6005, + /// <summary> + ///IO + /// </summary> + [pbr::OriginalName("FileUploadRequest")] FileUploadRequest = 7000, + [pbr::OriginalName("FileUploadResponse")] FileUploadResponse = 7001, + [pbr::OriginalName("FileChunkUploadRequest")] FileChunkUploadRequest = 7002, + [pbr::OriginalName("FileChunkUploadResponse")] FileChunkUploadResponse = 7003, + [pbr::OriginalName("ExecuteProcessRequest")] ExecuteProcessRequest = 7004, + [pbr::OriginalName("ExecuteProcessResponse")] ExecuteProcessResponse = 7005, + [pbr::OriginalName("KillProcessRequest")] KillProcessRequest = 7006, + [pbr::OriginalName("KillProcessResponse")] KillProcessResponse = 7007, } #endregion diff --git a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs index 99b5e10c8..096ed2bf4 100644 --- a/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs +++ b/Software/Visual_Studio/Tango.PMR/ExtensionMethods.cs @@ -13,14 +13,14 @@ namespace Tango.PMR /// <summary> /// Contains PMR extension methods. /// </summary> - public static class ExtensionMethods + public static class ExtensionMethods { /// <summary> /// Gets the protobuf <see cref="OriginalNameAttribute"/> attribute value from the message type. /// </summary> /// <param name="value">The value.</param> /// <returns></returns> - public static String ToOriginalName(this MessageType value) + public static String ToOriginalName(this MessageType value) { FieldInfo fi = value.GetType().GetField(value.ToString()); diff --git a/Software/Visual_Studio/Tango.PMR/IO/ExecuteProcessRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/ExecuteProcessRequest.cs new file mode 100644 index 000000000..089f03932 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/ExecuteProcessRequest.cs @@ -0,0 +1,188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ExecuteProcessRequest.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.IO { + + /// <summary>Holder for reflection information generated from ExecuteProcessRequest.proto</summary> + public static partial class ExecuteProcessRequestReflection { + + #region Descriptor + /// <summary>File descriptor for ExecuteProcessRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ExecuteProcessRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChtFeGVjdXRlUHJvY2Vzc1JlcXVlc3QucHJvdG8SDFRhbmdvLlBNUi5JTyI7", + "ChVFeGVjdXRlUHJvY2Vzc1JlcXVlc3QSEAoIVXBsb2FkSUQYASABKAkSEAoI", + "RmlsZU5hbWUYAiABKAlCGAoWY29tLnR3aW5lLnRhbmdvLnBtci5pb2IGcHJv", + "dG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.ExecuteProcessRequest), global::Tango.PMR.IO.ExecuteProcessRequest.Parser, new[]{ "UploadID", "FileName" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class ExecuteProcessRequest : pb::IMessage<ExecuteProcessRequest> { + private static readonly pb::MessageParser<ExecuteProcessRequest> _parser = new pb::MessageParser<ExecuteProcessRequest>(() => new ExecuteProcessRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<ExecuteProcessRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.ExecuteProcessRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExecuteProcessRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExecuteProcessRequest(ExecuteProcessRequest other) : this() { + uploadID_ = other.uploadID_; + fileName_ = other.fileName_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExecuteProcessRequest Clone() { + return new ExecuteProcessRequest(this); + } + + /// <summary>Field number for the "UploadID" field.</summary> + public const int UploadIDFieldNumber = 1; + private string uploadID_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string UploadID { + get { return uploadID_; } + set { + uploadID_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "FileName" field.</summary> + public const int FileNameFieldNumber = 2; + private string fileName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string FileName { + get { return fileName_; } + set { + fileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ExecuteProcessRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ExecuteProcessRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UploadID != other.UploadID) return false; + if (FileName != other.FileName) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (UploadID.Length != 0) hash ^= UploadID.GetHashCode(); + if (FileName.Length != 0) hash ^= FileName.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 (UploadID.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UploadID); + } + if (FileName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FileName); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (UploadID.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UploadID); + } + if (FileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ExecuteProcessRequest other) { + if (other == null) { + return; + } + if (other.UploadID.Length != 0) { + UploadID = other.UploadID; + } + if (other.FileName.Length != 0) { + FileName = other.FileName; + } + } + + [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: { + UploadID = input.ReadString(); + break; + } + case 18: { + FileName = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/ExecuteProcessResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/ExecuteProcessResponse.cs new file mode 100644 index 000000000..f0d881528 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/ExecuteProcessResponse.cs @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ExecuteProcessResponse.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.IO { + + /// <summary>Holder for reflection information generated from ExecuteProcessResponse.proto</summary> + public static partial class ExecuteProcessResponseReflection { + + #region Descriptor + /// <summary>File descriptor for ExecuteProcessResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ExecuteProcessResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChxFeGVjdXRlUHJvY2Vzc1Jlc3BvbnNlLnByb3RvEgxUYW5nby5QTVIuSU8i", + "KwoWRXhlY3V0ZVByb2Nlc3NSZXNwb25zZRIRCglQcm9jZXNzSUQYASABKAlC", + "GAoWY29tLnR3aW5lLnRhbmdvLnBtci5pb2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.ExecuteProcessResponse), global::Tango.PMR.IO.ExecuteProcessResponse.Parser, new[]{ "ProcessID" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class ExecuteProcessResponse : pb::IMessage<ExecuteProcessResponse> { + private static readonly pb::MessageParser<ExecuteProcessResponse> _parser = new pb::MessageParser<ExecuteProcessResponse>(() => new ExecuteProcessResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<ExecuteProcessResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.ExecuteProcessResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExecuteProcessResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExecuteProcessResponse(ExecuteProcessResponse other) : this() { + processID_ = other.processID_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExecuteProcessResponse Clone() { + return new ExecuteProcessResponse(this); + } + + /// <summary>Field number for the "ProcessID" field.</summary> + public const int ProcessIDFieldNumber = 1; + private string processID_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string ProcessID { + get { return processID_; } + set { + processID_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ExecuteProcessResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ExecuteProcessResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ProcessID != other.ProcessID) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (ProcessID.Length != 0) hash ^= ProcessID.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 (ProcessID.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ProcessID); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (ProcessID.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProcessID); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ExecuteProcessResponse other) { + if (other == null) { + return; + } + if (other.ProcessID.Length != 0) { + ProcessID = other.ProcessID; + } + } + + [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: { + ProcessID = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileChunkUploadRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/FileChunkUploadRequest.cs new file mode 100644 index 000000000..5d09ef5d5 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/FileChunkUploadRequest.cs @@ -0,0 +1,216 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: FileChunkUploadRequest.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.IO { + + /// <summary>Holder for reflection information generated from FileChunkUploadRequest.proto</summary> + public static partial class FileChunkUploadRequestReflection { + + #region Descriptor + /// <summary>File descriptor for FileChunkUploadRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FileChunkUploadRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChxGaWxlQ2h1bmtVcGxvYWRSZXF1ZXN0LnByb3RvEgxUYW5nby5QTVIuSU8i", + "TgoWRmlsZUNodW5rVXBsb2FkUmVxdWVzdBIQCghVcGxvYWRJRBgBIAEoCRIO", + "CgZCdWZmZXIYAiABKAwSEgoKSXNDYW5jZWxlZBgEIAEoCEIYChZjb20udHdp", + "bmUudGFuZ28ucG1yLmlvYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileChunkUploadRequest), global::Tango.PMR.IO.FileChunkUploadRequest.Parser, new[]{ "UploadID", "Buffer", "IsCanceled" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class FileChunkUploadRequest : pb::IMessage<FileChunkUploadRequest> { + private static readonly pb::MessageParser<FileChunkUploadRequest> _parser = new pb::MessageParser<FileChunkUploadRequest>(() => new FileChunkUploadRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<FileChunkUploadRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.FileChunkUploadRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileChunkUploadRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileChunkUploadRequest(FileChunkUploadRequest other) : this() { + uploadID_ = other.uploadID_; + buffer_ = other.buffer_; + isCanceled_ = other.isCanceled_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileChunkUploadRequest Clone() { + return new FileChunkUploadRequest(this); + } + + /// <summary>Field number for the "UploadID" field.</summary> + public const int UploadIDFieldNumber = 1; + private string uploadID_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string UploadID { + get { return uploadID_; } + set { + uploadID_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "Buffer" field.</summary> + public const int BufferFieldNumber = 2; + private pb::ByteString buffer_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pb::ByteString Buffer { + get { return buffer_; } + set { + buffer_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "IsCanceled" field.</summary> + public const int IsCanceledFieldNumber = 4; + private bool isCanceled_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool IsCanceled { + get { return isCanceled_; } + set { + isCanceled_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FileChunkUploadRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FileChunkUploadRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UploadID != other.UploadID) return false; + if (Buffer != other.Buffer) return false; + if (IsCanceled != other.IsCanceled) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (UploadID.Length != 0) hash ^= UploadID.GetHashCode(); + if (Buffer.Length != 0) hash ^= Buffer.GetHashCode(); + if (IsCanceled != false) hash ^= IsCanceled.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 (UploadID.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UploadID); + } + if (Buffer.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Buffer); + } + if (IsCanceled != false) { + output.WriteRawTag(32); + output.WriteBool(IsCanceled); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (UploadID.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UploadID); + } + if (Buffer.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Buffer); + } + if (IsCanceled != false) { + size += 1 + 1; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FileChunkUploadRequest other) { + if (other == null) { + return; + } + if (other.UploadID.Length != 0) { + UploadID = other.UploadID; + } + if (other.Buffer.Length != 0) { + Buffer = other.Buffer; + } + if (other.IsCanceled != false) { + IsCanceled = other.IsCanceled; + } + } + + [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: { + UploadID = input.ReadString(); + break; + } + case 18: { + Buffer = input.ReadBytes(); + break; + } + case 32: { + IsCanceled = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileChunkUploadResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/FileChunkUploadResponse.cs new file mode 100644 index 000000000..112f3e614 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/FileChunkUploadResponse.cs @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: FileChunkUploadResponse.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.IO { + + /// <summary>Holder for reflection information generated from FileChunkUploadResponse.proto</summary> + public static partial class FileChunkUploadResponseReflection { + + #region Descriptor + /// <summary>File descriptor for FileChunkUploadResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FileChunkUploadResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ch1GaWxlQ2h1bmtVcGxvYWRSZXNwb25zZS5wcm90bxIMVGFuZ28uUE1SLklP", + "Ii0KF0ZpbGVDaHVua1VwbG9hZFJlc3BvbnNlEhIKCklzQ2FuY2VsZWQYASAB", + "KAhCGAoWY29tLnR3aW5lLnRhbmdvLnBtci5pb2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileChunkUploadResponse), global::Tango.PMR.IO.FileChunkUploadResponse.Parser, new[]{ "IsCanceled" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class FileChunkUploadResponse : pb::IMessage<FileChunkUploadResponse> { + private static readonly pb::MessageParser<FileChunkUploadResponse> _parser = new pb::MessageParser<FileChunkUploadResponse>(() => new FileChunkUploadResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<FileChunkUploadResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.FileChunkUploadResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileChunkUploadResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileChunkUploadResponse(FileChunkUploadResponse other) : this() { + isCanceled_ = other.isCanceled_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileChunkUploadResponse Clone() { + return new FileChunkUploadResponse(this); + } + + /// <summary>Field number for the "IsCanceled" field.</summary> + public const int IsCanceledFieldNumber = 1; + private bool isCanceled_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool IsCanceled { + get { return isCanceled_; } + set { + isCanceled_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FileChunkUploadResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FileChunkUploadResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (IsCanceled != other.IsCanceled) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (IsCanceled != false) hash ^= IsCanceled.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 (IsCanceled != false) { + output.WriteRawTag(8); + output.WriteBool(IsCanceled); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (IsCanceled != false) { + size += 1 + 1; + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FileChunkUploadResponse other) { + if (other == null) { + return; + } + if (other.IsCanceled != false) { + IsCanceled = other.IsCanceled; + } + } + + [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: { + IsCanceled = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileUploadRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/FileUploadRequest.cs new file mode 100644 index 000000000..0596fbd81 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/FileUploadRequest.cs @@ -0,0 +1,187 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: FileUploadRequest.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.IO { + + /// <summary>Holder for reflection information generated from FileUploadRequest.proto</summary> + public static partial class FileUploadRequestReflection { + + #region Descriptor + /// <summary>File descriptor for FileUploadRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FileUploadRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChdGaWxlVXBsb2FkUmVxdWVzdC5wcm90bxIMVGFuZ28uUE1SLklPIjUKEUZp", + "bGVVcGxvYWRSZXF1ZXN0EhAKCEZpbGVOYW1lGAEgASgJEg4KBkxlbmd0aBgC", + "IAEoA0IYChZjb20udHdpbmUudGFuZ28ucG1yLmlvYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileUploadRequest), global::Tango.PMR.IO.FileUploadRequest.Parser, new[]{ "FileName", "Length" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class FileUploadRequest : pb::IMessage<FileUploadRequest> { + private static readonly pb::MessageParser<FileUploadRequest> _parser = new pb::MessageParser<FileUploadRequest>(() => new FileUploadRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<FileUploadRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.FileUploadRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileUploadRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileUploadRequest(FileUploadRequest other) : this() { + fileName_ = other.fileName_; + length_ = other.length_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileUploadRequest Clone() { + return new FileUploadRequest(this); + } + + /// <summary>Field number for the "FileName" field.</summary> + public const int FileNameFieldNumber = 1; + private string fileName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string FileName { + get { return fileName_; } + set { + fileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "Length" field.</summary> + public const int LengthFieldNumber = 2; + private long length_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public long Length { + get { return length_; } + set { + length_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FileUploadRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FileUploadRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FileName != other.FileName) return false; + if (Length != other.Length) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (FileName.Length != 0) hash ^= FileName.GetHashCode(); + if (Length != 0L) hash ^= Length.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 (FileName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(FileName); + } + if (Length != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Length); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (FileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); + } + if (Length != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Length); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FileUploadRequest other) { + if (other == null) { + return; + } + if (other.FileName.Length != 0) { + FileName = other.FileName; + } + if (other.Length != 0L) { + Length = other.Length; + } + } + + [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: { + FileName = input.ReadString(); + break; + } + case 16: { + Length = input.ReadInt64(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/FileUploadResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/FileUploadResponse.cs new file mode 100644 index 000000000..a832d970a --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/FileUploadResponse.cs @@ -0,0 +1,188 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: FileUploadResponse.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.IO { + + /// <summary>Holder for reflection information generated from FileUploadResponse.proto</summary> + public static partial class FileUploadResponseReflection { + + #region Descriptor + /// <summary>File descriptor for FileUploadResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FileUploadResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChhGaWxlVXBsb2FkUmVzcG9uc2UucHJvdG8SDFRhbmdvLlBNUi5JTyI+ChJG", + "aWxlVXBsb2FkUmVzcG9uc2USEAoIVXBsb2FkSUQYASABKAkSFgoOTWF4Q2h1", + "bmtMZW5ndGgYAiABKANCGAoWY29tLnR3aW5lLnRhbmdvLnBtci5pb2IGcHJv", + "dG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.FileUploadResponse), global::Tango.PMR.IO.FileUploadResponse.Parser, new[]{ "UploadID", "MaxChunkLength" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class FileUploadResponse : pb::IMessage<FileUploadResponse> { + private static readonly pb::MessageParser<FileUploadResponse> _parser = new pb::MessageParser<FileUploadResponse>(() => new FileUploadResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<FileUploadResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.FileUploadResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileUploadResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileUploadResponse(FileUploadResponse other) : this() { + uploadID_ = other.uploadID_; + maxChunkLength_ = other.maxChunkLength_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FileUploadResponse Clone() { + return new FileUploadResponse(this); + } + + /// <summary>Field number for the "UploadID" field.</summary> + public const int UploadIDFieldNumber = 1; + private string uploadID_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string UploadID { + get { return uploadID_; } + set { + uploadID_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "MaxChunkLength" field.</summary> + public const int MaxChunkLengthFieldNumber = 2; + private long maxChunkLength_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public long MaxChunkLength { + get { return maxChunkLength_; } + set { + maxChunkLength_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FileUploadResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FileUploadResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UploadID != other.UploadID) return false; + if (MaxChunkLength != other.MaxChunkLength) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (UploadID.Length != 0) hash ^= UploadID.GetHashCode(); + if (MaxChunkLength != 0L) hash ^= MaxChunkLength.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 (UploadID.Length != 0) { + output.WriteRawTag(10); + output.WriteString(UploadID); + } + if (MaxChunkLength != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MaxChunkLength); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (UploadID.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UploadID); + } + if (MaxChunkLength != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxChunkLength); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FileUploadResponse other) { + if (other == null) { + return; + } + if (other.UploadID.Length != 0) { + UploadID = other.UploadID; + } + if (other.MaxChunkLength != 0L) { + MaxChunkLength = other.MaxChunkLength; + } + } + + [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: { + UploadID = input.ReadString(); + break; + } + case 16: { + MaxChunkLength = input.ReadInt64(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/KillProcessRequest.cs b/Software/Visual_Studio/Tango.PMR/IO/KillProcessRequest.cs new file mode 100644 index 000000000..99f59b025 --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/KillProcessRequest.cs @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: KillProcessRequest.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.IO { + + /// <summary>Holder for reflection information generated from KillProcessRequest.proto</summary> + public static partial class KillProcessRequestReflection { + + #region Descriptor + /// <summary>File descriptor for KillProcessRequest.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static KillProcessRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChhLaWxsUHJvY2Vzc1JlcXVlc3QucHJvdG8SDFRhbmdvLlBNUi5JTyInChJL", + "aWxsUHJvY2Vzc1JlcXVlc3QSEQoJUHJvY2Vzc0lEGAEgASgJQhgKFmNvbS50", + "d2luZS50YW5nby5wbXIuaW9iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.KillProcessRequest), global::Tango.PMR.IO.KillProcessRequest.Parser, new[]{ "ProcessID" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class KillProcessRequest : pb::IMessage<KillProcessRequest> { + private static readonly pb::MessageParser<KillProcessRequest> _parser = new pb::MessageParser<KillProcessRequest>(() => new KillProcessRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<KillProcessRequest> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.KillProcessRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KillProcessRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KillProcessRequest(KillProcessRequest other) : this() { + processID_ = other.processID_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KillProcessRequest Clone() { + return new KillProcessRequest(this); + } + + /// <summary>Field number for the "ProcessID" field.</summary> + public const int ProcessIDFieldNumber = 1; + private string processID_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string ProcessID { + get { return processID_; } + set { + processID_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as KillProcessRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(KillProcessRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ProcessID != other.ProcessID) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (ProcessID.Length != 0) hash ^= ProcessID.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 (ProcessID.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ProcessID); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (ProcessID.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProcessID); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(KillProcessRequest other) { + if (other == null) { + return; + } + if (other.ProcessID.Length != 0) { + ProcessID = other.ProcessID; + } + } + + [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: { + ProcessID = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/IO/KillProcessResponse.cs b/Software/Visual_Studio/Tango.PMR/IO/KillProcessResponse.cs new file mode 100644 index 000000000..dd6f22f4e --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/IO/KillProcessResponse.cs @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: KillProcessResponse.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.IO { + + /// <summary>Holder for reflection information generated from KillProcessResponse.proto</summary> + public static partial class KillProcessResponseReflection { + + #region Descriptor + /// <summary>File descriptor for KillProcessResponse.proto</summary> + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static KillProcessResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChlLaWxsUHJvY2Vzc1Jlc3BvbnNlLnByb3RvEgxUYW5nby5QTVIuSU8iFQoT", + "S2lsbFByb2Nlc3NSZXNwb25zZUIYChZjb20udHdpbmUudGFuZ28ucG1yLmlv", + "YgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.IO.KillProcessResponse), global::Tango.PMR.IO.KillProcessResponse.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class KillProcessResponse : pb::IMessage<KillProcessResponse> { + private static readonly pb::MessageParser<KillProcessResponse> _parser = new pb::MessageParser<KillProcessResponse>(() => new KillProcessResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<KillProcessResponse> Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.IO.KillProcessResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KillProcessResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KillProcessResponse(KillProcessResponse other) : this() { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KillProcessResponse Clone() { + return new KillProcessResponse(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as KillProcessResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(KillProcessResponse 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(KillProcessResponse 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 b8561f61f..a85cde3c8 100644 --- a/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj +++ b/Software/Visual_Studio/Tango.PMR/Tango.PMR.csproj @@ -57,6 +57,7 @@ <Compile Include="ColorLab\LiquidType.cs" /> <Compile Include="ColorLab\OutputCoordinates.cs" /> <Compile Include="ColorLab\OutputLiquid.cs" /> + <Compile Include="Common\ErrorResponse.cs" /> <Compile Include="Connection\ConnectRequest.cs" /> <Compile Include="Connection\ConnectResponse.cs" /> <Compile Include="Connection\DeviceInformation.cs" /> @@ -142,6 +143,14 @@ <Compile Include="Integration\ExternalClientLoginResponse.cs" /> <Compile Include="Integration\OverrideDataBaseRequest.cs" /> <Compile Include="Integration\OverrideDataBaseResponse.cs" /> + <Compile Include="IO\ExecuteProcessRequest.cs" /> + <Compile Include="IO\ExecuteProcessResponse.cs" /> + <Compile Include="IO\FileChunkUploadRequest.cs" /> + <Compile Include="IO\FileChunkUploadResponse.cs" /> + <Compile Include="IO\FileUploadRequest.cs" /> + <Compile Include="IO\FileUploadResponse.cs" /> + <Compile Include="IO\KillProcessRequest.cs" /> + <Compile Include="IO\KillProcessResponse.cs" /> <Compile Include="ITangoMessage.cs" /> <Compile Include="MessageFactory.cs" /> <Compile Include="NativePMR.cs" /> diff --git a/Software/Visual_Studio/Tango.Transport/ExtensionMethods/TcpClientExtensions.cs b/Software/Visual_Studio/Tango.Transport/ExtensionMethods/TcpClientExtensions.cs new file mode 100644 index 000000000..f560b5a23 --- /dev/null +++ b/Software/Visual_Studio/Tango.Transport/ExtensionMethods/TcpClientExtensions.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; + + +public static class TcpClientExtensions +{ + /// <summary> + /// Returns the TcpClient remote end point IP address. + /// </summary> + /// <param name="socket">The socket.</param> + /// <returns></returns> + public static IPAddress GetIPAddress(this TcpClient socket) + { + return (socket.Client.RemoteEndPoint as IPEndPoint).Address; + } +} + diff --git a/Software/Visual_Studio/Tango.Transport/ITransporter.cs b/Software/Visual_Studio/Tango.Transport/ITransporter.cs index 1861ae6a3..ada8cf5ff 100644 --- a/Software/Visual_Studio/Tango.Transport/ITransporter.cs +++ b/Software/Visual_Studio/Tango.Transport/ITransporter.cs @@ -62,8 +62,19 @@ namespace Tango.Transport /// <typeparam name="Response">The type of the response.</typeparam> /// <param name="response">The response.</param> /// <param name="token">The token.</param> + /// <param name="completed">The completed.</param> + /// <param name="errorCode">The error code.</param> + /// <param name="errorMessage">The error message.</param> /// <returns></returns> - Task SendResponse<Response>(TangoMessage<Response> response, String token, bool? completed = null, ErrorCode? errorCode = null) where Response : IMessage<Response>; + Task SendResponse<Response>(TangoMessage<Response> response, String token, bool? completed = null, ErrorCode? errorCode = null, String errorMessage = null) where Response : IMessage<Response>; + + /// <summary> + /// Sends a general error response agnostic to the type of request. + /// </summary> + /// <param name="exception">The exception.</param> + /// <param name="token">The token.</param> + /// <returns></returns> + Task SendErrorResponse(Exception exception, String token); /// <summary> /// Occurs when a new request message has been received. diff --git a/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs b/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs index 747a07b4f..21019afcf 100644 --- a/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs +++ b/Software/Visual_Studio/Tango.Transport/ResponseErrorException.cs @@ -26,7 +26,7 @@ namespace Tango.Transport /// Initializes a new instance of the <see cref="ResponseErrorException{T}"/> class. /// </summary> /// <param name="error">The error.</param> - public ResponseErrorException(ErrorCode error, MessageType messageType) : base("Response " + messageType.ToString() + " returned with error " + error.ToString()) + public ResponseErrorException(ErrorCode error, String message, MessageType messageType) : base("Response " + messageType.ToString() + " returned with error " + error.ToString() + " - " + message) { Error = error; } diff --git a/Software/Visual_Studio/Tango.Transport/Tango.Transport.csproj b/Software/Visual_Studio/Tango.Transport/Tango.Transport.csproj index a1dd5e0d0..e7ae581f0 100644 --- a/Software/Visual_Studio/Tango.Transport/Tango.Transport.csproj +++ b/Software/Visual_Studio/Tango.Transport/Tango.Transport.csproj @@ -68,6 +68,7 @@ <Compile Include="Adapters\UsbSerialBaudRates.cs" /> <Compile Include="Adapters\UsbTransportAdapter.cs" /> <Compile Include="Encoders\ProtoEncoder.cs" /> + <Compile Include="ExtensionMethods\TcpClientExtensions.cs" /> <Compile Include="ITransportComponent.cs" /> <Compile Include="ITransportAdapter.cs" /> <Compile Include="Adapters\TcpTransportAdapter.cs" /> diff --git a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs index ba6b992cb..59fb91758 100644 --- a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs +++ b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs @@ -280,6 +280,14 @@ namespace Tango.Transport return source.Task; } + /// <summary> + /// Sends a request and expecting multiple response messages. + /// </summary> + /// <typeparam name="Request">The type of the request.</typeparam> + /// <typeparam name="Response">The type of the response.</typeparam> + /// <param name="request">The request.</param> + /// <param name="timeout"></param> + /// <returns></returns> public IObservable<TangoMessage<Response>> SendContinuousRequest<Request, Response>(TangoMessage<Request> request, TimeSpan? timeout = default(TimeSpan?)) where Request : IMessage<Request> where Response : IMessage<Response> { LogManager.Log("Queuing continuous request message: " + typeof(Request).Name + " Token: " + request.Container.Token, LogCategory.Debug); @@ -328,8 +336,12 @@ namespace Tango.Transport /// <typeparam name="Response">The type of the response.</typeparam> /// <param name="response">The response.</param> /// <param name="token">The token.</param> + /// <param name="completed">The completed.</param> + /// <param name="errorCode">The error code.</param> + /// <param name="errorMessage">The error message.</param> /// <returns></returns> - public Task SendResponse<Response>(TangoMessage<Response> response, String token, bool? completed = null, ErrorCode? errorCode = null) where Response : IMessage<Response> + /// <exception cref="InvalidOperationException">Matching request token was not found!</exception> + public Task SendResponse<Response>(TangoMessage<Response> response, String token, bool? completed = null, ErrorCode? errorCode = null, String errorMessage = null) where Response : IMessage<Response> { response.Container.Token = token; @@ -343,6 +355,11 @@ namespace Tango.Transport response.Container.Error = errorCode.Value; } + if (!String.IsNullOrEmpty(errorMessage)) + { + response.Container.ErrorMessage = errorMessage; + } + LogManager.Log("Queuing response message: " + typeof(Response).Name, LogCategory.Debug); PendingResponse pendingResponse = null; @@ -376,6 +393,17 @@ namespace Tango.Transport return source.Task; } + /// <summary> + /// Sends a general error response agnostic to the type of request. + /// </summary> + /// <param name="exception">The exception.</param> + /// <param name="token">The token.</param> + /// <returns></returns> + public Task SendErrorResponse(Exception exception, string token) + { + return SendResponse<ErrorResponse>(new ErrorResponse() { }, token, true, ErrorCode.GeneralError, exception.Message); + } + #endregion #region Private Methods @@ -504,7 +532,7 @@ namespace Tango.Transport else { LogManager.Log("Response has returned with error: " + container.Error.ToString(), LogCategory.Warning); - request.SetException(new ResponseErrorException(container.Error, container.Type)); + request.SetException(new ResponseErrorException(container.Error, container.ErrorMessage, container.Type)); } } catch (Exception ex) @@ -530,7 +558,7 @@ namespace Tango.Transport else { LogManager.Log("Response has returned with error: " + container.Error.ToString(), LogCategory.Warning); - request.SetException(new ResponseErrorException(container.Error, container.Type)); + request.SetException(new ResponseErrorException(container.Error, container.ErrorMessage, container.Type)); } } catch (Exception ex) diff --git a/Software/Visual_Studio/Tango.UnitTesting/Helper.cs b/Software/Visual_Studio/Tango.UnitTesting/Helper.cs index e09b17149..67252f914 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Helper.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/Helper.cs @@ -44,6 +44,15 @@ namespace Tango.UnitTesting } /// <summary> + /// Gets the tango build path. + /// </summary> + /// <returns></returns> + public static String GetBuildPath() + { + return Path.GetFullPath(@"..\..\Build\Debug"); + } + + /// <summary> /// Gets the SQLite database file path in DB folder. /// </summary> /// <returns></returns> diff --git a/Software/Visual_Studio/Tango.UnitTesting/RemoteRunner_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/RemoteRunner_TST.cs new file mode 100644 index 000000000..6e59dde8a --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/RemoteRunner_TST.cs @@ -0,0 +1,92 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Tango.Transport; +using Tango.Transport.Transporters; +using Tango.Transport.Adapters; +using Tango.PMR.IO; +using Tango.PMR; +using Google.Protobuf; + +namespace Tango.UnitTesting +{ + [TestClass] + [TestCategory("Remote Runner")] + public class RemoteRunner_TST + { + [TestMethod] + public void Run_Remote_Runner_Connect_Upload_And_Execute_Process() + { + Process runner = Process.Start(Path.Combine(Helper.GetBuildPath(), "Tango.RemoteRunner.UI.exe")); + runner.WaitForInputIdle(); + + Thread.Sleep(2000); + + ITransportAdapter adapter = new TcpTransportAdapter("localhost", 9595); + ITransporter transporter = new BasicTransporter(adapter); + transporter.Connect().Wait(); + + Thread.Sleep(1000); + + String uploadFileName = "RemoteRunnerExeTest.zip"; + String executeFileName = "RemoteRunnerExeTest.exe"; + + FileInfo exeFile = new FileInfo(Helper.GetResourcePath(uploadFileName)); + + var uploadResponse = transporter.SendRequest<FileUploadRequest, FileUploadResponse>(new FileUploadRequest() + { + FileName = uploadFileName, + Length = exeFile.Length, + }).Result.Message; + + int currentFilePosition = 0; + + do + { + using (FileStream fs = new FileStream(exeFile.FullName, FileMode.Open)) + { + fs.Position = currentFilePosition; + + FileChunkUploadRequest chunkRequest = new FileChunkUploadRequest(); + chunkRequest.UploadID = uploadResponse.UploadID; + + long remaining = exeFile.Length - currentFilePosition; + + byte[] buffer = new byte[uploadResponse.MaxChunkLength > remaining ? uploadResponse.MaxChunkLength : remaining]; + fs.Read(buffer, 0, buffer.Length); + chunkRequest.Buffer = ByteString.CopyFrom(buffer); + + transporter.SendRequest<FileChunkUploadRequest, FileChunkUploadResponse>(chunkRequest).Wait(); + + currentFilePosition += buffer.Length; + } + + } while (currentFilePosition < exeFile.Length); + + Thread.Sleep(1000); + + var response = transporter.SendRequest<ExecuteProcessRequest, ExecuteProcessResponse>(new ExecuteProcessRequest() + { + UploadID = uploadResponse.UploadID, + FileName = executeFileName, + }, TimeSpan.FromSeconds(30)).Result.Message; + + Thread.Sleep(5000); + + transporter.SendRequest<KillProcessRequest, KillProcessResponse>(new KillProcessRequest() + { + ProcessID = response.ProcessID, + }).Wait(); + + transporter.Disconnect().Wait(); + + runner.Kill(); + } + } +} diff --git a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj index b01b6374b..9fbcc4d09 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj +++ b/Software/Visual_Studio/Tango.UnitTesting/Tango.UnitTesting.csproj @@ -90,6 +90,7 @@ <Compile Include="DependencyInjection_TST.cs" /> <Compile Include="Logging_TST.cs" /> <Compile Include="MachineStudio_TST.cs" /> + <Compile Include="RemoteRunner_TST.cs" /> <Compile Include="Temporary_TST.cs" /> <Compile Include="TFS_TST.cs" /> <Compile Include="Outlook_TST.cs" /> @@ -168,6 +169,10 @@ <Project>{998f8471-dc1b-41b6-9d96-354e1b4e7a32}</Project> <Name>Tango.TFS</Name> </ProjectReference> + <ProjectReference Include="..\Tango.Transport\Tango.Transport.csproj"> + <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> + <Name>Tango.Transport</Name> + </ProjectReference> <ProjectReference Include="..\Utilities\Tango.DBObservablesGenerator.CLI\Tango.DBObservablesGenerator.CLI.csproj"> <Project>{ebb7cb9f-6af2-456b-a5dd-1b136b605d90}</Project> <Name>Tango.DBObservablesGenerator.CLI</Name> diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 1a1801234..2cb58792c 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -191,6 +191,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PPC.Common", "PPC\Tan EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PPC.UI", "PPC\Tango.PPC.UI\Tango.PPC.UI.csproj", "{654BEDA3-16FB-44FF-ADE7-B52E50B02E63}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.RemoteRunner.UI", "Utilities\Tango.RemoteRunner.UI\Tango.RemoteRunner.UI.csproj", "{4FD16878-1A44-4CCE-9589-5FC630FACDE9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution AppVeyor|Any CPU = AppVeyor|Any CPU @@ -3309,6 +3311,46 @@ Global {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x64.Build.0 = Release|Any CPU {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x86.ActiveCfg = Release|Any CPU {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x86.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|Any CPU.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|ARM.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|ARM.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|ARM64.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|x64.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|x64.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|x86.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.AppVeyor|x86.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|ARM.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|ARM.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|ARM64.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|x64.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|x64.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|x86.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Debug|x86.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|Any CPU.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|ARM.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|ARM.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|ARM64.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|ARM64.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|x64.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|x64.Build.0 = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|x86.ActiveCfg = Release|Any CPU + {4FD16878-1A44-4CCE-9589-5FC630FACDE9}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -3366,6 +3408,7 @@ Global {09EE4BC6-F1C6-46DD-B4FE-918377A4EF02} = {CD2513CC-7596-498C-957D-DE6473561A1C} {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60} {654BEDA3-16FB-44FF-ADE7-B52E50B02E63} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60} + {4FD16878-1A44-4CCE-9589-5FC630FACDE9} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.config b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.config new file mode 100644 index 000000000..c06036970 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.config @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /> + </startup> + <runtime> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.xaml b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.xaml new file mode 100644 index 000000000..20df5e220 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.xaml @@ -0,0 +1,29 @@ +<Application x:Class="Tango.RemoteRunner.UI.App" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.RemoteRunner.UI" + StartupUri="MainWindow.xaml"> + <Application.Resources> + <ResourceDictionary> + <ResourceDictionary.MergedDictionaries> + <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! --> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" /> + + <!-- Accent and AppTheme setting --> + + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" /> + + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" /> + <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Styles.xaml" /> + + <!--View Models--> + <ResourceDictionary> + <local:MainWindowVM x:Key="MainWindowVM" /> + </ResourceDictionary> + </ResourceDictionary.MergedDictionaries> + </ResourceDictionary> + </Application.Resources> +</Application> diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.xaml.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.xaml.cs new file mode 100644 index 000000000..9bfeb8192 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Tango.RemoteRunner.UI +{ + /// <summary> + /// Interaction logic for App.xaml + /// </summary> + public partial class App : Application + { + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/FileUpload.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/FileUpload.cs new file mode 100644 index 000000000..e707d475c --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/FileUpload.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.IO; + +namespace Tango.RemoteRunner.UI +{ + public class FileUpload + { + public TemporaryFolder Folder { get; set; } + public String UploadID { get; set; } + public String FileName { get; set; } + public bool Completed { get; set; } + public long Length { get; set; } + public long CurrentLength { get; set; } + public bool Expanded { get; set; } + + public String FullPath + { + get { return Path.Combine(Folder.Path, FileName); } + } + + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/FodyWeavers.xml b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/FodyWeavers.xml new file mode 100644 index 000000000..c6e1b7c8a --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/FodyWeavers.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<Weavers> + <Costura /> +</Weavers>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Images/cogwheel.png b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Images/cogwheel.png Binary files differnew file mode 100644 index 000000000..a93c7ff1a --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Images/cogwheel.png diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Images/process.png b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Images/process.png Binary files differnew file mode 100644 index 000000000..3992ca40d --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Images/process.png diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindow.xaml new file mode 100644 index 000000000..43d7b9c1c --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindow.xaml @@ -0,0 +1,72 @@ +<mahapps:MetroWindow x:Class="Tango.RemoteRunner.UI.MainWindow" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:local="clr-namespace:Tango.RemoteRunner.UI" + mc:Ignorable="d" + Title="Tango Remote Process Runner" Height="500" Width="800" ResizeMode="NoResize" TitlebarHeight="40" TitleCaps="False" BorderBrush="Gray" BorderThickness="1" WindowStartupLocation="CenterScreen" Background="#202020" Foreground="Gainsboro" DataContext="{StaticResource MainWindowVM}" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}"> + + <mahapps:MetroWindow.TitleTemplate> + <DataTemplate> + <TextBlock Foreground="Gray" Text="{Binding}" VerticalAlignment="Center"></TextBlock> + </DataTemplate> + </mahapps:MetroWindow.TitleTemplate> + <mahapps:MetroWindow.IconTemplate> + <DataTemplate> + <Image Source="/process.ico" Width="16" Height="16"></Image> + </DataTemplate> + </mahapps:MetroWindow.IconTemplate> + + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="80"/> + </Grid.RowDefinitions> + + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="456*"/> + <ColumnDefinition Width="5"/> + <ColumnDefinition Width="329*"/> + </Grid.ColumnDefinitions> + + <GridSplitter Grid.Column="1" Width="5" Background="#383838" HorizontalAlignment="Center" VerticalAlignment="Stretch" /> + <Rectangle VerticalAlignment="Bottom" Stroke="#383838" StrokeThickness="5" Grid.ColumnSpan="3" /> + + <DockPanel Margin="20"> + <TextBlock DockPanel.Dock="Top">Running Processes</TextBlock> + <DataGrid Margin="0 10 0 0" CanUserAddRows="False" RowHeight="40" CanUserDeleteRows="False" CanUserReorderColumns="False" ItemsSource="{Binding RunningProcesses}" AutoGenerateColumns="False"> + <DataGrid.Columns> + <DataGridTemplateColumn Width="40"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Image Source="/Images/cogwheel.png" Width="24" /> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + + <DataGridTextColumn Header="ID" Binding="{Binding ProcessID}" /> + <DataGridTextColumn Header="Name" Width="1*" Binding="{Binding ProcessName}" /> + + <DataGridTemplateColumn> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Button Width="70">Kill</Button> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + </DataGrid.Columns> + </DataGrid> + </DockPanel> + + <Grid Grid.Column="2"> + <DockPanel Margin="20"> + <TextBlock DockPanel.Dock="Top">Log</TextBlock> + <TextBox Text="{Binding Log,Mode=OneWay}" IsReadOnly="True" Padding="5" Margin="0 10 0 0" Background="#151515" Foreground="Gainsboro" BorderThickness="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" AcceptsReturn="True" /> + </DockPanel> + </Grid> + </Grid> + </Grid> +</mahapps:MetroWindow> diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindow.xaml.cs new file mode 100644 index 000000000..07b702885 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindow.xaml.cs @@ -0,0 +1,120 @@ +using MahApps.Metro.Controls; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Forms; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using System.ComponentModel; +using System.Windows.Interop; + +namespace Tango.RemoteRunner.UI +{ + /// <summary> + /// Interaction logic for MainWindow.xaml + /// </summary> + public partial class MainWindow : MetroWindow + { + NotifyIcon _icon; + private bool _canClose; + private MainWindowVM _vm; + + public MainWindow() + { + InitializeComponent(); + + double width = Width; + double height = Height; + + Width = 0; + Height = 0; + + Loaded += (_, __) => + { + Visibility = Visibility.Hidden; + _vm = DataContext as MainWindowVM; + _vm.SetNotificationAction(Notify); + Notify("Running in background..."); + }; + + ContentRendered += (_, __) => + { + Width = width; + Height = height; + _vm.ViewLoaded(); + }; + + _icon = new NotifyIcon(); + _icon.Visible = true; + _icon.Text = Title; + _icon.Icon = new System.Drawing.Icon(Core.Helpers.EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.RemoteRunner.UI.process_task.ico")); + + var menuExit = new System.Windows.Forms.MenuItem() + { + Text = "Quit", + }; + + menuExit.Click += (_, __) => + { + _canClose = true; + Close(); + }; + + var menuOpen = new System.Windows.Forms.MenuItem() + { + Text = "Open", + }; + + menuOpen.Click += (_, __) => + { + Visibility = Visibility.Visible; + Activate(); + }; + + _icon.ContextMenu = new System.Windows.Forms.ContextMenu(); + _icon.ContextMenu.MenuItems.Add(menuOpen); + _icon.ContextMenu.MenuItems.Add(menuExit); + _icon.MouseClick += (_, e) => + { + if (e.Button == MouseButtons.Left) + { + Visibility = Visibility.Visible; + Activate(); + } + }; + + var helper = new WindowInteropHelper(this); + helper.EnsureHandle(); + } + + protected override void OnClosing(CancelEventArgs e) + { + base.OnClosing(e); + + if (!_canClose) + { + Visibility = Visibility.Hidden; + Notify("Running in background..."); + } + + e.Cancel = !_canClose; + } + + private void Notify(String text) + { + this.BeginInvoke(() => + { + _icon.ShowBalloonTip(500, Title, text, ToolTipIcon.Info); + }); + } + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindowVM.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindowVM.cs new file mode 100644 index 000000000..d0108a499 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/MainWindowVM.cs @@ -0,0 +1,251 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using Tango.Logging; +using Tango.PMR; +using Tango.PMR.Common; +using Tango.PMR.IO; +using Tango.SharedUI; +using Tango.Transport; +using Tango.Transport.Adapters; +using Tango.Transport.Servers; +using Tango.Transport.Transporters; + +namespace Tango.RemoteRunner.UI +{ + public class MainWindowVM : ViewModel + { + private TcpServer _server; + private ITransporter _transporter; + private const int PORT = 9595; + private List<FileUpload> _uploads; + private const long MAX_CHUNK_LENGTH = 1024; + + private Action<String> _notificationAction; + private ObservableCollection<RunningProcess> _runningProcesses; + public ObservableCollection<RunningProcess> RunningProcesses + { + get { return _runningProcesses; } + set { _runningProcesses = value; RaisePropertyChangedAuto(); } + } + + private String _log; + public String Log + { + get { return _log; } + set { _log = value; RaisePropertyChangedAuto(); } + } + + public MainWindowVM() + { + RunningProcesses = new ObservableCollection<RunningProcess>(); + _uploads = new List<FileUpload>(); + + var logger = new SimpleStringLogger() { Enabled = true }; + logger.LogReceived += (_, log) => + { + Log += String.Format("{0}: {1}", log.TimeStamp.ToShortTimeString(), log.Message) + Environment.NewLine; + }; + LogManager.RegisterLogger(logger); + } + + public void ViewLoaded() + { + LogManager.Log("Application Started!"); + LogManager.Log("Initializing TCP listener on port " + PORT + "..."); + _server = new TcpServer(PORT); + _server.ClientConnected += _server_ClientConnected; + _server.Start(); + + LogManager.Log("Initializing basic transporter..."); + _transporter = new BasicTransporter(); + _transporter.FailsWithAdapter = false; + _transporter.RequestReceived += _transporter_RequestReceived; + } + + private void _transporter_RequestReceived(object sender, MessageContainer container) + { + try + { + switch (container.Type) + { + case MessageType.FileUploadRequest: + HandleFileUploadRequest(MessageFactory.ParseTangoMessageFromContainer<FileUploadRequest>(container)); + break; + case MessageType.FileChunkUploadRequest: + HandleFileChunkUploadRequest(MessageFactory.ParseTangoMessageFromContainer<FileChunkUploadRequest>(container)); + break; + case MessageType.ExecuteProcessRequest: + HandleExecuteProcessRequest(MessageFactory.ParseTangoMessageFromContainer<ExecuteProcessRequest>(container)); + break; + case MessageType.KillProcessRequest: + HandleKillProcessRequest(MessageFactory.ParseTangoMessageFromContainer<KillProcessRequest>(container)); + break; + } + } + catch (Exception ex) + { + LogManager.Log(ex); + _transporter.SendErrorResponse(ex, container.Token); + } + } + + #region Request Handlers + + private void HandleFileUploadRequest(TangoMessage<FileUploadRequest> request) + { + LogManager.Log("File upload request received " + request.Message.FileName); + + Notify("Upload request " + request.Message.FileName); + + var tempFolder = TemporaryManager.CreateFolder(); + LogManager.Log("Created temporary upload folder " + tempFolder.Path); + + String uploadID = Guid.NewGuid().ToString(); + + _uploads.Add(new FileUpload() + { + Folder = tempFolder, + UploadID = uploadID, + FileName = request.Message.FileName, + Length = request.Message.Length, + }); + + _transporter.SendResponse<FileUploadResponse>(new FileUploadResponse() + { + UploadID = uploadID, + MaxChunkLength = MAX_CHUNK_LENGTH, + }, request.Container.Token); + } + + private void HandleFileChunkUploadRequest(TangoMessage<FileChunkUploadRequest> request) + { + FileUpload upload = _uploads.SingleOrDefault(x => x.UploadID == request.Message.UploadID); + if (upload == null) + { + _transporter.SendResponse<FileChunkUploadResponse>(new FileChunkUploadResponse() { IsCanceled = true }, request.Container.Token, true, ErrorCode.InvalidUploadId); + return; + } + + if (upload.CurrentLength + request.Message.Buffer.Length > upload.Length) + { + _transporter.SendResponse<FileChunkUploadResponse>(new FileChunkUploadResponse() { IsCanceled = true }, request.Container.Token, true, ErrorCode.FileLengthOutOfRange); + return; + } + + using (FileStream fs = new FileStream(upload.FullPath, FileMode.Append)) + { + byte[] buffer = request.Message.Buffer.ToByteArray(); + fs.Write(buffer, 0, buffer.Length); + upload.CurrentLength = fs.Length; + + if (fs.Length == upload.Length) + { + upload.Completed = true; + LogManager.Log("File upload completed " + upload.FileName); + } + } + + _transporter.SendResponse<FileChunkUploadResponse>(new FileChunkUploadResponse(), request.Container.Token); + } + + private void HandleExecuteProcessRequest(TangoMessage<ExecuteProcessRequest> request) + { + LogManager.Log("Execute process request received " + request.Message.FileName); + + Notify("Execute request " + request.Message.FileName); + + FileUpload upload = _uploads.SingleOrDefault(x => x.UploadID == request.Message.UploadID); + if (upload == null || !upload.Completed) + { + _transporter.SendResponse<ExecuteProcessResponse>(new ExecuteProcessResponse(), request.Container.Token, true, ErrorCode.InvalidUploadId); + return; + } + + if (Path.GetExtension(upload.FileName).ToLower() == ".zip" && !upload.Expanded) + { + LogManager.Log("Extracting zip file to " + upload.Folder.Path); + ZipFile.ExtractToDirectory(upload.FullPath, upload.Folder.Path); + } + + upload.Expanded = true; + + RunningProcess process = new RunningProcess(); + process.Process = Process.Start(Path.Combine(upload.Folder.Path, Path.GetFileName(request.Message.FileName))); + + LogManager.Log("Process started " + process.ProcessName + ", " + process.ProcessID); + + InvokeUINow(() => + { + RunningProcesses.Add(process); + }); + + _transporter.SendResponse<ExecuteProcessResponse>(new ExecuteProcessResponse() { ProcessID = process.ProcessID }, request.Container.Token); + } + + private void HandleKillProcessRequest(TangoMessage<KillProcessRequest> request) + { + LogManager.Log("Kill process request received " + request.Message.ProcessID); + Notify("Kill request " + request.Message.ProcessID); + + var process = RunningProcesses.SingleOrDefault(x => x.ProcessID == request.Message.ProcessID); + + if (process == null) + { + _transporter.SendResponse<KillProcessResponse>(new KillProcessResponse(), request.Container.Token, true, ErrorCode.InvalidProcessId); + return; + } + + process.Process.Kill(); + LogManager.Log("Process killed " + process.ProcessName + ", " + process.ProcessID); + _transporter.SendResponse<KillProcessResponse>(new KillProcessResponse(), request.Container.Token); + } + + #endregion + + private void _server_ClientConnected(object sender, ClientConnectedEventArgs e) + { + Task.Factory.StartNew(async () => + { + try + { + Stopwatch watch = new Stopwatch(); + watch.Start(); + + LogManager.Log("Remote client connection from " + e.Socket.GetIPAddress()); + LogManager.Log("Initializing transporter with a new TCP adapter..."); + + Notify("Client connected from " + e.Socket.GetIPAddress()); + + await _transporter.Disconnect(); + TcpTransportAdapter adapter = new TcpTransportAdapter(e.Socket); + _transporter.Adapter = adapter; + await _transporter.Connect(); + + LogManager.Log(watch.Elapsed.Milliseconds + " milliseconds"); + } + catch (Exception ex) + { + LogManager.Log(ex); + } + }); + } + + public void SetNotificationAction(Action<String> notificationAction) + { + _notificationAction = notificationAction; + } + + private void Notify(String text) + { + _notificationAction?.Invoke(text); + } + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..587ec6945 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.RemoteRunner.UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.RemoteRunner.UI")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file +//inside a <PropertyGroup>. For example, if you are using US english +//in your source files, set the <UICulture> to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Resources.Designer.cs new file mode 100644 index 000000000..6714b7bda --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.RemoteRunner.UI.Properties +{ + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.RemoteRunner.UI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Resources.resx b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Settings.Designer.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Settings.Designer.cs new file mode 100644 index 000000000..7870758de --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.RemoteRunner.UI.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Settings.settings b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/RunningProcess.cs b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/RunningProcess.cs new file mode 100644 index 000000000..5e874791e --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/RunningProcess.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.RemoteRunner.UI +{ + public class RunningProcess + { + public Process Process { get; set; } + + public String ProcessID + { + get { return Process.Id.ToString(); } + } + + public String ProcessName + { + get { return Process.ProcessName; } + } + } +} diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Tango.RemoteRunner.UI.csproj b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Tango.RemoteRunner.UI.csproj new file mode 100644 index 000000000..99921bdcb --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/Tango.RemoteRunner.UI.csproj @@ -0,0 +1,166 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{4FD16878-1A44-4CCE-9589-5FC630FACDE9}</ProjectGuid> + <OutputType>WinExe</OutputType> + <RootNamespace>Tango.RemoteRunner.UI</RootNamespace> + <AssemblyName>Tango.RemoteRunner.UI</AssemblyName> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <NuGetPackageImportStamp> + </NuGetPackageImportStamp> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\Build\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>..\..\Build\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Costura, Version=1.6.2.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> + </Reference> + <Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> + <HintPath>..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.IO.Compression" /> + <Reference Include="System.IO.Compression.FileSystem" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll</HintPath> + </Reference> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <ApplicationDefinition Include="App.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </ApplicationDefinition> + <Compile Include="FileUpload.cs" /> + <Compile Include="RunningProcess.cs" /> + <Page Include="MainWindow.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Compile Include="App.xaml.cs"> + <DependentUpon>App.xaml</DependentUpon> + <SubType>Code</SubType> + </Compile> + <Compile Include="MainWindow.xaml.cs"> + <DependentUpon>MainWindow.xaml</DependentUpon> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="MainWindowVM.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Logging\Tango.Logging.csproj"> + <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> + <Name>Tango.Logging</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj"> + <Project>{8491D07B-C1F6-4B62-A412-41B9FD2D6538}</Project> + <Name>Tango.SharedUI</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Transport\Tango.Transport.csproj"> + <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> + <Name>Tango.Transport</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <None Include="FodyWeavers.xml" /> + </ItemGroup> + <ItemGroup> + <Resource Include="process.ico" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\cogwheel.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\process.png" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="process_task.ico" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <Import Project="..\..\packages\Fody.2.0.0\build\dotnet\Fody.targets" Condition="Exists('..\..\packages\Fody.2.0.0\build\dotnet\Fody.targets')" /> + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> + <PropertyGroup> + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> + </PropertyGroup> + <Error Condition="!Exists('..\..\packages\Fody.2.0.0\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Fody.2.0.0\build\dotnet\Fody.targets'))" /> + <Error Condition="!Exists('..\..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets'))" /> + </Target> + <Import Project="..\..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets" Condition="Exists('..\..\packages\Costura.Fody.1.6.2\build\dotnet\Costura.Fody.targets')" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/packages.config b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/packages.config new file mode 100644 index 000000000..8f0ca84f9 --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/packages.config @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Costura.Fody" version="1.6.2" targetFramework="net46" developmentDependency="true" /> + <package id="Fody" version="2.0.0" targetFramework="net46" developmentDependency="true" /> + <package id="Google.Protobuf" version="3.4.1" targetFramework="net46" /> + <package id="MahApps.Metro" version="1.5.0" targetFramework="net46" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/process.ico b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/process.ico Binary files differnew file mode 100644 index 000000000..777a3b36d --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/process.ico diff --git a/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/process_task.ico b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/process_task.ico Binary files differnew file mode 100644 index 000000000..777a3b36d --- /dev/null +++ b/Software/Visual_Studio/Utilities/Tango.RemoteRunner.UI/process_task.ico |
