From a20fd4bd769aeccd1fd1f20273f895c92a5b5bb8 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 14 Jan 2018 15:24:49 +0200 Subject: Added code comments for: MachineStudio.Common. --- .../Notifications/DefaultNotificationProvider.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs index d4d053eaf..6b6d59c63 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -37,7 +37,7 @@ namespace Tango.MachineStudio.UI.Notifications TaskItems = new ObservableCollection(); } - public bool? ShowDialog(PackIconKind icon, Brush iconColor, string message, bool hasCancel) + public bool? ShowMessageBox(PackIconKind icon, Brush iconColor, string message, bool hasCancel) { MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible; @@ -161,22 +161,22 @@ namespace Tango.MachineStudio.UI.Notifications public void ShowError(string message) { - ShowDialog(PackIconKind.Exclamation, Brushes.Red, message, false); + ShowMessageBox(PackIconKind.Exclamation, Brushes.Red, message, false); } public void ShowInfo(string message) { - ShowDialog(PackIconKind.Information, Brushes.Black, message, false); + ShowMessageBox(PackIconKind.Information, Brushes.Black, message, false); } public bool ShowQuestion(string message) { - return ShowDialog(PackIconKind.CommentQuestionOutline, Brushes.Black, message, true).Value; + return ShowMessageBox(PackIconKind.CommentQuestionOutline, Brushes.Black, message, true).Value; } - public void ShowWarnning(string message) + public void ShowWarning(string message) { - ShowDialog(PackIconKind.Exclamation, Brushes.DarkOrange, message, false); + ShowMessageBox(PackIconKind.Exclamation, Brushes.DarkOrange, message, false); } public void PushTaskItem(TaskItem taskItem) -- cgit v1.3.1 From 48071f784b19ea8ed2859fb03642b8cc856406b1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 14 Jan 2018 15:49:39 +0200 Subject: Added code comments for: MachineStudio.UI --- .../DefaultAuthenticationProvider.cs | 22 +++++- .../Modules/DefaultStudioModuleLoader.cs | 23 +++++++ .../Navigation/DefaultNavigationManager.cs | 8 +++ .../Notifications/DefaultNotificationProvider.cs | 80 ++++++++++++++++++++++ .../Notifications/DialogWindow.xaml.cs | 2 - .../DefaultStudioApplicationManager.cs | 35 ++++++++++ .../SupervisingController/IMainView.cs | 4 ++ .../Tango.MachineStudio.UI.csproj | 4 +- .../Tango.MachineStudio.UI/ViewModelLocator.cs | 7 +- .../ViewModels/LoadingViewVM.cs | 13 ++++ .../ViewModels/LoginViewVM.cs | 25 ++++++- .../ViewModels/MachineConnectionViewVM.cs | 26 ++++++- .../ViewModels/MachineLoginViewVM.cs | 20 ++++++ .../ViewModels/MainViewVM.cs | 76 +++++++++++++++++--- .../ViewModels/ShutdownViewVM.cs | 3 + 15 files changed, 327 insertions(+), 21 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs index a30cf0f92..80e5e9762 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs @@ -10,10 +10,17 @@ using Tango.MachineStudio.Common.Authentication; namespace Tango.MachineStudio.UI.Authentication { + /// + /// Represents the default Machine Studio Authentication provider + /// + /// + /// public class DefaultAuthenticationProvider : ExtendedObject, IAuthenticationProvider { private User _currentUser; - + /// + /// Gets the current logged-in user. + /// public User CurrentUser { get { return _currentUser; } @@ -25,8 +32,18 @@ namespace Tango.MachineStudio.UI.Authentication } } + /// + /// Occurs when the current logged-in user has changed. + /// public event EventHandler CurrentUserChanged; + /// + /// Performs a user login by the specified email and password. + /// + /// The email. + /// The password. + /// + /// Login failed for user " + email public User Login(string email, string password) { User user = ObservablesEntitiesAdapter.Instance.Users.SingleOrDefault(x => x.Email.ToLower() == email.ToLower() && x.Password == password); @@ -40,6 +57,9 @@ namespace Tango.MachineStudio.UI.Authentication return user; } + /// + /// Logs-out the current logged-in user. + /// public void Logout() { CurrentUser = null; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs index 473e66d38..5944af2d1 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Modules/DefaultStudioModuleLoader.cs @@ -16,11 +16,20 @@ using Tango.MachineStudio.Stubs; namespace Tango.MachineStudio.UI.Modules { + /// + /// Represents the Machine Studio default module loader. + /// + /// + /// public class DefaultStudioModuleLoader : ExtendedObject, IStudioModuleLoader { private IAuthenticationProvider _authenticationProvider; private bool _loaded; + /// + /// Initializes a new instance of the class. + /// + /// The authentication provider. public DefaultStudioModuleLoader(IAuthenticationProvider authenticationProvider) { _authenticationProvider = authenticationProvider; @@ -29,12 +38,20 @@ namespace Tango.MachineStudio.UI.Modules _authenticationProvider.CurrentUserChanged += _authenticationProvider_CurrentUserChanged; } + /// + /// Handles the authentication provider user changed event. + /// + /// The sender. + /// The e. private void _authenticationProvider_CurrentUserChanged(object sender, DAL.Observables.User e) { LoadModules(); } private ObservableCollection _allModules; + /// + /// Gets all loaded modules. + /// public ObservableCollection AllModules { get { return _allModules; } @@ -42,12 +59,18 @@ namespace Tango.MachineStudio.UI.Modules } private ObservableCollection _userModules; + /// + /// Gets all the user permitted modules. + /// public ObservableCollection UserModules { get { return _userModules; } private set { _userModules = value; RaisePropertyChangedAuto(); } } + /// + /// Loads all available Machine Studio modules. + /// public void LoadModules() { if (!_loaded) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Navigation/DefaultNavigationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Navigation/DefaultNavigationManager.cs index 15f2fe422..2fa8c7562 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Navigation/DefaultNavigationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Navigation/DefaultNavigationManager.cs @@ -7,8 +7,16 @@ using Tango.MachineStudio.Common.Navigation; namespace Tango.MachineStudio.UI.Navigation { + /// + /// Represents the Machine Studio default Navigation Manager. + /// + /// public class DefaultNavigationManager : INavigationManager { + /// + /// Navigates to the specified view. + /// + /// The view. public void NavigateTo(NavigationView view) { MainWindow.Instance.Dispatcher.Invoke(() => diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs index 6b6d59c63..8ca933397 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -13,30 +13,61 @@ using System.Collections.ObjectModel; namespace Tango.MachineStudio.UI.Notifications { + /// + /// Represents the default Machine Studio Notification Provider. + /// + /// + /// public class DefaultNotificationProvider : ExtendedObject, INotificationProvider { + /// + /// The view types + /// private static List viewTypes; + /// + /// Gets the collection of active task items. + /// public ObservableCollection TaskItems { get; private set; } + /// + /// Gets a value indicating whether there are any queued task items. + /// public bool HasTaskItems { get { return TaskItems.Count > 0; } } + /// + /// The current task item + /// private TaskItem _currentTaskItem; + /// + /// Gets the current displayed task item. + /// public TaskItem CurrentTaskItem { get { return _currentTaskItem; } set { _currentTaskItem = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(HasTaskItems)); } } + /// + /// Initializes a new instance of the class. + /// public DefaultNotificationProvider() { TaskItems = new ObservableCollection(); } + /// + /// Display a message box. + /// + /// The icon. + /// Color of the icon. + /// The message. + /// if set to true displays the cancel button. + /// public bool? ShowMessageBox(PackIconKind icon, Brush iconColor, string message, bool hasCancel) { MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible; @@ -55,6 +86,13 @@ namespace Tango.MachineStudio.UI.Notifications return result; } + /// + /// Creates a new instance of the specified View type and displays it as a modal dialog. + /// + /// The type of the view. + /// The type of the view model. + /// Accept button callback. + /// Cancel button callback. public void ShowModalDialog(Action onAccept, Action onCancel) where View : FrameworkElement where VM : DialogViewVM { var view = Activator.CreateInstance(); @@ -97,6 +135,13 @@ namespace Tango.MachineStudio.UI.Notifications MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden; } + /// + /// Creates a new view by a naming convention of the specified view model type. + /// + /// The type of the view model. + /// Accept button callback. + /// Cancel button callback. + /// Could not locate view " + viewName public void ShowModalDialog(Action onAccept, Action onCancel) where VM : DialogViewVM { String viewName = typeof(VM).Name.Replace("VM", ""); @@ -154,37 +199,68 @@ namespace Tango.MachineStudio.UI.Notifications MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden; } + /// + /// Creates a new view by a naming convention of the specified view model type. + /// + /// The type of the view model. + /// Accept button callback. public void ShowModalDialog(Action onAccept) where VM : DialogViewVM { ShowModalDialog(onAccept, null); } + /// + /// Shows an error message box. + /// + /// The message. public void ShowError(string message) { ShowMessageBox(PackIconKind.Exclamation, Brushes.Red, message, false); } + /// + /// Shows an information message box. + /// + /// The message. public void ShowInfo(string message) { ShowMessageBox(PackIconKind.Information, Brushes.Black, message, false); } + /// + /// Shows a question message box. + /// + /// The message. + /// public bool ShowQuestion(string message) { return ShowMessageBox(PackIconKind.CommentQuestionOutline, Brushes.Black, message, true).Value; } + /// + /// Shows warning message box. + /// + /// The message. public void ShowWarning(string message) { ShowMessageBox(PackIconKind.Exclamation, Brushes.DarkOrange, message, false); } + /// + /// Pushes the specified task item to the queue. + /// + /// The task item. public void PushTaskItem(TaskItem taskItem) { TaskItems.Add(taskItem); CurrentTaskItem = taskItem; } + /// + /// Create and push a new task item from the specified message. + /// + /// The message. + /// public TaskItem PushTaskItem(string message) { TaskItem item = new TaskItem(this); @@ -193,6 +269,10 @@ namespace Tango.MachineStudio.UI.Notifications return item; } + /// + /// Removed the specified task item from the queue. + /// + /// The task item. public void PopTaskItem(TaskItem taskItem) { TaskItems.Remove(taskItem); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml.cs index d1bc0564b..8ed1a4946 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml.cs @@ -36,7 +36,5 @@ namespace Tango.MachineStudio.UI.Windows // Using a DependencyProperty as the backing store for InnerContent. This enables animation, styling, binding, etc... public static readonly DependencyProperty InnerContentProperty = DependencyProperty.Register("InnerContent", typeof(FrameworkElement), typeof(DialogWindow), new PropertyMetadata(null)); - - } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index 36b5074cb..68af7bdc3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -17,19 +17,40 @@ using Tango.Logging; namespace Tango.MachineStudio.UI.StudioApplication { + /// + /// Represents the default Machine Studio Application Manager. + /// + /// + /// public class DefaultStudioApplicationManager : ExtendedObject, IStudioApplicationManager { + /// + /// The navigation manager + /// private INavigationManager _navigationManager; + /// + /// Initializes a new instance of the class. + /// + /// The navigation manager. public DefaultStudioApplicationManager(INavigationManager navigationManager) { _navigationManager = navigationManager; } + /// + /// Gets a value indicating whether Machine Studio is shutting down. + /// public bool IsShuttingDown { get; private set; } + /// + /// The connected machine + /// private IExternalBridgeClient _connectedMachine; + /// + /// Gets or sets the currently connected machine if any. + /// public IExternalBridgeClient ConnectedMachine { get { return _connectedMachine; } @@ -48,11 +69,19 @@ namespace Tango.MachineStudio.UI.StudioApplication } } + /// + /// Gets a value indicating whether the is valid and connected through TCP/IP. + /// public bool IsMachineConnectedViaTCP { get { return IsMachineConnected && ConnectedMachine is ExternalBridgeTcpClient; } } + /// + /// Handles the state changed event. + /// + /// The sender. + /// The e. private void ConnectedMachine_StateChanged(object sender, Transport.TransportComponentState e) { if (e == Transport.TransportComponentState.Disconnected || e == Transport.TransportComponentState.Failed) @@ -62,11 +91,17 @@ namespace Tango.MachineStudio.UI.StudioApplication } + /// + /// Gets a value indicating whether the is valid. + /// public bool IsMachineConnected { get { return ConnectedMachine != null; } } + /// + /// Shutdown the application. + /// public async void ShutDown() { if (IsShuttingDown) return; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/SupervisingController/IMainView.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/SupervisingController/IMainView.cs index 70b57027e..3de061de8 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/SupervisingController/IMainView.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/SupervisingController/IMainView.cs @@ -7,6 +7,10 @@ using Tango.SharedUI; namespace Tango.MachineStudio.UI.SupervisingController { + /// + /// Represents a supervising controller pattern view contract. + /// + /// public interface IMainView : IView { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index df8b65fda..fcc790d7a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -311,9 +311,7 @@ - - - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs index 70912ba98..5f315f7f4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs @@ -65,8 +65,11 @@ namespace Tango.MachineStudio.UI SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); - LogManager.RegisterLogger(new VSOutputLogger()); - LogManager.RegisterLogger(new FileLogger()); + if (!ViewModelBase.IsInDesignModeStatic) + { + LogManager.RegisterLogger(new VSOutputLogger()); + LogManager.RegisterLogger(new FileLogger()); + } //Register View (Supervising Controller Pattern). if (!ViewModelBase.IsInDesignModeStatic) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs index 5d341b835..54e2f9196 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs @@ -13,12 +13,22 @@ using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels { + /// + /// Represents the Machine Studio loading view, view model. + /// + /// public class LoadingViewVM : ViewModel { private INotificationProvider _notificationProvider; private INavigationManager _navigationManager; private IStudioModuleLoader _studioModuleLoader; + /// + /// Initializes a new instance of the class. + /// + /// The navigation manager. + /// The studio module loader. + /// The notification provider. public LoadingViewVM(INavigationManager navigationManager, IStudioModuleLoader studioModuleLoader, INotificationProvider notificationProvider) { _navigationManager = navigationManager; @@ -27,6 +37,9 @@ namespace Tango.MachineStudio.UI.ViewModels Load(); } + /// + /// Load application modules. + /// private void Load() { ThreadsHelper.StartStaThread(() => diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs index 6fe90fa99..c5936eea8 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs @@ -16,6 +16,10 @@ using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels { + /// + /// Represents the Machine Studio login view, view model. + /// + /// public class LoginViewVM : ViewModel { private IAuthenticationProvider _authenticationProvider; @@ -24,6 +28,9 @@ namespace Tango.MachineStudio.UI.ViewModels private Rfc2898Cryptographer cryptographer; private String _email; + /// + /// Gets or sets the email. + /// [Required(ErrorMessage = "Email is required")] [EmailAddress(ErrorMessage = "Please enter a valid email")] public String Email @@ -33,16 +40,26 @@ namespace Tango.MachineStudio.UI.ViewModels } private bool _rememberMe; - + /// + /// Gets or sets a value indicating whether to remember the last user email and password. + /// public bool RememberMe { get { return _rememberMe; } set { _rememberMe = value; RaisePropertyChangedAuto(); } } - + /// + /// Gets or sets the login command. + /// public RelayCommand LoginCommand { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The authentication provider. + /// The navigation manager. + /// The notification provider. public LoginViewVM(IAuthenticationProvider authenticationProvider, INavigationManager navigationManager, INotificationProvider notificationProvider) { _notificationProvider = notificationProvider; @@ -55,6 +72,10 @@ namespace Tango.MachineStudio.UI.ViewModels RememberMe = SettingsManager.Default.MachineStudio.RememberMe; } + /// + /// Logins the requested user. + /// + /// The password. private void Login(String password) { if (Validate()) diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs index b8b888e86..23be8d274 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs @@ -10,10 +10,16 @@ using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels { + /// + /// Represents the Machine Studio connection dialog, view model. + /// + /// public class MachineConnectionViewVM : DialogViewVM { private ExternalBridgeScanner _scanner; - + /// + /// Gets or sets the machine scanner. + /// public ExternalBridgeScanner Scanner { get { return _scanner; } @@ -21,15 +27,24 @@ namespace Tango.MachineStudio.UI.ViewModels } private IExternalBridgeClient _selectedMachine; - + /// + /// Gets or sets the selected machine. + /// public IExternalBridgeClient SelectedMachine { get { return _selectedMachine; } set { _selectedMachine = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } + /// + /// Gets or sets the connect command. + /// public RelayCommand ConnectCommand { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The scanner. public MachineConnectionViewVM(ExternalBridgeScanner scanner) { Scanner = scanner; @@ -37,6 +52,9 @@ namespace Tango.MachineStudio.UI.ViewModels Scanner.Start(); } + /// + /// Connect to the currently selected machine. + /// private void Connect() { if (SelectedMachine != null) @@ -45,10 +63,12 @@ namespace Tango.MachineStudio.UI.ViewModels } } + /// + /// Called when the dialog has been shown. + /// public override void OnShow() { base.OnShow(); - Scanner.AvailableMachines.Clear(); } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs index a6ee9ee2a..20c2e3afb 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineLoginViewVM.cs @@ -8,20 +8,40 @@ using Tango.MachineStudio.Common.Notifications; namespace Tango.MachineStudio.UI.ViewModels { + /// + /// Represents the machine login dialog, view model. + /// + /// public class MachineLoginViewVM : DialogViewVM { + /// + /// Gets or sets the machine password. + /// public String Password { get; set; } + /// + /// Gets or sets the login command. + /// public RelayCommand LoginCommand { get; set; } + /// + /// Gets or sets the cancel command. + /// public RelayCommand CancelCommand { get; set; } + /// + /// Initializes a new instance of the class. + /// public MachineLoginViewVM() { LoginCommand = new RelayCommand(Login); CancelCommand = new RelayCommand(Cancel); } + /// + /// Invoked when user presses the login button. + /// + /// The password. private void Login(string password) { Password = password; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index ceb81a66f..fcbdc90a3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -23,12 +23,19 @@ using Tango.Transport.Adapters; namespace Tango.MachineStudio.UI.ViewModels { + /// + /// Represents the Machine Studio main view, view model. + /// + /// public class MainViewVM : ViewModel { private IStudioModule _currentModule; private INavigationManager _navigation; private bool _isDisconnecting; + /// + /// Gets or sets the current loaded module. + /// public IStudioModule CurrentModule { get { return _currentModule; } @@ -36,33 +43,54 @@ namespace Tango.MachineStudio.UI.ViewModels } private bool _isModuleLoaded; - + /// + /// Gets or sets a value indicating whether any module is loaded at the moment. + /// public bool IsModuleLoaded { get { return _isModuleLoaded; } set { _isModuleLoaded = value; RaisePropertyChangedAuto(); } } - private bool _isMenuOpened; - + /// + /// Gets or sets a value indicating whether the side menu is opened. + /// public bool IsMenuOpened { get { return _isMenuOpened; } set { _isMenuOpened = value; RaisePropertyChangedAuto(); } } + /// + /// Gets or sets the start module command. + /// public RelayCommand StartModuleCommand { get; set; } + /// + /// Gets or sets the home command. + /// public RelayCommand HomeCommand { get; set; } + /// + /// Gets or sets the connect command. + /// public RelayCommand ConnectCommand { get; set; } + /// + /// Gets or sets the disconnect command. + /// public RelayCommand DisconnectCommand { get; set; } + /// + /// Gets or sets the sign-out command. + /// public RelayCommand SignoutCommand { get; set; } private IAuthenticationProvider _authenticationProvider; + /// + /// Gets or sets the authentication provider. + /// public IAuthenticationProvider AuthenticationProvider { get { return _authenticationProvider; } @@ -70,7 +98,9 @@ namespace Tango.MachineStudio.UI.ViewModels } private IStudioModuleLoader _studioModuleLoader; - + /// + /// Gets or sets the studio module loader. + /// public IStudioModuleLoader StudioModuleLoader { get { return _studioModuleLoader; } @@ -78,7 +108,9 @@ namespace Tango.MachineStudio.UI.ViewModels } private INotificationProvider _notificationProvider; - + /// + /// Gets or sets the notification provider. + /// public INotificationProvider NotificationProvider { get { return _notificationProvider; } @@ -86,15 +118,24 @@ namespace Tango.MachineStudio.UI.ViewModels } private IStudioApplicationManager _applicationManager; - + /// + /// Gets or sets the application manager. + /// public IStudioApplicationManager ApplicationManager { get { return _applicationManager; } set { _applicationManager = value; RaisePropertyChangedAuto(); } } - - + /// + /// Initializes a new instance of the class. + /// + /// The view. + /// The authentication provider. + /// The studio module loader. + /// The notification provider. + /// The application manager. + /// The navigation manager. public MainViewVM( IMainView view, IAuthenticationProvider authenticationProvider, @@ -117,6 +158,9 @@ namespace Tango.MachineStudio.UI.ViewModels DisconnectCommand = new RelayCommand(DisconnectFromMachine, (x) => ApplicationManager.IsMachineConnected && !_isDisconnecting); } + /// + /// Disconnected from the current connected machine. + /// private async void DisconnectFromMachine() { using (_notificationProvider.PushTaskItem("Disconnecting from machine...")) @@ -130,6 +174,9 @@ namespace Tango.MachineStudio.UI.ViewModels } } + /// + /// Signs-out the current logged-in user. + /// private void SignOut() { _authenticationProvider.Logout(); @@ -138,6 +185,9 @@ namespace Tango.MachineStudio.UI.ViewModels IsMenuOpened = false; } + /// + /// Opens the machine connection dialog to allow the user to scan and connect to remote machines view USB/TCP. + /// private void ConnectToMachine() { _notificationProvider.ShowModalDialog(async (x) => @@ -209,11 +259,18 @@ namespace Tango.MachineStudio.UI.ViewModels }); } + /// + /// Navigates to the home screen. + /// private void Home() { StartModule(null); } + /// + /// Starts the specified module. + /// + /// The module. private void StartModule(IStudioModule module) { IsMenuOpened = false; @@ -229,6 +286,9 @@ namespace Tango.MachineStudio.UI.ViewModels } } + /// + /// Called when the is loaded and attached. + /// protected override void OnViewAttached() { base.OnViewAttached(); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs index c7a919a82..ed771f00a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ShutdownViewVM.cs @@ -6,6 +6,9 @@ using System.Threading.Tasks; namespace Tango.MachineStudio.UI.ViewModels { + /// + /// Represents the Machine Studio shutdown view, view model. + /// public class ShutdownViewVM { } -- cgit v1.3.1 From 5e68543fd93e441e1e76acc3f439594f66c4412a Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 18 Jan 2018 16:20:02 +0200 Subject: Removed Deleted from most of DB Tables !!!!!!!!!!! --- Software/Android_Studio/Tango.DAL/build.gradle | 2 +- .../src/main/java/com/twine/tango/dal/Entity.java | 23 - .../java/com/twine/tango/dal/dao/TangoDAO.java | 43 +- .../java/com/twine/tango/dal/entities/Address.java | 26 + .../java/com/twine/tango/dal/entities/Cat.java | 94 ++ .../java/com/twine/tango/dal/entities/Cct.java | 224 +++ .../twine/tango/dal/entities/Configuration.java | 140 +- .../java/com/twine/tango/dal/entities/Contact.java | 26 + .../twine/tango/dal/entities/DispenserType.java | 52 + .../twine/tango/dal/entities/EventTypesAction.java | 40 +- .../java/com/twine/tango/dal/entities/IdsPack.java | 112 +- .../twine/tango/dal/entities/LiquidTypesRml.java | 46 +- .../java/com/twine/tango/dal/entities/Machine.java | 20 +- .../twine/tango/dal/entities/MachinesEvent.java | 20 +- .../com/twine/tango/dal/entities/MidTankType.java | 94 ++ .../java/com/twine/tango/dal/entities/Rml.java | 186 +-- .../java/com/twine/tango/dal/entities/User.java | 26 + .../com/twine/tango/dal/entities/UsersRole.java | 26 + .../twine/tango/dal/enumerations/FiberShapes.java | 4 + .../twine/tango/dal/enumerations/FiberSynths.java | 4 + .../dal/enumerations/LinearMassDensityUnits.java | 4 + .../twine/tango/dal/enumerations/LiquidTypes.java | 15 + .../tango/dal/enumerations/MediaConditions.java | 4 + .../tango/dal/enumerations/MediaMaterials.java | 4 + .../tango/dal/enumerations/MediaPurposes.java | 4 + .../twine/tango/dal/enumerations/MidTankTypes.java | 19 + .../twine/tango/dal/enumerations/Permissions.java | 3 + .../Tango.DAL/src/main/res/raw/tangodb | Bin 602112 -> 602112 bytes .../tango/pmr/common/MessageTypeOuterClass.java | 41 +- .../StartDiagnosticsRequestOuterClass.java | 635 +++++++++ .../StartDiagnosticsResponseOuterClass.java | 782 ++++++++++ .../java/com/twine/tango/pmr/jobs/Dispenser.java | 1406 ++++++++++++++++++ .../com/twine/tango/pmr/jobs/JobOuterClass.java | 999 ++++++++++++- .../main/java/com/twine/tango/pmr/jobs/Motor.java | 1500 ++++++++++++++++++++ .../twine/tango/pmr/jobs/SegmentOuterClass.java | 384 ++++- .../Tango.PMR/src/main/res/raw/packages.txt | 1 + Software/DB/Tango.db | Bin 602112 -> 602112 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 8388608 -> 8388608 bytes .../EventTypeActionsToStringConverter.cs | 2 +- .../Converters/LiquidTypeRmlsToStringConverter.cs | 2 +- .../RolesPermissionsToStringConverter.cs | 2 +- .../ViewModels/DbTableViewModel.cs | 15 +- .../ViewModels/EventTypesViewVM.cs | 27 +- .../ViewModels/LiquidTypesViewVM.cs | 25 +- .../ViewModels/RolesViewVM.cs | 25 +- .../Views/DBViews/IdsPackView.xaml | 6 +- .../Views/DBViews/IdsPacksView.xaml | 4 +- .../AutoComplete/MachineVersionsProvider.cs | 26 + .../Tango.MachineStudio.MachineDesigner.csproj | 9 + .../ViewModels/MachineVersionDialogVM.cs | 61 + .../ViewModels/MainViewVM.cs | 67 + .../Views/MachineVersionDialog.xaml | 80 ++ .../Views/MachineVersionDialog.xaml.cs | 28 + .../Views/MainView.xaml | 35 +- .../Notifications/DefaultNotificationProvider.cs | 4 + .../Tango.DAL.Local/DB/ACTION_TYPES.cs | 1 - .../DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs | 1 - .../DB/APPLICATION_FIRMWARE_VERSIONS.cs | 1 - .../Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs | 1 - .../Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs | 1 - .../Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs | 1 - Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs | 1 - Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs | 1 - .../Tango.DAL.Local/DB/CONFIGURATION.cs | 1 - .../Tango.DAL.Local/DB/DISPENSER_TYPES.cs | 1 - .../DB/EMBEDDED_FIRMWARE_VERSIONS.cs | 1 - .../DB/EMBEDDED_SOFTWARE_VERSIONS.cs | 1 - .../Tango.DAL.Local/DB/EVENT_TYPES.cs | 1 - .../Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs | 1 - .../Tango.DAL.Local/DB/FIBER_SHAPES.cs | 1 - .../Tango.DAL.Local/DB/FIBER_SYNTHS.cs | 1 - .../Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs | 1 - .../Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs | 1 - .../DB/LINEAR_MASS_DENSITY_UNITS.cs | 1 - .../Tango.DAL.Local/DB/LIQUID_TYPES.cs | 1 - .../Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs | 1 - .../Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx | 105 -- .../Tango.DAL.Local/DB/LocalADO.edmx.diagram | 38 +- .../Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs | 1 - .../Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs | 1 - .../Tango.DAL.Local/DB/MACHINES_EVENTS.cs | 1 - .../Tango.DAL.Local/DB/MACHINE_VERSIONS.cs | 1 - .../Tango.DAL.Local/DB/MEDIA_COLORS.cs | 1 - .../Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs | 1 - .../Tango.DAL.Local/DB/MEDIA_MATERIALS.cs | 1 - .../Tango.DAL.Local/DB/MEDIA_PURPOSES.cs | 1 - .../Tango.DAL.Local/DB/MID_TANK_TYPES.cs | 1 - .../Tango.DAL.Local/DB/ORGANIZATION.cs | 1 - .../Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs | 1 - Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs | 1 - Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs | 1 - .../Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs | 1 - .../Tango.DAL.Observables/Entities/Address.cs | 19 + .../Tango.DAL.Observables/Entities/Contact.cs | 19 + .../Tango.DAL.Observables/Entities/User.cs | 19 + .../Tango.DAL.Observables/Entities/UsersRole.cs | 19 + .../Enumerations/MidTankTypes.cs | 6 +- .../Tango.DAL.Observables/IObservableEntity.cs | 15 +- .../Tango.DAL.Observables/ObservableEntity.cs | 73 +- .../ObservablesEntitiesAdapter.cs | 74 +- .../Tango.DAL.Observables/ObservablesGenerator.cs | 16 +- .../Tango.DAL.Observables/Partials/Machine.cs | 27 + .../Partials/MachineVersion.cs | 19 + .../Tango.DAL.Observables/Partials/User.cs | 2 +- .../Tango.DAL.Observables.csproj | 2 + .../Tango.DAL.Remote/DB/ACTION_TYPES.cs | 1 - .../DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs | 1 - .../DB/APPLICATION_FIRMWARE_VERSIONS.cs | 1 - .../Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs | 1 - .../Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs | 1 - .../Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs | 1 - Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs | 1 - Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs | 1 - .../Tango.DAL.Remote/DB/CONFIGURATION.cs | 1 - .../Tango.DAL.Remote/DB/DISPENSER_TYPES.cs | 1 - .../DB/EMBEDDED_FIRMWARE_VERSIONS.cs | 1 - .../DB/EMBEDDED_SOFTWARE_VERSIONS.cs | 1 - .../Tango.DAL.Remote/DB/EVENT_TYPES.cs | 1 - .../Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs | 1 - .../Tango.DAL.Remote/DB/FIBER_SHAPES.cs | 1 - .../Tango.DAL.Remote/DB/FIBER_SYNTHS.cs | 1 - .../Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs | 1 - .../Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs | 1 - .../DB/LINEAR_MASS_DENSITY_UNITS.cs | 1 - .../Tango.DAL.Remote/DB/LIQUID_TYPES.cs | 1 - .../Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs | 1 - .../Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs | 1 - .../Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs | 1 - .../Tango.DAL.Remote/DB/MACHINES_EVENTS.cs | 1 - .../Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs | 1 - .../Tango.DAL.Remote/DB/MEDIA_COLORS.cs | 1 - .../Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs | 1 - .../Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs | 1 - .../Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs | 1 - .../Tango.DAL.Remote/DB/MID_TANK_TYPES.cs | 1 - .../Tango.DAL.Remote/DB/ORGANIZATION.cs | 1 - .../Tango.DAL.Remote/DB/PERMISSION.cs | 1 - Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 1 - Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs | 1 - .../Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs | 1 - .../Tango.DAL.Remote/DB/RemoteADO.edmx | 145 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 84 +- .../Web/Tango.MachineService/App_Data/Tango.db | Bin 602112 -> 602112 bytes 144 files changed, 7336 insertions(+), 843 deletions(-) create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cat.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cct.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MidTankType.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MidTankTypes.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Dispenser.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Motor.java create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachineVersionsProvider.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineVersionDialogVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Partials/MachineVersion.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs') diff --git a/Software/Android_Studio/Tango.DAL/build.gradle b/Software/Android_Studio/Tango.DAL/build.gradle index cf010e8ba..86c71c619 100644 --- a/Software/Android_Studio/Tango.DAL/build.gradle +++ b/Software/Android_Studio/Tango.DAL/build.gradle @@ -73,4 +73,4 @@ task generateEntities(type: Exec, description: 'Generate DAL Entities') { preBuild.dependsOn(copyFiles) -//preBuild.dependsOn(generateEntities) \ No newline at end of file +preBuild.dependsOn(generateEntities) \ No newline at end of file diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/Entity.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/Entity.java index 6cf88e85e..84b88535a 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/Entity.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/Entity.java @@ -28,9 +28,6 @@ public class Entity extends BaseRXModel @Column(name = "LAST_UPDATED",typeConverter = DateConverter.class) private DateTime last_updated; - @Column(name = "DELETED") - private boolean deleted; - /** * Gets id. * @@ -91,26 +88,6 @@ public class Entity extends BaseRXModel this.last_updated = last_updated; } - /** - * Is deleted boolean. - * - * @return the boolean - */ - public boolean isDeleted() - { - return deleted; - } - - /** - * Sets deleted. - * - * @param deleted the deleted - */ - public void setDeleted(boolean deleted) - { - this.deleted = deleted; - } - /** * Instantiates a new Entity. */ diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/TangoDAO.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/TangoDAO.java index e60d6e134..6b0c83a16 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/TangoDAO.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/TangoDAO.java @@ -8,11 +8,11 @@ import com.twine.tango.dal.entities.ApplicationFirmwareVersion; import com.twine.tango.dal.entities.ApplicationOsVersion; import com.twine.tango.dal.entities.ApplicationVersion; import com.twine.tango.dal.entities.CartridgeType; -import com.twine.tango.dal.entities.Cartridge; +import com.twine.tango.dal.entities.Cat; +import com.twine.tango.dal.entities.Cct; import com.twine.tango.dal.entities.Configuration; import com.twine.tango.dal.entities.Contact; import com.twine.tango.dal.entities.DispenserType; -import com.twine.tango.dal.entities.Dispenser; import com.twine.tango.dal.entities.EmbeddedFirmwareVersion; import com.twine.tango.dal.entities.EmbeddedSoftwareVersion; import com.twine.tango.dal.entities.EventType; @@ -32,6 +32,7 @@ import com.twine.tango.dal.entities.MediaColor; import com.twine.tango.dal.entities.MediaCondition; import com.twine.tango.dal.entities.MediaMaterial; import com.twine.tango.dal.entities.MediaPurpose; +import com.twine.tango.dal.entities.MidTankType; import com.twine.tango.dal.entities.Organization; import com.twine.tango.dal.entities.Permission; import com.twine.tango.dal.entities.Rml; @@ -116,13 +117,23 @@ public class TangoDAO } /** - * Gets all the Cartridges from database. + * Gets all the Cats from database. * - * @return all Cartridges + * @return all Cats */ - public static List getAllCartridges() + public static List getAllCats() { - return SQLite.select().from(Cartridge.class).queryList(); + return SQLite.select().from(Cat.class).queryList(); + } + + /** + * Gets all the Ccts from database. + * + * @return all Ccts + */ + public static List getAllCcts() + { + return SQLite.select().from(Cct.class).queryList(); } /** @@ -155,16 +166,6 @@ public class TangoDAO return SQLite.select().from(DispenserType.class).queryList(); } - /** - * Gets all the Dispensers from database. - * - * @return all Dispensers - */ - public static List getAllDispensers() - { - return SQLite.select().from(Dispenser.class).queryList(); - } - /** * Gets all the EmbeddedFirmwareVersions from database. * @@ -355,6 +356,16 @@ public class TangoDAO return SQLite.select().from(MediaPurpose.class).queryList(); } + /** + * Gets all the MidTankTypes from database. + * + * @return all MidTankTypes + */ + public static List getAllMidTankTypes() + { + return SQLite.select().from(MidTankType.class).queryList(); + } + /** * Gets all the Organizations from database. * diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Address.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Address.java index 199d8f923..7a2a9242f 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Address.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Address.java @@ -13,6 +13,11 @@ import com.twine.tango.dal.TangoDB; public class Address extends Entity { + @Column(name = "DELETED") + private Boolean deleted; + + + @Column(name = "ADDRESS_STRING") private String addressString; @@ -49,6 +54,27 @@ import com.twine.tango.dal.TangoDB; + /** + * Gets the Deleted. + * + * return the Deleted + */ + public Boolean isDeleted() + { + return deleted; + } + + /** + * Sets the Deleted. + * + * @param deleted the Deleted + */ + public void setDeleted(Boolean deleted) + { + this.deleted = deleted; + } + + /** * Gets the AddressString. * diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cat.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cat.java new file mode 100644 index 000000000..026927dd7 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cat.java @@ -0,0 +1,94 @@ +package com.twine.tango.dal.entities; + +import com.raizlabs.android.dbflow.annotation.Column; +import com.raizlabs.android.dbflow.annotation.ForeignKey; +import com.raizlabs.android.dbflow.annotation.ForeignKeyReference; +import com.raizlabs.android.dbflow.annotation.Table; +import org.joda.time.DateTime; +import com.twine.tango.dal.Entity; +import com.twine.tango.dal.TangoDB; + + + @Table(name = "CATS", database = TangoDB.class) + public class Cat extends Entity + { + + @Column(name = "DATA") + private byte[] data; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "LIQUID_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private LiquidType liquidTypes; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MACHINE_GUID", foreignKeyColumnName = "GUID")}) + private Machine machine; + + + + + /** + * Gets the Data. + * + * return the Data + */ + public byte[] getData() + { + return data; + } + + /** + * Sets the Data. + * + * @param data the Data + */ + public void setData(byte[] data) + { + this.data = data; + } + + + /** + * Gets the LiquidTypes. + * + * return the LiquidTypes + */ + public LiquidType getLiquidTypes() + { + return liquidTypes; + } + + /** + * Sets the LiquidTypes. + * + * @param liquidTypes the LiquidTypes + */ + public void setLiquidTypes(LiquidType liquidTypes) + { + this.liquidTypes = liquidTypes; + } + + + /** + * Gets the Machine. + * + * return the Machine + */ + public Machine getMachine() + { + return machine; + } + + /** + * Sets the Machine. + * + * @param machine the Machine + */ + public void setMachine(Machine machine) + { + this.machine = machine; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cct.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cct.java new file mode 100644 index 000000000..398eba866 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cct.java @@ -0,0 +1,224 @@ +package com.twine.tango.dal.entities; + +import com.raizlabs.android.dbflow.annotation.Column; +import com.raizlabs.android.dbflow.annotation.ForeignKey; +import com.raizlabs.android.dbflow.annotation.ForeignKeyReference; +import com.raizlabs.android.dbflow.annotation.Table; +import org.joda.time.DateTime; +import com.twine.tango.dal.Entity; +import com.twine.tango.dal.TangoDB; + + + @Table(name = "CCTS", database = TangoDB.class) + public class Cct extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "DESCRIPTION") + private String description; + + + + @Column(name = "FORWARD_FILE_NAME") + private String forwardFileName; + + + + @Column(name = "INVERSE_FILE_NAME") + private String inverseFileName; + + + + @Column(name = "FORWARD_DATA") + private byte[] forwardData; + + + + @Column(name = "INVERSE_DATA") + private byte[] inverseData; + + + + @Column(name = "VERSION") + private Double version; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "RML_GUID", foreignKeyColumnName = "GUID")}) + private Rml rml; + + + + + /** + * Gets the Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Gets the Description. + * + * return the Description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the Description. + * + * @param description the Description + */ + public void setDescription(String description) + { + this.description = description; + } + + + /** + * Gets the ForwardFileName. + * + * return the ForwardFileName + */ + public String getForwardFileName() + { + return forwardFileName; + } + + /** + * Sets the ForwardFileName. + * + * @param forwardFileName the ForwardFileName + */ + public void setForwardFileName(String forwardFileName) + { + this.forwardFileName = forwardFileName; + } + + + /** + * Gets the InverseFileName. + * + * return the InverseFileName + */ + public String getInverseFileName() + { + return inverseFileName; + } + + /** + * Sets the InverseFileName. + * + * @param inverseFileName the InverseFileName + */ + public void setInverseFileName(String inverseFileName) + { + this.inverseFileName = inverseFileName; + } + + + /** + * Gets the ForwardData. + * + * return the ForwardData + */ + public byte[] getForwardData() + { + return forwardData; + } + + /** + * Sets the ForwardData. + * + * @param forwardData the ForwardData + */ + public void setForwardData(byte[] forwardData) + { + this.forwardData = forwardData; + } + + + /** + * Gets the InverseData. + * + * return the InverseData + */ + public byte[] getInverseData() + { + return inverseData; + } + + /** + * Sets the InverseData. + * + * @param inverseData the InverseData + */ + public void setInverseData(byte[] inverseData) + { + this.inverseData = inverseData; + } + + + /** + * Gets the Version. + * + * return the Version + */ + public Double getVersion() + { + return version; + } + + /** + * Sets the Version. + * + * @param version the Version + */ + public void setVersion(Double version) + { + this.version = version; + } + + + /** + * Gets the Rml. + * + * return the Rml + */ + public Rml getRml() + { + return rml; + } + + /** + * Sets the Rml. + * + * @param rml the Rml + */ + public void setRml(Rml rml) + { + this.rml = rml; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Configuration.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Configuration.java index 13aeec266..6eaa78902 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Configuration.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Configuration.java @@ -23,38 +23,38 @@ import com.twine.tango.dal.TangoDB; - @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_DISPLAY_PANEL_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private ApplicationDisplayPanelVersion applicationDisplayPanelVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_DISPLAY_PANEL_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationDisplayPanelVersion applicationDisplayPanelVersions; - @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_FIRMWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private ApplicationFirmwareVersion applicationFirmwareVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_FIRMWARE_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationFirmwareVersion applicationFirmwareVersions; - @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_OS_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private ApplicationOsVersion applicationOsVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_OS_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationOsVersion applicationOsVersions; - @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private ApplicationVersion applicationVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationVersion applicationVersions; - @ForeignKey(references = { @ForeignKeyReference(columnName = "EMBEDDED_FIRMWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private EmbeddedFirmwareVersion embeddedFirmwareVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "EMBEDDED_FIRMWARE_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private EmbeddedFirmwareVersion embeddedFirmwareVersions; - @ForeignKey(references = { @ForeignKeyReference(columnName = "EMBEDDED_SOFTWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private EmbeddedSoftwareVersion embeddedSoftwareVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "EMBEDDED_SOFTWARE_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private EmbeddedSoftwareVersion embeddedSoftwareVersions; - @ForeignKey(references = { @ForeignKeyReference(columnName = "HARDWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private HardwareVersion hardwareVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "HARDWARE_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private HardwareVersion hardwareVersions; @@ -102,149 +102,149 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the ApplicationDisplayPanelVersion. + * Gets the ApplicationDisplayPanelVersions. * - * return the ApplicationDisplayPanelVersion + * return the ApplicationDisplayPanelVersions */ - public ApplicationDisplayPanelVersion getApplicationDisplayPanelVersion() + public ApplicationDisplayPanelVersion getApplicationDisplayPanelVersions() { - return applicationDisplayPanelVersion; + return applicationDisplayPanelVersions; } /** - * Sets the ApplicationDisplayPanelVersion. + * Sets the ApplicationDisplayPanelVersions. * - * @param applicationDisplayPanelVersion the ApplicationDisplayPanelVersion + * @param applicationDisplayPanelVersions the ApplicationDisplayPanelVersions */ - public void setApplicationDisplayPanelVersion(ApplicationDisplayPanelVersion applicationDisplayPanelVersion) + public void setApplicationDisplayPanelVersions(ApplicationDisplayPanelVersion applicationDisplayPanelVersions) { - this.applicationDisplayPanelVersion = applicationDisplayPanelVersion; + this.applicationDisplayPanelVersions = applicationDisplayPanelVersions; } /** - * Gets the ApplicationFirmwareVersion. + * Gets the ApplicationFirmwareVersions. * - * return the ApplicationFirmwareVersion + * return the ApplicationFirmwareVersions */ - public ApplicationFirmwareVersion getApplicationFirmwareVersion() + public ApplicationFirmwareVersion getApplicationFirmwareVersions() { - return applicationFirmwareVersion; + return applicationFirmwareVersions; } /** - * Sets the ApplicationFirmwareVersion. + * Sets the ApplicationFirmwareVersions. * - * @param applicationFirmwareVersion the ApplicationFirmwareVersion + * @param applicationFirmwareVersions the ApplicationFirmwareVersions */ - public void setApplicationFirmwareVersion(ApplicationFirmwareVersion applicationFirmwareVersion) + public void setApplicationFirmwareVersions(ApplicationFirmwareVersion applicationFirmwareVersions) { - this.applicationFirmwareVersion = applicationFirmwareVersion; + this.applicationFirmwareVersions = applicationFirmwareVersions; } /** - * Gets the ApplicationOsVersion. + * Gets the ApplicationOsVersions. * - * return the ApplicationOsVersion + * return the ApplicationOsVersions */ - public ApplicationOsVersion getApplicationOsVersion() + public ApplicationOsVersion getApplicationOsVersions() { - return applicationOsVersion; + return applicationOsVersions; } /** - * Sets the ApplicationOsVersion. + * Sets the ApplicationOsVersions. * - * @param applicationOsVersion the ApplicationOsVersion + * @param applicationOsVersions the ApplicationOsVersions */ - public void setApplicationOsVersion(ApplicationOsVersion applicationOsVersion) + public void setApplicationOsVersions(ApplicationOsVersion applicationOsVersions) { - this.applicationOsVersion = applicationOsVersion; + this.applicationOsVersions = applicationOsVersions; } /** - * Gets the ApplicationVersion. + * Gets the ApplicationVersions. * - * return the ApplicationVersion + * return the ApplicationVersions */ - public ApplicationVersion getApplicationVersion() + public ApplicationVersion getApplicationVersions() { - return applicationVersion; + return applicationVersions; } /** - * Sets the ApplicationVersion. + * Sets the ApplicationVersions. * - * @param applicationVersion the ApplicationVersion + * @param applicationVersions the ApplicationVersions */ - public void setApplicationVersion(ApplicationVersion applicationVersion) + public void setApplicationVersions(ApplicationVersion applicationVersions) { - this.applicationVersion = applicationVersion; + this.applicationVersions = applicationVersions; } /** - * Gets the EmbeddedFirmwareVersion. + * Gets the EmbeddedFirmwareVersions. * - * return the EmbeddedFirmwareVersion + * return the EmbeddedFirmwareVersions */ - public EmbeddedFirmwareVersion getEmbeddedFirmwareVersion() + public EmbeddedFirmwareVersion getEmbeddedFirmwareVersions() { - return embeddedFirmwareVersion; + return embeddedFirmwareVersions; } /** - * Sets the EmbeddedFirmwareVersion. + * Sets the EmbeddedFirmwareVersions. * - * @param embeddedFirmwareVersion the EmbeddedFirmwareVersion + * @param embeddedFirmwareVersions the EmbeddedFirmwareVersions */ - public void setEmbeddedFirmwareVersion(EmbeddedFirmwareVersion embeddedFirmwareVersion) + public void setEmbeddedFirmwareVersions(EmbeddedFirmwareVersion embeddedFirmwareVersions) { - this.embeddedFirmwareVersion = embeddedFirmwareVersion; + this.embeddedFirmwareVersions = embeddedFirmwareVersions; } /** - * Gets the EmbeddedSoftwareVersion. + * Gets the EmbeddedSoftwareVersions. * - * return the EmbeddedSoftwareVersion + * return the EmbeddedSoftwareVersions */ - public EmbeddedSoftwareVersion getEmbeddedSoftwareVersion() + public EmbeddedSoftwareVersion getEmbeddedSoftwareVersions() { - return embeddedSoftwareVersion; + return embeddedSoftwareVersions; } /** - * Sets the EmbeddedSoftwareVersion. + * Sets the EmbeddedSoftwareVersions. * - * @param embeddedSoftwareVersion the EmbeddedSoftwareVersion + * @param embeddedSoftwareVersions the EmbeddedSoftwareVersions */ - public void setEmbeddedSoftwareVersion(EmbeddedSoftwareVersion embeddedSoftwareVersion) + public void setEmbeddedSoftwareVersions(EmbeddedSoftwareVersion embeddedSoftwareVersions) { - this.embeddedSoftwareVersion = embeddedSoftwareVersion; + this.embeddedSoftwareVersions = embeddedSoftwareVersions; } /** - * Gets the HardwareVersion. + * Gets the HardwareVersions. * - * return the HardwareVersion + * return the HardwareVersions */ - public HardwareVersion getHardwareVersion() + public HardwareVersion getHardwareVersions() { - return hardwareVersion; + return hardwareVersions; } /** - * Sets the HardwareVersion. + * Sets the HardwareVersions. * - * @param hardwareVersion the HardwareVersion + * @param hardwareVersions the HardwareVersions */ - public void setHardwareVersion(HardwareVersion hardwareVersion) + public void setHardwareVersions(HardwareVersion hardwareVersions) { - this.hardwareVersion = hardwareVersion; + this.hardwareVersions = hardwareVersions; } } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Contact.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Contact.java index d4bc21b34..9f84e1038 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Contact.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Contact.java @@ -13,6 +13,11 @@ import com.twine.tango.dal.TangoDB; public class Contact extends Entity { + @Column(name = "DELETED") + private Boolean deleted; + + + @Column(name = "FIRST_NAME") private String firstName; @@ -44,6 +49,27 @@ import com.twine.tango.dal.TangoDB; + /** + * Gets the Deleted. + * + * return the Deleted + */ + public Boolean isDeleted() + { + return deleted; + } + + /** + * Sets the Deleted. + * + * @param deleted the Deleted + */ + public void setDeleted(Boolean deleted) + { + this.deleted = deleted; + } + + /** * Gets the FirstName. * diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DispenserType.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DispenserType.java index 321ba241b..6739b3e89 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DispenserType.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DispenserType.java @@ -22,6 +22,16 @@ import com.twine.tango.dal.TangoDB; private String name; + + @Column(name = "NL_PER_PULSE") + private Double nlPerPulse; + + + + @Column(name = "CAPACITY") + private Double capacity; + + /** @@ -65,4 +75,46 @@ import com.twine.tango.dal.TangoDB; this.name = name; } + + /** + * Gets the NlPerPulse. + * + * return the NlPerPulse + */ + public Double getNlPerPulse() + { + return nlPerPulse; + } + + /** + * Sets the NlPerPulse. + * + * @param nlPerPulse the NlPerPulse + */ + public void setNlPerPulse(Double nlPerPulse) + { + this.nlPerPulse = nlPerPulse; + } + + + /** + * Gets the Capacity. + * + * return the Capacity + */ + public Double getCapacity() + { + return capacity; + } + + /** + * Sets the Capacity. + * + * @param capacity the Capacity + */ + public void setCapacity(Double capacity) + { + this.capacity = capacity; + } + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventTypesAction.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventTypesAction.java index 9f69b2592..7189d6066 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventTypesAction.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventTypesAction.java @@ -13,56 +13,56 @@ import com.twine.tango.dal.TangoDB; public class EventTypesAction extends Entity { - @ForeignKey(references = { @ForeignKeyReference(columnName = "ACTION_TYPE_GUID", foreignKeyColumnName = "GUID")}) - private ActionType actionType; + @ForeignKey(references = { @ForeignKeyReference(columnName = "ACTION_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private ActionType actionTypes; - @ForeignKey(references = { @ForeignKeyReference(columnName = "EVENT_TYPE_GUID", foreignKeyColumnName = "GUID")}) - private EventType eventType; + @ForeignKey(references = { @ForeignKeyReference(columnName = "EVENT_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private EventType eventTypes; /** - * Gets the ActionType. + * Gets the ActionTypes. * - * return the ActionType + * return the ActionTypes */ - public ActionType getActionType() + public ActionType getActionTypes() { - return actionType; + return actionTypes; } /** - * Sets the ActionType. + * Sets the ActionTypes. * - * @param actionType the ActionType + * @param actionTypes the ActionTypes */ - public void setActionType(ActionType actionType) + public void setActionTypes(ActionType actionTypes) { - this.actionType = actionType; + this.actionTypes = actionTypes; } /** - * Gets the EventType. + * Gets the EventTypes. * - * return the EventType + * return the EventTypes */ - public EventType getEventType() + public EventType getEventTypes() { - return eventType; + return eventTypes; } /** - * Sets the EventType. + * Sets the EventTypes. * - * @param eventType the EventType + * @param eventTypes the EventTypes */ - public void setEventType(EventType eventType) + public void setEventTypes(EventType eventTypes) { - this.eventType = eventType; + this.eventTypes = eventTypes; } } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/IdsPack.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/IdsPack.java index 3fb61d0a1..75699cfd7 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/IdsPack.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/IdsPack.java @@ -18,8 +18,13 @@ import com.twine.tango.dal.TangoDB; - @ForeignKey(references = { @ForeignKeyReference(columnName = "CARTRIDGE_GUID", foreignKeyColumnName = "GUID")}) - private Cartridge cartridge; + @Column(name = "PACK_INDEX") + private int packIndex; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "CARTRIDGE_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private CartridgeType cartridgeTypes; @@ -28,13 +33,18 @@ import com.twine.tango.dal.TangoDB; - @ForeignKey(references = { @ForeignKeyReference(columnName = "DISPENSER_GUID", foreignKeyColumnName = "GUID")}) - private Dispenser dispenser; + @ForeignKey(references = { @ForeignKeyReference(columnName = "DISPENSER_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private DispenserType dispenserTypes; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "LIQUID_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private LiquidType liquidTypes; - @ForeignKey(references = { @ForeignKeyReference(columnName = "LIQUID_TYPE_GUID", foreignKeyColumnName = "GUID")}) - private LiquidType liquidType; + @ForeignKey(references = { @ForeignKeyReference(columnName = "MID_TANK_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private MidTankType midTankTypes; @@ -61,23 +71,44 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the Cartridge. + * Gets the PackIndex. + * + * return the PackIndex + */ + public int getPackIndex() + { + return packIndex; + } + + /** + * Sets the PackIndex. + * + * @param packIndex the PackIndex + */ + public void setPackIndex(int packIndex) + { + this.packIndex = packIndex; + } + + + /** + * Gets the CartridgeTypes. * - * return the Cartridge + * return the CartridgeTypes */ - public Cartridge getCartridge() + public CartridgeType getCartridgeTypes() { - return cartridge; + return cartridgeTypes; } /** - * Sets the Cartridge. + * Sets the CartridgeTypes. * - * @param cartridge the Cartridge + * @param cartridgeTypes the CartridgeTypes */ - public void setCartridge(Cartridge cartridge) + public void setCartridgeTypes(CartridgeType cartridgeTypes) { - this.cartridge = cartridge; + this.cartridgeTypes = cartridgeTypes; } @@ -103,44 +134,65 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the Dispenser. + * Gets the DispenserTypes. + * + * return the DispenserTypes + */ + public DispenserType getDispenserTypes() + { + return dispenserTypes; + } + + /** + * Sets the DispenserTypes. + * + * @param dispenserTypes the DispenserTypes + */ + public void setDispenserTypes(DispenserType dispenserTypes) + { + this.dispenserTypes = dispenserTypes; + } + + + /** + * Gets the LiquidTypes. * - * return the Dispenser + * return the LiquidTypes */ - public Dispenser getDispenser() + public LiquidType getLiquidTypes() { - return dispenser; + return liquidTypes; } /** - * Sets the Dispenser. + * Sets the LiquidTypes. * - * @param dispenser the Dispenser + * @param liquidTypes the LiquidTypes */ - public void setDispenser(Dispenser dispenser) + public void setLiquidTypes(LiquidType liquidTypes) { - this.dispenser = dispenser; + this.liquidTypes = liquidTypes; } /** - * Gets the LiquidType. + * Gets the MidTankTypes. * - * return the LiquidType + * return the MidTankTypes */ - public LiquidType getLiquidType() + public MidTankType getMidTankTypes() { - return liquidType; + return midTankTypes; } /** - * Sets the LiquidType. + * Sets the MidTankTypes. * - * @param liquidType the LiquidType + * @param midTankTypes the MidTankTypes */ - public void setLiquidType(LiquidType liquidType) + public void setMidTankTypes(MidTankType midTankTypes) { - this.liquidType = liquidType; + this.midTankTypes = midTankTypes; } } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidTypesRml.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidTypesRml.java index db5f43933..b708557fb 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidTypesRml.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidTypesRml.java @@ -13,8 +13,13 @@ import com.twine.tango.dal.TangoDB; public class LiquidTypesRml extends Entity { - @ForeignKey(references = { @ForeignKeyReference(columnName = "LIQUID_TYPE_GUID", foreignKeyColumnName = "GUID")}) - private LiquidType liquidType; + @Column(name = "MAX_NL_PER_CM") + private Double maxNlPerCm; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "LIQUID_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private LiquidType liquidTypes; @@ -25,23 +30,44 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the LiquidType. + * Gets the MaxNlPerCm. + * + * return the MaxNlPerCm + */ + public Double getMaxNlPerCm() + { + return maxNlPerCm; + } + + /** + * Sets the MaxNlPerCm. + * + * @param maxNlPerCm the MaxNlPerCm + */ + public void setMaxNlPerCm(Double maxNlPerCm) + { + this.maxNlPerCm = maxNlPerCm; + } + + + /** + * Gets the LiquidTypes. * - * return the LiquidType + * return the LiquidTypes */ - public LiquidType getLiquidType() + public LiquidType getLiquidTypes() { - return liquidType; + return liquidTypes; } /** - * Sets the LiquidType. + * Sets the LiquidTypes. * - * @param liquidType the LiquidType + * @param liquidTypes the LiquidTypes */ - public void setLiquidType(LiquidType liquidType) + public void setLiquidTypes(LiquidType liquidTypes) { - this.liquidType = liquidType; + this.liquidTypes = liquidTypes; } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Machine.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Machine.java index 778974f2c..660e1e188 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Machine.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Machine.java @@ -33,8 +33,8 @@ import com.twine.tango.dal.TangoDB; - @ForeignKey(references = { @ForeignKeyReference(columnName = "MACHINE_VERSION_GUID", foreignKeyColumnName = "GUID")}) - private MachineVersion machineVersion; + @ForeignKey(references = { @ForeignKeyReference(columnName = "MACHINE_VERSIONS_GUID", foreignKeyColumnName = "GUID")}) + private MachineVersion machineVersions; @@ -129,23 +129,23 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the MachineVersion. + * Gets the MachineVersions. * - * return the MachineVersion + * return the MachineVersions */ - public MachineVersion getMachineVersion() + public MachineVersion getMachineVersions() { - return machineVersion; + return machineVersions; } /** - * Sets the MachineVersion. + * Sets the MachineVersions. * - * @param machineVersion the MachineVersion + * @param machineVersions the MachineVersions */ - public void setMachineVersion(MachineVersion machineVersion) + public void setMachineVersions(MachineVersion machineVersions) { - this.machineVersion = machineVersion; + this.machineVersions = machineVersions; } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesEvent.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesEvent.java index 85cde559a..c60a46ef2 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesEvent.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesEvent.java @@ -23,8 +23,8 @@ import com.twine.tango.dal.TangoDB; - @ForeignKey(references = { @ForeignKeyReference(columnName = "EVENT_TYPE_GUID", foreignKeyColumnName = "GUID")}) - private EventType eventType; + @ForeignKey(references = { @ForeignKeyReference(columnName = "EVENT_TYPES_GUID", foreignKeyColumnName = "GUID")}) + private EventType eventTypes; @@ -82,23 +82,23 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the EventType. + * Gets the EventTypes. * - * return the EventType + * return the EventTypes */ - public EventType getEventType() + public EventType getEventTypes() { - return eventType; + return eventTypes; } /** - * Sets the EventType. + * Sets the EventTypes. * - * @param eventType the EventType + * @param eventTypes the EventTypes */ - public void setEventType(EventType eventType) + public void setEventTypes(EventType eventTypes) { - this.eventType = eventType; + this.eventTypes = eventTypes; } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MidTankType.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MidTankType.java new file mode 100644 index 000000000..a934ee8f6 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MidTankType.java @@ -0,0 +1,94 @@ +package com.twine.tango.dal.entities; + +import com.raizlabs.android.dbflow.annotation.Column; +import com.raizlabs.android.dbflow.annotation.ForeignKey; +import com.raizlabs.android.dbflow.annotation.ForeignKeyReference; +import com.raizlabs.android.dbflow.annotation.Table; +import org.joda.time.DateTime; +import com.twine.tango.dal.Entity; +import com.twine.tango.dal.TangoDB; + + + @Table(name = "MID_TANK_TYPES", database = TangoDB.class) + public class MidTankType extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + @Column(name = "LITER_CAPACITY") + private Double literCapacity; + + + + + /** + * Gets the Code. + * + * return the Code + */ + public int getCode() + { + return code; + } + + /** + * Sets the Code. + * + * @param code the Code + */ + public void setCode(int code) + { + this.code = code; + } + + + /** + * Gets the Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + + /** + * Gets the LiterCapacity. + * + * return the LiterCapacity + */ + public Double getLiterCapacity() + { + return literCapacity; + } + + /** + * Sets the LiterCapacity. + * + * @param literCapacity the LiterCapacity + */ + public void setLiterCapacity(Double literCapacity) + { + this.literCapacity = literCapacity; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Rml.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Rml.java index 5f7fe528d..d796ee690 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Rml.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Rml.java @@ -13,6 +13,11 @@ import com.twine.tango.dal.TangoDB; public class Rml extends Entity { + @Column(name = "NAME") + private String name; + + + @Column(name = "MANUFACTURER") private String manufacturer; @@ -23,8 +28,8 @@ import com.twine.tango.dal.TangoDB; - @Column(name = "NUMBER_OF_FIBER") - private int numberOfFiber; + @Column(name = "NUMBER_OF_FIBERS") + private int numberOfFibers; @@ -68,42 +73,63 @@ import com.twine.tango.dal.TangoDB; - @ForeignKey(references = { @ForeignKeyReference(columnName = "FIBER_SHAPE_GUID", foreignKeyColumnName = "GUID")}) - private FiberShape fiberShape; + @ForeignKey(references = { @ForeignKeyReference(columnName = "FIBER_SHAPES_GUID", foreignKeyColumnName = "GUID")}) + private FiberShape fiberShapes; - @ForeignKey(references = { @ForeignKeyReference(columnName = "FIBER_SYNTH_GUID", foreignKeyColumnName = "GUID")}) - private FiberSynth fiberSynth; + @ForeignKey(references = { @ForeignKeyReference(columnName = "FIBER_SYNTHS_GUID", foreignKeyColumnName = "GUID")}) + private FiberSynth fiberSynths; - @ForeignKey(references = { @ForeignKeyReference(columnName = "LINEAR_MASS_DENSITY_UNIT_GUID", foreignKeyColumnName = "GUID")}) - private LinearMassDensityUnit linearMassDensityUnit; + @ForeignKey(references = { @ForeignKeyReference(columnName = "LINEAR_MASS_DENSITY_UNITS_GUID", foreignKeyColumnName = "GUID")}) + private LinearMassDensityUnit linearMassDensityUnits; - @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_COLOR_GUID", foreignKeyColumnName = "GUID")}) - private MediaColor mediaColor; + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_COLORS_GUID", foreignKeyColumnName = "GUID")}) + private MediaColor mediaColors; - @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_CONDITION_GUID", foreignKeyColumnName = "GUID")}) - private MediaCondition mediaCondition; + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_CONDITIONS_GUID", foreignKeyColumnName = "GUID")}) + private MediaCondition mediaConditions; - @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_MATERIAL_GUID", foreignKeyColumnName = "GUID")}) - private MediaMaterial mediaMaterial; + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_MATERIALS_GUID", foreignKeyColumnName = "GUID")}) + private MediaMaterial mediaMaterials; - @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_PURPOSE_GUID", foreignKeyColumnName = "GUID")}) - private MediaPurpose mediaPurpose; + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_PURPOSES_GUID", foreignKeyColumnName = "GUID")}) + private MediaPurpose mediaPurposes; + /** + * Gets the Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + /** * Gets the Manufacturer. * @@ -147,23 +173,23 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the NumberOfFiber. + * Gets the NumberOfFibers. * - * return the NumberOfFiber + * return the NumberOfFibers */ - public int getNumberOfFiber() + public int getNumberOfFibers() { - return numberOfFiber; + return numberOfFibers; } /** - * Sets the NumberOfFiber. + * Sets the NumberOfFibers. * - * @param numberOfFiber the NumberOfFiber + * @param numberOfFibers the NumberOfFibers */ - public void setNumberOfFiber(int numberOfFiber) + public void setNumberOfFibers(int numberOfFibers) { - this.numberOfFiber = numberOfFiber; + this.numberOfFibers = numberOfFibers; } @@ -336,149 +362,149 @@ import com.twine.tango.dal.TangoDB; /** - * Gets the FiberShape. + * Gets the FiberShapes. * - * return the FiberShape + * return the FiberShapes */ - public FiberShape getFiberShape() + public FiberShape getFiberShapes() { - return fiberShape; + return fiberShapes; } /** - * Sets the FiberShape. + * Sets the FiberShapes. * - * @param fiberShape the FiberShape + * @param fiberShapes the FiberShapes */ - public void setFiberShape(FiberShape fiberShape) + public void setFiberShapes(FiberShape fiberShapes) { - this.fiberShape = fiberShape; + this.fiberShapes = fiberShapes; } /** - * Gets the FiberSynth. + * Gets the FiberSynths. * - * return the FiberSynth + * return the FiberSynths */ - public FiberSynth getFiberSynth() + public FiberSynth getFiberSynths() { - return fiberSynth; + return fiberSynths; } /** - * Sets the FiberSynth. + * Sets the FiberSynths. * - * @param fiberSynth the FiberSynth + * @param fiberSynths the FiberSynths */ - public void setFiberSynth(FiberSynth fiberSynth) + public void setFiberSynths(FiberSynth fiberSynths) { - this.fiberSynth = fiberSynth; + this.fiberSynths = fiberSynths; } /** - * Gets the LinearMassDensityUnit. + * Gets the LinearMassDensityUnits. * - * return the LinearMassDensityUnit + * return the LinearMassDensityUnits */ - public LinearMassDensityUnit getLinearMassDensityUnit() + public LinearMassDensityUnit getLinearMassDensityUnits() { - return linearMassDensityUnit; + return linearMassDensityUnits; } /** - * Sets the LinearMassDensityUnit. + * Sets the LinearMassDensityUnits. * - * @param linearMassDensityUnit the LinearMassDensityUnit + * @param linearMassDensityUnits the LinearMassDensityUnits */ - public void setLinearMassDensityUnit(LinearMassDensityUnit linearMassDensityUnit) + public void setLinearMassDensityUnits(LinearMassDensityUnit linearMassDensityUnits) { - this.linearMassDensityUnit = linearMassDensityUnit; + this.linearMassDensityUnits = linearMassDensityUnits; } /** - * Gets the MediaColor. + * Gets the MediaColors. * - * return the MediaColor + * return the MediaColors */ - public MediaColor getMediaColor() + public MediaColor getMediaColors() { - return mediaColor; + return mediaColors; } /** - * Sets the MediaColor. + * Sets the MediaColors. * - * @param mediaColor the MediaColor + * @param mediaColors the MediaColors */ - public void setMediaColor(MediaColor mediaColor) + public void setMediaColors(MediaColor mediaColors) { - this.mediaColor = mediaColor; + this.mediaColors = mediaColors; } /** - * Gets the MediaCondition. + * Gets the MediaConditions. * - * return the MediaCondition + * return the MediaConditions */ - public MediaCondition getMediaCondition() + public MediaCondition getMediaConditions() { - return mediaCondition; + return mediaConditions; } /** - * Sets the MediaCondition. + * Sets the MediaConditions. * - * @param mediaCondition the MediaCondition + * @param mediaConditions the MediaConditions */ - public void setMediaCondition(MediaCondition mediaCondition) + public void setMediaConditions(MediaCondition mediaConditions) { - this.mediaCondition = mediaCondition; + this.mediaConditions = mediaConditions; } /** - * Gets the MediaMaterial. + * Gets the MediaMaterials. * - * return the MediaMaterial + * return the MediaMaterials */ - public MediaMaterial getMediaMaterial() + public MediaMaterial getMediaMaterials() { - return mediaMaterial; + return mediaMaterials; } /** - * Sets the MediaMaterial. + * Sets the MediaMaterials. * - * @param mediaMaterial the MediaMaterial + * @param mediaMaterials the MediaMaterials */ - public void setMediaMaterial(MediaMaterial mediaMaterial) + public void setMediaMaterials(MediaMaterial mediaMaterials) { - this.mediaMaterial = mediaMaterial; + this.mediaMaterials = mediaMaterials; } /** - * Gets the MediaPurpose. + * Gets the MediaPurposes. * - * return the MediaPurpose + * return the MediaPurposes */ - public MediaPurpose getMediaPurpose() + public MediaPurpose getMediaPurposes() { - return mediaPurpose; + return mediaPurposes; } /** - * Sets the MediaPurpose. + * Sets the MediaPurposes. * - * @param mediaPurpose the MediaPurpose + * @param mediaPurposes the MediaPurposes */ - public void setMediaPurpose(MediaPurpose mediaPurpose) + public void setMediaPurposes(MediaPurpose mediaPurposes) { - this.mediaPurpose = mediaPurpose; + this.mediaPurposes = mediaPurposes; } } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/User.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/User.java index 5a346a620..8694bfefc 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/User.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/User.java @@ -13,6 +13,11 @@ import com.twine.tango.dal.TangoDB; public class User extends Entity { + @Column(name = "DELETED") + private Boolean deleted; + + + @Column(name = "EMAIL") private String email; @@ -39,6 +44,27 @@ import com.twine.tango.dal.TangoDB; + /** + * Gets the Deleted. + * + * return the Deleted + */ + public Boolean isDeleted() + { + return deleted; + } + + /** + * Sets the Deleted. + * + * @param deleted the Deleted + */ + public void setDeleted(Boolean deleted) + { + this.deleted = deleted; + } + + /** * Gets the Email. * diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/UsersRole.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/UsersRole.java index ad1c44bd1..c40c669f2 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/UsersRole.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/UsersRole.java @@ -13,6 +13,11 @@ import com.twine.tango.dal.TangoDB; public class UsersRole extends Entity { + @Column(name = "DELETED") + private Boolean deleted; + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "ROLE_GUID", foreignKeyColumnName = "GUID")}) private Role role; @@ -24,6 +29,27 @@ import com.twine.tango.dal.TangoDB; + /** + * Gets the Deleted. + * + * return the Deleted + */ + public Boolean isDeleted() + { + return deleted; + } + + /** + * Sets the Deleted. + * + * @param deleted the Deleted + */ + public void setDeleted(Boolean deleted) + { + this.deleted = deleted; + } + + /** * Gets the Role. * diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberShapes.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberShapes.java index d146cd79a..10411d66a 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberShapes.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberShapes.java @@ -4,6 +4,10 @@ import com.twine.tango.core.DescriptionAnnotation; public enum FiberShapes { + + @DescriptionAnnotation(description = "Triangle") + Triangle(1), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberSynths.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberSynths.java index 0b8b6384d..03f2f950b 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberSynths.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberSynths.java @@ -4,6 +4,10 @@ import com.twine.tango.core.DescriptionAnnotation; public enum FiberSynths { + + @DescriptionAnnotation(description = "Some syntheses type") + Somesynthesestype(1), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LinearMassDensityUnits.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LinearMassDensityUnits.java index 495a187f1..1cc561b63 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LinearMassDensityUnits.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LinearMassDensityUnits.java @@ -4,6 +4,10 @@ import com.twine.tango.core.DescriptionAnnotation; public enum LinearMassDensityUnits { + + @DescriptionAnnotation(description = "Dex") + Dex(1), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LiquidTypes.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LiquidTypes.java index d2d480167..5b9d52450 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LiquidTypes.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LiquidTypes.java @@ -8,9 +8,24 @@ public enum LiquidTypes @DescriptionAnnotation(description = "Cyan") Cyan(1), + @DescriptionAnnotation(description = "Red") + Red(7), + + @DescriptionAnnotation(description = "Transparent Ink") + TransparentInk(6), + @DescriptionAnnotation(description = "Magenta") Magenta(2), + @DescriptionAnnotation(description = "Lubricant") + Lubricant(5), + + @DescriptionAnnotation(description = "Yellow") + Yellow(2), + + @DescriptionAnnotation(description = "Black") + Black(4), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaConditions.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaConditions.java index 7fc83ad16..b083f111a 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaConditions.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaConditions.java @@ -4,6 +4,10 @@ import com.twine.tango.core.DescriptionAnnotation; public enum MediaConditions { + + @DescriptionAnnotation(description = "Treated") + Treated(1), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaMaterials.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaMaterials.java index ca2b458af..87c8313a9 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaMaterials.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaMaterials.java @@ -4,6 +4,10 @@ import com.twine.tango.core.DescriptionAnnotation; public enum MediaMaterials { + + @DescriptionAnnotation(description = "Nylon") + Nylon(1), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaPurposes.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaPurposes.java index 8cf72e8e0..ac68e56df 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaPurposes.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaPurposes.java @@ -4,6 +4,10 @@ import com.twine.tango.core.DescriptionAnnotation; public enum MediaPurposes { + + @DescriptionAnnotation(description = "Embroidery") + Embroidery(1), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MidTankTypes.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MidTankTypes.java new file mode 100644 index 000000000..a1122db40 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MidTankTypes.java @@ -0,0 +1,19 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum MidTankTypes +{ + + @DescriptionAnnotation(description = "Liter Tank 2") + LiterTank2(1), + + ; + + private int value; + + MidTankTypes(int value) + { + this.value = value; + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Permissions.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Permissions.java index b280489a4..b8c324466 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Permissions.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Permissions.java @@ -17,6 +17,9 @@ public enum Permissions @DescriptionAnnotation(description = "Allows loading the synchronization module in machine studio") RunSynchronizationModule(3), + @DescriptionAnnotation(description = "Allows loading the machine designer module in Machine Studio") + RunMachineDesignerModule(4), + ; private int value; diff --git a/Software/Android_Studio/Tango.DAL/src/main/res/raw/tangodb b/Software/Android_Studio/Tango.DAL/src/main/res/raw/tangodb index 12c88039d..147c930c6 100644 Binary files a/Software/Android_Studio/Tango.DAL/src/main/res/raw/tangodb and b/Software/Android_Studio/Tango.DAL/src/main/res/raw/tangodb differ diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java index 42b46a576..0b4c2fb97 100644 --- a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java @@ -20,6 +20,10 @@ public final class MessageTypeOuterClass { public enum MessageType implements com.google.protobuf.ProtocolMessageEnum { /** + *
+     *Common
+     * 
+ * * RGB = 0; */ RGB(0), @@ -211,10 +215,26 @@ public final class MessageTypeOuterClass { * KeepAliveResponse = 1008; */ KeepAliveResponse(1008), + /** + *
+     *Diagnostics
+     * 
+ * + * StartDiagnosticsRequest = 2000; + */ + StartDiagnosticsRequest(2000), + /** + * StartDiagnosticsResponse = 2001; + */ + StartDiagnosticsResponse(2001), UNRECOGNIZED(-1), ; /** + *
+     *Common
+     * 
+ * * RGB = 0; */ public static final int RGB_VALUE = 0; @@ -406,6 +426,18 @@ public final class MessageTypeOuterClass { * KeepAliveResponse = 1008; */ public static final int KeepAliveResponse_VALUE = 1008; + /** + *
+     *Diagnostics
+     * 
+ * + * StartDiagnosticsRequest = 2000; + */ + public static final int StartDiagnosticsRequest_VALUE = 2000; + /** + * StartDiagnosticsResponse = 2001; + */ + public static final int StartDiagnosticsResponse_VALUE = 2001; public final int getNumber() { @@ -472,6 +504,8 @@ public final class MessageTypeOuterClass { case 1006: return OverrideDataBaseResponse; case 1007: return KeepAliveRequest; case 1008: return KeepAliveResponse; + case 2000: return StartDiagnosticsRequest; + case 2001: return StartDiagnosticsResponse; default: return null; } } @@ -533,7 +567,7 @@ public final class MessageTypeOuterClass { descriptor; static { java.lang.String[] descriptorData = { - "\n\021MessageType.proto\022\020Tango.PMR.Common*\204\n" + + "\n\021MessageType.proto\022\020Tango.PMR.Common*\301\n" + "\n\013MessageType\022\007\n\003RGB\020\000\022\007\n\003Job\020\001\022\013\n\007Segme" + "nt\020\002\022\024\n\020CalculateRequest\020\003\022\025\n\021CalculateR" + "esponse\020\004\022\023\n\017ProgressRequest\020\005\022\024\n\020Progre" + @@ -566,8 +600,9 @@ public final class MessageTypeOuterClass { "ationResponse\020\354\007\022\034\n\027OverrideDataBaseRequ" + "est\020\355\007\022\035\n\030OverrideDataBaseResponse\020\356\007\022\025\n" + "\020KeepAliveRequest\020\357\007\022\026\n\021KeepAliveRespons" + - "e\020\360\007B\034\n\032com.twine.tango.pmr.commonb\006prot" + - "o3" + "e\020\360\007\022\034\n\027StartDiagnosticsRequest\020\320\017\022\035\n\030St" + + "artDiagnosticsResponse\020\321\017B\034\n\032com.twine.t" + + "ango.pmr.commonb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsRequestOuterClass.java new file mode 100644 index 000000000..f4d31c154 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsRequestOuterClass.java @@ -0,0 +1,635 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StartDiagnosticsRequest.proto + +package com.twine.tango.pmr.diagnostics; + +public final class StartDiagnosticsRequestOuterClass { + private StartDiagnosticsRequestOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface StartDiagnosticsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Diagnostics.StartDiagnosticsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * bool PushSensors = 1; + */ + boolean getPushSensors(); + + /** + * bool PushMotors = 2; + */ + boolean getPushMotors(); + + /** + * bool PushLogs = 3; + */ + boolean getPushLogs(); + } + /** + * Protobuf type {@code Tango.PMR.Diagnostics.StartDiagnosticsRequest} + */ + public static final class StartDiagnosticsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Diagnostics.StartDiagnosticsRequest) + StartDiagnosticsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartDiagnosticsRequest.newBuilder() to construct. + private StartDiagnosticsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StartDiagnosticsRequest() { + pushSensors_ = false; + pushMotors_ = false; + pushLogs_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StartDiagnosticsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + pushSensors_ = input.readBool(); + break; + } + case 16: { + + pushMotors_ = input.readBool(); + break; + } + case 24: { + + pushLogs_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest.class, com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest.Builder.class); + } + + public static final int PUSHSENSORS_FIELD_NUMBER = 1; + private boolean pushSensors_; + /** + * bool PushSensors = 1; + */ + public boolean getPushSensors() { + return pushSensors_; + } + + public static final int PUSHMOTORS_FIELD_NUMBER = 2; + private boolean pushMotors_; + /** + * bool PushMotors = 2; + */ + public boolean getPushMotors() { + return pushMotors_; + } + + public static final int PUSHLOGS_FIELD_NUMBER = 3; + private boolean pushLogs_; + /** + * bool PushLogs = 3; + */ + public boolean getPushLogs() { + return pushLogs_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (pushSensors_ != false) { + output.writeBool(1, pushSensors_); + } + if (pushMotors_ != false) { + output.writeBool(2, pushMotors_); + } + if (pushLogs_ != false) { + output.writeBool(3, pushLogs_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pushSensors_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, pushSensors_); + } + if (pushMotors_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, pushMotors_); + } + if (pushLogs_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, pushLogs_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest other = (com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest) obj; + + boolean result = true; + result = result && (getPushSensors() + == other.getPushSensors()); + result = result && (getPushMotors() + == other.getPushMotors()); + result = result && (getPushLogs() + == other.getPushLogs()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PUSHSENSORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushSensors()); + hash = (37 * hash) + PUSHMOTORS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushMotors()); + hash = (37 * hash) + PUSHLOGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushLogs()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Diagnostics.StartDiagnosticsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Diagnostics.StartDiagnosticsRequest) + com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest.class, com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pushSensors_ = false; + + pushMotors_ = false; + + pushLogs_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_descriptor; + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest build() { + com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest buildPartial() { + com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest result = new com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest(this); + result.pushSensors_ = pushSensors_; + result.pushMotors_ = pushMotors_; + result.pushLogs_ = pushLogs_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest) { + return mergeFrom((com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest other) { + if (other == com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest.getDefaultInstance()) return this; + if (other.getPushSensors() != false) { + setPushSensors(other.getPushSensors()); + } + if (other.getPushMotors() != false) { + setPushMotors(other.getPushMotors()); + } + if (other.getPushLogs() != false) { + setPushLogs(other.getPushLogs()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean pushSensors_ ; + /** + * bool PushSensors = 1; + */ + public boolean getPushSensors() { + return pushSensors_; + } + /** + * bool PushSensors = 1; + */ + public Builder setPushSensors(boolean value) { + + pushSensors_ = value; + onChanged(); + return this; + } + /** + * bool PushSensors = 1; + */ + public Builder clearPushSensors() { + + pushSensors_ = false; + onChanged(); + return this; + } + + private boolean pushMotors_ ; + /** + * bool PushMotors = 2; + */ + public boolean getPushMotors() { + return pushMotors_; + } + /** + * bool PushMotors = 2; + */ + public Builder setPushMotors(boolean value) { + + pushMotors_ = value; + onChanged(); + return this; + } + /** + * bool PushMotors = 2; + */ + public Builder clearPushMotors() { + + pushMotors_ = false; + onChanged(); + return this; + } + + private boolean pushLogs_ ; + /** + * bool PushLogs = 3; + */ + public boolean getPushLogs() { + return pushLogs_; + } + /** + * bool PushLogs = 3; + */ + public Builder setPushLogs(boolean value) { + + pushLogs_ = value; + onChanged(); + return this; + } + /** + * bool PushLogs = 3; + */ + public Builder clearPushLogs() { + + pushLogs_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Diagnostics.StartDiagnosticsRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Diagnostics.StartDiagnosticsRequest) + private static final com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest(); + } + + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StartDiagnosticsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartDiagnosticsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsRequestOuterClass.StartDiagnosticsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035StartDiagnosticsRequest.proto\022\025Tango.P" + + "MR.Diagnostics\"T\n\027StartDiagnosticsReques" + + "t\022\023\n\013PushSensors\030\001 \001(\010\022\022\n\nPushMotors\030\002 \001" + + "(\010\022\020\n\010PushLogs\030\003 \001(\010B!\n\037com.twine.tango." + + "pmr.diagnosticsb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsRequest_descriptor, + new java.lang.String[] { "PushSensors", "PushMotors", "PushLogs", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsResponseOuterClass.java new file mode 100644 index 000000000..fa5b736e1 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/diagnostics/StartDiagnosticsResponseOuterClass.java @@ -0,0 +1,782 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StartDiagnosticsResponse.proto + +package com.twine.tango.pmr.diagnostics; + +public final class StartDiagnosticsResponseOuterClass { + private StartDiagnosticsResponseOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface StartDiagnosticsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Diagnostics.StartDiagnosticsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated double Temperature = 1; + */ + java.util.List getTemperatureList(); + /** + * repeated double Temperature = 1; + */ + int getTemperatureCount(); + /** + * repeated double Temperature = 1; + */ + double getTemperature(int index); + + /** + * repeated double Velocity = 2; + */ + java.util.List getVelocityList(); + /** + * repeated double Velocity = 2; + */ + int getVelocityCount(); + /** + * repeated double Velocity = 2; + */ + double getVelocity(int index); + } + /** + * Protobuf type {@code Tango.PMR.Diagnostics.StartDiagnosticsResponse} + */ + public static final class StartDiagnosticsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Diagnostics.StartDiagnosticsResponse) + StartDiagnosticsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartDiagnosticsResponse.newBuilder() to construct. + private StartDiagnosticsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StartDiagnosticsResponse() { + temperature_ = java.util.Collections.emptyList(); + velocity_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StartDiagnosticsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 9: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + temperature_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + temperature_.add(input.readDouble()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { + temperature_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + temperature_.add(input.readDouble()); + } + input.popLimit(limit); + break; + } + case 17: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + velocity_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + velocity_.add(input.readDouble()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { + velocity_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + velocity_.add(input.readDouble()); + } + input.popLimit(limit); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + temperature_ = java.util.Collections.unmodifiableList(temperature_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + velocity_ = java.util.Collections.unmodifiableList(velocity_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse.class, com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse.Builder.class); + } + + public static final int TEMPERATURE_FIELD_NUMBER = 1; + private java.util.List temperature_; + /** + * repeated double Temperature = 1; + */ + public java.util.List + getTemperatureList() { + return temperature_; + } + /** + * repeated double Temperature = 1; + */ + public int getTemperatureCount() { + return temperature_.size(); + } + /** + * repeated double Temperature = 1; + */ + public double getTemperature(int index) { + return temperature_.get(index); + } + private int temperatureMemoizedSerializedSize = -1; + + public static final int VELOCITY_FIELD_NUMBER = 2; + private java.util.List velocity_; + /** + * repeated double Velocity = 2; + */ + public java.util.List + getVelocityList() { + return velocity_; + } + /** + * repeated double Velocity = 2; + */ + public int getVelocityCount() { + return velocity_.size(); + } + /** + * repeated double Velocity = 2; + */ + public double getVelocity(int index) { + return velocity_.get(index); + } + private int velocityMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getTemperatureList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(temperatureMemoizedSerializedSize); + } + for (int i = 0; i < temperature_.size(); i++) { + output.writeDoubleNoTag(temperature_.get(i)); + } + if (getVelocityList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(velocityMemoizedSerializedSize); + } + for (int i = 0; i < velocity_.size(); i++) { + output.writeDoubleNoTag(velocity_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + dataSize = 8 * getTemperatureList().size(); + size += dataSize; + if (!getTemperatureList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + temperatureMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + dataSize = 8 * getVelocityList().size(); + size += dataSize; + if (!getVelocityList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + velocityMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse other = (com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse) obj; + + boolean result = true; + result = result && getTemperatureList() + .equals(other.getTemperatureList()); + result = result && getVelocityList() + .equals(other.getVelocityList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTemperatureCount() > 0) { + hash = (37 * hash) + TEMPERATURE_FIELD_NUMBER; + hash = (53 * hash) + getTemperatureList().hashCode(); + } + if (getVelocityCount() > 0) { + hash = (37 * hash) + VELOCITY_FIELD_NUMBER; + hash = (53 * hash) + getVelocityList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Diagnostics.StartDiagnosticsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Diagnostics.StartDiagnosticsResponse) + com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse.class, com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + temperature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + velocity_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_descriptor; + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse build() { + com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse buildPartial() { + com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse result = new com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + temperature_ = java.util.Collections.unmodifiableList(temperature_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.temperature_ = temperature_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + velocity_ = java.util.Collections.unmodifiableList(velocity_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.velocity_ = velocity_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse) { + return mergeFrom((com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse other) { + if (other == com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse.getDefaultInstance()) return this; + if (!other.temperature_.isEmpty()) { + if (temperature_.isEmpty()) { + temperature_ = other.temperature_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTemperatureIsMutable(); + temperature_.addAll(other.temperature_); + } + onChanged(); + } + if (!other.velocity_.isEmpty()) { + if (velocity_.isEmpty()) { + velocity_ = other.velocity_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureVelocityIsMutable(); + velocity_.addAll(other.velocity_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List temperature_ = java.util.Collections.emptyList(); + private void ensureTemperatureIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + temperature_ = new java.util.ArrayList(temperature_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated double Temperature = 1; + */ + public java.util.List + getTemperatureList() { + return java.util.Collections.unmodifiableList(temperature_); + } + /** + * repeated double Temperature = 1; + */ + public int getTemperatureCount() { + return temperature_.size(); + } + /** + * repeated double Temperature = 1; + */ + public double getTemperature(int index) { + return temperature_.get(index); + } + /** + * repeated double Temperature = 1; + */ + public Builder setTemperature( + int index, double value) { + ensureTemperatureIsMutable(); + temperature_.set(index, value); + onChanged(); + return this; + } + /** + * repeated double Temperature = 1; + */ + public Builder addTemperature(double value) { + ensureTemperatureIsMutable(); + temperature_.add(value); + onChanged(); + return this; + } + /** + * repeated double Temperature = 1; + */ + public Builder addAllTemperature( + java.lang.Iterable values) { + ensureTemperatureIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, temperature_); + onChanged(); + return this; + } + /** + * repeated double Temperature = 1; + */ + public Builder clearTemperature() { + temperature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List velocity_ = java.util.Collections.emptyList(); + private void ensureVelocityIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + velocity_ = new java.util.ArrayList(velocity_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated double Velocity = 2; + */ + public java.util.List + getVelocityList() { + return java.util.Collections.unmodifiableList(velocity_); + } + /** + * repeated double Velocity = 2; + */ + public int getVelocityCount() { + return velocity_.size(); + } + /** + * repeated double Velocity = 2; + */ + public double getVelocity(int index) { + return velocity_.get(index); + } + /** + * repeated double Velocity = 2; + */ + public Builder setVelocity( + int index, double value) { + ensureVelocityIsMutable(); + velocity_.set(index, value); + onChanged(); + return this; + } + /** + * repeated double Velocity = 2; + */ + public Builder addVelocity(double value) { + ensureVelocityIsMutable(); + velocity_.add(value); + onChanged(); + return this; + } + /** + * repeated double Velocity = 2; + */ + public Builder addAllVelocity( + java.lang.Iterable values) { + ensureVelocityIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, velocity_); + onChanged(); + return this; + } + /** + * repeated double Velocity = 2; + */ + public Builder clearVelocity() { + velocity_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Diagnostics.StartDiagnosticsResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Diagnostics.StartDiagnosticsResponse) + private static final com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse(); + } + + public static com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StartDiagnosticsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartDiagnosticsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.diagnostics.StartDiagnosticsResponseOuterClass.StartDiagnosticsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\036StartDiagnosticsResponse.proto\022\025Tango." + + "PMR.Diagnostics\"A\n\030StartDiagnosticsRespo" + + "nse\022\023\n\013Temperature\030\001 \003(\001\022\020\n\010Velocity\030\002 \003" + + "(\001B!\n\037com.twine.tango.pmr.diagnosticsb\006p" + + "roto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Diagnostics_StartDiagnosticsResponse_descriptor, + new java.lang.String[] { "Temperature", "Velocity", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Dispenser.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Dispenser.java new file mode 100644 index 000000000..e1193c8d3 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Dispenser.java @@ -0,0 +1,1406 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dispenser.proto + +package com.twine.tango.pmr.jobs; + +public final class Dispenser { + private Dispenser() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface gradientFlowOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Jobs.gradientFlow) + com.google.protobuf.MessageOrBuilder { + + /** + * double NLflow = 1; + */ + double getNLflow(); + } + /** + * Protobuf type {@code Tango.PMR.Jobs.gradientFlow} + */ + public static final class gradientFlow extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Jobs.gradientFlow) + gradientFlowOrBuilder { + private static final long serialVersionUID = 0L; + // Use gradientFlow.newBuilder() to construct. + private gradientFlow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private gradientFlow() { + nLflow_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private gradientFlow( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 9: { + + nLflow_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_gradientFlow_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_gradientFlow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.Dispenser.gradientFlow.class, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder.class); + } + + public static final int NLFLOW_FIELD_NUMBER = 1; + private double nLflow_; + /** + * double NLflow = 1; + */ + public double getNLflow() { + return nLflow_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (nLflow_ != 0D) { + output.writeDouble(1, nLflow_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nLflow_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, nLflow_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.jobs.Dispenser.gradientFlow)) { + return super.equals(obj); + } + com.twine.tango.pmr.jobs.Dispenser.gradientFlow other = (com.twine.tango.pmr.jobs.Dispenser.gradientFlow) obj; + + boolean result = true; + result = result && ( + java.lang.Double.doubleToLongBits(getNLflow()) + == java.lang.Double.doubleToLongBits( + other.getNLflow())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NLFLOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getNLflow())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.jobs.Dispenser.gradientFlow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Jobs.gradientFlow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Jobs.gradientFlow) + com.twine.tango.pmr.jobs.Dispenser.gradientFlowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_gradientFlow_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_gradientFlow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.Dispenser.gradientFlow.class, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder.class); + } + + // Construct using com.twine.tango.pmr.jobs.Dispenser.gradientFlow.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + nLflow_ = 0D; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_gradientFlow_descriptor; + } + + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow getDefaultInstanceForType() { + return com.twine.tango.pmr.jobs.Dispenser.gradientFlow.getDefaultInstance(); + } + + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow build() { + com.twine.tango.pmr.jobs.Dispenser.gradientFlow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow buildPartial() { + com.twine.tango.pmr.jobs.Dispenser.gradientFlow result = new com.twine.tango.pmr.jobs.Dispenser.gradientFlow(this); + result.nLflow_ = nLflow_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.jobs.Dispenser.gradientFlow) { + return mergeFrom((com.twine.tango.pmr.jobs.Dispenser.gradientFlow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.jobs.Dispenser.gradientFlow other) { + if (other == com.twine.tango.pmr.jobs.Dispenser.gradientFlow.getDefaultInstance()) return this; + if (other.getNLflow() != 0D) { + setNLflow(other.getNLflow()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.jobs.Dispenser.gradientFlow parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.jobs.Dispenser.gradientFlow) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double nLflow_ ; + /** + * double NLflow = 1; + */ + public double getNLflow() { + return nLflow_; + } + /** + * double NLflow = 1; + */ + public Builder setNLflow(double value) { + + nLflow_ = value; + onChanged(); + return this; + } + /** + * double NLflow = 1; + */ + public Builder clearNLflow() { + + nLflow_ = 0D; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Jobs.gradientFlow) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.gradientFlow) + private static final com.twine.tango.pmr.jobs.Dispenser.gradientFlow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.jobs.Dispenser.gradientFlow(); + } + + public static com.twine.tango.pmr.jobs.Dispenser.gradientFlow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public gradientFlow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new gradientFlow(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DispenseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Jobs.Dispense) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 Id = 1; + */ + int getId(); + + /** + * double startFlow = 2; + */ + double getStartFlow(); + + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + java.util.List + getGradientList(); + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + com.twine.tango.pmr.jobs.Dispenser.gradientFlow getGradient(int index); + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + int getGradientCount(); + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + java.util.List + getGradientOrBuilderList(); + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + com.twine.tango.pmr.jobs.Dispenser.gradientFlowOrBuilder getGradientOrBuilder( + int index); + } + /** + * Protobuf type {@code Tango.PMR.Jobs.Dispense} + */ + public static final class Dispense extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Jobs.Dispense) + DispenseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Dispense.newBuilder() to construct. + private Dispense(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Dispense() { + id_ = 0; + startFlow_ = 0D; + gradient_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Dispense( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + id_ = input.readInt32(); + break; + } + case 17: { + + startFlow_ = input.readDouble(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + gradient_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + gradient_.add( + input.readMessage(com.twine.tango.pmr.jobs.Dispenser.gradientFlow.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + gradient_ = java.util.Collections.unmodifiableList(gradient_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_Dispense_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_Dispense_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.Dispenser.Dispense.class, com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder.class); + } + + private int bitField0_; + public static final int ID_FIELD_NUMBER = 1; + private int id_; + /** + * int32 Id = 1; + */ + public int getId() { + return id_; + } + + public static final int STARTFLOW_FIELD_NUMBER = 2; + private double startFlow_; + /** + * double startFlow = 2; + */ + public double getStartFlow() { + return startFlow_; + } + + public static final int GRADIENT_FIELD_NUMBER = 3; + private java.util.List gradient_; + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public java.util.List getGradientList() { + return gradient_; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public java.util.List + getGradientOrBuilderList() { + return gradient_; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public int getGradientCount() { + return gradient_.size(); + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow getGradient(int index) { + return gradient_.get(index); + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public com.twine.tango.pmr.jobs.Dispenser.gradientFlowOrBuilder getGradientOrBuilder( + int index) { + return gradient_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0) { + output.writeInt32(1, id_); + } + if (startFlow_ != 0D) { + output.writeDouble(2, startFlow_); + } + for (int i = 0; i < gradient_.size(); i++) { + output.writeMessage(3, gradient_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, id_); + } + if (startFlow_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, startFlow_); + } + for (int i = 0; i < gradient_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, gradient_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.jobs.Dispenser.Dispense)) { + return super.equals(obj); + } + com.twine.tango.pmr.jobs.Dispenser.Dispense other = (com.twine.tango.pmr.jobs.Dispenser.Dispense) obj; + + boolean result = true; + result = result && (getId() + == other.getId()); + result = result && ( + java.lang.Double.doubleToLongBits(getStartFlow()) + == java.lang.Double.doubleToLongBits( + other.getStartFlow())); + result = result && getGradientList() + .equals(other.getGradientList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (37 * hash) + STARTFLOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getStartFlow())); + if (getGradientCount() > 0) { + hash = (37 * hash) + GRADIENT_FIELD_NUMBER; + hash = (53 * hash) + getGradientList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Dispenser.Dispense parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.jobs.Dispenser.Dispense prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Jobs.Dispense} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Jobs.Dispense) + com.twine.tango.pmr.jobs.Dispenser.DispenseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_Dispense_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_Dispense_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.Dispenser.Dispense.class, com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder.class); + } + + // Construct using com.twine.tango.pmr.jobs.Dispenser.Dispense.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getGradientFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + id_ = 0; + + startFlow_ = 0D; + + if (gradientBuilder_ == null) { + gradient_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + gradientBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.jobs.Dispenser.internal_static_Tango_PMR_Jobs_Dispense_descriptor; + } + + public com.twine.tango.pmr.jobs.Dispenser.Dispense getDefaultInstanceForType() { + return com.twine.tango.pmr.jobs.Dispenser.Dispense.getDefaultInstance(); + } + + public com.twine.tango.pmr.jobs.Dispenser.Dispense build() { + com.twine.tango.pmr.jobs.Dispenser.Dispense result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.jobs.Dispenser.Dispense buildPartial() { + com.twine.tango.pmr.jobs.Dispenser.Dispense result = new com.twine.tango.pmr.jobs.Dispenser.Dispense(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.id_ = id_; + result.startFlow_ = startFlow_; + if (gradientBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + gradient_ = java.util.Collections.unmodifiableList(gradient_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.gradient_ = gradient_; + } else { + result.gradient_ = gradientBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.jobs.Dispenser.Dispense) { + return mergeFrom((com.twine.tango.pmr.jobs.Dispenser.Dispense)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.jobs.Dispenser.Dispense other) { + if (other == com.twine.tango.pmr.jobs.Dispenser.Dispense.getDefaultInstance()) return this; + if (other.getId() != 0) { + setId(other.getId()); + } + if (other.getStartFlow() != 0D) { + setStartFlow(other.getStartFlow()); + } + if (gradientBuilder_ == null) { + if (!other.gradient_.isEmpty()) { + if (gradient_.isEmpty()) { + gradient_ = other.gradient_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureGradientIsMutable(); + gradient_.addAll(other.gradient_); + } + onChanged(); + } + } else { + if (!other.gradient_.isEmpty()) { + if (gradientBuilder_.isEmpty()) { + gradientBuilder_.dispose(); + gradientBuilder_ = null; + gradient_ = other.gradient_; + bitField0_ = (bitField0_ & ~0x00000004); + gradientBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGradientFieldBuilder() : null; + } else { + gradientBuilder_.addAllMessages(other.gradient_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.jobs.Dispenser.Dispense parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.jobs.Dispenser.Dispense) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int id_ ; + /** + * int32 Id = 1; + */ + public int getId() { + return id_; + } + /** + * int32 Id = 1; + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + * int32 Id = 1; + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private double startFlow_ ; + /** + * double startFlow = 2; + */ + public double getStartFlow() { + return startFlow_; + } + /** + * double startFlow = 2; + */ + public Builder setStartFlow(double value) { + + startFlow_ = value; + onChanged(); + return this; + } + /** + * double startFlow = 2; + */ + public Builder clearStartFlow() { + + startFlow_ = 0D; + onChanged(); + return this; + } + + private java.util.List gradient_ = + java.util.Collections.emptyList(); + private void ensureGradientIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + gradient_ = new java.util.ArrayList(gradient_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Dispenser.gradientFlow, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder, com.twine.tango.pmr.jobs.Dispenser.gradientFlowOrBuilder> gradientBuilder_; + + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public java.util.List getGradientList() { + if (gradientBuilder_ == null) { + return java.util.Collections.unmodifiableList(gradient_); + } else { + return gradientBuilder_.getMessageList(); + } + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public int getGradientCount() { + if (gradientBuilder_ == null) { + return gradient_.size(); + } else { + return gradientBuilder_.getCount(); + } + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow getGradient(int index) { + if (gradientBuilder_ == null) { + return gradient_.get(index); + } else { + return gradientBuilder_.getMessage(index); + } + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder setGradient( + int index, com.twine.tango.pmr.jobs.Dispenser.gradientFlow value) { + if (gradientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradientIsMutable(); + gradient_.set(index, value); + onChanged(); + } else { + gradientBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder setGradient( + int index, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder builderForValue) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.set(index, builderForValue.build()); + onChanged(); + } else { + gradientBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder addGradient(com.twine.tango.pmr.jobs.Dispenser.gradientFlow value) { + if (gradientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradientIsMutable(); + gradient_.add(value); + onChanged(); + } else { + gradientBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder addGradient( + int index, com.twine.tango.pmr.jobs.Dispenser.gradientFlow value) { + if (gradientBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradientIsMutable(); + gradient_.add(index, value); + onChanged(); + } else { + gradientBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder addGradient( + com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder builderForValue) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.add(builderForValue.build()); + onChanged(); + } else { + gradientBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder addGradient( + int index, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder builderForValue) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.add(index, builderForValue.build()); + onChanged(); + } else { + gradientBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder addAllGradient( + java.lang.Iterable values) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, gradient_); + onChanged(); + } else { + gradientBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder clearGradient() { + if (gradientBuilder_ == null) { + gradient_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + gradientBuilder_.clear(); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public Builder removeGradient(int index) { + if (gradientBuilder_ == null) { + ensureGradientIsMutable(); + gradient_.remove(index); + onChanged(); + } else { + gradientBuilder_.remove(index); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder getGradientBuilder( + int index) { + return getGradientFieldBuilder().getBuilder(index); + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public com.twine.tango.pmr.jobs.Dispenser.gradientFlowOrBuilder getGradientOrBuilder( + int index) { + if (gradientBuilder_ == null) { + return gradient_.get(index); } else { + return gradientBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public java.util.List + getGradientOrBuilderList() { + if (gradientBuilder_ != null) { + return gradientBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(gradient_); + } + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder addGradientBuilder() { + return getGradientFieldBuilder().addBuilder( + com.twine.tango.pmr.jobs.Dispenser.gradientFlow.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder addGradientBuilder( + int index) { + return getGradientFieldBuilder().addBuilder( + index, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.gradientFlow gradient = 3; + */ + public java.util.List + getGradientBuilderList() { + return getGradientFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Dispenser.gradientFlow, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder, com.twine.tango.pmr.jobs.Dispenser.gradientFlowOrBuilder> + getGradientFieldBuilder() { + if (gradientBuilder_ == null) { + gradientBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Dispenser.gradientFlow, com.twine.tango.pmr.jobs.Dispenser.gradientFlow.Builder, com.twine.tango.pmr.jobs.Dispenser.gradientFlowOrBuilder>( + gradient_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + gradient_ = null; + } + return gradientBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Jobs.Dispense) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.Dispense) + private static final com.twine.tango.pmr.jobs.Dispenser.Dispense DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.jobs.Dispenser.Dispense(); + } + + public static com.twine.tango.pmr.jobs.Dispenser.Dispense getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Dispense parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Dispense(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.jobs.Dispenser.Dispense getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Jobs_gradientFlow_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Jobs_gradientFlow_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Jobs_Dispense_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Jobs_Dispense_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017dispenser.proto\022\016Tango.PMR.Jobs\"\036\n\014gra" + + "dientFlow\022\016\n\006NLflow\030\001 \001(\001\"Y\n\010Dispense\022\n\n" + + "\002Id\030\001 \001(\005\022\021\n\tstartFlow\030\002 \001(\001\022.\n\010gradient" + + "\030\003 \003(\0132\034.Tango.PMR.Jobs.gradientFlowB\032\n\030" + + "com.twine.tango.pmr.jobsb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Tango_PMR_Jobs_gradientFlow_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Jobs_gradientFlow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Jobs_gradientFlow_descriptor, + new java.lang.String[] { "NLflow", }); + internal_static_Tango_PMR_Jobs_Dispense_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_Tango_PMR_Jobs_Dispense_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Jobs_Dispense_descriptor, + new java.lang.String[] { "Id", "StartFlow", "Gradient", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java index 79c17d6a8..08cd603b0 100644 --- a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/JobOuterClass.java @@ -29,28 +29,104 @@ public final class JobOuterClass { getNameBytes(); /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + *
+     *does user have chosen inter segment enable option
+     * 
+ * + * bool interSegEnable = 2; + */ + boolean getInterSegEnable(); + + /** + *
+     *does user have chosen distanse to spool enable option
+     * 
+ * + * bool distanseToSpoolEnable = 3; + */ + boolean getDistanseToSpoolEnable(); + + /** + *
+     *had distance to spool finished?
+     * 
+ * + * uint32 distanceToSpoolLength = 4; + */ + int getDistanceToSpoolLength(); + + /** + *
+     *repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+     *SCREW:
+     * 
+ * + * uint32 startOffsetPulses = 5; + */ + int getStartOffsetPulses(); + + /** + * uint32 spoolBackingRate = 6; + */ + int getSpoolBackingRate(); + + /** + * uint32 segmentOffsetPulses = 7; + */ + int getSegmentOffsetPulses(); + + /** + * uint32 milimetersPerRotation = 8; + */ + int getMilimetersPerRotation(); + + /** + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ java.util.List getSegmentsList(); /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getSegments(int index); /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ int getSegmentsCount(); /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ java.util.List getSegmentsOrBuilderList(); /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( int index); + + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + java.util.List + getMotorsList(); + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + com.twine.tango.pmr.jobs.Motor.MotorConfig getMotors(int index); + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + int getMotorsCount(); + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + java.util.List + getMotorsOrBuilderList(); + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + com.twine.tango.pmr.jobs.Motor.MotorConfigOrBuilder getMotorsOrBuilder( + int index); } /** * Protobuf type {@code Tango.PMR.Jobs.Job} @@ -66,7 +142,15 @@ public final class JobOuterClass { } private Job() { name_ = ""; + interSegEnable_ = false; + distanseToSpoolEnable_ = false; + distanceToSpoolLength_ = 0; + startOffsetPulses_ = 0; + spoolBackingRate_ = 0; + segmentOffsetPulses_ = 0; + milimetersPerRotation_ = 0; segments_ = java.util.Collections.emptyList(); + motors_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -103,15 +187,59 @@ public final class JobOuterClass { name_ = s; break; } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + case 16: { + + interSegEnable_ = input.readBool(); + break; + } + case 24: { + + distanseToSpoolEnable_ = input.readBool(); + break; + } + case 32: { + + distanceToSpoolLength_ = input.readUInt32(); + break; + } + case 40: { + + startOffsetPulses_ = input.readUInt32(); + break; + } + case 48: { + + spoolBackingRate_ = input.readUInt32(); + break; + } + case 56: { + + segmentOffsetPulses_ = input.readUInt32(); + break; + } + case 64: { + + milimetersPerRotation_ = input.readUInt32(); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { segments_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; + mutable_bitField0_ |= 0x00000100; } segments_.add( input.readMessage(com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.parser(), extensionRegistry)); break; } + case 82: { + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + motors_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000200; + } + motors_.add( + input.readMessage(com.twine.tango.pmr.jobs.Motor.MotorConfig.parser(), extensionRegistry)); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -120,9 +248,12 @@ public final class JobOuterClass { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { segments_ = java.util.Collections.unmodifiableList(segments_); } + if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + motors_ = java.util.Collections.unmodifiableList(motors_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -174,41 +305,156 @@ public final class JobOuterClass { } } - public static final int SEGMENTS_FIELD_NUMBER = 2; + public static final int INTERSEGENABLE_FIELD_NUMBER = 2; + private boolean interSegEnable_; + /** + *
+     *does user have chosen inter segment enable option
+     * 
+ * + * bool interSegEnable = 2; + */ + public boolean getInterSegEnable() { + return interSegEnable_; + } + + public static final int DISTANSETOSPOOLENABLE_FIELD_NUMBER = 3; + private boolean distanseToSpoolEnable_; + /** + *
+     *does user have chosen distanse to spool enable option
+     * 
+ * + * bool distanseToSpoolEnable = 3; + */ + public boolean getDistanseToSpoolEnable() { + return distanseToSpoolEnable_; + } + + public static final int DISTANCETOSPOOLLENGTH_FIELD_NUMBER = 4; + private int distanceToSpoolLength_; + /** + *
+     *had distance to spool finished?
+     * 
+ * + * uint32 distanceToSpoolLength = 4; + */ + public int getDistanceToSpoolLength() { + return distanceToSpoolLength_; + } + + public static final int STARTOFFSETPULSES_FIELD_NUMBER = 5; + private int startOffsetPulses_; + /** + *
+     *repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+     *SCREW:
+     * 
+ * + * uint32 startOffsetPulses = 5; + */ + public int getStartOffsetPulses() { + return startOffsetPulses_; + } + + public static final int SPOOLBACKINGRATE_FIELD_NUMBER = 6; + private int spoolBackingRate_; + /** + * uint32 spoolBackingRate = 6; + */ + public int getSpoolBackingRate() { + return spoolBackingRate_; + } + + public static final int SEGMENTOFFSETPULSES_FIELD_NUMBER = 7; + private int segmentOffsetPulses_; + /** + * uint32 segmentOffsetPulses = 7; + */ + public int getSegmentOffsetPulses() { + return segmentOffsetPulses_; + } + + public static final int MILIMETERSPERROTATION_FIELD_NUMBER = 8; + private int milimetersPerRotation_; + /** + * uint32 milimetersPerRotation = 8; + */ + public int getMilimetersPerRotation() { + return milimetersPerRotation_; + } + + public static final int SEGMENTS_FIELD_NUMBER = 9; private java.util.List segments_; /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public java.util.List getSegmentsList() { return segments_; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public java.util.List getSegmentsOrBuilderList() { return segments_; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public int getSegmentsCount() { return segments_.size(); } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getSegments(int index) { return segments_.get(index); } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( int index) { return segments_.get(index); } + public static final int MOTORS_FIELD_NUMBER = 10; + private java.util.List motors_; + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public java.util.List getMotorsList() { + return motors_; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public java.util.List + getMotorsOrBuilderList() { + return motors_; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public int getMotorsCount() { + return motors_.size(); + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public com.twine.tango.pmr.jobs.Motor.MotorConfig getMotors(int index) { + return motors_.get(index); + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public com.twine.tango.pmr.jobs.Motor.MotorConfigOrBuilder getMotorsOrBuilder( + int index) { + return motors_.get(index); + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -224,8 +470,32 @@ public final class JobOuterClass { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + if (interSegEnable_ != false) { + output.writeBool(2, interSegEnable_); + } + if (distanseToSpoolEnable_ != false) { + output.writeBool(3, distanseToSpoolEnable_); + } + if (distanceToSpoolLength_ != 0) { + output.writeUInt32(4, distanceToSpoolLength_); + } + if (startOffsetPulses_ != 0) { + output.writeUInt32(5, startOffsetPulses_); + } + if (spoolBackingRate_ != 0) { + output.writeUInt32(6, spoolBackingRate_); + } + if (segmentOffsetPulses_ != 0) { + output.writeUInt32(7, segmentOffsetPulses_); + } + if (milimetersPerRotation_ != 0) { + output.writeUInt32(8, milimetersPerRotation_); + } for (int i = 0; i < segments_.size(); i++) { - output.writeMessage(2, segments_.get(i)); + output.writeMessage(9, segments_.get(i)); + } + for (int i = 0; i < motors_.size(); i++) { + output.writeMessage(10, motors_.get(i)); } unknownFields.writeTo(output); } @@ -238,9 +508,41 @@ public final class JobOuterClass { if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + if (interSegEnable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, interSegEnable_); + } + if (distanseToSpoolEnable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, distanseToSpoolEnable_); + } + if (distanceToSpoolLength_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, distanceToSpoolLength_); + } + if (startOffsetPulses_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, startOffsetPulses_); + } + if (spoolBackingRate_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, spoolBackingRate_); + } + if (segmentOffsetPulses_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, segmentOffsetPulses_); + } + if (milimetersPerRotation_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, milimetersPerRotation_); + } for (int i = 0; i < segments_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, segments_.get(i)); + .computeMessageSize(9, segments_.get(i)); + } + for (int i = 0; i < motors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, motors_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -260,8 +562,24 @@ public final class JobOuterClass { boolean result = true; result = result && getName() .equals(other.getName()); + result = result && (getInterSegEnable() + == other.getInterSegEnable()); + result = result && (getDistanseToSpoolEnable() + == other.getDistanseToSpoolEnable()); + result = result && (getDistanceToSpoolLength() + == other.getDistanceToSpoolLength()); + result = result && (getStartOffsetPulses() + == other.getStartOffsetPulses()); + result = result && (getSpoolBackingRate() + == other.getSpoolBackingRate()); + result = result && (getSegmentOffsetPulses() + == other.getSegmentOffsetPulses()); + result = result && (getMilimetersPerRotation() + == other.getMilimetersPerRotation()); result = result && getSegmentsList() .equals(other.getSegmentsList()); + result = result && getMotorsList() + .equals(other.getMotorsList()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -275,10 +593,30 @@ public final class JobOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + INTERSEGENABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getInterSegEnable()); + hash = (37 * hash) + DISTANSETOSPOOLENABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDistanseToSpoolEnable()); + hash = (37 * hash) + DISTANCETOSPOOLLENGTH_FIELD_NUMBER; + hash = (53 * hash) + getDistanceToSpoolLength(); + hash = (37 * hash) + STARTOFFSETPULSES_FIELD_NUMBER; + hash = (53 * hash) + getStartOffsetPulses(); + hash = (37 * hash) + SPOOLBACKINGRATE_FIELD_NUMBER; + hash = (53 * hash) + getSpoolBackingRate(); + hash = (37 * hash) + SEGMENTOFFSETPULSES_FIELD_NUMBER; + hash = (53 * hash) + getSegmentOffsetPulses(); + hash = (37 * hash) + MILIMETERSPERROTATION_FIELD_NUMBER; + hash = (53 * hash) + getMilimetersPerRotation(); if (getSegmentsCount() > 0) { hash = (37 * hash) + SEGMENTS_FIELD_NUMBER; hash = (53 * hash) + getSegmentsList().hashCode(); } + if (getMotorsCount() > 0) { + hash = (37 * hash) + MOTORS_FIELD_NUMBER; + hash = (53 * hash) + getMotorsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -405,18 +743,39 @@ public final class JobOuterClass { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getSegmentsFieldBuilder(); + getMotorsFieldBuilder(); } } public Builder clear() { super.clear(); name_ = ""; + interSegEnable_ = false; + + distanseToSpoolEnable_ = false; + + distanceToSpoolLength_ = 0; + + startOffsetPulses_ = 0; + + spoolBackingRate_ = 0; + + segmentOffsetPulses_ = 0; + + milimetersPerRotation_ = 0; + if (segmentsBuilder_ == null) { segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000100); } else { segmentsBuilder_.clear(); } + if (motorsBuilder_ == null) { + motors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + } else { + motorsBuilder_.clear(); + } return this; } @@ -442,15 +801,31 @@ public final class JobOuterClass { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; + result.interSegEnable_ = interSegEnable_; + result.distanseToSpoolEnable_ = distanseToSpoolEnable_; + result.distanceToSpoolLength_ = distanceToSpoolLength_; + result.startOffsetPulses_ = startOffsetPulses_; + result.spoolBackingRate_ = spoolBackingRate_; + result.segmentOffsetPulses_ = segmentOffsetPulses_; + result.milimetersPerRotation_ = milimetersPerRotation_; if (segmentsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { segments_ = java.util.Collections.unmodifiableList(segments_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000100); } result.segments_ = segments_; } else { result.segments_ = segmentsBuilder_.build(); } + if (motorsBuilder_ == null) { + if (((bitField0_ & 0x00000200) == 0x00000200)) { + motors_ = java.util.Collections.unmodifiableList(motors_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.motors_ = motors_; + } else { + result.motors_ = motorsBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -497,11 +872,32 @@ public final class JobOuterClass { name_ = other.name_; onChanged(); } + if (other.getInterSegEnable() != false) { + setInterSegEnable(other.getInterSegEnable()); + } + if (other.getDistanseToSpoolEnable() != false) { + setDistanseToSpoolEnable(other.getDistanseToSpoolEnable()); + } + if (other.getDistanceToSpoolLength() != 0) { + setDistanceToSpoolLength(other.getDistanceToSpoolLength()); + } + if (other.getStartOffsetPulses() != 0) { + setStartOffsetPulses(other.getStartOffsetPulses()); + } + if (other.getSpoolBackingRate() != 0) { + setSpoolBackingRate(other.getSpoolBackingRate()); + } + if (other.getSegmentOffsetPulses() != 0) { + setSegmentOffsetPulses(other.getSegmentOffsetPulses()); + } + if (other.getMilimetersPerRotation() != 0) { + setMilimetersPerRotation(other.getMilimetersPerRotation()); + } if (segmentsBuilder_ == null) { if (!other.segments_.isEmpty()) { if (segments_.isEmpty()) { segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensureSegmentsIsMutable(); segments_.addAll(other.segments_); @@ -514,7 +910,7 @@ public final class JobOuterClass { segmentsBuilder_.dispose(); segmentsBuilder_ = null; segments_ = other.segments_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000100); segmentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSegmentsFieldBuilder() : null; @@ -523,6 +919,32 @@ public final class JobOuterClass { } } } + if (motorsBuilder_ == null) { + if (!other.motors_.isEmpty()) { + if (motors_.isEmpty()) { + motors_ = other.motors_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureMotorsIsMutable(); + motors_.addAll(other.motors_); + } + onChanged(); + } + } else { + if (!other.motors_.isEmpty()) { + if (motorsBuilder_.isEmpty()) { + motorsBuilder_.dispose(); + motorsBuilder_ = null; + motors_ = other.motors_; + bitField0_ = (bitField0_ & ~0x00000200); + motorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMotorsFieldBuilder() : null; + } else { + motorsBuilder_.addAllMessages(other.motors_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -620,12 +1042,245 @@ public final class JobOuterClass { return this; } + private boolean interSegEnable_ ; + /** + *
+       *does user have chosen inter segment enable option
+       * 
+ * + * bool interSegEnable = 2; + */ + public boolean getInterSegEnable() { + return interSegEnable_; + } + /** + *
+       *does user have chosen inter segment enable option
+       * 
+ * + * bool interSegEnable = 2; + */ + public Builder setInterSegEnable(boolean value) { + + interSegEnable_ = value; + onChanged(); + return this; + } + /** + *
+       *does user have chosen inter segment enable option
+       * 
+ * + * bool interSegEnable = 2; + */ + public Builder clearInterSegEnable() { + + interSegEnable_ = false; + onChanged(); + return this; + } + + private boolean distanseToSpoolEnable_ ; + /** + *
+       *does user have chosen distanse to spool enable option
+       * 
+ * + * bool distanseToSpoolEnable = 3; + */ + public boolean getDistanseToSpoolEnable() { + return distanseToSpoolEnable_; + } + /** + *
+       *does user have chosen distanse to spool enable option
+       * 
+ * + * bool distanseToSpoolEnable = 3; + */ + public Builder setDistanseToSpoolEnable(boolean value) { + + distanseToSpoolEnable_ = value; + onChanged(); + return this; + } + /** + *
+       *does user have chosen distanse to spool enable option
+       * 
+ * + * bool distanseToSpoolEnable = 3; + */ + public Builder clearDistanseToSpoolEnable() { + + distanseToSpoolEnable_ = false; + onChanged(); + return this; + } + + private int distanceToSpoolLength_ ; + /** + *
+       *had distance to spool finished?
+       * 
+ * + * uint32 distanceToSpoolLength = 4; + */ + public int getDistanceToSpoolLength() { + return distanceToSpoolLength_; + } + /** + *
+       *had distance to spool finished?
+       * 
+ * + * uint32 distanceToSpoolLength = 4; + */ + public Builder setDistanceToSpoolLength(int value) { + + distanceToSpoolLength_ = value; + onChanged(); + return this; + } + /** + *
+       *had distance to spool finished?
+       * 
+ * + * uint32 distanceToSpoolLength = 4; + */ + public Builder clearDistanceToSpoolLength() { + + distanceToSpoolLength_ = 0; + onChanged(); + return this; + } + + private int startOffsetPulses_ ; + /** + *
+       *repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+       *SCREW:
+       * 
+ * + * uint32 startOffsetPulses = 5; + */ + public int getStartOffsetPulses() { + return startOffsetPulses_; + } + /** + *
+       *repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+       *SCREW:
+       * 
+ * + * uint32 startOffsetPulses = 5; + */ + public Builder setStartOffsetPulses(int value) { + + startOffsetPulses_ = value; + onChanged(); + return this; + } + /** + *
+       *repeated temperatureSensorsSetting[Dryer,Head, Mixer]; //temp sensor wanted temperaure in celzius
+       *SCREW:
+       * 
+ * + * uint32 startOffsetPulses = 5; + */ + public Builder clearStartOffsetPulses() { + + startOffsetPulses_ = 0; + onChanged(); + return this; + } + + private int spoolBackingRate_ ; + /** + * uint32 spoolBackingRate = 6; + */ + public int getSpoolBackingRate() { + return spoolBackingRate_; + } + /** + * uint32 spoolBackingRate = 6; + */ + public Builder setSpoolBackingRate(int value) { + + spoolBackingRate_ = value; + onChanged(); + return this; + } + /** + * uint32 spoolBackingRate = 6; + */ + public Builder clearSpoolBackingRate() { + + spoolBackingRate_ = 0; + onChanged(); + return this; + } + + private int segmentOffsetPulses_ ; + /** + * uint32 segmentOffsetPulses = 7; + */ + public int getSegmentOffsetPulses() { + return segmentOffsetPulses_; + } + /** + * uint32 segmentOffsetPulses = 7; + */ + public Builder setSegmentOffsetPulses(int value) { + + segmentOffsetPulses_ = value; + onChanged(); + return this; + } + /** + * uint32 segmentOffsetPulses = 7; + */ + public Builder clearSegmentOffsetPulses() { + + segmentOffsetPulses_ = 0; + onChanged(); + return this; + } + + private int milimetersPerRotation_ ; + /** + * uint32 milimetersPerRotation = 8; + */ + public int getMilimetersPerRotation() { + return milimetersPerRotation_; + } + /** + * uint32 milimetersPerRotation = 8; + */ + public Builder setMilimetersPerRotation(int value) { + + milimetersPerRotation_ = value; + onChanged(); + return this; + } + /** + * uint32 milimetersPerRotation = 8; + */ + public Builder clearMilimetersPerRotation() { + + milimetersPerRotation_ = 0; + onChanged(); + return this; + } + private java.util.List segments_ = java.util.Collections.emptyList(); private void ensureSegmentsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { segments_ = new java.util.ArrayList(segments_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000100; } } @@ -633,7 +1288,7 @@ public final class JobOuterClass { com.twine.tango.pmr.jobs.SegmentOuterClass.Segment, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder, com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder> segmentsBuilder_; /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public java.util.List getSegmentsList() { if (segmentsBuilder_ == null) { @@ -643,7 +1298,7 @@ public final class JobOuterClass { } } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public int getSegmentsCount() { if (segmentsBuilder_ == null) { @@ -653,7 +1308,7 @@ public final class JobOuterClass { } } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment getSegments(int index) { if (segmentsBuilder_ == null) { @@ -663,7 +1318,7 @@ public final class JobOuterClass { } } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder setSegments( int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment value) { @@ -680,7 +1335,7 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder setSegments( int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder builderForValue) { @@ -694,7 +1349,7 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder addSegments(com.twine.tango.pmr.jobs.SegmentOuterClass.Segment value) { if (segmentsBuilder_ == null) { @@ -710,7 +1365,7 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder addSegments( int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment value) { @@ -727,7 +1382,7 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder addSegments( com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder builderForValue) { @@ -741,7 +1396,7 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder addSegments( int index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder builderForValue) { @@ -755,7 +1410,7 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder addAllSegments( java.lang.Iterable values) { @@ -770,12 +1425,12 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder clearSegments() { if (segmentsBuilder_ == null) { segments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { segmentsBuilder_.clear(); @@ -783,7 +1438,7 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public Builder removeSegments(int index) { if (segmentsBuilder_ == null) { @@ -796,14 +1451,14 @@ public final class JobOuterClass { return this; } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder getSegmentsBuilder( int index) { return getSegmentsFieldBuilder().getBuilder(index); } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder getSegmentsOrBuilder( int index) { @@ -813,7 +1468,7 @@ public final class JobOuterClass { } } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public java.util.List getSegmentsOrBuilderList() { @@ -824,14 +1479,14 @@ public final class JobOuterClass { } } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder addSegmentsBuilder() { return getSegmentsFieldBuilder().addBuilder( com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.getDefaultInstance()); } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder addSegmentsBuilder( int index) { @@ -839,7 +1494,7 @@ public final class JobOuterClass { index, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.getDefaultInstance()); } /** - * repeated .Tango.PMR.Jobs.Segment Segments = 2; + * repeated .Tango.PMR.Jobs.Segment Segments = 9; */ public java.util.List getSegmentsBuilderList() { @@ -852,13 +1507,253 @@ public final class JobOuterClass { segmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.twine.tango.pmr.jobs.SegmentOuterClass.Segment, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder, com.twine.tango.pmr.jobs.SegmentOuterClass.SegmentOrBuilder>( segments_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000100) == 0x00000100), getParentForChildren(), isClean()); segments_ = null; } return segmentsBuilder_; } + + private java.util.List motors_ = + java.util.Collections.emptyList(); + private void ensureMotorsIsMutable() { + if (!((bitField0_ & 0x00000200) == 0x00000200)) { + motors_ = new java.util.ArrayList(motors_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Motor.MotorConfig, com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder, com.twine.tango.pmr.jobs.Motor.MotorConfigOrBuilder> motorsBuilder_; + + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public java.util.List getMotorsList() { + if (motorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(motors_); + } else { + return motorsBuilder_.getMessageList(); + } + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public int getMotorsCount() { + if (motorsBuilder_ == null) { + return motors_.size(); + } else { + return motorsBuilder_.getCount(); + } + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public com.twine.tango.pmr.jobs.Motor.MotorConfig getMotors(int index) { + if (motorsBuilder_ == null) { + return motors_.get(index); + } else { + return motorsBuilder_.getMessage(index); + } + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder setMotors( + int index, com.twine.tango.pmr.jobs.Motor.MotorConfig value) { + if (motorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMotorsIsMutable(); + motors_.set(index, value); + onChanged(); + } else { + motorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder setMotors( + int index, com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder builderForValue) { + if (motorsBuilder_ == null) { + ensureMotorsIsMutable(); + motors_.set(index, builderForValue.build()); + onChanged(); + } else { + motorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder addMotors(com.twine.tango.pmr.jobs.Motor.MotorConfig value) { + if (motorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMotorsIsMutable(); + motors_.add(value); + onChanged(); + } else { + motorsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder addMotors( + int index, com.twine.tango.pmr.jobs.Motor.MotorConfig value) { + if (motorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMotorsIsMutable(); + motors_.add(index, value); + onChanged(); + } else { + motorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder addMotors( + com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder builderForValue) { + if (motorsBuilder_ == null) { + ensureMotorsIsMutable(); + motors_.add(builderForValue.build()); + onChanged(); + } else { + motorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder addMotors( + int index, com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder builderForValue) { + if (motorsBuilder_ == null) { + ensureMotorsIsMutable(); + motors_.add(index, builderForValue.build()); + onChanged(); + } else { + motorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder addAllMotors( + java.lang.Iterable values) { + if (motorsBuilder_ == null) { + ensureMotorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, motors_); + onChanged(); + } else { + motorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder clearMotors() { + if (motorsBuilder_ == null) { + motors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + motorsBuilder_.clear(); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public Builder removeMotors(int index) { + if (motorsBuilder_ == null) { + ensureMotorsIsMutable(); + motors_.remove(index); + onChanged(); + } else { + motorsBuilder_.remove(index); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder getMotorsBuilder( + int index) { + return getMotorsFieldBuilder().getBuilder(index); + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public com.twine.tango.pmr.jobs.Motor.MotorConfigOrBuilder getMotorsOrBuilder( + int index) { + if (motorsBuilder_ == null) { + return motors_.get(index); } else { + return motorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public java.util.List + getMotorsOrBuilderList() { + if (motorsBuilder_ != null) { + return motorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(motors_); + } + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder addMotorsBuilder() { + return getMotorsFieldBuilder().addBuilder( + com.twine.tango.pmr.jobs.Motor.MotorConfig.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder addMotorsBuilder( + int index) { + return getMotorsFieldBuilder().addBuilder( + index, com.twine.tango.pmr.jobs.Motor.MotorConfig.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.MotorConfig Motors = 10; + */ + public java.util.List + getMotorsBuilderList() { + return getMotorsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Motor.MotorConfig, com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder, com.twine.tango.pmr.jobs.Motor.MotorConfigOrBuilder> + getMotorsFieldBuilder() { + if (motorsBuilder_ == null) { + motorsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Motor.MotorConfig, com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder, com.twine.tango.pmr.jobs.Motor.MotorConfigOrBuilder>( + motors_, + ((bitField0_ & 0x00000200) == 0x00000200), + getParentForChildren(), + isClean()); + motors_ = null; + } + return motorsBuilder_; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); @@ -923,9 +1818,15 @@ public final class JobOuterClass { static { java.lang.String[] descriptorData = { "\n\tJob.proto\022\016Tango.PMR.Jobs\032\rSegment.pro" + - "to\">\n\003Job\022\014\n\004Name\030\001 \001(\t\022)\n\010Segments\030\002 \003(" + - "\0132\027.Tango.PMR.Jobs.SegmentB\032\n\030com.twine." + - "tango.pmr.jobsb\006proto3" + "to\032\013motor.proto\"\262\002\n\003Job\022\014\n\004Name\030\001 \001(\t\022\026\n" + + "\016interSegEnable\030\002 \001(\010\022\035\n\025distanseToSpool" + + "Enable\030\003 \001(\010\022\035\n\025distanceToSpoolLength\030\004 " + + "\001(\r\022\031\n\021startOffsetPulses\030\005 \001(\r\022\030\n\020spoolB" + + "ackingRate\030\006 \001(\r\022\033\n\023segmentOffsetPulses\030" + + "\007 \001(\r\022\035\n\025milimetersPerRotation\030\010 \001(\r\022)\n\010" + + "Segments\030\t \003(\0132\027.Tango.PMR.Jobs.Segment\022" + + "+\n\006Motors\030\n \003(\0132\033.Tango.PMR.Jobs.MotorCo" + + "nfigB\032\n\030com.twine.tango.pmr.jobsb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -939,14 +1840,16 @@ public final class JobOuterClass { .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.twine.tango.pmr.jobs.SegmentOuterClass.getDescriptor(), + com.twine.tango.pmr.jobs.Motor.getDescriptor(), }, assigner); internal_static_Tango_PMR_Jobs_Job_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_Tango_PMR_Jobs_Job_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_Tango_PMR_Jobs_Job_descriptor, - new java.lang.String[] { "Name", "Segments", }); + new java.lang.String[] { "Name", "InterSegEnable", "DistanseToSpoolEnable", "DistanceToSpoolLength", "StartOffsetPulses", "SpoolBackingRate", "SegmentOffsetPulses", "MilimetersPerRotation", "Segments", "Motors", }); com.twine.tango.pmr.jobs.SegmentOuterClass.getDescriptor(); + com.twine.tango.pmr.jobs.Motor.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Motor.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Motor.java new file mode 100644 index 000000000..9b099e7d4 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/Motor.java @@ -0,0 +1,1500 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: motor.proto + +package com.twine.tango.pmr.jobs; + +public final class Motor { + private Motor() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code Tango.PMR.Jobs.MotorId} + */ + public enum MotorId + implements com.google.protobuf.ProtocolMessageEnum { + /** + * Feeder = 0; + */ + Feeder(0), + /** + * Dryer = 1; + */ + Dryer(1), + /** + * Pooler = 2; + */ + Pooler(2), + /** + * Winder = 3; + */ + Winder(3), + UNRECOGNIZED(-1), + ; + + /** + * Feeder = 0; + */ + public static final int Feeder_VALUE = 0; + /** + * Dryer = 1; + */ + public static final int Dryer_VALUE = 1; + /** + * Pooler = 2; + */ + public static final int Pooler_VALUE = 2; + /** + * Winder = 3; + */ + public static final int Winder_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static MotorId valueOf(int value) { + return forNumber(value); + } + + public static MotorId forNumber(int value) { + switch (value) { + case 0: return Feeder; + case 1: return Dryer; + case 2: return Pooler; + case 3: return Winder; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + MotorId> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public MotorId findValueByNumber(int number) { + return MotorId.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.Motor.getDescriptor().getEnumTypes().get(0); + } + + private static final MotorId[] VALUES = values(); + + public static MotorId valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private MotorId(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:Tango.PMR.Jobs.MotorId) + } + + public interface MotorConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Jobs.MotorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + int getIdValue(); + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + com.twine.tango.pmr.jobs.Motor.MotorId getId(); + + /** + * uint32 minfreq = 2; + */ + int getMinfreq(); + + /** + * uint32 maxfreq = 3; + */ + int getMaxfreq(); + + /** + * uint32 minmicrostep = 4; + */ + int getMinmicrostep(); + + /** + * uint32 maxmicrostep = 5; + */ + int getMaxmicrostep(); + + /** + * double linearratio = 6; + */ + double getLinearratio(); + + /** + * uint32 medianposition = 7; + */ + int getMedianposition(); + + /** + * double correctiongain = 8; + */ + double getCorrectiongain(); + + /** + * double ration2dryerspd = 9; + */ + double getRation2Dryerspd(); + + /** + * double Kp = 10; + */ + double getKp(); + + /** + * double Ki = 11; + */ + double getKi(); + + /** + * double Kd = 12; + */ + double getKd(); + + /** + * double changeSlope = 13; + */ + double getChangeSlope(); + + /** + * double hightimeoutmSec = 14; + */ + double getHightimeoutmSec(); + } + /** + * Protobuf type {@code Tango.PMR.Jobs.MotorConfig} + */ + public static final class MotorConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Jobs.MotorConfig) + MotorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MotorConfig.newBuilder() to construct. + private MotorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MotorConfig() { + id_ = 0; + minfreq_ = 0; + maxfreq_ = 0; + minmicrostep_ = 0; + maxmicrostep_ = 0; + linearratio_ = 0D; + medianposition_ = 0; + correctiongain_ = 0D; + ration2Dryerspd_ = 0D; + kp_ = 0D; + ki_ = 0D; + kd_ = 0D; + changeSlope_ = 0D; + hightimeoutmSec_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MotorConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + id_ = rawValue; + break; + } + case 16: { + + minfreq_ = input.readUInt32(); + break; + } + case 24: { + + maxfreq_ = input.readUInt32(); + break; + } + case 32: { + + minmicrostep_ = input.readUInt32(); + break; + } + case 40: { + + maxmicrostep_ = input.readUInt32(); + break; + } + case 49: { + + linearratio_ = input.readDouble(); + break; + } + case 56: { + + medianposition_ = input.readUInt32(); + break; + } + case 65: { + + correctiongain_ = input.readDouble(); + break; + } + case 73: { + + ration2Dryerspd_ = input.readDouble(); + break; + } + case 81: { + + kp_ = input.readDouble(); + break; + } + case 89: { + + ki_ = input.readDouble(); + break; + } + case 97: { + + kd_ = input.readDouble(); + break; + } + case 105: { + + changeSlope_ = input.readDouble(); + break; + } + case 113: { + + hightimeoutmSec_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.Motor.internal_static_Tango_PMR_Jobs_MotorConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.Motor.internal_static_Tango_PMR_Jobs_MotorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.Motor.MotorConfig.class, com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private int id_; + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + public int getIdValue() { + return id_; + } + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + public com.twine.tango.pmr.jobs.Motor.MotorId getId() { + com.twine.tango.pmr.jobs.Motor.MotorId result = com.twine.tango.pmr.jobs.Motor.MotorId.valueOf(id_); + return result == null ? com.twine.tango.pmr.jobs.Motor.MotorId.UNRECOGNIZED : result; + } + + public static final int MINFREQ_FIELD_NUMBER = 2; + private int minfreq_; + /** + * uint32 minfreq = 2; + */ + public int getMinfreq() { + return minfreq_; + } + + public static final int MAXFREQ_FIELD_NUMBER = 3; + private int maxfreq_; + /** + * uint32 maxfreq = 3; + */ + public int getMaxfreq() { + return maxfreq_; + } + + public static final int MINMICROSTEP_FIELD_NUMBER = 4; + private int minmicrostep_; + /** + * uint32 minmicrostep = 4; + */ + public int getMinmicrostep() { + return minmicrostep_; + } + + public static final int MAXMICROSTEP_FIELD_NUMBER = 5; + private int maxmicrostep_; + /** + * uint32 maxmicrostep = 5; + */ + public int getMaxmicrostep() { + return maxmicrostep_; + } + + public static final int LINEARRATIO_FIELD_NUMBER = 6; + private double linearratio_; + /** + * double linearratio = 6; + */ + public double getLinearratio() { + return linearratio_; + } + + public static final int MEDIANPOSITION_FIELD_NUMBER = 7; + private int medianposition_; + /** + * uint32 medianposition = 7; + */ + public int getMedianposition() { + return medianposition_; + } + + public static final int CORRECTIONGAIN_FIELD_NUMBER = 8; + private double correctiongain_; + /** + * double correctiongain = 8; + */ + public double getCorrectiongain() { + return correctiongain_; + } + + public static final int RATION2DRYERSPD_FIELD_NUMBER = 9; + private double ration2Dryerspd_; + /** + * double ration2dryerspd = 9; + */ + public double getRation2Dryerspd() { + return ration2Dryerspd_; + } + + public static final int KP_FIELD_NUMBER = 10; + private double kp_; + /** + * double Kp = 10; + */ + public double getKp() { + return kp_; + } + + public static final int KI_FIELD_NUMBER = 11; + private double ki_; + /** + * double Ki = 11; + */ + public double getKi() { + return ki_; + } + + public static final int KD_FIELD_NUMBER = 12; + private double kd_; + /** + * double Kd = 12; + */ + public double getKd() { + return kd_; + } + + public static final int CHANGESLOPE_FIELD_NUMBER = 13; + private double changeSlope_; + /** + * double changeSlope = 13; + */ + public double getChangeSlope() { + return changeSlope_; + } + + public static final int HIGHTIMEOUTMSEC_FIELD_NUMBER = 14; + private double hightimeoutmSec_; + /** + * double hightimeoutmSec = 14; + */ + public double getHightimeoutmSec() { + return hightimeoutmSec_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != com.twine.tango.pmr.jobs.Motor.MotorId.Feeder.getNumber()) { + output.writeEnum(1, id_); + } + if (minfreq_ != 0) { + output.writeUInt32(2, minfreq_); + } + if (maxfreq_ != 0) { + output.writeUInt32(3, maxfreq_); + } + if (minmicrostep_ != 0) { + output.writeUInt32(4, minmicrostep_); + } + if (maxmicrostep_ != 0) { + output.writeUInt32(5, maxmicrostep_); + } + if (linearratio_ != 0D) { + output.writeDouble(6, linearratio_); + } + if (medianposition_ != 0) { + output.writeUInt32(7, medianposition_); + } + if (correctiongain_ != 0D) { + output.writeDouble(8, correctiongain_); + } + if (ration2Dryerspd_ != 0D) { + output.writeDouble(9, ration2Dryerspd_); + } + if (kp_ != 0D) { + output.writeDouble(10, kp_); + } + if (ki_ != 0D) { + output.writeDouble(11, ki_); + } + if (kd_ != 0D) { + output.writeDouble(12, kd_); + } + if (changeSlope_ != 0D) { + output.writeDouble(13, changeSlope_); + } + if (hightimeoutmSec_ != 0D) { + output.writeDouble(14, hightimeoutmSec_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != com.twine.tango.pmr.jobs.Motor.MotorId.Feeder.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, id_); + } + if (minfreq_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, minfreq_); + } + if (maxfreq_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, maxfreq_); + } + if (minmicrostep_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, minmicrostep_); + } + if (maxmicrostep_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, maxmicrostep_); + } + if (linearratio_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, linearratio_); + } + if (medianposition_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, medianposition_); + } + if (correctiongain_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(8, correctiongain_); + } + if (ration2Dryerspd_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(9, ration2Dryerspd_); + } + if (kp_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(10, kp_); + } + if (ki_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(11, ki_); + } + if (kd_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(12, kd_); + } + if (changeSlope_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(13, changeSlope_); + } + if (hightimeoutmSec_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(14, hightimeoutmSec_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.jobs.Motor.MotorConfig)) { + return super.equals(obj); + } + com.twine.tango.pmr.jobs.Motor.MotorConfig other = (com.twine.tango.pmr.jobs.Motor.MotorConfig) obj; + + boolean result = true; + result = result && id_ == other.id_; + result = result && (getMinfreq() + == other.getMinfreq()); + result = result && (getMaxfreq() + == other.getMaxfreq()); + result = result && (getMinmicrostep() + == other.getMinmicrostep()); + result = result && (getMaxmicrostep() + == other.getMaxmicrostep()); + result = result && ( + java.lang.Double.doubleToLongBits(getLinearratio()) + == java.lang.Double.doubleToLongBits( + other.getLinearratio())); + result = result && (getMedianposition() + == other.getMedianposition()); + result = result && ( + java.lang.Double.doubleToLongBits(getCorrectiongain()) + == java.lang.Double.doubleToLongBits( + other.getCorrectiongain())); + result = result && ( + java.lang.Double.doubleToLongBits(getRation2Dryerspd()) + == java.lang.Double.doubleToLongBits( + other.getRation2Dryerspd())); + result = result && ( + java.lang.Double.doubleToLongBits(getKp()) + == java.lang.Double.doubleToLongBits( + other.getKp())); + result = result && ( + java.lang.Double.doubleToLongBits(getKi()) + == java.lang.Double.doubleToLongBits( + other.getKi())); + result = result && ( + java.lang.Double.doubleToLongBits(getKd()) + == java.lang.Double.doubleToLongBits( + other.getKd())); + result = result && ( + java.lang.Double.doubleToLongBits(getChangeSlope()) + == java.lang.Double.doubleToLongBits( + other.getChangeSlope())); + result = result && ( + java.lang.Double.doubleToLongBits(getHightimeoutmSec()) + == java.lang.Double.doubleToLongBits( + other.getHightimeoutmSec())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + id_; + hash = (37 * hash) + MINFREQ_FIELD_NUMBER; + hash = (53 * hash) + getMinfreq(); + hash = (37 * hash) + MAXFREQ_FIELD_NUMBER; + hash = (53 * hash) + getMaxfreq(); + hash = (37 * hash) + MINMICROSTEP_FIELD_NUMBER; + hash = (53 * hash) + getMinmicrostep(); + hash = (37 * hash) + MAXMICROSTEP_FIELD_NUMBER; + hash = (53 * hash) + getMaxmicrostep(); + hash = (37 * hash) + LINEARRATIO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLinearratio())); + hash = (37 * hash) + MEDIANPOSITION_FIELD_NUMBER; + hash = (53 * hash) + getMedianposition(); + hash = (37 * hash) + CORRECTIONGAIN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getCorrectiongain())); + hash = (37 * hash) + RATION2DRYERSPD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRation2Dryerspd())); + hash = (37 * hash) + KP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getKp())); + hash = (37 * hash) + KI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getKi())); + hash = (37 * hash) + KD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getKd())); + hash = (37 * hash) + CHANGESLOPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getChangeSlope())); + hash = (37 * hash) + HIGHTIMEOUTMSEC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHightimeoutmSec())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.jobs.Motor.MotorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.jobs.Motor.MotorConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Jobs.MotorConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Jobs.MotorConfig) + com.twine.tango.pmr.jobs.Motor.MotorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.jobs.Motor.internal_static_Tango_PMR_Jobs_MotorConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.jobs.Motor.internal_static_Tango_PMR_Jobs_MotorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.jobs.Motor.MotorConfig.class, com.twine.tango.pmr.jobs.Motor.MotorConfig.Builder.class); + } + + // Construct using com.twine.tango.pmr.jobs.Motor.MotorConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + id_ = 0; + + minfreq_ = 0; + + maxfreq_ = 0; + + minmicrostep_ = 0; + + maxmicrostep_ = 0; + + linearratio_ = 0D; + + medianposition_ = 0; + + correctiongain_ = 0D; + + ration2Dryerspd_ = 0D; + + kp_ = 0D; + + ki_ = 0D; + + kd_ = 0D; + + changeSlope_ = 0D; + + hightimeoutmSec_ = 0D; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.jobs.Motor.internal_static_Tango_PMR_Jobs_MotorConfig_descriptor; + } + + public com.twine.tango.pmr.jobs.Motor.MotorConfig getDefaultInstanceForType() { + return com.twine.tango.pmr.jobs.Motor.MotorConfig.getDefaultInstance(); + } + + public com.twine.tango.pmr.jobs.Motor.MotorConfig build() { + com.twine.tango.pmr.jobs.Motor.MotorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.jobs.Motor.MotorConfig buildPartial() { + com.twine.tango.pmr.jobs.Motor.MotorConfig result = new com.twine.tango.pmr.jobs.Motor.MotorConfig(this); + result.id_ = id_; + result.minfreq_ = minfreq_; + result.maxfreq_ = maxfreq_; + result.minmicrostep_ = minmicrostep_; + result.maxmicrostep_ = maxmicrostep_; + result.linearratio_ = linearratio_; + result.medianposition_ = medianposition_; + result.correctiongain_ = correctiongain_; + result.ration2Dryerspd_ = ration2Dryerspd_; + result.kp_ = kp_; + result.ki_ = ki_; + result.kd_ = kd_; + result.changeSlope_ = changeSlope_; + result.hightimeoutmSec_ = hightimeoutmSec_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.jobs.Motor.MotorConfig) { + return mergeFrom((com.twine.tango.pmr.jobs.Motor.MotorConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.jobs.Motor.MotorConfig other) { + if (other == com.twine.tango.pmr.jobs.Motor.MotorConfig.getDefaultInstance()) return this; + if (other.id_ != 0) { + setIdValue(other.getIdValue()); + } + if (other.getMinfreq() != 0) { + setMinfreq(other.getMinfreq()); + } + if (other.getMaxfreq() != 0) { + setMaxfreq(other.getMaxfreq()); + } + if (other.getMinmicrostep() != 0) { + setMinmicrostep(other.getMinmicrostep()); + } + if (other.getMaxmicrostep() != 0) { + setMaxmicrostep(other.getMaxmicrostep()); + } + if (other.getLinearratio() != 0D) { + setLinearratio(other.getLinearratio()); + } + if (other.getMedianposition() != 0) { + setMedianposition(other.getMedianposition()); + } + if (other.getCorrectiongain() != 0D) { + setCorrectiongain(other.getCorrectiongain()); + } + if (other.getRation2Dryerspd() != 0D) { + setRation2Dryerspd(other.getRation2Dryerspd()); + } + if (other.getKp() != 0D) { + setKp(other.getKp()); + } + if (other.getKi() != 0D) { + setKi(other.getKi()); + } + if (other.getKd() != 0D) { + setKd(other.getKd()); + } + if (other.getChangeSlope() != 0D) { + setChangeSlope(other.getChangeSlope()); + } + if (other.getHightimeoutmSec() != 0D) { + setHightimeoutmSec(other.getHightimeoutmSec()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.jobs.Motor.MotorConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.jobs.Motor.MotorConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int id_ = 0; + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + public int getIdValue() { + return id_; + } + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + public Builder setIdValue(int value) { + id_ = value; + onChanged(); + return this; + } + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + public com.twine.tango.pmr.jobs.Motor.MotorId getId() { + com.twine.tango.pmr.jobs.Motor.MotorId result = com.twine.tango.pmr.jobs.Motor.MotorId.valueOf(id_); + return result == null ? com.twine.tango.pmr.jobs.Motor.MotorId.UNRECOGNIZED : result; + } + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + public Builder setId(com.twine.tango.pmr.jobs.Motor.MotorId value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Tango.PMR.Jobs.MotorId Id = 1; + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + + private int minfreq_ ; + /** + * uint32 minfreq = 2; + */ + public int getMinfreq() { + return minfreq_; + } + /** + * uint32 minfreq = 2; + */ + public Builder setMinfreq(int value) { + + minfreq_ = value; + onChanged(); + return this; + } + /** + * uint32 minfreq = 2; + */ + public Builder clearMinfreq() { + + minfreq_ = 0; + onChanged(); + return this; + } + + private int maxfreq_ ; + /** + * uint32 maxfreq = 3; + */ + public int getMaxfreq() { + return maxfreq_; + } + /** + * uint32 maxfreq = 3; + */ + public Builder setMaxfreq(int value) { + + maxfreq_ = value; + onChanged(); + return this; + } + /** + * uint32 maxfreq = 3; + */ + public Builder clearMaxfreq() { + + maxfreq_ = 0; + onChanged(); + return this; + } + + private int minmicrostep_ ; + /** + * uint32 minmicrostep = 4; + */ + public int getMinmicrostep() { + return minmicrostep_; + } + /** + * uint32 minmicrostep = 4; + */ + public Builder setMinmicrostep(int value) { + + minmicrostep_ = value; + onChanged(); + return this; + } + /** + * uint32 minmicrostep = 4; + */ + public Builder clearMinmicrostep() { + + minmicrostep_ = 0; + onChanged(); + return this; + } + + private int maxmicrostep_ ; + /** + * uint32 maxmicrostep = 5; + */ + public int getMaxmicrostep() { + return maxmicrostep_; + } + /** + * uint32 maxmicrostep = 5; + */ + public Builder setMaxmicrostep(int value) { + + maxmicrostep_ = value; + onChanged(); + return this; + } + /** + * uint32 maxmicrostep = 5; + */ + public Builder clearMaxmicrostep() { + + maxmicrostep_ = 0; + onChanged(); + return this; + } + + private double linearratio_ ; + /** + * double linearratio = 6; + */ + public double getLinearratio() { + return linearratio_; + } + /** + * double linearratio = 6; + */ + public Builder setLinearratio(double value) { + + linearratio_ = value; + onChanged(); + return this; + } + /** + * double linearratio = 6; + */ + public Builder clearLinearratio() { + + linearratio_ = 0D; + onChanged(); + return this; + } + + private int medianposition_ ; + /** + * uint32 medianposition = 7; + */ + public int getMedianposition() { + return medianposition_; + } + /** + * uint32 medianposition = 7; + */ + public Builder setMedianposition(int value) { + + medianposition_ = value; + onChanged(); + return this; + } + /** + * uint32 medianposition = 7; + */ + public Builder clearMedianposition() { + + medianposition_ = 0; + onChanged(); + return this; + } + + private double correctiongain_ ; + /** + * double correctiongain = 8; + */ + public double getCorrectiongain() { + return correctiongain_; + } + /** + * double correctiongain = 8; + */ + public Builder setCorrectiongain(double value) { + + correctiongain_ = value; + onChanged(); + return this; + } + /** + * double correctiongain = 8; + */ + public Builder clearCorrectiongain() { + + correctiongain_ = 0D; + onChanged(); + return this; + } + + private double ration2Dryerspd_ ; + /** + * double ration2dryerspd = 9; + */ + public double getRation2Dryerspd() { + return ration2Dryerspd_; + } + /** + * double ration2dryerspd = 9; + */ + public Builder setRation2Dryerspd(double value) { + + ration2Dryerspd_ = value; + onChanged(); + return this; + } + /** + * double ration2dryerspd = 9; + */ + public Builder clearRation2Dryerspd() { + + ration2Dryerspd_ = 0D; + onChanged(); + return this; + } + + private double kp_ ; + /** + * double Kp = 10; + */ + public double getKp() { + return kp_; + } + /** + * double Kp = 10; + */ + public Builder setKp(double value) { + + kp_ = value; + onChanged(); + return this; + } + /** + * double Kp = 10; + */ + public Builder clearKp() { + + kp_ = 0D; + onChanged(); + return this; + } + + private double ki_ ; + /** + * double Ki = 11; + */ + public double getKi() { + return ki_; + } + /** + * double Ki = 11; + */ + public Builder setKi(double value) { + + ki_ = value; + onChanged(); + return this; + } + /** + * double Ki = 11; + */ + public Builder clearKi() { + + ki_ = 0D; + onChanged(); + return this; + } + + private double kd_ ; + /** + * double Kd = 12; + */ + public double getKd() { + return kd_; + } + /** + * double Kd = 12; + */ + public Builder setKd(double value) { + + kd_ = value; + onChanged(); + return this; + } + /** + * double Kd = 12; + */ + public Builder clearKd() { + + kd_ = 0D; + onChanged(); + return this; + } + + private double changeSlope_ ; + /** + * double changeSlope = 13; + */ + public double getChangeSlope() { + return changeSlope_; + } + /** + * double changeSlope = 13; + */ + public Builder setChangeSlope(double value) { + + changeSlope_ = value; + onChanged(); + return this; + } + /** + * double changeSlope = 13; + */ + public Builder clearChangeSlope() { + + changeSlope_ = 0D; + onChanged(); + return this; + } + + private double hightimeoutmSec_ ; + /** + * double hightimeoutmSec = 14; + */ + public double getHightimeoutmSec() { + return hightimeoutmSec_; + } + /** + * double hightimeoutmSec = 14; + */ + public Builder setHightimeoutmSec(double value) { + + hightimeoutmSec_ = value; + onChanged(); + return this; + } + /** + * double hightimeoutmSec = 14; + */ + public Builder clearHightimeoutmSec() { + + hightimeoutmSec_ = 0D; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Jobs.MotorConfig) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Jobs.MotorConfig) + private static final com.twine.tango.pmr.jobs.Motor.MotorConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.jobs.Motor.MotorConfig(); + } + + public static com.twine.tango.pmr.jobs.Motor.MotorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MotorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MotorConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.jobs.Motor.MotorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Jobs_MotorConfig_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Jobs_MotorConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\013motor.proto\022\016Tango.PMR.Jobs\"\260\002\n\013MotorC" + + "onfig\022#\n\002Id\030\001 \001(\0162\027.Tango.PMR.Jobs.Motor" + + "Id\022\017\n\007minfreq\030\002 \001(\r\022\017\n\007maxfreq\030\003 \001(\r\022\024\n\014" + + "minmicrostep\030\004 \001(\r\022\024\n\014maxmicrostep\030\005 \001(\r" + + "\022\023\n\013linearratio\030\006 \001(\001\022\026\n\016medianposition\030" + + "\007 \001(\r\022\026\n\016correctiongain\030\010 \001(\001\022\027\n\017ration2" + + "dryerspd\030\t \001(\001\022\n\n\002Kp\030\n \001(\001\022\n\n\002Ki\030\013 \001(\001\022\n" + + "\n\002Kd\030\014 \001(\001\022\023\n\013changeSlope\030\r \001(\001\022\027\n\017hight" + + "imeoutmSec\030\016 \001(\001*8\n\007MotorId\022\n\n\006Feeder\020\000\022" + + "\t\n\005Dryer\020\001\022\n\n\006Pooler\020\002\022\n\n\006Winder\020\003B\032\n\030co", + "m.twine.tango.pmr.jobsb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Tango_PMR_Jobs_MotorConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Jobs_MotorConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Jobs_MotorConfig_descriptor, + new java.lang.String[] { "Id", "Minfreq", "Maxfreq", "Minmicrostep", "Maxmicrostep", "Linearratio", "Medianposition", "Correctiongain", "Ration2Dryerspd", "Kp", "Ki", "Kd", "ChangeSlope", "HightimeoutmSec", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java index eb19e884e..629204d61 100644 --- a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/jobs/SegmentOuterClass.java @@ -45,6 +45,30 @@ public final class SegmentOuterClass { * .Tango.PMR.Common.RGB Color = 3; */ com.twine.tango.pmr.common.RGBOuterClass.RGBOrBuilder getColorOrBuilder(); + + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + java.util.List + getDispenserList(); + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + com.twine.tango.pmr.jobs.Dispenser.Dispense getDispenser(int index); + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + int getDispenserCount(); + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + java.util.List + getDispenserOrBuilderList(); + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + com.twine.tango.pmr.jobs.Dispenser.DispenseOrBuilder getDispenserOrBuilder( + int index); } /** * Protobuf type {@code Tango.PMR.Jobs.Segment} @@ -61,6 +85,7 @@ public final class SegmentOuterClass { private Segment() { name_ = ""; length_ = 0; + dispenser_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -115,6 +140,15 @@ public final class SegmentOuterClass { break; } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + dispenser_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + dispenser_.add( + input.readMessage(com.twine.tango.pmr.jobs.Dispenser.Dispense.parser(), extensionRegistry)); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -123,6 +157,9 @@ public final class SegmentOuterClass { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + dispenser_ = java.util.Collections.unmodifiableList(dispenser_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -139,6 +176,7 @@ public final class SegmentOuterClass { com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.class, com.twine.tango.pmr.jobs.SegmentOuterClass.Segment.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -203,6 +241,41 @@ public final class SegmentOuterClass { return getColor(); } + public static final int DISPENSER_FIELD_NUMBER = 4; + private java.util.List dispenser_; + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public java.util.List getDispenserList() { + return dispenser_; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public java.util.List + getDispenserOrBuilderList() { + return dispenser_; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public int getDispenserCount() { + return dispenser_.size(); + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public com.twine.tango.pmr.jobs.Dispenser.Dispense getDispenser(int index) { + return dispenser_.get(index); + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public com.twine.tango.pmr.jobs.Dispenser.DispenseOrBuilder getDispenserOrBuilder( + int index) { + return dispenser_.get(index); + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -224,6 +297,9 @@ public final class SegmentOuterClass { if (color_ != null) { output.writeMessage(3, getColor()); } + for (int i = 0; i < dispenser_.size(); i++) { + output.writeMessage(4, dispenser_.get(i)); + } unknownFields.writeTo(output); } @@ -243,6 +319,10 @@ public final class SegmentOuterClass { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getColor()); } + for (int i = 0; i < dispenser_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, dispenser_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -268,6 +348,8 @@ public final class SegmentOuterClass { result = result && getColor() .equals(other.getColor()); } + result = result && getDispenserList() + .equals(other.getDispenserList()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -287,6 +369,10 @@ public final class SegmentOuterClass { hash = (37 * hash) + COLOR_FIELD_NUMBER; hash = (53 * hash) + getColor().hashCode(); } + if (getDispenserCount() > 0) { + hash = (37 * hash) + DISPENSER_FIELD_NUMBER; + hash = (53 * hash) + getDispenserList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -412,6 +498,7 @@ public final class SegmentOuterClass { private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { + getDispenserFieldBuilder(); } } public Builder clear() { @@ -426,6 +513,12 @@ public final class SegmentOuterClass { color_ = null; colorBuilder_ = null; } + if (dispenserBuilder_ == null) { + dispenser_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + dispenserBuilder_.clear(); + } return this; } @@ -448,6 +541,8 @@ public final class SegmentOuterClass { public com.twine.tango.pmr.jobs.SegmentOuterClass.Segment buildPartial() { com.twine.tango.pmr.jobs.SegmentOuterClass.Segment result = new com.twine.tango.pmr.jobs.SegmentOuterClass.Segment(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; result.name_ = name_; result.length_ = length_; if (colorBuilder_ == null) { @@ -455,6 +550,16 @@ public final class SegmentOuterClass { } else { result.color_ = colorBuilder_.build(); } + if (dispenserBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + dispenser_ = java.util.Collections.unmodifiableList(dispenser_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.dispenser_ = dispenser_; + } else { + result.dispenser_ = dispenserBuilder_.build(); + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -506,6 +611,32 @@ public final class SegmentOuterClass { if (other.hasColor()) { mergeColor(other.getColor()); } + if (dispenserBuilder_ == null) { + if (!other.dispenser_.isEmpty()) { + if (dispenser_.isEmpty()) { + dispenser_ = other.dispenser_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDispenserIsMutable(); + dispenser_.addAll(other.dispenser_); + } + onChanged(); + } + } else { + if (!other.dispenser_.isEmpty()) { + if (dispenserBuilder_.isEmpty()) { + dispenserBuilder_.dispose(); + dispenserBuilder_ = null; + dispenser_ = other.dispenser_; + bitField0_ = (bitField0_ & ~0x00000008); + dispenserBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDispenserFieldBuilder() : null; + } else { + dispenserBuilder_.addAllMessages(other.dispenser_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -532,6 +663,7 @@ public final class SegmentOuterClass { } return this; } + private int bitField0_; private java.lang.Object name_ = ""; /** @@ -744,6 +876,246 @@ public final class SegmentOuterClass { } return colorBuilder_; } + + private java.util.List dispenser_ = + java.util.Collections.emptyList(); + private void ensureDispenserIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + dispenser_ = new java.util.ArrayList(dispenser_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Dispenser.Dispense, com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder, com.twine.tango.pmr.jobs.Dispenser.DispenseOrBuilder> dispenserBuilder_; + + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public java.util.List getDispenserList() { + if (dispenserBuilder_ == null) { + return java.util.Collections.unmodifiableList(dispenser_); + } else { + return dispenserBuilder_.getMessageList(); + } + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public int getDispenserCount() { + if (dispenserBuilder_ == null) { + return dispenser_.size(); + } else { + return dispenserBuilder_.getCount(); + } + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public com.twine.tango.pmr.jobs.Dispenser.Dispense getDispenser(int index) { + if (dispenserBuilder_ == null) { + return dispenser_.get(index); + } else { + return dispenserBuilder_.getMessage(index); + } + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder setDispenser( + int index, com.twine.tango.pmr.jobs.Dispenser.Dispense value) { + if (dispenserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDispenserIsMutable(); + dispenser_.set(index, value); + onChanged(); + } else { + dispenserBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder setDispenser( + int index, com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder builderForValue) { + if (dispenserBuilder_ == null) { + ensureDispenserIsMutable(); + dispenser_.set(index, builderForValue.build()); + onChanged(); + } else { + dispenserBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder addDispenser(com.twine.tango.pmr.jobs.Dispenser.Dispense value) { + if (dispenserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDispenserIsMutable(); + dispenser_.add(value); + onChanged(); + } else { + dispenserBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder addDispenser( + int index, com.twine.tango.pmr.jobs.Dispenser.Dispense value) { + if (dispenserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDispenserIsMutable(); + dispenser_.add(index, value); + onChanged(); + } else { + dispenserBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder addDispenser( + com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder builderForValue) { + if (dispenserBuilder_ == null) { + ensureDispenserIsMutable(); + dispenser_.add(builderForValue.build()); + onChanged(); + } else { + dispenserBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder addDispenser( + int index, com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder builderForValue) { + if (dispenserBuilder_ == null) { + ensureDispenserIsMutable(); + dispenser_.add(index, builderForValue.build()); + onChanged(); + } else { + dispenserBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder addAllDispenser( + java.lang.Iterable values) { + if (dispenserBuilder_ == null) { + ensureDispenserIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dispenser_); + onChanged(); + } else { + dispenserBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder clearDispenser() { + if (dispenserBuilder_ == null) { + dispenser_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + dispenserBuilder_.clear(); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public Builder removeDispenser(int index) { + if (dispenserBuilder_ == null) { + ensureDispenserIsMutable(); + dispenser_.remove(index); + onChanged(); + } else { + dispenserBuilder_.remove(index); + } + return this; + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder getDispenserBuilder( + int index) { + return getDispenserFieldBuilder().getBuilder(index); + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public com.twine.tango.pmr.jobs.Dispenser.DispenseOrBuilder getDispenserOrBuilder( + int index) { + if (dispenserBuilder_ == null) { + return dispenser_.get(index); } else { + return dispenserBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public java.util.List + getDispenserOrBuilderList() { + if (dispenserBuilder_ != null) { + return dispenserBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dispenser_); + } + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder addDispenserBuilder() { + return getDispenserFieldBuilder().addBuilder( + com.twine.tango.pmr.jobs.Dispenser.Dispense.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder addDispenserBuilder( + int index) { + return getDispenserFieldBuilder().addBuilder( + index, com.twine.tango.pmr.jobs.Dispenser.Dispense.getDefaultInstance()); + } + /** + * repeated .Tango.PMR.Jobs.Dispense dispenser = 4; + */ + public java.util.List + getDispenserBuilderList() { + return getDispenserFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Dispenser.Dispense, com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder, com.twine.tango.pmr.jobs.Dispenser.DispenseOrBuilder> + getDispenserFieldBuilder() { + if (dispenserBuilder_ == null) { + dispenserBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.twine.tango.pmr.jobs.Dispenser.Dispense, com.twine.tango.pmr.jobs.Dispenser.Dispense.Builder, com.twine.tango.pmr.jobs.Dispenser.DispenseOrBuilder>( + dispenser_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + dispenser_ = null; + } + return dispenserBuilder_; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); @@ -808,9 +1180,11 @@ public final class SegmentOuterClass { static { java.lang.String[] descriptorData = { "\n\rSegment.proto\022\016Tango.PMR.Jobs\032\tRGB.pro" + - "to\"M\n\007Segment\022\014\n\004Name\030\001 \001(\t\022\016\n\006Length\030\002 " + - "\001(\005\022$\n\005Color\030\003 \001(\0132\025.Tango.PMR.Common.RG" + - "BB\032\n\030com.twine.tango.pmr.jobsb\006proto3" + "to\032\017dispenser.proto\"z\n\007Segment\022\014\n\004Name\030\001" + + " \001(\t\022\016\n\006Length\030\002 \001(\005\022$\n\005Color\030\003 \001(\0132\025.Ta" + + "ngo.PMR.Common.RGB\022+\n\tdispenser\030\004 \003(\0132\030." + + "Tango.PMR.Jobs.DispenseB\032\n\030com.twine.tan" + + "go.pmr.jobsb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -824,14 +1198,16 @@ public final class SegmentOuterClass { .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.twine.tango.pmr.common.RGBOuterClass.getDescriptor(), + com.twine.tango.pmr.jobs.Dispenser.getDescriptor(), }, assigner); internal_static_Tango_PMR_Jobs_Segment_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_Tango_PMR_Jobs_Segment_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_Tango_PMR_Jobs_Segment_descriptor, - new java.lang.String[] { "Name", "Length", "Color", }); + new java.lang.String[] { "Name", "Length", "Color", "Dispenser", }); com.twine.tango.pmr.common.RGBOuterClass.getDescriptor(); + com.twine.tango.pmr.jobs.Dispenser.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/Software/Android_Studio/Tango.PMR/src/main/res/raw/packages.txt b/Software/Android_Studio/Tango.PMR/src/main/res/raw/packages.txt index 7dcb7e0f1..8633ab3c5 100644 --- a/Software/Android_Studio/Tango.PMR/src/main/res/raw/packages.txt +++ b/Software/Android_Studio/Tango.PMR/src/main/res/raw/packages.txt @@ -1,4 +1,5 @@ common +diagnostics integration jobs stubs diff --git a/Software/DB/Tango.db b/Software/DB/Tango.db index 2aafcab0e..147c930c6 100644 Binary files a/Software/DB/Tango.db and b/Software/DB/Tango.db differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index a8a07a2f0..0e29193ec 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 a0a6f87d4..a437a0c1e 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.DB/Converters/EventTypeActionsToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs index 278802863..5cdee0153 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/EventTypeActionsToStringConverter.cs @@ -23,7 +23,7 @@ namespace Tango.MachineStudio.DB.Converters if (value is IEnumerable) { IEnumerable eventActions = value as IEnumerable; - return String.Join(", ", eventActions.Where(x => !x.Deleted).Select(x => x.ActionTypes.Name)); + return String.Join(", ", eventActions.Select(x => x.ActionTypes.Name)); } else { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/LiquidTypeRmlsToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/LiquidTypeRmlsToStringConverter.cs index 05ffa684c..a8e82b69b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/LiquidTypeRmlsToStringConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/LiquidTypeRmlsToStringConverter.cs @@ -23,7 +23,7 @@ namespace Tango.MachineStudio.DB.Converters if (value is IEnumerable) { IEnumerable liquidRmls = value as IEnumerable; - return String.Join(", ", liquidRmls.Where(x => !x.Deleted).Select(x => x.Rml.Name)); + return String.Join(", ", liquidRmls.Select(x => x.Rml.Name)); } else { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs index 6ad99213d..96c4d7d7d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Converters/RolesPermissionsToStringConverter.cs @@ -24,7 +24,7 @@ namespace Tango.MachineStudio.DB.Converters if (value is IEnumerable) { IEnumerable rolesPermissions = value as IEnumerable; - return String.Join(", ", rolesPermissions.Where(x => !x.Deleted).Select(x => x.Permission.Name)); + return String.Join(", ", rolesPermissions.Select(x => x.Permission.Name)); } else { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs index bc8d54ce9..a3d3e2486 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DbTableViewModel.cs @@ -156,21 +156,20 @@ namespace Tango.MachineStudio.DB.ViewModels { using (_notification.PushTaskItem("Saving changes to database...")) { - var dependenctEntities = SelectedEntity.GetDependentEntitiesNameAndGuid(); + //var dependenctEntities = SelectedEntity.GetDependentEntitiesNameAndGuid(); - if (dependenctEntities.Count > 0) - { - _notification.ShowError("The selected entity is being used by " + dependenctEntities.Count + " other entities." + Environment.NewLine + "Please delete any dependencies and try again." + Environment.NewLine + Environment.NewLine + String.Join(Environment.NewLine, dependenctEntities.Select(x => x.Key + ", ID: " + x.Value))); - return; - } + //if (dependenctEntities.Count > 0) + //{ + // _notification.ShowError("The selected entity is being used by " + dependenctEntities.Count + " other entities." + Environment.NewLine + "Please delete any dependencies and try again." + Environment.NewLine + Environment.NewLine + String.Join(Environment.NewLine, dependenctEntities.Select(x => x.Key + ", ID: " + x.Value))); + // return; + //} try { - await SelectedEntity.SoftDeleteAsync(); + await SelectedEntity.DeleteAsync(); } catch (Exception ex) { - SelectedEntity.Deleted = false; Adapter.Invalidate(); _notification.ShowError("Could not delete entity."); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs index 69e3c9ff6..0325e42ee 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EventTypesViewVM.cs @@ -29,7 +29,7 @@ namespace Tango.MachineStudio.DB.ViewModels foreach (var actionType in SelectedActions) { - if (SelectedEntity.EventTypesActions.ToList().Exists(x => x.ActionTypes == actionType.Entity && !x.Deleted)) + if (SelectedEntity.EventTypesActions.ToList().Exists(x => x.ActionTypes == actionType.Entity)) { actionType.IsSelected = true; } @@ -51,24 +51,23 @@ namespace Tango.MachineStudio.DB.ViewModels foreach (var actionType in SelectedActions) { - var userRole = eventType.EventTypesActions.SingleOrDefault(x => x.ActionTypes == actionType.Entity); + var eventTypeAction = eventType.EventTypesActions.SingleOrDefault(x => x.ActionTypes == actionType.Entity); - if (userRole != null) + if (eventTypeAction != null && !actionType.IsSelected) { - userRole.Deleted = !actionType.IsSelected; + eventTypeAction.Delete(); + continue; } - else + + if (actionType.IsSelected) { - if (actionType.IsSelected) + eventType.EventTypesActions.Add(new EventTypesAction() { - eventType.EventTypesActions.Add(new EventTypesAction() - { - ActionTypes = actionType.Entity, - EventTypes = eventType, - ActionTypeGuid = actionType.Entity.Guid, - EventTypeGuid = eventType.Guid - }); - } + ActionTypes = actionType.Entity, + EventTypes = eventType, + ActionTypeGuid = actionType.Entity.Guid, + EventTypeGuid = eventType.Guid + }); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs index eaa482a41..49bd18822 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidTypesViewVM.cs @@ -29,7 +29,7 @@ namespace Tango.MachineStudio.DB.ViewModels foreach (var rml in SelectedRmls) { - if (SelectedEntity.LiquidTypesRmls.ToList().Exists(x => x.Rml == rml.Entity && !x.Deleted)) + if (SelectedEntity.LiquidTypesRmls.ToList().Exists(x => x.Rml == rml.Entity)) { rml.IsSelected = true; } @@ -53,22 +53,21 @@ namespace Tango.MachineStudio.DB.ViewModels { var liquidRml = liquid.LiquidTypesRmls.SingleOrDefault(x => x.Rml == rml.Entity); - if (liquidRml != null) + if (liquidRml != null && !rml.IsSelected) { - liquidRml.Deleted = !rml.IsSelected; + liquidRml.Delete(); + continue; } - else + + if (rml.IsSelected) { - if (rml.IsSelected) + liquid.LiquidTypesRmls.Add(new LiquidTypesRml() { - liquid.LiquidTypesRmls.Add(new LiquidTypesRml() - { - Rml = rml.Entity, - LiquidTypes = liquid, - RmlGuid = rml.Entity.Guid, - LiquidTypeGuid = liquid.Guid - }); - } + Rml = rml.Entity, + LiquidTypes = liquid, + RmlGuid = rml.Entity.Guid, + LiquidTypeGuid = liquid.Guid + }); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs index d09722ec9..8ce95f736 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RolesViewVM.cs @@ -30,7 +30,7 @@ namespace Tango.MachineStudio.DB.ViewModels foreach (var permission in SelectedPermissions) { - if (SelectedEntity.RolesPermissions.ToList().Exists(x => x.Permission == permission.Entity && !x.Deleted)) + if (SelectedEntity.RolesPermissions.ToList().Exists(x => x.Permission == permission.Entity)) { permission.IsSelected = true; } @@ -54,22 +54,21 @@ namespace Tango.MachineStudio.DB.ViewModels { var rolePermission = role.RolesPermissions.SingleOrDefault(x => x.Permission == permission.Entity); - if (rolePermission != null) + if (rolePermission != null && !permission.IsSelected) { - rolePermission.Deleted = !permission.IsSelected; + rolePermission.Delete(); + continue; } - else + + if (permission.IsSelected) { - if (permission.IsSelected) + role.RolesPermissions.Add(new RolesPermission() { - role.RolesPermissions.Add(new RolesPermission() - { - Permission = permission.Entity, - Role = role, - PermissionGuid = permission.Entity.Guid, - RoleGuid = role.Guid - }); - } + Permission = permission.Entity, + Role = role, + PermissionGuid = permission.Entity.Guid, + RoleGuid = role.Guid + }); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml index 699a9ceb6..543e6b40c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml @@ -28,11 +28,11 @@ - - + + - , + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml index 4a35b1900..e5043e3e2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml @@ -22,10 +22,10 @@ - + - , + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachineVersionsProvider.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachineVersionsProvider.cs new file mode 100644 index 000000000..51ca629a4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachineVersionsProvider.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.AutoComplete.Editors; +using Tango.DAL.Observables; + +namespace Tango.MachineStudio.MachineDesigner.AutoComplete +{ + /// + /// Represents an auto-complete Machine Versions provider. + /// + /// + public class MachineVersionsProvider : ISuggestionProvider + { + public String Text { get; set; } + + public IEnumerable GetSuggestions(string filter) + { + Text = filter; + return ObservablesEntitiesAdapter.Instance.MachineVersions.Where(x => x.Version.ToString().StartsWith(filter, StringComparison.CurrentCultureIgnoreCase) || x.Name.StartsWith(filter, StringComparison.CurrentCultureIgnoreCase)).ToList(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj index 46ec20fdc..ac1616401 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Tango.MachineStudio.MachineDesigner.csproj @@ -78,8 +78,13 @@
+ + + + MachineVersionDialog.xaml + MainView.xaml @@ -87,6 +92,10 @@ GlobalVersionInfo.cs + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineVersionDialogVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineVersionDialogVM.cs new file mode 100644 index 000000000..6854472f1 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineVersionDialogVM.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; +using Tango.MachineStudio.MachineDesigner.AutoComplete; + +namespace Tango.MachineStudio.MachineDesigner.ViewModels +{ + public class MachineVersionDialogVM : DialogViewVM + { + public MachineVersionsProvider VersionsProvider { get; set; } + + public double Version { get; set; } + + private String _versionName; + + public String VersionName + { + get { return _versionName; } + set { _versionName = value; RaisePropertyChangedAuto(); } + } + + private MachineVersion _selectedVersion; + + public MachineVersion SelectedVersion + { + get { return _selectedVersion; } + set + { + _selectedVersion = value; + RaisePropertyChangedAuto(); + VersionName = value != null ? value.Name : null; + Version = value != null ? value.Version : 0; + } + } + + public RelayCommand AcceptCommand { get; set; } + + public RelayCommand CancelCommand { get; set; } + + public MachineVersionDialogVM() + { + VersionsProvider = new MachineVersionsProvider(); + AcceptCommand = new RelayCommand(() => + { + if (SelectedVersion == null) + { + Version = double.Parse(VersionsProvider.Text); + } + + Accept(); + + }); + CancelCommand = new RelayCommand(Cancel); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs index 96b66c204..24f2f6d43 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MainViewVM.cs @@ -123,6 +123,16 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels /// public RelayCommand RemoveIdsCommand { get; set; } + /// + /// Gets or sets the set version configuration command. + /// + public RelayCommand SetVersionConfigurationCommand { get; set; } + + /// + /// Gets or sets the set as default command. + /// + public RelayCommand SetAsDefaultCommand { get; set; } + #endregion #region Constructors @@ -143,6 +153,8 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels SaveCommand = new RelayCommand(Save, (x) => !_isSaving); AddIdsCommand = new RelayCommand(AddIds, (x) => !_isSaving && Configuration.IdsPacks.Count < 8); RemoveIdsCommand = new RelayCommand(RemoveIds, (x) => !_isSaving && SelectedIds != null); + SetVersionConfigurationCommand = new RelayCommand(SetVersionConfiguration,(x) => !_isSaving); + SetAsDefaultCommand = new RelayCommand(SetAsDefaultConfiguration,(x) => !_isSaving); } #endregion @@ -563,6 +575,61 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels History.Insert(0, machine.Configuration); } + /// + /// Sets the current configuration to the selected machine version default configuration. + /// + private void SetVersionConfiguration() + { + if (Machine.MachineVersions != null) + { + Configuration = Machine.MachineVersions.Configuration.CloneConfiguration(); + } + else + { + _notification.ShowError("No machine version selected."); + } + } + + /// + /// Sets the current configuration as a default machine version configuration. + /// + private void SetAsDefaultConfiguration() + { + _notification.ShowModalDialog(async (vm) => + { + try + { + using (_notification.PushTaskItem("Saving Default Configuration...")) + { + if (vm.SelectedVersion != null) + { + vm.SelectedVersion.Configuration = Configuration.CloneConfiguration(); + vm.SelectedVersion.DefaultConfigurationGuid = vm.SelectedVersion.Configuration.Guid; + await vm.SelectedVersion.SaveAsync(); + } + else + { + MachineVersion newVersion = new MachineVersion(); + newVersion.Version = vm.Version; + newVersion.Name = vm.VersionName; + + newVersion.Configuration = Configuration.CloneConfiguration(); + newVersion.DefaultConfigurationGuid = newVersion.Configuration.Guid; + await newVersion.SaveAsync(); + } + } + } + catch (Exception ex) + { + _notification.ShowError(ex.Message); + } + + }, () => + { + + }); + } + #endregion } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml new file mode 100644 index 000000000..60aebef7f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Version + + + + , + + + + + + + Name + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml.cs new file mode 100644 index 000000000..3d59d7cda --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MachineVersionDialog.xaml.cs @@ -0,0 +1,28 @@ +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.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.MachineDesigner.Views +{ + /// + /// Interaction logic for MachineVersionDialog.xaml + /// + public partial class MachineVersionDialog : UserControl + { + public MachineVersionDialog() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml index 8f955beea..605b66a05 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/Views/MainView.xaml @@ -431,7 +431,7 @@ - + @@ -447,7 +447,14 @@ Machine Version - + + + + + + + + Organization @@ -806,12 +813,24 @@ - + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs index 8ca933397..448625f27 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -166,6 +166,10 @@ namespace Tango.MachineStudio.UI.Notifications view.Loaded += (x, y) => { VM context = view.DataContext as VM; + if (context == null) + { + context = Activator.CreateInstance(); + } dialog.DataContext = context; Action onAcceptAction = null; diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs index a0297f529..7ff535d35 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ACTION_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs index 410d0309c..29a652b80 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs index dca8e82f1..dc5527468 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_FIRMWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs index c05a2410c..1c3af40e0 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_OS_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs index c250201d0..bdd0fa8a8 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/APPLICATION_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs index 6d8e2d441..ce5c33442 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CARTRIDGE_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs index c46de78a5..8b610ca97 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CAT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string MACHINE_GUID { get; set; } public byte[] DATA { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs index fc71ebf27..a44251468 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CCT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } public string FORWARD_FILE_NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs index b17564a48..bbefb6dff 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/CONFIGURATION.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public System.DateTime CREATION_DATE { get; set; } public string APPLICATION_VERSION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs index 0d8094f81..a2af8f1fe 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/DISPENSER_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public double NL_PER_PULSE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs index b4f3c3c85..33e37676e 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_FIRMWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs index 117295091..e85e5702c 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EMBEDDED_SOFTWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs index af7b10d05..5420add49 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs index 0e7ba0913..bb751a464 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/EVENT_TYPES_ACTIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string EVENT_TYPE_GUID { get; set; } public string ACTION_TYPE_GUID { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs index 5dd3efc31..304030fc2 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SHAPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs index 27a67a9fa..3010e8756 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/FIBER_SYNTHS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs index 62b93a878..eaa862f33 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/HARDWARE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs index e2a9c4425..8da598c46 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/IDS_PACKS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string CONFIGURATION_GUID { get; set; } public string DISPENSER_TYPE_GUID { get; set; } public string LIQUID_TYPE_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs index c0c5ff8c6..de881b40c 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LINEAR_MASS_DENSITY_UNITS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs index 16e069ef1..d16e78826 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public double VERSION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs index 637b61e01..1beb1e217 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LIQUID_TYPES_RMLS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string RML_GUID { get; set; } public double MAX_NL_PER_CM { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx index 60f35f27c..9fb01760a 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx @@ -12,7 +12,6 @@ - @@ -40,7 +39,6 @@ - @@ -51,7 +49,6 @@ - @@ -62,7 +59,6 @@ - @@ -73,7 +69,6 @@ - @@ -84,7 +79,6 @@ - @@ -95,7 +89,6 @@ - @@ -107,7 +100,6 @@ - @@ -124,7 +116,6 @@ - @@ -157,7 +148,6 @@ - @@ -170,7 +160,6 @@ - @@ -181,7 +170,6 @@ - @@ -192,7 +180,6 @@ - @@ -204,7 +191,6 @@ - @@ -215,7 +201,6 @@ - @@ -226,7 +211,6 @@ - @@ -237,7 +221,6 @@ - @@ -248,7 +231,6 @@ - @@ -264,7 +246,6 @@ - @@ -275,7 +256,6 @@ - @@ -288,7 +268,6 @@ - @@ -300,7 +279,6 @@ - @@ -312,7 +290,6 @@ - @@ -327,7 +304,6 @@ - @@ -338,7 +314,6 @@ - @@ -352,7 +327,6 @@ - @@ -362,7 +336,6 @@ - @@ -373,7 +346,6 @@ - @@ -384,7 +356,6 @@ - @@ -395,7 +366,6 @@ - @@ -407,7 +377,6 @@ - @@ -419,7 +388,6 @@ - @@ -431,7 +399,6 @@ - @@ -459,7 +426,6 @@ - @@ -471,7 +437,6 @@ - @@ -603,7 +568,6 @@ - @@ -631,7 +595,6 @@ - @@ -642,7 +605,6 @@ - @@ -653,7 +615,6 @@ - @@ -664,7 +625,6 @@ - @@ -675,7 +635,6 @@ - @@ -686,7 +645,6 @@ - @@ -698,7 +656,6 @@ - @@ -715,7 +672,6 @@ - @@ -748,7 +704,6 @@ - @@ -761,7 +716,6 @@ - @@ -772,7 +726,6 @@ - @@ -783,7 +736,6 @@ - @@ -795,7 +747,6 @@ - @@ -806,7 +757,6 @@ - @@ -817,7 +767,6 @@ - @@ -828,7 +777,6 @@ - @@ -839,7 +787,6 @@ - @@ -855,7 +802,6 @@ - @@ -866,7 +812,6 @@ - @@ -879,7 +824,6 @@ - @@ -891,7 +835,6 @@ - @@ -903,7 +846,6 @@ - @@ -918,7 +860,6 @@ - @@ -929,7 +870,6 @@ - @@ -943,7 +883,6 @@ - @@ -953,7 +892,6 @@ - @@ -964,7 +902,6 @@ - @@ -975,7 +912,6 @@ - @@ -986,7 +922,6 @@ - @@ -998,7 +933,6 @@ - @@ -1010,7 +944,6 @@ - @@ -1022,7 +955,6 @@ - @@ -1050,7 +982,6 @@ - @@ -1062,7 +993,6 @@ - @@ -1111,7 +1041,6 @@ - @@ -1140,7 +1069,6 @@ - @@ -1152,7 +1080,6 @@ - @@ -1164,7 +1091,6 @@ - @@ -1176,7 +1102,6 @@ - @@ -1188,7 +1113,6 @@ - @@ -1201,7 +1125,6 @@ - @@ -1219,7 +1142,6 @@ - @@ -1238,7 +1160,6 @@ - @@ -1268,7 +1189,6 @@ - @@ -1280,7 +1200,6 @@ - @@ -1292,7 +1211,6 @@ - @@ -1305,7 +1223,6 @@ - @@ -1317,7 +1234,6 @@ - @@ -1329,7 +1245,6 @@ - @@ -1341,7 +1256,6 @@ - @@ -1353,7 +1267,6 @@ - @@ -1370,7 +1283,6 @@ - @@ -1382,7 +1294,6 @@ - @@ -1396,7 +1307,6 @@ - @@ -1409,7 +1319,6 @@ - @@ -1422,7 +1331,6 @@ - @@ -1438,7 +1346,6 @@ - @@ -1450,7 +1357,6 @@ - @@ -1465,7 +1371,6 @@ - @@ -1476,7 +1381,6 @@ - @@ -1488,7 +1392,6 @@ - @@ -1500,7 +1403,6 @@ - @@ -1512,7 +1414,6 @@ - @@ -1525,7 +1426,6 @@ - @@ -1538,7 +1438,6 @@ - @@ -1551,7 +1450,6 @@ - @@ -1580,7 +1478,6 @@ - @@ -1593,7 +1490,6 @@ - @@ -1605,7 +1501,6 @@ - diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram index 2d0a148ea..06fe3fd60 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx.diagram @@ -13,38 +13,38 @@ - - - - - - - - + + + + + + + + - - - - + + + + - - - + + + - - - - + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs index 7bf83f80c..dd46b5ab6 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string SERIAL_NUMBER { get; set; } public string NAME { get; set; } public System.DateTime PRODUCTION_DATE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs index 64bff8f15..974094a37 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_CONFIGURATIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string CONFIGURATION_GUID { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs index 2b916274a..c6a009e8a 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINES_EVENTS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string EVENT_TYPE_GUID { get; set; } public string USER_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs index 482c5ff01..8507deef3 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public double VERSION { get; set; } public string DEFAULT_CONFIGURATION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs index d4da68404..a7619286e 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_COLORS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long COLOR { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs index 368913189..46e6e9836 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_CONDITIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs index fdf51b12e..f04bfa105 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_MATERIALS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs index 15ea7c140..19fac3d1b 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MEDIA_PURPOSES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public long CODE { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs index 75eb1ba64..ee3ffbcea 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/MID_TANK_TYPES.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public double LITER_CAPACITY { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs index 8ff5faa2f..6e42825e4 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ORGANIZATION.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string CONTACT_GUID { get; set; } public string ADDRESS_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs index 6052bccc0..dc4b2b654 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/PERMISSION.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs index d84850194..acadec6a9 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/RML.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string MANUFACTURER { get; set; } public string MATERIAL_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs index 66f453b4e..7dc8669ca 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLE.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public long CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs index d63343b82..6a20ac604 100644 --- a/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Local/DB/ROLES_PERMISSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Local.DB public long ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string ROLE_GUID { get; set; } public string PERMISSION_GUID { get; set; } } diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs index ad1786fed..020c3a3c2 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Address.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class Address : ObservableEntity
{ + private Boolean _deleted; + /// + /// Gets or sets the address deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _addressstring; /// /// Gets or sets the address address string. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs index 9f8ec680b..0356d44b5 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/Contact.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class Contact : ObservableEntity { + private Boolean _deleted; + /// + /// Gets or sets the contact deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _firstname; /// /// Gets or sets the contact first name. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs index a7fc315d3..210488ac4 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/User.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class User : ObservableEntity { + private Boolean _deleted; + /// + /// Gets or sets the user deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _email; /// /// Gets or sets the user email. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs b/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs index 2001d86f1..782c296e3 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Entities/UsersRole.cs @@ -10,6 +10,25 @@ namespace Tango.DAL.Observables public partial class UsersRole : ObservableEntity { + private Boolean _deleted; + /// + /// Gets or sets the usersrole deleted. + /// + [EntityFieldName("DELETED")] + public Boolean Deleted + { + get + { + return _deleted; + } + + set + { + _deleted = value; RaisePropertyChanged(nameof(Deleted)); + } + + } + private String _userguid; /// /// Gets or sets the usersrole user guid. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs index a2515c714..a2571f577 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MidTankTypes.cs @@ -10,10 +10,10 @@ namespace Tango.DAL.Observables { /// - /// (2 Liter Tank) + /// (Liter Tank 2) /// - [Description("2 Liter Tank")] - 2LiterTank = 1, + [Description("Liter Tank 2")] + LiterTank2 = 1, } } diff --git a/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs b/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs index 027b385c9..71da4fa7c 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/IObservableEntity.cs @@ -30,12 +30,6 @@ namespace Tango.DAL.Observables [EntityFieldName("LAST_UPDATED")] DateTime LastUpdated { get; set; } - /// - /// Gets or sets a value indicating whether this is deleted. - /// - [EntityFieldName("DELETED")] - bool Deleted { get; set; } - /// /// Saves the changes on this entity to database. /// @@ -48,20 +42,19 @@ namespace Tango.DAL.Observables Task SaveAsync(); /// - /// Deletes this entity from the database (Do no use this). + /// Deletes this entity from the database. /// - [Obsolete("The method delete is not for use as it prevents the synchronization of remote and local database.")] void Delete(); /// - /// Performs a "soft delete" of this entity (Set to true and save). + /// Removed this entity from it's DB SET without saving changes. /// void SoftDelete(); /// - /// Performs a "soft delete" of this entity asynchronously (Set to true and save). + /// Deletes this entity from the database. /// - Task SoftDeleteAsync(); + Task DeleteAsync(); /// /// Gets a collection of entities which are dependent on this entity. diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs index 2cc9ad097..e8a99cea6 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservableEntity.cs @@ -40,11 +40,6 @@ namespace Tango.DAL.Observables /// public abstract DateTime LastUpdated { get; set; } - /// - /// Gets or sets a value indicating whether this is deleted. - /// - public abstract bool Deleted { get; set; } - /// /// Saves the changes on this entity to database. /// @@ -57,26 +52,25 @@ namespace Tango.DAL.Observables internal abstract void Save(List savedEntities); /// - /// Deletes this entity from the database (Do no use this). + /// Deletes this entity from the database. /// public abstract void Delete(); /// - /// Saves the changes on this entity to database asynchronously. + /// Removed this entity from it's DB SET without saving changes. /// - /// - public abstract Task SaveAsync(); + public abstract void SoftDelete(); /// - /// Performs a "soft delete" of this entity (Set to true and save). + /// Deletes this entity from the database /// - public abstract void SoftDelete(); + public abstract Task DeleteAsync(); /// - /// Performs a "soft delete" of this entity asynchronously (Set to true and save). + /// Saves the changes on this entity to database asynchronously. /// /// - public abstract Task SoftDeleteAsync(); + public abstract Task SaveAsync(); /// /// Converts the specified database conventional name to the observables conventional name. @@ -266,17 +260,6 @@ namespace Tango.DAL.Observables set { _lastUpdated = value; RaisePropertyChanged(nameof(LastUpdated)); } } - private bool _deleted; - /// - /// Gets or sets a value indicating whether this is deleted. - /// - [EntityFieldName("DELETED")] - public override bool Deleted - { - get { return _deleted; } - set { _deleted = value; RaisePropertyChanged(nameof(Deleted)); } - } - /// /// Initializes a new instance of the class. /// @@ -324,41 +307,53 @@ namespace Tango.DAL.Observables } /// - /// Deletes this entity from the database (Do no use this). + /// Deletes this entity from the database /// public override void Delete() { - String tabelName = this.GetType().GetDALName(); - DbSet dbSet = typeof(RemoteDB).GetProperty(tabelName).GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; - dbSet.Remove(Entity); - ObservablesEntitiesAdapter.Instance.SaveChanges(); + var delProp = this.GetType().GetProperty("Deleted"); + + if (delProp != null) + { + delProp.SetValue(this, true); + Save(); + } + else + { + String tabelName = this.GetType().GetDALName(); + DbSet dbSet = typeof(RemoteDB).GetProperty(tabelName).GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; + dbSet.Remove(Entity); + ObservablesEntitiesAdapter.Instance.SaveChanges(); + } } /// - /// Performs a "soft delete" of this entity (Set to true and save). + /// Removed this entity from it's DB SET without saving changes. /// public override void SoftDelete() { - if (!SettingsManager.Default.DataBase.DeleteForReal) + var delProp = this.GetType().GetProperty("IsDeleted"); + + if (delProp != null) { - this.Deleted = true; - Save(); + delProp.SetValue(this, true); } else { - Delete(); + String tabelName = this.GetType().GetDALName(); + DbSet dbSet = typeof(RemoteDB).GetProperty(tabelName).GetValue(ObservablesEntitiesAdapter.Instance.Context) as DbSet; + dbSet.Remove(Entity); } } /// - /// Performs a "soft delete" of this entity asynchronously (Set to true and save). + /// Deletes this entity from the database /// - /// - public override Task SoftDeleteAsync() + public override Task DeleteAsync() { - return Task.Factory.StartNew(() => + return Task.Factory.StartNew(() => { - SoftDelete(); + Delete(); }); } diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs index 384f10dc7..a5ed56530 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapter.cs @@ -85,9 +85,9 @@ namespace Tango.DAL.Observables { Context.SaveChanges(); } - catch + catch (Exception ex) { - throw; + throw ex; } finally { @@ -151,27 +151,27 @@ namespace Tango.DAL.Observables //Remove Unlinked Configurations.. } - Organizations = Context.ORGANIZATIONS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Organizations = Context.ORGANIZATIONS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); OrganizationsViewSource = CreateCollectionView(Organizations); - Machines = Context.MACHINES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Machines = Context.MACHINES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); foreach (var machine in Machines) { machine.MachinesConfigurations = machine.MachinesConfigurations.OrderByDescending(x => x.Configuration.CreationDate).Take(30).ToObservableCollection(); } - MachinesConfigurations = Context.MACHINES_CONFIGURATIONS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MachinesConfigurations = Context.MACHINES_CONFIGURATIONS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MachineVersions = Context.MACHINE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MachineVersions = Context.MACHINE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); Addresses = Context.ADDRESSES.Where(x => !x.DELETED).ToList().OrderBy(x => x.ADDRESS_STRING).Select(x => ObservableEntity.CreateObservableFromEntity
(x)).ToObservableCollection(); Contacts = Context.CONTACTS.Where(x => !x.DELETED).ToList().OrderBy(x => x.FULL_NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Roles = Context.ROLES.Where(x => !x.DELETED).ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Roles = Context.ROLES.ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Permissions = Context.PERMISSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Permissions = Context.PERMISSIONS.ToList().OrderBy(x => x.NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); Users = Context.USERS.Where(x => !x.DELETED).ToList().OrderBy(x => x.CONTACT.FULL_NAME).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); @@ -182,70 +182,70 @@ namespace Tango.DAL.Observables foreach (var role in Roles) { - role.RolesPermissions = role.RolesPermissions.Where(x => !x.Deleted).ToObservableCollection(); + role.RolesPermissions = role.RolesPermissions.ToObservableCollection(); } - Configurations = Context.CONFIGURATIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.LAST_UPDATED).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Configurations = Context.CONFIGURATIONS.ToList().OrderBy(x => x.LAST_UPDATED).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); foreach (var config in Configurations) { - config.IdsPacks = config.IdsPacks.Where(x => !x.Deleted).ToObservableCollection(); + config.IdsPacks = config.IdsPacks.ToObservableCollection(); } - ApplicationVersions = Context.APPLICATION_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationVersions = Context.APPLICATION_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ApplicationOsVersions = Context.APPLICATION_OS_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationOsVersions = Context.APPLICATION_OS_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ApplicationFirmwareVersions = Context.APPLICATION_FIRMWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationFirmwareVersions = Context.APPLICATION_FIRMWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ApplicationDisplayPanelVersions = Context.APPLICATION_DISPLAY_PANEL_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ApplicationDisplayPanelVersions = Context.APPLICATION_DISPLAY_PANEL_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - EmbeddedFirmwareVersions = Context.EMBEDDED_FIRMWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + EmbeddedFirmwareVersions = Context.EMBEDDED_FIRMWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - EmbeddedSoftwareVersions = Context.EMBEDDED_SOFTWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + EmbeddedSoftwareVersions = Context.EMBEDDED_SOFTWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - HardwareVersions = Context.HARDWARE_VERSIONS.Where(x => !x.DELETED).ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + HardwareVersions = Context.HARDWARE_VERSIONS.ToList().OrderBy(x => x.VERSION).Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - IdsPacks = Context.IDS_PACKS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + IdsPacks = Context.IDS_PACKS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - DispenserTypes = Context.DISPENSER_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + DispenserTypes = Context.DISPENSER_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - LiquidTypes = Context.LIQUID_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + LiquidTypes = Context.LIQUID_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - CartridgeTypes = Context.CARTRIDGE_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + CartridgeTypes = Context.CARTRIDGE_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MidTankTypes = Context.MID_TANK_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MidTankTypes = Context.MID_TANK_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - ActionTypes = Context.ACTION_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + ActionTypes = Context.ACTION_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - EventTypes = Context.EVENT_TYPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + EventTypes = Context.EVENT_TYPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); foreach (var eventType in EventTypes) { - eventType.EventTypesActions = eventType.EventTypesActions.Where(x => !x.Deleted).ToObservableCollection(); + eventType.EventTypesActions = eventType.EventTypesActions.ToObservableCollection(); } - MediaMaterials = Context.MEDIA_MATERIALS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaMaterials = Context.MEDIA_MATERIALS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MediaColors = Context.MEDIA_COLORS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaColors = Context.MEDIA_COLORS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MediaPurposes = Context.MEDIA_PURPOSES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaPurposes = Context.MEDIA_PURPOSES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - MediaConditions = Context.MEDIA_CONDITIONS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + MediaConditions = Context.MEDIA_CONDITIONS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - LinearMassDensityUnits = Context.LINEAR_MASS_DENSITY_UNITS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + LinearMassDensityUnits = Context.LINEAR_MASS_DENSITY_UNITS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - FiberShapes = Context.FIBER_SHAPES.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + FiberShapes = Context.FIBER_SHAPES.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - FiberSynths = Context.FIBER_SYNTHS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + FiberSynths = Context.FIBER_SYNTHS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Rmls = Context.RMLS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Rmls = Context.RMLS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - LiquidTypesRmls = Context.LIQUID_TYPES_RMLS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + LiquidTypesRmls = Context.LIQUID_TYPES_RMLS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Ccts = Context.CCTS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Ccts = Context.CCTS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); - Cats = Context.CATS.Where(x => !x.DELETED).ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); + Cats = Context.CATS.ToList().Select(x => ObservableEntity.CreateObservableFromEntity(x)).ToObservableCollection(); InitCollectionSources(); diff --git a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs index c0dcf8662..53f27c9ba 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/ObservablesGenerator.cs @@ -34,7 +34,7 @@ namespace Tango.DAL.Observables TableName = table.Name, }; - foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(4)) + foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(3)) { EntityCodeFileField codeField = new EntityCodeFileField(); codeField.FieldName = field.Name; @@ -149,12 +149,12 @@ namespace Tango.DAL.Observables - foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(4).Where(x => !x.Name.Contains("GUID"))) + foreach (var field in table.PropertyType.GenericTypeArguments.First().GetProperties().Skip(3).Where(x => !x.Name.Contains("GUID"))) { EntityCodeFileField codeField = new EntityCodeFileField(); - codeField.FieldName = field.Name.Singularize(false); - codeField.Name = ObservableEntity.DalNameToStandardName(field.Name.Singularize(false)); - codeField.Description = FirstCharacterToLower(ObservableEntity.DalNameToStandardName(field.Name).Singularize(false)); + codeField.FieldName = field.Name; + codeField.Name = ObservableEntity.DalNameToStandardName(field.Name); + codeField.Description = FirstCharacterToLower(ObservableEntity.DalNameToStandardName(field.Name)); if (field.PropertyType.IsGenericType) @@ -163,11 +163,15 @@ namespace Tango.DAL.Observables } else { - if (field.PropertyType.IsClass && field.PropertyType != typeof(String)) + if (field.PropertyType.IsClass && field.PropertyType != typeof(String) && field.PropertyType != typeof(Byte[])) { codeField.Type = ObservableEntity.DalNameToStandardName(field.PropertyType.Name).Singularize(false); codeField.Construct = true; } + else if (field.PropertyType == typeof(Byte[])) + { + codeField.Type = field.PropertyType.Name.ToLower(); + } else { codeField.Type = field.PropertyType.Name == "Int32" ? "int" : field.PropertyType.Name; diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs b/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs new file mode 100644 index 000000000..71c1eeaee --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Observables/Partials/Machine.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DAL.Observables +{ + public partial class Machine + { + /// + /// Deletes this entity from the database + /// + public override void Delete() + { + foreach (var machine_config in MachinesConfigurations) + { + machine_config.SoftDelete(); + machine_config.Configuration.SoftDelete(); + } + + base.SoftDelete(); + + ObservablesEntitiesAdapter.Instance.SaveChanges(); + } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Partials/MachineVersion.cs b/Software/Visual_Studio/Tango.DAL.Observables/Partials/MachineVersion.cs new file mode 100644 index 000000000..95f4b0d69 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Observables/Partials/MachineVersion.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.DAL.Observables +{ + public partial class MachineVersion + { + public override void Delete() + { + Configuration.SoftDelete(); + base.SoftDelete(); + + ObservablesEntitiesAdapter.Instance.SaveChanges(); + } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs b/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs index 2781a34be..805c389fc 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs +++ b/Software/Visual_Studio/Tango.DAL.Observables/Partials/User.cs @@ -25,7 +25,7 @@ namespace Tango.DAL.Observables ///
public List GetPermissions() { - return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).Select(x => (Permissions)x.Permission.Code).ToList(); + return UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).Select(x => (Permissions)x.Permission.Code).ToList(); } /// diff --git a/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj b/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj index c17fcbc93..95ed8bc63 100644 --- a/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj +++ b/Software/Visual_Studio/Tango.DAL.Observables/Tango.DAL.Observables.csproj @@ -87,6 +87,7 @@ + @@ -122,6 +123,7 @@ + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs index 1c71eb314..6a864f024 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ACTION_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs index 5d5c329e0..ad55d5d82 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs index 249dcfe2b..e24375a6f 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_FIRMWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs index 677e7f099..5839f5a8b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs index f5f0d29aa..620be2da0 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs index cfead09a2..57bc2a101 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs index 162c39209..a9dafc33a 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string MACHINE_GUID { get; set; } public byte[] DATA { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs index 9a420020b..87c657d50 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CCT.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } public string FORWARD_FILE_NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs index cfe748bc3..173463fff 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/CONFIGURATION.cs @@ -26,7 +26,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public System.DateTime CREATION_DATE { get; set; } public string APPLICATION_VERSION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs index 1bf5a8e0e..efe9286f2 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/DISPENSER_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public double NL_PER_PULSE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs index 2ebc41626..df70c3cf2 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_FIRMWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs index 470cbaa49..6ae24f6a7 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EMBEDDED_SOFTWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs index 1eb478383..550cb87b1 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs index 003e4293e..3ce891623 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/EVENT_TYPES_ACTIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string EVENT_TYPE_GUID { get; set; } public string ACTION_TYPE_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs index 4e7bdf298..863a368e2 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SHAPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs index 885eff2c7..f2d340f47 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs index ba114fe3c..12974024e 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs index 24db64501..cddce2f6d 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string CONFIGURATION_GUID { get; set; } public string DISPENSER_TYPE_GUID { get; set; } public string LIQUID_TYPE_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs index ac91c8c3e..5c0fb50fe 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LINEAR_MASS_DENSITY_UNITS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs index 71f55585b..0e0b78e21 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs @@ -25,7 +25,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public double VERSION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs index 4a521f980..782f70d6c 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES_RMLS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string LIQUID_TYPE_GUID { get; set; } public string RML_GUID { get; set; } public double MAX_NL_PER_CM { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs index bd54bbf4a..8963261a1 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs @@ -25,7 +25,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string SERIAL_NUMBER { get; set; } public string NAME { get; set; } public System.DateTime PRODUCTION_DATE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs index fbd2bfb20..2efe07680 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_CONFIGURATIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string CONFIGURATION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs index 1f24cc1f9..6dae4b687 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINES_EVENTS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string MACHINE_GUID { get; set; } public string EVENT_TYPE_GUID { get; set; } public string USER_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs index a93d8e5b8..6c354d4bb 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public double VERSION { get; set; } public string NAME { get; set; } public string DEFAULT_CONFIGURATION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs index 68a018f3a..c158b1770 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int COLOR { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs index 844ece666..52c5edaab 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_CONDITIONS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs index 80ede3e01..9f08788ac 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_MATERIALS.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs index bd305011c..c540d2469 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_PURPOSES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public int CODE { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs index 52da42c25..dafe79a3b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MID_TANK_TYPES.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public double LITER_CAPACITY { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs index 3dd2c0738..e9837a775 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ORGANIZATION.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string CONTACT_GUID { get; set; } public string ADDRESS_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs index c342b49c0..4392a4b22 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/PERMISSION.cs @@ -23,7 +23,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs index ab1189e95..6120596e1 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string NAME { get; set; } public string MANUFACTURER { get; set; } public string MATERIAL_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs index b2987c5f6..d4be1220c 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLE.cs @@ -24,7 +24,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public int CODE { get; set; } public string NAME { get; set; } public string DESCRIPTION { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs index b9c5ea451..850f784f8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/ROLES_PERMISSIONS.cs @@ -17,7 +17,6 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } - public bool DELETED { get; set; } public string ROLE_GUID { get; set; } public string PERMISSION_GUID { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index c1e7d53c4..ea19fea80 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -12,7 +12,6 @@ - @@ -40,7 +39,6 @@ - @@ -51,7 +49,6 @@ - @@ -62,7 +59,6 @@ - @@ -73,7 +69,6 @@ - @@ -84,7 +79,6 @@ - @@ -95,7 +89,6 @@ - @@ -107,7 +100,6 @@ - @@ -124,7 +116,6 @@ - @@ -157,7 +148,6 @@ - @@ -170,7 +160,6 @@ - @@ -181,7 +170,6 @@ - @@ -192,7 +180,6 @@ - @@ -204,7 +191,6 @@ - @@ -215,7 +201,6 @@ - @@ -226,7 +211,6 @@ - @@ -237,7 +221,6 @@ - @@ -248,7 +231,6 @@ - @@ -264,7 +246,6 @@ - @@ -275,7 +256,6 @@ - @@ -288,7 +268,6 @@ - @@ -300,7 +279,6 @@ - @@ -312,7 +290,6 @@ - @@ -327,7 +304,6 @@ - @@ -338,7 +314,6 @@ - @@ -352,7 +327,6 @@ - @@ -362,7 +336,6 @@ - @@ -373,7 +346,6 @@ - @@ -384,7 +356,6 @@ - @@ -395,7 +366,6 @@ - @@ -407,7 +377,6 @@ - @@ -419,7 +388,6 @@ - @@ -431,7 +399,6 @@ - @@ -459,7 +426,6 @@ - @@ -471,7 +437,6 @@ - @@ -714,8 +679,10 @@ - - + + + + @@ -726,8 +693,10 @@ - - + + + + @@ -1157,11 +1126,11 @@ - + - + @@ -1423,11 +1392,11 @@ - + - + @@ -1495,7 +1464,6 @@ - @@ -1526,7 +1494,6 @@ - @@ -1538,7 +1505,6 @@ - @@ -1550,7 +1516,6 @@ - @@ -1562,7 +1527,6 @@ - @@ -1574,7 +1538,6 @@ - @@ -1586,7 +1549,6 @@ - @@ -1600,7 +1562,6 @@ - @@ -1618,7 +1579,6 @@ - @@ -1664,7 +1624,6 @@ - @@ -1678,7 +1637,6 @@ - @@ -1690,7 +1648,6 @@ - @@ -1702,7 +1659,6 @@ - @@ -1716,7 +1672,6 @@ - @@ -1729,7 +1684,6 @@ - @@ -1741,7 +1695,6 @@ - @@ -1753,7 +1706,6 @@ - @@ -1765,7 +1717,6 @@ - @@ -1786,7 +1737,6 @@ - @@ -1798,14 +1748,13 @@ - - + @@ -1814,12 +1763,11 @@ - - - + + @@ -1828,7 +1776,6 @@ - @@ -1842,7 +1789,6 @@ - @@ -1863,7 +1809,6 @@ - @@ -1876,7 +1821,6 @@ - @@ -1893,7 +1837,6 @@ - @@ -1904,7 +1847,6 @@ - @@ -1916,7 +1858,6 @@ - @@ -1928,7 +1869,6 @@ - @@ -1940,7 +1880,6 @@ - @@ -1953,7 +1892,6 @@ - @@ -1969,7 +1907,6 @@ - @@ -1982,7 +1919,6 @@ - @@ -2006,7 +1942,7 @@ - + @@ -2019,7 +1955,6 @@ - @@ -2033,7 +1968,6 @@ - @@ -2421,8 +2355,10 @@ - - + + + + @@ -2433,8 +2369,10 @@ - - + + + + @@ -2631,7 +2569,6 @@ - @@ -2660,7 +2597,6 @@ - @@ -2672,7 +2608,6 @@ - @@ -2684,7 +2619,6 @@ - @@ -2696,7 +2630,6 @@ - @@ -2708,7 +2641,6 @@ - @@ -2721,7 +2653,6 @@ - @@ -2739,7 +2670,6 @@ - @@ -2758,7 +2688,6 @@ - @@ -2788,7 +2717,6 @@ - @@ -2800,7 +2728,6 @@ - @@ -2812,7 +2739,6 @@ - @@ -2825,7 +2751,6 @@ - @@ -2837,7 +2762,6 @@ - @@ -2849,7 +2773,6 @@ - @@ -2861,7 +2784,6 @@ - @@ -2873,7 +2795,6 @@ - @@ -2890,7 +2811,6 @@ - @@ -2902,7 +2822,6 @@ - @@ -2916,7 +2835,6 @@ - @@ -2929,7 +2847,6 @@ - @@ -2942,7 +2859,6 @@ - @@ -2958,7 +2874,6 @@ - @@ -2970,7 +2885,6 @@ - @@ -2985,7 +2899,6 @@ - @@ -2996,7 +2909,6 @@ - @@ -3008,7 +2920,6 @@ - @@ -3020,7 +2931,6 @@ - @@ -3032,7 +2942,6 @@ - @@ -3045,7 +2954,6 @@ - @@ -3058,7 +2966,6 @@ - @@ -3071,7 +2978,6 @@ - @@ -3100,7 +3006,6 @@ - @@ -3113,7 +3018,6 @@ - @@ -3125,7 +3029,6 @@ - diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 60d141af1..8c11eeccc 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,46 +5,46 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -73,8 +73,8 @@ - - + + diff --git a/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db b/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db index 12c88039d..147c930c6 100644 Binary files a/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db and b/Software/Visual_Studio/Web/Tango.MachineService/App_Data/Tango.db differ -- cgit v1.3.1 From 8ae0f3da19c537eff30e19a1fe99cce51b3116f1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 23 Jan 2018 17:58:59 +0200 Subject: A lot of work on Developer Module and Jobs related DB tables. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 8388608 -> 8388608 bytes .../Tango.MachineStudio.DB.csproj | 14 +- .../Tango.MachineStudio.DB/ViewModelLocator.cs | 6 +- .../ProcessParametersTablesGroupsViewVM.cs | 33 + .../RmlsProcessParametersTablesViewVM.cs | 18 - .../Views/DBViews/ProcessParametersTableView.xaml | 8 +- .../DBViews/ProcessParametersTablesGroupView.xaml | 31 + .../ProcessParametersTablesGroupView.xaml.cs | 28 + .../DBViews/ProcessParametersTablesGroupsView.xaml | 32 + .../ProcessParametersTablesGroupsView.xaml.cs | 30 + .../Views/DBViews/ProcessParametersTablesView.xaml | 4 +- .../DBViews/RmlsProcessParametersTableView.xaml | 31 - .../DBViews/RmlsProcessParametersTableView.xaml.cs | 28 - .../DBViews/RmlsProcessParametersTablesView.xaml | 26 - .../RmlsProcessParametersTablesView.xaml.cs | 30 - .../ViewModels/MainViewVM.cs | 120 +++- .../Views/MainView.xaml | 100 +-- .../Notifications/INotificationProvider.cs | 9 + .../Notifications/DefaultNotificationProvider.cs | 33 +- .../Notifications/TextInputBoxWindow.xaml | 44 ++ .../Notifications/TextInputBoxWindow.xaml.cs | 99 +++ .../Tango.MachineStudio.UI.csproj | 7 + .../Tango.DAL.Observables/Entities/BrushStop.cs | 342 ++++++++++ .../Tango.DAL.Observables/Entities/ColorSpace.cs | 117 ++++ .../Tango.DAL.Observables/Entities/Job.cs | 290 +++++++++ .../Tango.DAL.Observables/Entities/JobRun.cs | 133 ++++ .../Tango.DAL.Observables/Entities/Machine.cs | 21 + .../Entities/ProcessParametersTable.cs | 39 +- .../Entities/ProcessParametersTablesGroup.cs | 155 +++++ .../Tango.DAL.Observables/Entities/Rml.cs | 35 +- .../Entities/RmlsProcessParametersTable.cs | 133 ---- .../Tango.DAL.Observables/Entities/Segment.cs | 136 ++++ .../Entities/WindingMethod.cs | 117 ++++ .../Enumerations/ColorSpaces.cs | 12 + .../Enumerations/WindingMethods.cs | 12 + .../ProcessParametersTablesGroupExtensions.cs | 27 + .../ObservablesEntitiesAdapter.cs | 9 +- .../ObservablesEntitiesAdapterExtension.cs | 272 +++++++- .../Tango.DAL.Observables.csproj | 9 +- .../Tango.DAL.Remote/DB/BRUSH_STOPS.cs | 38 ++ .../Tango.DAL.Remote/DB/COLOR_SPACES.cs | 33 + Software/Visual_Studio/Tango.DAL.Remote/DB/JOB.cs | 44 ++ .../Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs | 27 + .../Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs | 3 + .../DB/PROCESS_PARAMETERS_TABLES.cs | 13 +- .../DB/PROCESS_PARAMETERS_TABLES_GROUPS.cs | 35 + Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 7 +- .../DB/RMLS_PROCESS_PARAMETERS_TABLES.cs | 27 - .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 8 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 716 ++++++++++++++++++--- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 101 +-- .../Visual_Studio/Tango.DAL.Remote/DB/SEGMENT.cs | 34 + .../Tango.DAL.Remote/DB/WINDING_METHODS.cs | 33 + .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 24 +- 55 files changed, 3162 insertions(+), 571 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/TextInputBoxWindow.xaml.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/BrushStop.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/ColorSpace.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/Job.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/JobRun.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/ProcessParametersTablesGroup.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/RmlsProcessParametersTable.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/Segment.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/WindingMethod.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/ColorSpaces.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/WindingMethods.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/ExtensionMethods/ProcessParametersTablesGroupExtensions.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_SPACES.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/JOB.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/JOB_RUNS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/PROCESS_PARAMETERS_TABLES_GROUPS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_PROCESS_PARAMETERS_TABLES.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENT.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/WINDING_METHODS.cs (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 534511002..8c88f40a2 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 119576f0e..3eb7381ae 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.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj index bb3084207..54c29f7f3 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj @@ -129,7 +129,7 @@ - + @@ -142,11 +142,11 @@ ActionTypeView.xaml - - RmlsProcessParametersTablesView.xaml + + ProcessParametersTablesGroupsView.xaml - - RmlsProcessParametersTableView.xaml + + ProcessParametersTablesGroupView.xaml ProcessParametersTablesView.xaml @@ -378,11 +378,11 @@ MSBuild:Compile Designer - + MSBuild:Compile Designer - + MSBuild:Compile Designer diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs index 5fe386749..8a7afc067 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -60,7 +60,7 @@ namespace Tango.MachineStudio.DB SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); - SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); } public static MainViewVM MainViewVM @@ -351,11 +351,11 @@ namespace Tango.MachineStudio.DB } } - public static RmlsProcessParametersTablesViewVM RmlsProcessParametersTablesViewVM + public static ProcessParametersTablesGroupsViewVM ProcessParametersTablesGroupsViewVM { get { - return ServiceLocator.Current.GetInstance(); + return ServiceLocator.Current.GetInstance(); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs new file mode 100644 index 000000000..620762a6f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; + +namespace Tango.MachineStudio.DB.ViewModels +{ + public class ProcessParametersTablesGroupsViewVM : DbTableViewModel + { + public ProcessParametersTablesGroupsViewVM(INotificationProvider notification) : base(notification) + { + + } + + protected override void OnBeforeEntitySave(DialogOpenMode mode, ProcessParametersTablesGroup entity) + { + entity.SaveDate = DateTime.UtcNow; + + if (entity.Rml != null && entity.Active) + { + foreach (var group in entity.Rml.ProcessParametersTablesGroups.Where(x => x != entity)) + { + group.Active = false; + } + } + + base.OnBeforeEntitySave(mode, entity); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs deleted file mode 100644 index 4ae1f063f..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.DAL.Observables; -using Tango.MachineStudio.Common.Notifications; - -namespace Tango.MachineStudio.DB.ViewModels -{ - public class RmlsProcessParametersTablesViewVM : DbTableViewModel - { - public RmlsProcessParametersTablesViewVM(INotificationProvider notification) : base(notification) - { - - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml index e9b7c31af..1e3933ce0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml @@ -22,8 +22,12 @@ + + + + @@ -54,10 +58,6 @@ - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml new file mode 100644 index 000000000..135d66eac --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml.cs new file mode 100644 index 000000000..490453f2a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml.cs @@ -0,0 +1,28 @@ +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.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for UserView.xaml + /// + public partial class ProcessParametersTablesGroupView : UserControl + { + public ProcessParametersTablesGroupView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml new file mode 100644 index 000000000..0eee2aa77 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml.cs new file mode 100644 index 000000000..67072d554 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml.cs @@ -0,0 +1,30 @@ +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.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.MachineStudio.DB.CustomAttributes; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for UsersView.xaml + /// + [DBView] + public partial class ProcessParametersTablesGroupsView : UserControl + { + public ProcessParametersTablesGroupsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml index 2648b78a0..d9ad83f68 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml @@ -21,7 +21,9 @@ + + @@ -37,8 +39,6 @@ - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml deleted file mode 100644 index 767b39f29..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml.cs deleted file mode 100644 index 713a46204..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for UserView.xaml - /// - public partial class RmlsProcessParametersTableView : UserControl - { - public RmlsProcessParametersTableView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml deleted file mode 100644 index d599c64a3..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml.cs deleted file mode 100644 index c4ee7e66d..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -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.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.MachineStudio.DB.CustomAttributes; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for UsersView.xaml - /// - [DBView] - public partial class RmlsProcessParametersTablesView : UserControl - { - public RmlsProcessParametersTablesView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 621ce550b..34a4ff470 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -7,6 +7,7 @@ using System.Text; using System.Threading.Tasks; using Tango.Core.Commands; using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.Common.StudioApplication; using Tango.SharedUI; @@ -14,6 +15,8 @@ namespace Tango.MachineStudio.Developer.ViewModels { public class MainViewVM : ViewModel { + private INotificationProvider _notification; + public IStudioApplicationManager ApplicationManager { get; set; } public ObservablesEntitiesAdapter Adapter { get; set; } @@ -34,18 +37,43 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _rmlProcessParametersTables; + private ProcessParametersTablesGroup _rmlProcessParametersTablesGroup; + + public ProcessParametersTablesGroup RmlProcessParametersTableGroup + { + get { return _rmlProcessParametersTablesGroup; } + set { _rmlProcessParametersTablesGroup = value; RaisePropertyChangedAuto(); } + } + + private ProcessParametersTablesGroup _selectedGroupHistory; - public ObservableCollection RmlProcessParametersTables + public ProcessParametersTablesGroup SelectedGroupHistory { - get { return _rmlProcessParametersTables; } - set { _rmlProcessParametersTables = value; RaisePropertyChangedAuto(); } + get { return _selectedGroupHistory; } + set { _selectedGroupHistory = value; RaisePropertyChangedAuto(); OnSelectedGroupHistoryChanged(); } } + private void OnSelectedGroupHistoryChanged() + { + if (SelectedGroupHistory != null) + { + RmlProcessParametersTableGroup = SelectedGroupHistory.CloneGroup(); + } + } - private DBViewContextWrapper _selectedRML; + private ObservableCollection _groupsHistory; - public DBViewContextWrapper SelectedRML + public ObservableCollection GroupsHistory + { + get { return _groupsHistory; } + set { _groupsHistory = value; RaisePropertyChangedAuto(); } + } + + + + private Rml _selectedRML; + + public Rml SelectedRML { get { return _selectedRML; } set { _selectedRML = value; RaisePropertyChangedAuto(); InvalidateLiquidFactorsAndProcessTables(); InvalidateRelayCommands(); } @@ -66,24 +94,48 @@ namespace Tango.MachineStudio.Developer.ViewModels public RelayCommand ToggleSideBarCommand { get; set; } + public RelayCommand SaveProcessParametersCommand { get; set; } + + public RelayCommand SaveLiquidFactorsCommand { get; set; } + public MainViewVM() { IsSideBarOpened = true; } [PreferredConstructor] - public MainViewVM(IStudioApplicationManager applicationManager) + public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider) { + _notification = notificationProvider; Adapter = ObservablesEntitiesAdapter.Instance; EditMachineCommand = new RelayCommand(EditMachine, (x) => SelectedMachine != null); ApplicationManager = applicationManager; EditRMLCommand = new RelayCommand(EditRML, (x) => SelectedRML != null); ToggleSideBarCommand = new RelayCommand(() => IsSideBarOpened = !IsSideBarOpened); + SaveProcessParametersCommand = new RelayCommand(SaveProcessParameters); + SaveLiquidFactorsCommand = new RelayCommand(SaveLiquidFactors); + } + + private async void SaveLiquidFactors() + { + if (SelectedRML != null) + { + using (_notification.PushTaskItem("Saving Liquid Factors...")) + { + String machineGuid = SelectedMachine.Guid; + String rmlGuid = SelectedRML.Guid; + + await SelectedRML.SaveAsync(); + + SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == machineGuid); + SelectedRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == rmlGuid); + } + } } private void EditRML() { - ApplicationManager.RequestModule("Data Base", SelectedRML.EditEntity); + ApplicationManager.RequestModule("Data Base", SelectedRML); } private void EditMachine() @@ -96,12 +148,60 @@ namespace Tango.MachineStudio.Developer.ViewModels InvalidateLiquidFactorsAndProcessTables(); } + private async void SaveProcessParameters() + { + var response = _notification.ShowTextInput("Enter Group Name", "Group Name"); + + if (response == null) return; + + using (_notification.PushTaskItem("Saving Parameters Group...")) + { + ProcessParametersTablesGroup group = new ProcessParametersTablesGroup(); + + List tables = new List(); + foreach (var table in RmlProcessParametersTableGroup.ProcessParametersTables) + { + var newTable = table.CloneEntity(); + newTable.ProcessParametersTablesGroups = group; + tables.Add(newTable); + } + + group.Active = true; + group.ProcessParametersTables = tables.ToObservableCollection(); + group.Rml = SelectedRML; + group.Name = response; + group.SaveDate = DateTime.UtcNow; + + foreach (var g in SelectedRML.ProcessParametersTablesGroups) + { + g.Active = false; + } + + String machineGuid = SelectedMachine.Guid; + String rmlGuid = SelectedRML.Guid; + + SelectedRML.ProcessParametersTablesGroups.Add(group); + await SelectedRML.SaveAsync(); + + SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == machineGuid); + SelectedRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == rmlGuid); + } + } + private void InvalidateLiquidFactorsAndProcessTables() { if (SelectedRML != null && SelectedMachine != null) { - LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidTypes).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.EditEntity.Guid).ToList(); - RmlProcessParametersTables = SelectedRML.EditEntity.RmlsProcessParametersTables.ToObservableCollection(); + LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidTypes).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); + RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.SingleOrDefault(x => x.Active); + + if (RmlProcessParametersTableGroup != null) + { + RmlProcessParametersTableGroup = RmlProcessParametersTableGroup.CloneGroup(); + RmlProcessParametersTableGroup.ProcessParametersTables = RmlProcessParametersTableGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToObservableCollection(); + } + + GroupsHistory = SelectedRML.ProcessParametersTablesGroups.OrderByDescending(x => x.SaveDate).OrderBy(x => !x.Active).ToObservableCollection(); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml index d6cba4914..fa6cbbd76 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml @@ -77,18 +77,45 @@ - - + + + + + HISTORY + + + + + + + + + + + + + + + + + - + - + - - + + Dyeing Speed: - + Min Ink Uptake: - + Mixer Temp: - + Head Zone1 Temp: - + Head Zone2 Temp: - + Head Zone3 Temp: - + Head Air Flow: - + Feeder Tension: - + Puller Tension: - + Dryer Buffer Length: - + Dryer Zone1 Temp: - + Dryer Zone2 Temp: - + Dryer Zone3 Temp: - + @@ -204,28 +231,14 @@ Dryer Air Flow: - + Winder Tension: - - - - - - - Lubrication NL/CM: - - - - - - - Lubrication: - + @@ -234,10 +247,14 @@ + + + + - + + + + + + + + + + + + + + + + + + + + + + Total Frames: + + + + File Size: + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml.cs new file mode 100644 index 000000000..624840d66 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/MainView.xaml.cs @@ -0,0 +1,28 @@ +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.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.DataCapture.Views +{ + /// + /// Interaction logic for MainView.xaml + /// + public partial class MainView : UserControl + { + public MainView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/RecordingBarView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/RecordingBarView.xaml new file mode 100644 index 000000000..d076eb631 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/RecordingBarView.xaml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/RecordingBarView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/RecordingBarView.xaml.cs new file mode 100644 index 000000000..97389a1e5 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/Views/RecordingBarView.xaml.cs @@ -0,0 +1,28 @@ +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.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.DataCapture.Views +{ + /// + /// Interaction logic for RecordingBarView.xaml + /// + public partial class RecordingBarView : UserControl + { + public RecordingBarView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config new file mode 100644 index 000000000..4fd672b32 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DataCapture/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 8ce8c64d0..148e4375c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -459,11 +459,6 @@ namespace Tango.MachineStudio.Developer.ViewModels /// public RelayCommand MediaTogglePlayPauseCommand { get; set; } - /// - /// Gets or sets the media load file command. - /// - public RelayCommand MediaLoadFileCommand { get; set; } - /// /// Gets or sets the media play pause command. /// diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs new file mode 100644 index 000000000..b77619ac2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Integration.Operators; +using Tango.MachineStudio.Common.StudioApplication; +using Tango.PMR.Diagnostics; + +namespace Tango.MachineStudio.Common.Diagnostics +{ + /// + /// Represents the default diagnostics frame provider. + /// + /// + public class DefaultDiagnosticsFrameProvider : IDiagnosticsFrameProvider + { + /// + /// Disables the frame delivery from the current connected machine and enables the manual push frame method. + /// + public bool Disable { get; set; } + + /// + /// Occurs when a new data frame is available. + /// + public event EventHandler FrameReceived; + + /// + /// Initializes a new instance of the class. + /// + /// The application manager. + public DefaultDiagnosticsFrameProvider(IStudioApplicationManager applicationManager) + { + applicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged; + } + + /// + /// Applications the manager connected machine changed. + /// + /// The sender. + /// The machine. + private void ApplicationManager_ConnectedMachineChanged(object sender, Integration.Services.IExternalBridgeClient machine) + { + if (machine != null) + { + (machine as MachineOperator).DiagnosticsDataAvailable += DefaultDiagnosticsFrameProvider_DiagnosticsDataAvailable; + } + } + + /// + /// Defaults the diagnostics frame provider diagnostics data available. + /// + /// The sender. + /// The frame. + private void DefaultDiagnosticsFrameProvider_DiagnosticsDataAvailable(object sender, PushDiagnosticsResponse frame) + { + if (!Disable) + { + OnFrameReceived(frame); + } + } + + /// + /// Push frames manual. (Only when Disable = true) + /// + /// The frame. + public void PushFrame(PushDiagnosticsResponse frame) + { + if (Disable) + { + OnFrameReceived(frame); + } + } + + /// + /// Raises the event. + /// + /// The frame. + protected virtual void OnFrameReceived(PushDiagnosticsResponse frame) + { + FrameReceived?.Invoke(this, frame); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/IDiagnosticsFrameProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/IDiagnosticsFrameProvider.cs new file mode 100644 index 000000000..0d63b59b6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Diagnostics/IDiagnosticsFrameProvider.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PMR.Diagnostics; + +namespace Tango.MachineStudio.Common.Diagnostics +{ + /// + /// Represents a tango machine diagnostics frame provider. + /// + public interface IDiagnosticsFrameProvider + { + /// + /// Occurs when a new data frame is available. + /// + event EventHandler FrameReceived; + + /// + /// Disables the frame delivery from the current connected machine and enables the manual push frame method. + /// + bool Disable { get; set; } + + /// + /// Push frames manual. (Only when Disable = true) + /// + /// The frame. + void PushFrame(PushDiagnosticsResponse frame); + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs new file mode 100644 index 000000000..8d3cefa40 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/BarItem.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using Tango.Core; + +namespace Tango.MachineStudio.Common.Notifications +{ + public class BarItem : ExtendedObject, IDisposable + { + private INotificationProvider _notificationProvider; + + public FrameworkElement Element { get; set; } + + public BarItem(INotificationProvider notificationProvider) + { + _notificationProvider = notificationProvider; + } + + /// + /// Removed this item from the queue. + /// + public void Pop() + { + _notificationProvider.PopBarItem(this); + } + + /// + /// Pushes this item to the queue. + /// + public void Push() + { + _notificationProvider.PushBarItem(this); + } + + /// + /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + /// + public void Dispose() + { + Pop(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs index 8161ce885..e1b6275bd 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs @@ -20,6 +20,11 @@ namespace Tango.MachineStudio.Common.Notifications ///
ObservableCollection TaskItems { get; } + /// + /// Gets the collection of active bar items. + /// + ObservableCollection BarItems { get; } + /// /// Gets the current displayed task item. /// @@ -43,12 +48,32 @@ namespace Tango.MachineStudio.Common.Notifications /// TaskItem PushTaskItem(String message); + /// + /// Creates and push a new bar item from the specified framework element. + /// + /// The element. + /// + BarItem PushBarItem(FrameworkElement element); + + /// + /// Pushes the specified bar item. + /// + /// The bar item. + /// + BarItem PushBarItem(BarItem barItem); + /// /// Removed the specified task item from the queue. /// /// The task item. void PopTaskItem(TaskItem taskItem); + /// + /// Removed the specified bar item. + /// + /// The bar item. + void PopBarItem(BarItem barItem); + /// /// Creates a new instance of the specified View type and displays it as a modal dialog. /// diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 20079ff68..ba4fbab84 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -83,7 +83,10 @@ + + + @@ -186,6 +189,10 @@ {4206ac58-3b57-4699-8835-90bf6db01a61} Tango.Integration + + {e4927038-348d-4295-aaf4-861c58cb3943} + Tango.PMR + {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} Tango.Settings @@ -194,6 +201,10 @@ {8491d07b-c1f6-4b62-a412-41b9fd2d6538} Tango.SharedUI + + {74e700b0-1156-4126-be40-ee450d3c3026} + Tango.Transport + {9652f972-2bd1-4283-99cb-fc6240434c17} Tango.Video diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/DefaultVideoCaptureProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/DefaultVideoCaptureProvider.cs index 5aace7705..3aa9d4c88 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/DefaultVideoCaptureProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Video/DefaultVideoCaptureProvider.cs @@ -24,7 +24,21 @@ namespace Tango.MachineStudio.Common.Video ///
public DefaultVideoCaptureProvider() { - AvailableCaptureDevices = CaptureDevice.GetAvailableCaptureDevices().Select(device => new CaptureDevice() { Device = device }).ToObservableCollection(); + AvailableCaptureDevices = new ObservableCollection(); + + var availableDevices = CaptureDevice.GetAvailableCaptureDevices(); + + for (int i = 0; i < 3; i++) + { + if (i > availableDevices.Count - 1) + { + AvailableCaptureDevices.Add(new CaptureDevice() { Device = null }); + } + else + { + AvailableCaptureDevices.Add(new CaptureDevice() { Device = availableDevices[i] }); + } + } } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs index 31fb4b1e0..1ea22c587 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -30,6 +30,11 @@ namespace Tango.MachineStudio.UI.Notifications ///
public ObservableCollection TaskItems { get; private set; } + /// + /// Gets the collection of active bar items. + /// + public ObservableCollection BarItems { get; private set; } + /// /// Gets a value indicating whether there are any queued task items. /// @@ -58,6 +63,7 @@ namespace Tango.MachineStudio.UI.Notifications public DefaultNotificationProvider() { TaskItems = new ObservableCollection(); + BarItems = new ObservableCollection(); } /// @@ -289,6 +295,39 @@ namespace Tango.MachineStudio.UI.Notifications RaisePropertyChanged(nameof(HasTaskItems)); } + /// + /// Pushes the specified bar item. + /// + /// The bar item. + /// + public BarItem PushBarItem(BarItem barItem) + { + BarItems.Add(barItem); + return barItem; + } + + /// + /// Creates and push a new bar item from the specified framework element. + /// + /// The element. + /// + public BarItem PushBarItem(FrameworkElement element) + { + BarItem item = new BarItem(this); + item.Element = element; + PushBarItem(item); + return item; + } + + /// + /// Removed the specified bar item. + /// + /// The bar item. + public void PopBarItem(BarItem barItem) + { + BarItems.Remove(barItem); + } + /// /// Shows a dialog with a text input field and returns the response. /// diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 4569d1439..f48561e40 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -292,6 +292,10 @@ {74e700b0-1156-4126-be40-ee450d3c3026} Tango.Transport + + {fc337a7f-1214-41d8-9992-78092a3b961e} + Tango.MachineStudio.DataCapture + {94f7acf8-55e1-4a02-b9bc-a818413fdbbf} Tango.MachineStudio.DB diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs index 7ee3d50d5..1907074c0 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs @@ -5,6 +5,7 @@ using System; using Tango.Integration.Services; using Tango.Logging; using Tango.MachineStudio.Common.Authentication; +using Tango.MachineStudio.Common.Diagnostics; using Tango.MachineStudio.Common.Modules; using Tango.MachineStudio.Common.Navigation; using Tango.MachineStudio.Common.Notifications; @@ -53,6 +54,7 @@ namespace Tango.MachineStudio.UI SimpleIoc.Default.Unregister(); SimpleIoc.Default.Unregister(); SimpleIoc.Default.Unregister(); + SimpleIoc.Default.Unregister(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); @@ -61,6 +63,7 @@ namespace Tango.MachineStudio.UI SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml index 7fe900dff..479052cc5 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -18,7 +18,7 @@ - + - - + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.Integration/Diagnostics/DiagnosticsFileRecorder.cs b/Software/Visual_Studio/Tango.Integration/Diagnostics/DiagnosticsFileRecorder.cs index e89e55651..770b222f4 100644 --- a/Software/Visual_Studio/Tango.Integration/Diagnostics/DiagnosticsFileRecorder.cs +++ b/Software/Visual_Studio/Tango.Integration/Diagnostics/DiagnosticsFileRecorder.cs @@ -63,6 +63,14 @@ namespace Tango.Integration.Diagnostics private set { _totalBytesRecorded = value; RaisePropertyChanged(nameof(TotalBytesRecorded)); } } + /// + /// Gets the recording time. + /// + public TimeSpan RecordingTime + { + get { return _stopWatch != null ? _stopWatch.Elapsed : TimeSpan.Zero; } + } + #endregion #region Public Methods @@ -140,6 +148,8 @@ namespace Tango.Integration.Diagnostics frame.Milliseconds = (int)_stopWatch.Elapsed.TotalMilliseconds; _frames.Enqueue(frame); + + RaisePropertyChanged(nameof(RecordingTime)); } /// diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 7d1339354..f5fe8c1c0 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.14 +VisualStudioVersion = 15.0.26430.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Protobuf", "Tango.Protobuf\Tango.Protobuf.csproj", "{40073806-914E-4E78-97AB-FA9639308EBE}" EndProject @@ -125,6 +125,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Editors", "Tango.Edit EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Visuals", "Tango.Visuals\Tango.Visuals.csproj", "{CF7C0FF4-9440-42CF-83B8-C060772792D4}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.DataCapture", "MachineStudio\Modules\Tango.MachineStudio.DataCapture\Tango.MachineStudio.DataCapture.csproj", "{FC337A7F-1214-41D8-9992-78092A3B961E}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1625,6 +1627,36 @@ Global {CF7C0FF4-9440-42CF-83B8-C060772792D4}.Release|x64.Build.0 = Release|Any CPU {CF7C0FF4-9440-42CF-83B8-C060772792D4}.Release|x86.ActiveCfg = Release|Any CPU {CF7C0FF4-9440-42CF-83B8-C060772792D4}.Release|x86.Build.0 = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|ARM.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|ARM.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|ARM64.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|x64.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|x64.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|x86.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Debug|x86.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|Any CPU.Build.0 = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|ARM.ActiveCfg = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|ARM.Build.0 = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|ARM64.ActiveCfg = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|ARM64.Build.0 = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|x64.ActiveCfg = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|x64.Build.0 = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|x86.ActiveCfg = Release|Any CPU + {FC337A7F-1214-41D8-9992-78092A3B961E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1659,5 +1691,6 @@ Global {8A03ADC0-991B-4DA8-8A19-E1D03F92E81C} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} {37E4CEAB-B54B-451F-B535-04CF7DA9C459} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} {5B954D98-4020-4AC6-939F-C52B5646E8E6} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} + {FC337A7F-1214-41D8-9992-78092A3B961E} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} EndGlobalSection EndGlobal diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml index 403723a92..3d0a14c4e 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml +++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml @@ -18,7 +18,7 @@ - + IS ON -- cgit v1.3.1