From e0c19a620f338848b130ad6d2bd0ce8d5a52ca93 Mon Sep 17 00:00:00 2001 From: Avi Levkovich Date: Wed, 18 Jul 2018 17:50:14 +0300 Subject: Flash R/W Buf --- .../Tango.MachineStudio.UI/Resources/BuildDate.txt | 2 +- .../Visual_Studio/Tango.PMR/Common/MessageType.cs | 97 ++++---- .../Stubs/StubExtFlashReadWordsRequest.cs | 163 ++++++++++++++ .../Stubs/StubExtFlashReadWordsResponse.cs | 246 +++++++++++++++++++++ .../Stubs/StubExtFlashWriteWordsRequest.cs | 183 +++++++++++++++ .../Stubs/StubExtFlashWriteWordsResponse.cs | 224 +++++++++++++++++++ 6 files changed, 869 insertions(+), 46 deletions(-) create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsResponse.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsRequest.cs create mode 100644 Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsResponse.cs (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt index 4e5321cc7..2e68b7446 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt @@ -1 +1 @@ -Mon 07/16/2018 19:59:53.31 +18-Jul-18 17:28:52.88 diff --git a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs index de184cee7..8b7cae444 100644 --- a/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs +++ b/Software/Visual_Studio/Tango.PMR/Common/MessageType.cs @@ -22,7 +22,7 @@ namespace Tango.PMR.Common { static MessageTypeReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirPIwoLTWVz", + "ChFNZXNzYWdlVHlwZS5wcm90bxIQVGFuZ28uUE1SLkNvbW1vbirbJAoLTWVz", "c2FnZVR5cGUSCAoETm9uZRAAEhEKDUVycm9yUmVzcG9uc2UQARIUChBDYWxj", "dWxhdGVSZXF1ZXN0EAMSFQoRQ2FsY3VsYXRlUmVzcG9uc2UQBBITCg9Qcm9n", "cmVzc1JlcXVlc3QQBRIUChBQcm9ncmVzc1Jlc3BvbnNlEAYSHAoYU3R1YkNh", @@ -82,50 +82,53 @@ namespace Tango.PMR.Common { "FlN0dWJUZW1wU2Vuc29yUmVzcG9uc2UQWhIbChdTdHViSTJDUmVhZEJ5dGVz", "UmVxdWVzdBBbEhwKGFN0dWJJMkNSZWFkQnl0ZXNSZXNwb25zZRBcEhwKGFN0", "dWJJMkNXcml0ZUJ5dGVzUmVxdWVzdBBdEh0KGVN0dWJJMkNXcml0ZUJ5dGVz", - "UmVzcG9uc2UQXhIlCiBFeHRlcm5hbEJyaWRnZVVkcERpc2NvdmVyeVBhY2tl", - "dBDoBxIfChpFeHRlcm5hbENsaWVudExvZ2luUmVxdWVzdBDpBxIgChtFeHRl", - "cm5hbENsaWVudExvZ2luUmVzcG9uc2UQ6gcSIQocRGlyZWN0U3luY2hyb25p", - "emF0aW9uUmVxdWVzdBDrBxIiCh1EaXJlY3RTeW5jaHJvbml6YXRpb25SZXNw", - "b25zZRDsBxIcChdPdmVycmlkZURhdGFCYXNlUmVxdWVzdBDtBxIdChhPdmVy", - "cmlkZURhdGFCYXNlUmVzcG9uc2UQ7gcSHAoXU3RhcnREaWFnbm9zdGljc1Jl", - "cXVlc3QQ0A8SHQoYU3RhcnREaWFnbm9zdGljc1Jlc3BvbnNlENEPEhwKF01v", - "dG9yQWJvcnRIb21pbmdSZXF1ZXN0ENIPEh0KGE1vdG9yQWJv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neratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Common.MessageType), }, null)); @@ -238,6 +241,10 @@ namespace Tango.PMR.Common { [pbr::OriginalName("StubI2CReadBytesResponse")] StubI2CreadBytesResponse = 92, [pbr::OriginalName("StubI2CWriteBytesRequest")] StubI2CwriteBytesRequest = 93, [pbr::OriginalName("StubI2CWriteBytesResponse")] StubI2CwriteBytesResponse = 94, + [pbr::OriginalName("StubExtFlashWriteWordsRequest")] StubExtFlashWriteWordsRequest = 95, + [pbr::OriginalName("StubExtFlashWriteWordsResponse")] StubExtFlashWriteWordsResponse = 96, + [pbr::OriginalName("StubExtFlashReadWordsRequest")] StubExtFlashReadWordsRequest = 97, + [pbr::OriginalName("StubExtFlashReadWordsResponse")] StubExtFlashReadWordsResponse = 98, /// ///Integration /// diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsRequest.cs new file mode 100644 index 000000000..e8fe1416a --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsRequest.cs @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubExtFlashReadWordsRequest.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.Stubs { + + /// Holder for reflection information generated from StubExtFlashReadWordsRequest.proto + public static partial class StubExtFlashReadWordsRequestReflection { + + #region Descriptor + /// File descriptor for StubExtFlashReadWordsRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubExtFlashReadWordsRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiJTdHViRXh0Rmxhc2hSZWFkV29yZHNSZXF1ZXN0LnByb3RvEg9UYW5nby5Q", + "TVIuU3R1YnMiNwocU3R1YkV4dEZsYXNoUmVhZFdvcmRzUmVxdWVzdBIXCg9O", + "dW1iZXJfT2ZfV29yZHMYASABKA1CGwoZY29tLnR3aW5lLnRhbmdvLnBtci5z", + "dHVic2IGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubExtFlashReadWordsRequest), global::Tango.PMR.Stubs.StubExtFlashReadWordsRequest.Parser, new[]{ "NumberOfWords" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubExtFlashReadWordsRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubExtFlashReadWordsRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubExtFlashReadWordsRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashReadWordsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashReadWordsRequest(StubExtFlashReadWordsRequest other) : this() { + numberOfWords_ = other.numberOfWords_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashReadWordsRequest Clone() { + return new StubExtFlashReadWordsRequest(this); + } + + /// Field number for the "Number_Of_Words" field. + public const int NumberOfWordsFieldNumber = 1; + private uint numberOfWords_; + /// + ///Max 5 at this test + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumberOfWords { + get { return numberOfWords_; } + set { + numberOfWords_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubExtFlashReadWordsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubExtFlashReadWordsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NumberOfWords != other.NumberOfWords) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NumberOfWords != 0) hash ^= NumberOfWords.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 (NumberOfWords != 0) { + output.WriteRawTag(8); + output.WriteUInt32(NumberOfWords); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NumberOfWords != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumberOfWords); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubExtFlashReadWordsRequest other) { + if (other == null) { + return; + } + if (other.NumberOfWords != 0) { + NumberOfWords = other.NumberOfWords; + } + } + + [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: { + NumberOfWords = input.ReadUInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsResponse.cs new file mode 100644 index 000000000..f3a3d05aa --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashReadWordsResponse.cs @@ -0,0 +1,246 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubExtFlashReadWordsResponse.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.Stubs { + + /// Holder for reflection information generated from StubExtFlashReadWordsResponse.proto + public static partial class StubExtFlashReadWordsResponseReflection { + + #region Descriptor + /// File descriptor for StubExtFlashReadWordsResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubExtFlashReadWordsResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiNTdHViRXh0Rmxhc2hSZWFkV29yZHNSZXNwb25zZS5wcm90bxIPVGFuZ28u", + "UE1SLlN0dWJzImcKHVN0dWJFeHRGbGFzaFJlYWRXb3Jkc1Jlc3BvbnNlEg8K", + "B0FkZHJlc3MYASABKA0SEQoJUmVhZEJ5dGVzGAIgAygNEg4KBlN0YXR1cxgD", + "IAEoCRISCgpTdGF0dXNXb3JkGAQgASgNQhsKGWNvbS50d2luZS50YW5nby5w", + "bXIuc3R1YnNiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubExtFlashReadWordsResponse), global::Tango.PMR.Stubs.StubExtFlashReadWordsResponse.Parser, new[]{ "Address", "ReadBytes", "Status", "StatusWord" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubExtFlashReadWordsResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubExtFlashReadWordsResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubExtFlashReadWordsResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashReadWordsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashReadWordsResponse(StubExtFlashReadWordsResponse other) : this() { + address_ = other.address_; + readBytes_ = other.readBytes_.Clone(); + status_ = other.status_; + statusWord_ = other.statusWord_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashReadWordsResponse Clone() { + return new StubExtFlashReadWordsResponse(this); + } + + /// Field number for the "Address" field. + public const int AddressFieldNumber = 1; + private uint address_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Address { + get { return address_; } + set { + address_ = value; + } + } + + /// Field number for the "ReadBytes" field. + public const int ReadBytesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_readBytes_codec + = pb::FieldCodec.ForUInt32(18); + private readonly pbc::RepeatedField readBytes_ = new pbc::RepeatedField(); + /// + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField ReadBytes { + get { return readBytes_; } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 3; + private string status_ = ""; + /// + /// Passed/Failed + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "StatusWord" field. + public const int StatusWordFieldNumber = 4; + private uint statusWord_; + /// + /// Error number/bit when the status is Failed + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint StatusWord { + get { return statusWord_; } + set { + statusWord_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubExtFlashReadWordsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubExtFlashReadWordsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Address != other.Address) return false; + if(!readBytes_.Equals(other.readBytes_)) return false; + if (Status != other.Status) return false; + if (StatusWord != other.StatusWord) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Address != 0) hash ^= Address.GetHashCode(); + hash ^= readBytes_.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (StatusWord != 0) hash ^= StatusWord.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 (Address != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Address); + } + readBytes_.WriteTo(output, _repeated_readBytes_codec); + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (StatusWord != 0) { + output.WriteRawTag(32); + output.WriteUInt32(StatusWord); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Address != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Address); + } + size += readBytes_.CalculateSize(_repeated_readBytes_codec); + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (StatusWord != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StatusWord); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubExtFlashReadWordsResponse other) { + if (other == null) { + return; + } + if (other.Address != 0) { + Address = other.Address; + } + readBytes_.Add(other.readBytes_); + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.StatusWord != 0) { + StatusWord = other.StatusWord; + } + } + + [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: { + Address = input.ReadUInt32(); + break; + } + case 18: + case 16: { + readBytes_.AddEntriesFrom(input, _repeated_readBytes_codec); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + case 32: { + StatusWord = input.ReadUInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsRequest.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsRequest.cs new file mode 100644 index 000000000..fe5fcf96a --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsRequest.cs @@ -0,0 +1,183 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubExtFlashWriteWordsRequest.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.Stubs { + + /// Holder for reflection information generated from StubExtFlashWriteWordsRequest.proto + public static partial class StubExtFlashWriteWordsRequestReflection { + + #region Descriptor + /// File descriptor for StubExtFlashWriteWordsRequest.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubExtFlashWriteWordsRequestReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiNTdHViRXh0Rmxhc2hXcml0ZVdvcmRzUmVxdWVzdC5wcm90bxIPVGFuZ28u", + "UE1SLlN0dWJzIkQKHVN0dWJFeHRGbGFzaFdyaXRlV29yZHNSZXF1ZXN0Eg8K", + "B0FkZHJlc3MYASABKA0SEgoKV29yZFRXcml0ZRgCIAMoDUIbChljb20udHdp", + "bmUudGFuZ28ucG1yLnN0dWJzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubExtFlashWriteWordsRequest), global::Tango.PMR.Stubs.StubExtFlashWriteWordsRequest.Parser, new[]{ "Address", "WordTWrite" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubExtFlashWriteWordsRequest : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubExtFlashWriteWordsRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubExtFlashWriteWordsRequestReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashWriteWordsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashWriteWordsRequest(StubExtFlashWriteWordsRequest other) : this() { + address_ = other.address_; + wordTWrite_ = other.wordTWrite_.Clone(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashWriteWordsRequest Clone() { + return new StubExtFlashWriteWordsRequest(this); + } + + /// Field number for the "Address" field. + public const int AddressFieldNumber = 1; + private uint address_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Address { + get { return address_; } + set { + address_ = value; + } + } + + /// Field number for the "WordTWrite" field. + public const int WordTWriteFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_wordTWrite_codec + = pb::FieldCodec.ForUInt32(18); + private readonly pbc::RepeatedField wordTWrite_ = new pbc::RepeatedField(); + /// + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField WordTWrite { + get { return wordTWrite_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubExtFlashWriteWordsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubExtFlashWriteWordsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Address != other.Address) return false; + if(!wordTWrite_.Equals(other.wordTWrite_)) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Address != 0) hash ^= Address.GetHashCode(); + hash ^= wordTWrite_.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 (Address != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Address); + } + wordTWrite_.WriteTo(output, _repeated_wordTWrite_codec); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Address != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Address); + } + size += wordTWrite_.CalculateSize(_repeated_wordTWrite_codec); + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubExtFlashWriteWordsRequest other) { + if (other == null) { + return; + } + if (other.Address != 0) { + Address = other.Address; + } + wordTWrite_.Add(other.wordTWrite_); + } + + [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: { + Address = input.ReadUInt32(); + break; + } + case 18: + case 16: { + wordTWrite_.AddEntriesFrom(input, _repeated_wordTWrite_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsResponse.cs b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsResponse.cs new file mode 100644 index 000000000..9cbd8678b --- /dev/null +++ b/Software/Visual_Studio/Tango.PMR/Stubs/StubExtFlashWriteWordsResponse.cs @@ -0,0 +1,224 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubExtFlashWriteWordsResponse.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.Stubs { + + /// Holder for reflection information generated from StubExtFlashWriteWordsResponse.proto + public static partial class StubExtFlashWriteWordsResponseReflection { + + #region Descriptor + /// File descriptor for StubExtFlashWriteWordsResponse.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StubExtFlashWriteWordsResponseReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiRTdHViRXh0Rmxhc2hXcml0ZVdvcmRzUmVzcG9uc2UucHJvdG8SD1Rhbmdv", + "LlBNUi5TdHVicyJVCh5TdHViRXh0Rmxhc2hXcml0ZVdvcmRzUmVzcG9uc2US", + "DwoHQWRkcmVzcxgBIAEoDRIOCgZTdGF0dXMYAiABKAkSEgoKU3RhdHVzV29y", + "ZBgDIAEoDUIbChljb20udHdpbmUudGFuZ28ucG1yLnN0dWJzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Stubs.StubExtFlashWriteWordsResponse), global::Tango.PMR.Stubs.StubExtFlashWriteWordsResponse.Parser, new[]{ "Address", "Status", "StatusWord" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StubExtFlashWriteWordsResponse : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StubExtFlashWriteWordsResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tango.PMR.Stubs.StubExtFlashWriteWordsResponseReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashWriteWordsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashWriteWordsResponse(StubExtFlashWriteWordsResponse other) : this() { + address_ = other.address_; + status_ = other.status_; + statusWord_ = other.statusWord_; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StubExtFlashWriteWordsResponse Clone() { + return new StubExtFlashWriteWordsResponse(this); + } + + /// Field number for the "Address" field. + public const int AddressFieldNumber = 1; + private uint address_; + /// + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Address { + get { return address_; } + set { + address_ = value; + } + } + + /// Field number for the "Status" field. + public const int StatusFieldNumber = 2; + private string status_ = ""; + /// + /// Passed/Failed + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "StatusWord" field. + public const int StatusWordFieldNumber = 3; + private uint statusWord_; + /// + /// Error number/bit when the status is Failed + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint StatusWord { + get { return statusWord_; } + set { + statusWord_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StubExtFlashWriteWordsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StubExtFlashWriteWordsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Address != other.Address) return false; + if (Status != other.Status) return false; + if (StatusWord != other.StatusWord) return false; + return true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Address != 0) hash ^= Address.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (StatusWord != 0) hash ^= StatusWord.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 (Address != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Address); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (StatusWord != 0) { + output.WriteRawTag(24); + output.WriteUInt32(StatusWord); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Address != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Address); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (StatusWord != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(StatusWord); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StubExtFlashWriteWordsResponse other) { + if (other == null) { + return; + } + if (other.Address != 0) { + Address = other.Address; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.StatusWord != 0) { + StatusWord = other.StatusWord; + } + } + + [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: { + Address = input.ReadUInt32(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + case 24: { + StatusWord = input.ReadUInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code -- cgit v1.3.1 From 90fa13d3f55a5ad704ce34b508f15b4abada6872 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 19 Jul 2018 13:54:32 +0300 Subject: Fixed issue with new relay command --- Software/Visual_Studio/Tango.Core/Commands/RelayCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/Tango.Core/Commands/RelayCommand.cs b/Software/Visual_Studio/Tango.Core/Commands/RelayCommand.cs index b3964d1e0..359574a5c 100644 --- a/Software/Visual_Studio/Tango.Core/Commands/RelayCommand.cs +++ b/Software/Visual_Studio/Tango.Core/Commands/RelayCommand.cs @@ -78,7 +78,7 @@ namespace Tango.Core.Commands } - public RelayCommand(Action action) : this(action, new Func((x) => true)) + public RelayCommand(Action action) : base((x) => action((T)x)) { } -- cgit v1.3.1 From 4f81c6ce6c3b836bbfdb86532199aa37382b6147 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 19 Jul 2018 13:55:25 +0300 Subject: Some improvements and fixes to machine studio logging module. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1572864 -> 1572864 bytes .../ViewModels/ApplicationLogsViewVM.cs | 64 ++++++++++++++++++++- .../ViewModels/EmbeddedLogsViewVM.cs | 13 ++++- .../ViewModels/EventsViewVM.cs | 13 ++++- .../Views/ApplicationLogsView.xaml | 7 ++- .../Views/ApplicationLogsView.xaml.cs | 10 ++++ .../Views/EmbeddedLogsView.xaml | 2 +- .../Views/EmbeddedLogsView.xaml.cs | 5 ++ .../Views/EventsView.xaml | 2 +- .../Views/EventsView.xaml.cs | 5 ++ .../Tango.MachineStudio.UI/App.xaml.cs | 3 + .../Tango.MachineStudio.UI/Resources/BuildDate.txt | 2 +- .../Tango.Integration/Operation/EmbeddedLogItem.cs | 9 +++ .../Visual_Studio/Tango.Logging/LogItemBase.cs | 2 +- .../Visual_Studio/Tango.Logging/VSOutputLogger.cs | 5 +- .../Tango.Transport/TransporterBase.cs | 8 ++- 17 files changed, 134 insertions(+), 16 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 3273ebdd4..7b7040e64 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 447bf18d1..ddc635704 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs index 2b12b1670..c56ca5541 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Data; using Tango.Core.Commands; using Tango.Logging; using Tango.MachineStudio.Common.Notifications; @@ -19,6 +21,8 @@ namespace Tango.MachineStudio.Logging.ViewModels private ApplicationLogFileParser _parser; private List _logFiles; private INotificationProvider _notification; + private bool _dialog_shown; + private bool _is_debug; private ControlledObservableCollection _realTimeLogs; private List _pausedLogs; @@ -30,6 +34,29 @@ namespace Tango.MachineStudio.Logging.ViewModels set { _logs = value; RaisePropertyChangedAuto(); } } + private ICollectionView _logsViewSource; + public ICollectionView LogsViewSource + { + get { return _logsViewSource; } + set { _logsViewSource = value; RaisePropertyChangedAuto(); } + } + + private String _filter; + public String Filter + { + get { return _filter; } + set + { + _filter = value; + RaisePropertyChangedAuto(); + + if (RealTimePaused) + { + LogsViewSource.Refresh(); + } + } + } + private LogItemBase _selectedLog; public LogItemBase SelectedLog { @@ -84,9 +111,19 @@ namespace Tango.MachineStudio.Logging.ViewModels if (!_realTimePaused) { + LogsViewSource.Filter = null; _realTimeLogs.InsertRange(0, _pausedLogs); _pausedLogs.Clear(); } + else + { + LogsViewSource.Filter = (x) => + { + if (String.IsNullOrWhiteSpace(Filter)) return true; + LogItemBase log = x as LogItemBase; + return log.Message.ToLower().Contains(Filter.ToLower()); + }; + } } } @@ -126,6 +163,8 @@ namespace Tango.MachineStudio.Logging.ViewModels ToggleRealTimePaused = new RelayCommand(() => RealTimePaused = !RealTimePaused); ClearRealTimeLogsCommand = new RelayCommand(() => { _realTimeLogs.Clear(); }); + + _is_debug = LogManager.Categories.Contains(LogCategory.Debug); } private void LogManager_NewLog(object sender, LogItemBase log) @@ -134,6 +173,17 @@ namespace Tango.MachineStudio.Logging.ViewModels { InvokeUI(() => { + if (_is_debug) + { + if (_realTimeLogs.Count > 1000) + { + for (int i = 998; i < _realTimeLogs.Count; i++) + { + _realTimeLogs.RemoveAt(i); + } + } + } + _realTimeLogs.Insert(0, log); }); } @@ -166,14 +216,22 @@ namespace Tango.MachineStudio.Logging.ViewModels Logs = new ControlledObservableCollection(logs); } + + LogsViewSource = CollectionViewSource.GetDefaultView(Logs); } private void OnSelectedLogChanged() { - if (SelectedLog != null) + if (SelectedLog != null && !_dialog_shown) { - _notification.ShowModalDialog(new LogDetailsViewVM(SelectedLog), (x) => { }, () => { }); - SelectedLog = null; + _dialog_shown = true; + _notification.ShowModalDialog(new LogDetailsViewVM(SelectedLog), (x) => + { + + }, () => + { + _dialog_shown = false; + }); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs index 1895dd230..3f6775b75 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs @@ -21,6 +21,7 @@ namespace Tango.MachineStudio.Logging.ViewModels private EmbeddedLogFileParser _parser; private List _logFiles; private INotificationProvider _notification; + private bool _dialog_shown; private ControlledObservableCollection _realTimeLogs; private List _pausedLogs; @@ -172,10 +173,16 @@ namespace Tango.MachineStudio.Logging.ViewModels private void OnSelectedLogChanged() { - if (SelectedLog != null) + if (SelectedLog != null && !_dialog_shown) { - _notification.ShowModalDialog(new LogDetailsViewVM(SelectedLog), (x) => { }, () => { }); - SelectedLog = null; + _dialog_shown = true; + _notification.ShowModalDialog(new LogDetailsViewVM(SelectedLog), (x) => + { + + }, () => + { + _dialog_shown = false; + }); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs index 98fcf12db..e2185bbdc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EventsViewVM.cs @@ -25,6 +25,7 @@ namespace Tango.MachineStudio.Logging.ViewModels private ObservableCollection _realTimeEvents; private Machine _connectedMachine; private LoggingNavigationManager _navigation; + private bool _dialog_shown; private Machine _selectedMachine; public Machine SelectedMachine @@ -178,10 +179,16 @@ namespace Tango.MachineStudio.Logging.ViewModels private void OnSelectedEventChanged() { - if (SelectedEvent != null && SelectedEvent.Type != BL.Enumerations.EventTypes.ApplicationStarted) + if (SelectedEvent != null && SelectedEvent.Type != BL.Enumerations.EventTypes.ApplicationStarted && !_dialog_shown) { - _notification.ShowModalDialog(new EventDetailsViewVM(SelectedEvent), (x) => { }, () => { }); - SelectedEvent = null; + _dialog_shown = true; + _notification.ShowModalDialog(new EventDetailsViewVM(SelectedEvent), (x) => + { + + }, () => + { + _dialog_shown = false; + }); } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml index 3ca10f370..310f4fd87 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml @@ -99,6 +99,11 @@ CLEAR + + + + + @@ -113,7 +118,7 @@ - +