diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-19 15:29:02 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-19 15:29:02 +0300 |
| commit | 2acc04360cb773a1dab31fc0bcc514b877f0d991 (patch) | |
| tree | cf450c2b0462103a1a895950a18ad017de8e7203 /Software/Visual_Studio | |
| parent | 1b6ae474bbe241e531a975f556151534c866fefd (diff) | |
| parent | b8cae8fcfe37cee8df17d0e8ccfbf2b3ac8c2152 (diff) | |
| download | Tango-2acc04360cb773a1dab31fc0bcc514b877f0d991.tar.gz Tango-2acc04360cb773a1dab31fc0bcc514b877f0d991.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio')
20 files changed, 1002 insertions, 61 deletions
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<LogFile> _logFiles; private INotificationProvider _notification; + private bool _dialog_shown; + private bool _is_debug; private ControlledObservableCollection<LogItemBase> _realTimeLogs; private List<LogItemBase> _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<LogItemBase>(logs); } + + LogsViewSource = CollectionViewSource.GetDefaultView(Logs); } private void OnSelectedLogChanged() { - if (SelectedLog != null) + if (SelectedLog != null && !_dialog_shown) { - _notification.ShowModalDialog<LogDetailsViewVM, ApplicationLogDetailsView>(new LogDetailsViewVM(SelectedLog), (x) => { }, () => { }); - SelectedLog = null; + _dialog_shown = true; + _notification.ShowModalDialog<LogDetailsViewVM, ApplicationLogDetailsView>(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<LogFile> _logFiles; private INotificationProvider _notification; + private bool _dialog_shown; private ControlledObservableCollection<LogItemBase> _realTimeLogs; private List<LogItemBase> _pausedLogs; @@ -172,10 +173,16 @@ namespace Tango.MachineStudio.Logging.ViewModels private void OnSelectedLogChanged() { - if (SelectedLog != null) + if (SelectedLog != null && !_dialog_shown) { - _notification.ShowModalDialog<LogDetailsViewVM, EmbeddedLogDetailsView>(new LogDetailsViewVM(SelectedLog), (x) => { }, () => { }); - SelectedLog = null; + _dialog_shown = true; + _notification.ShowModalDialog<LogDetailsViewVM, EmbeddedLogDetailsView>(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<MachinesEvent> _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<EventDetailsViewVM, EventDetailsView>(new EventDetailsViewVM(SelectedEvent), (x) => { }, () => { }); - SelectedEvent = null; + _dialog_shown = true; + _notification.ShowModalDialog<EventDetailsViewVM, EventDetailsView>(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 @@ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">CLEAR</TextBlock> </StackPanel> </Button> + + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="30 0 0 0"> + <materialDesign:PackIcon Kind="Magnify" Width="24" Height="24" /> + <TextBox VerticalAlignment="Center" Margin="10 0 0 0" Width="200" Text="{Binding Filter,UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding RealTimePaused}" materialDesign:HintAssist.Hint="Filter" /> + </StackPanel> </StackPanel> </Grid> </Border> @@ -113,7 +118,7 @@ <Grid> <Grid> <Grid> - <DataGrid Background="Transparent" AutoGenerateColumns="False" SelectionMode="Single" ItemsSource="{Binding Logs}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"> + <DataGrid x:Name="grid" Background="Transparent" RenderOptions.EdgeMode="Aliased" RenderOptions.BitmapScalingMode="LowQuality" MaxWidth="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth}" AutoGenerateColumns="False" SelectionMode="Single" SelectedCellsChanged="grid_SelectedCellsChanged" ItemsSource="{Binding LogsViewSource}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"> <DataGrid.RowStyle> <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> <Style.Triggers> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml.cs index 6cdf6ea53..234fdfeab 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml.cs @@ -24,5 +24,15 @@ namespace Tango.MachineStudio.Logging.Views { InitializeComponent(); } + + private void DataGrid_Selected(object sender, RoutedEventArgs e) + { + + } + + private void grid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e) + { + grid.SelectedIndex = -1; + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml index ba6330f77..4573c8451 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml @@ -113,7 +113,7 @@ <Grid> <Grid> <Grid> - <DataGrid Background="Transparent" AutoGenerateColumns="False" SelectionMode="Single" ItemsSource="{Binding Logs}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"> + <DataGrid x:Name="grid" SelectedCellsChanged="grid_SelectedCellsChanged" Background="Transparent" AutoGenerateColumns="False" SelectionMode="Single" ItemsSource="{Binding Logs}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"> <DataGrid.RowStyle> <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> <Style.Triggers> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml.cs index a728650cd..bc897cc82 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EmbeddedLogsView.xaml.cs @@ -24,5 +24,10 @@ namespace Tango.MachineStudio.Logging.Views { InitializeComponent(); } + + private void grid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e) + { + grid.SelectedIndex = -1; + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml index 9fe9e084e..196b6f930 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml @@ -121,7 +121,7 @@ <Grid> <Grid> <Grid> - <DataGrid Background="Transparent" AutoGenerateColumns="False" SelectionMode="Single" ItemsSource="{Binding Events}" SelectedItem="{Binding SelectedEvent}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"> + <DataGrid x:Name="grid" SelectedCellsChanged="grid_SelectedCellsChanged" Background="Transparent" AutoGenerateColumns="False" SelectionMode="Single" ItemsSource="{Binding Events}" SelectedItem="{Binding SelectedEvent}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"> <DataGrid.RowStyle> <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}"> <Style.Triggers> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml.cs index b17eea54c..83710f1c9 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/EventsView.xaml.cs @@ -24,5 +24,10 @@ namespace Tango.MachineStudio.Logging.Views { InitializeComponent(); } + + private void grid_SelectedCellsChanged(object sender, SelectedCellsChangedEventArgs e) + { + grid.SelectedIndex = -1; + } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs index 2cc23f9e6..53171a1a3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs @@ -42,7 +42,10 @@ namespace Tango.MachineStudio.UI CoreSettings.DefaultDataBaseSource = "twine01\\SQLTWINE"; #endif + +#if DEBUG LogManager.RegisterLogger(new VSOutputLogger()); +#endif LogManager.RegisterLogger(new FileLogger()); LogManager.Log("Application Started..."); 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<T> action) : this(action, new Func<T, bool>((x) => true)) + public RelayCommand(Action<T> action) : base((x) => action((T)x)) { } diff --git a/Software/Visual_Studio/Tango.Integration/Operation/EmbeddedLogItem.cs b/Software/Visual_Studio/Tango.Integration/Operation/EmbeddedLogItem.cs index 5bd084566..a644b071d 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/EmbeddedLogItem.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/EmbeddedLogItem.cs @@ -58,5 +58,14 @@ namespace Tango.Integration.Operation { get { return Repeated > 1 ? String.Format("{0} ({1})", Message, Repeated) : Message; } } + + /// <summary> + /// Gets the relative caller file path. + /// </summary> + /// <returns></returns> + protected override string GetRelativeCallerFilePath() + { + return CallerFile; + } } } diff --git a/Software/Visual_Studio/Tango.Logging/LogItemBase.cs b/Software/Visual_Studio/Tango.Logging/LogItemBase.cs index cd786c0e6..b914a33ef 100644 --- a/Software/Visual_Studio/Tango.Logging/LogItemBase.cs +++ b/Software/Visual_Studio/Tango.Logging/LogItemBase.cs @@ -67,7 +67,7 @@ namespace Tango.Logging /// Gets the relative caller file path. /// </summary> /// <returns></returns> - protected String GetRelativeCallerFilePath() + protected virtual String GetRelativeCallerFilePath() { if (base_path == null) { diff --git a/Software/Visual_Studio/Tango.Logging/VSOutputLogger.cs b/Software/Visual_Studio/Tango.Logging/VSOutputLogger.cs index 3804bdaa3..c2cd32437 100644 --- a/Software/Visual_Studio/Tango.Logging/VSOutputLogger.cs +++ b/Software/Visual_Studio/Tango.Logging/VSOutputLogger.cs @@ -27,7 +27,10 @@ namespace Tango.Logging /// <param name="output">The output.</param> public void OnLog(LogItemBase output) { - Debug.WriteLine(output.ToString()); + if (output.Category != LogCategory.Debug) + { + Debug.WriteLine(output.ToString()); + } } private bool _isEnabled; 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", - "cm5hbENsaWVudExvZ2luUmVzcG9uc2UQ6gcSIQocRG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pbGVDaHVua1VwbG9h", + "ZFJlcXVlc3QQ2jYSHAoXRmlsZUNodW5rVXBsb2FkUmVzcG9uc2UQ2zYSGgoV", + "RXhlY3V0ZVByb2Nlc3NSZXF1ZXN0ENw2EhsKFkV4ZWN1dGVQcm9jZXNzUmVz", + "cG9uc2UQ3TYSFwoSS2lsbFByb2Nlc3NSZXF1ZXN0EN42EhgKE0tpbGxQcm9j", + "ZXNzUmVzcG9uc2UQ3zZCHAoaY29tLnR3aW5lLnRhbmdvLnBtci5jb21tb25i", + "BnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(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, /// <summary> ///Integration /// </summary> 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 { + + /// <summary>Holder for reflection information generated from StubExtFlashReadWordsRequest.proto</summary> + public static partial class StubExtFlashReadWordsRequestReflection { + + #region Descriptor + /// <summary>File descriptor for StubExtFlashReadWordsRequest.proto</summary> + 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<StubExtFlashReadWordsRequest> { + private static readonly pb::MessageParser<StubExtFlashReadWordsRequest> _parser = new pb::MessageParser<StubExtFlashReadWordsRequest>(() => new StubExtFlashReadWordsRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StubExtFlashReadWordsRequest> 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); + } + + /// <summary>Field number for the "Number_Of_Words" field.</summary> + public const int NumberOfWordsFieldNumber = 1; + private uint numberOfWords_; + /// <summary> + ///Max 5 at this test + /// </summary> + [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 { + + /// <summary>Holder for reflection information generated from StubExtFlashReadWordsResponse.proto</summary> + public static partial class StubExtFlashReadWordsResponseReflection { + + #region Descriptor + /// <summary>File descriptor for StubExtFlashReadWordsResponse.proto</summary> + 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<StubExtFlashReadWordsResponse> { + private static readonly pb::MessageParser<StubExtFlashReadWordsResponse> _parser = new pb::MessageParser<StubExtFlashReadWordsResponse>(() => new StubExtFlashReadWordsResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StubExtFlashReadWordsResponse> 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); + } + + /// <summary>Field number for the "Address" field.</summary> + public const int AddressFieldNumber = 1; + private uint address_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Address { + get { return address_; } + set { + address_ = value; + } + } + + /// <summary>Field number for the "ReadBytes" field.</summary> + public const int ReadBytesFieldNumber = 2; + private static readonly pb::FieldCodec<uint> _repeated_readBytes_codec + = pb::FieldCodec.ForUInt32(18); + private readonly pbc::RepeatedField<uint> readBytes_ = new pbc::RepeatedField<uint>(); + /// <summary> + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<uint> ReadBytes { + get { return readBytes_; } + } + + /// <summary>Field number for the "Status" field.</summary> + public const int StatusFieldNumber = 3; + private string status_ = ""; + /// <summary> + /// Passed/Failed + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "StatusWord" field.</summary> + public const int StatusWordFieldNumber = 4; + private uint statusWord_; + /// <summary> + /// Error number/bit when the status is Failed + /// </summary> + [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 { + + /// <summary>Holder for reflection information generated from StubExtFlashWriteWordsRequest.proto</summary> + public static partial class StubExtFlashWriteWordsRequestReflection { + + #region Descriptor + /// <summary>File descriptor for StubExtFlashWriteWordsRequest.proto</summary> + 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<StubExtFlashWriteWordsRequest> { + private static readonly pb::MessageParser<StubExtFlashWriteWordsRequest> _parser = new pb::MessageParser<StubExtFlashWriteWordsRequest>(() => new StubExtFlashWriteWordsRequest()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StubExtFlashWriteWordsRequest> 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); + } + + /// <summary>Field number for the "Address" field.</summary> + public const int AddressFieldNumber = 1; + private uint address_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Address { + get { return address_; } + set { + address_ = value; + } + } + + /// <summary>Field number for the "WordTWrite" field.</summary> + public const int WordTWriteFieldNumber = 2; + private static readonly pb::FieldCodec<uint> _repeated_wordTWrite_codec + = pb::FieldCodec.ForUInt32(18); + private readonly pbc::RepeatedField<uint> wordTWrite_ = new pbc::RepeatedField<uint>(); + /// <summary> + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField<uint> 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 { + + /// <summary>Holder for reflection information generated from StubExtFlashWriteWordsResponse.proto</summary> + public static partial class StubExtFlashWriteWordsResponseReflection { + + #region Descriptor + /// <summary>File descriptor for StubExtFlashWriteWordsResponse.proto</summary> + 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<StubExtFlashWriteWordsResponse> { + private static readonly pb::MessageParser<StubExtFlashWriteWordsResponse> _parser = new pb::MessageParser<StubExtFlashWriteWordsResponse>(() => new StubExtFlashWriteWordsResponse()); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser<StubExtFlashWriteWordsResponse> 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); + } + + /// <summary>Field number for the "Address" field.</summary> + public const int AddressFieldNumber = 1; + private uint address_; + /// <summary> + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Address { + get { return address_; } + set { + address_ = value; + } + } + + /// <summary>Field number for the "Status" field.</summary> + public const int StatusFieldNumber = 2; + private string status_ = ""; + /// <summary> + /// Passed/Failed + /// </summary> + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// <summary>Field number for the "StatusWord" field.</summary> + public const int StatusWordFieldNumber = 3; + private uint statusWord_; + /// <summary> + /// Error number/bit when the status is Failed + /// </summary> + [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 diff --git a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs index d78905472..dbeae5b41 100644 --- a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs +++ b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs @@ -683,7 +683,7 @@ namespace Tango.Transport } else { - LogManager.Log("Pending request was identified as 'continuous response'. keeping pending request.", LogCategory.Debug); + LogManager.Log("Pending request was identified as 'continuous response' " + container.Type + ". keeping pending request.", LogCategory.Debug); try { @@ -719,6 +719,12 @@ namespace Tango.Transport } else { + if (container.Type.ToString().EndsWith("Response")) + { + LogManager.Log(String.Format("A response message with no awaiting request was identified. {0}, Token: {1}. Message ignored.", container.Type, container.Token), LogCategory.Warning); + continue; + } + LogManager.Log("Message was identified as a new request message: " + container.Type.ToString(), LogCategory.Debug); try |
