From afc7a07d285e08d905c58dd5978441c155b2f296 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 19 Dec 2017 10:25:40 +0200 Subject: MERGE. --- .../twine/tango/core/DescriptionAnnotation.java | 17 + Software/Android_Studio/Tango.DAL/build.gradle | 15 +- .../java/com/twine/tango/dal/DateConverter.java | 35 + .../src/main/java/com/twine/tango/dal/Entity.java | 120 ++ .../com/twine/tango/dal/dao/OrganizationsDAO.java | 18 - .../java/com/twine/tango/dal/dao/TangoDAO.java | 438 ++++++ .../java/com/twine/tango/dal/entities/Action.java | 94 ++ .../java/com/twine/tango/dal/entities/Address.java | 328 +++-- .../entities/ApplicationDisplayPanelVersion.java | 68 + .../dal/entities/ApplicationFirmwareVersion.java | 68 + .../tango/dal/entities/ApplicationOsVersion.java | 68 + .../tango/dal/entities/ApplicationVersion.java | 68 + .../com/twine/tango/dal/entities/Cartridge.java | 68 + .../twine/tango/dal/entities/CartridgeType.java | 68 + .../twine/tango/dal/entities/Configuration.java | 250 ++++ .../java/com/twine/tango/dal/entities/Contact.java | 283 ++-- .../twine/tango/dal/entities/DateConverter.java | 36 - .../com/twine/tango/dal/entities/Dispenser.java | 68 + .../twine/tango/dal/entities/DispenserType.java | 68 + .../dal/entities/EmbeddedFirmwareVersion.java | 68 + .../dal/entities/EmbeddedSoftwareVersion.java | 68 + .../java/com/twine/tango/dal/entities/Entity.java | 118 -- .../java/com/twine/tango/dal/entities/Event.java | 94 ++ .../com/twine/tango/dal/entities/EventsAction.java | 68 + .../com/twine/tango/dal/entities/FiberShape.java | 68 + .../com/twine/tango/dal/entities/FiberSynth.java | 68 + .../twine/tango/dal/entities/HardwareVersion.java | 68 + .../java/com/twine/tango/dal/entities/IdsPack.java | 146 ++ .../tango/dal/entities/LinearMassDensityUnit.java | 68 + .../java/com/twine/tango/dal/entities/Liquid.java | 120 ++ .../com/twine/tango/dal/entities/LiquidsRml.java | 68 + .../java/com/twine/tango/dal/entities/Machine.java | 146 ++ .../twine/tango/dal/entities/MachineVersion.java | 94 ++ .../tango/dal/entities/MachinesConfiguration.java | 68 + .../twine/tango/dal/entities/MachinesEvent.java | 146 ++ .../com/twine/tango/dal/entities/MediaColor.java | 42 + .../twine/tango/dal/entities/MediaCondition.java | 68 + .../twine/tango/dal/entities/MediaMaterial.java | 68 + .../com/twine/tango/dal/entities/MediaPurpose.java | 68 + .../com/twine/tango/dal/entities/Organization.java | 146 +- .../com/twine/tango/dal/entities/Permission.java | 94 ++ .../java/com/twine/tango/dal/entities/Rml.java | 484 +++++++ .../java/com/twine/tango/dal/entities/Role.java | 94 ++ .../twine/tango/dal/entities/RolesPermission.java | 68 + .../tango/dal/entities/SyncConfiguration.java | 16 + .../java/com/twine/tango/dal/entities/User.java | 146 ++ .../com/twine/tango/dal/entities/UsersRole.java | 68 + .../com/twine/tango/dal/enumerations/Actions.java | 15 + .../tango/dal/enumerations/CartridgeTypes.java | 19 + .../tango/dal/enumerations/DispenserTypes.java | 19 + .../com/twine/tango/dal/enumerations/EnumDemo.java | 20 + .../com/twine/tango/dal/enumerations/Events.java | 15 + .../twine/tango/dal/enumerations/FiberShapes.java | 15 + .../twine/tango/dal/enumerations/FiberSynths.java | 15 + .../dal/enumerations/LinearMassDensityUnits.java | 15 + .../com/twine/tango/dal/enumerations/Liquids.java | 22 + .../tango/dal/enumerations/MediaConditions.java | 15 + .../tango/dal/enumerations/MediaMaterials.java | 15 + .../tango/dal/enumerations/MediaPurposes.java | 15 + .../twine/tango/dal/enumerations/Permissions.java | 25 + .../com/twine/tango/dal/enumerations/Roles.java | 31 + .../Tango.DAL/src/main/res/raw/tangodb | Bin 516096 -> 557056 bytes .../tango/pmr/common/ErrorCodeOuterClass.java | 143 ++ .../pmr/common/MessageContainerOuterClass.java | 171 ++- .../tango/pmr/common/MessageTypeOuterClass.java | 239 +++- .../stubs/StubCartridgeReadRequestOuterClass.java | 525 +++++++ .../stubs/StubCartridgeReadResponseOuterClass.java | 824 +++++++++++ .../stubs/StubCartridgeWriteRequestOuterClass.java | 815 +++++++++++ .../StubCartridgeWriteResponseOuterClass.java | 568 ++++++++ .../pmr/stubs/StubDispenserRequestOuterClass.java | 841 +++++++++++ .../pmr/stubs/StubDispenserResponseOuterClass.java | 771 ++++++++++ .../stubs/StubGPIOReadBitRequestOuterClass.java | 608 ++++++++ .../stubs/StubGPIOReadBitResponseOuterClass.java | 757 ++++++++++ .../stubs/StubGPIOReadByteRequestOuterClass.java | 525 +++++++ .../stubs/StubGPIOReadByteResponseOuterClass.java | 673 +++++++++ .../stubs/StubGPIOWriteBitRequestOuterClass.java | 673 +++++++++ .../stubs/StubGPIOWriteBitResponseOuterClass.java | 693 +++++++++ .../stubs/StubGPIOWriteByteRequestOuterClass.java | 588 ++++++++ .../stubs/StubGPIOWriteByteResponseOuterClass.java | 609 ++++++++ .../pmr/stubs/StubHeaterRequestOuterClass.java | 673 +++++++++ .../pmr/stubs/StubHeaterResponseOuterClass.java | 673 +++++++++ .../stubs/StubMotorEncoderRequestOuterClass.java | 758 ++++++++++ .../stubs/StubMotorEncoderResponseOuterClass.java | 821 +++++++++++ .../stubs/StubOptLimitSwitchRequestOuterClass.java | 610 ++++++++ .../StubOptLimitSwitchResponseOuterClass.java | 689 +++++++++ .../stubs/StubSteperMotorRequestOuterClass.java | 861 +++++++++++ .../stubs/StubSteperMotorResponseOuterClass.java | 688 +++++++++ .../pmr/stubs/StubValveRequestOuterClass.java | 631 ++++++++ .../pmr/stubs/StubValveResponseOuterClass.java | 525 +++++++ .../tango/unittesting/Synchronization_TST.java | 7 +- Software/DB/Tango.db-journal | Bin 0 -> 234440 bytes Software/Graphics/account.png | Bin 0 -> 3373 bytes .../Modules/Tango.MachineStudio.DB/DBModule.cs | 2 +- .../INotificationProviderExtensions.cs | 13 +- .../Managers/ViewsManager.cs | 4 +- .../Messages/CloseEntityEditViewMessage.cs | 13 + .../Messages/OpenEntityEditViewMessage.cs | 28 + .../Tango.MachineStudio.DB.csproj | 245 ++++ .../Tango.MachineStudio.DB/ViewModelLocator.cs | 137 ++ .../ApplicationDisplayPanelVersionsViewVM.cs | 17 + .../ApplicationFirmwareVersionsViewVM.cs | 17 + .../ViewModels/ApplicationOsVersionsViewVM.cs | 17 + .../ViewModels/ApplicationVersionsViewVM.cs | 17 + .../ViewModels/CartridgeTypesViewVM.cs | 17 + .../ViewModels/CartridgesViewVM.cs | 18 + .../ViewModels/ConfigurationsViewVM.cs | 24 + .../ViewModels/DbTableViewModel.cs | 126 +- .../ViewModels/DispenserTypesViewVM.cs | 17 + .../ViewModels/DispensersViewVM.cs | 18 + .../ViewModels/EmbeddedFirmwareVersionsViewVM.cs | 17 + .../ViewModels/EmbeddedSoftwareVersionsViewVM.cs | 17 + .../ViewModels/HardwareVersionsViewVM.cs | 17 + .../ViewModels/IdsPacksViewVM.cs | 18 + .../ViewModels/LiquidsViewVM.cs | 17 + .../ViewModels/MachineVersionsViewVM.cs | 18 + .../ViewModels/MainViewVM.cs | 5 +- .../ViewModels/OrganizationsViewVM.cs | 9 - .../ViewModels/UsersViewVM.cs | 19 + .../Views/DBViews/AddressesView.xaml | 2 +- .../ApplicationDisplayPanelVersionView.xaml | 25 + .../ApplicationDisplayPanelVersionView.xaml.cs | 28 + .../ApplicationDisplayPanelVersionsView.xaml | 23 + .../ApplicationDisplayPanelVersionsView.xaml.cs | 32 + .../DBViews/ApplicationFirmwareVersionView.xaml | 25 + .../DBViews/ApplicationFirmwareVersionView.xaml.cs | 28 + .../DBViews/ApplicationFirmwareVersionsView.xaml | 23 + .../ApplicationFirmwareVersionsView.xaml.cs | 32 + .../Views/DBViews/ApplicationOsVersionView.xaml | 25 + .../Views/DBViews/ApplicationOsVersionView.xaml.cs | 28 + .../Views/DBViews/ApplicationOsVersionsView.xaml | 23 + .../DBViews/ApplicationOsVersionsView.xaml.cs | 32 + .../Views/DBViews/ApplicationVersionView.xaml | 25 + .../Views/DBViews/ApplicationVersionView.xaml.cs | 28 + .../Views/DBViews/ApplicationVersionsView.xaml | 23 + .../Views/DBViews/ApplicationVersionsView.xaml.cs | 32 + .../Views/DBViews/CartridgeTypeView.xaml | 29 + .../Views/DBViews/CartridgeTypeView.xaml.cs | 28 + .../Views/DBViews/CartridgeTypesView.xaml | 24 + .../Views/DBViews/CartridgeTypesView.xaml.cs | 32 + .../Views/DBViews/CartridgeView.xaml | 29 + .../Views/DBViews/CartridgeView.xaml.cs | 28 + .../Views/DBViews/CartridgesView.xaml | 24 + .../Views/DBViews/CartridgesView.xaml.cs | 32 + .../Views/DBViews/ConfigurationView.xaml | 53 + .../Views/DBViews/ConfigurationView.xaml.cs | 28 + .../Views/DBViews/ConfigurationsView.xaml | 30 + .../Views/DBViews/ConfigurationsView.xaml.cs | 32 + .../Views/DBViews/DispenserTypeView.xaml | 29 + .../Views/DBViews/DispenserTypeView.xaml.cs | 28 + .../Views/DBViews/DispenserTypesView.xaml | 24 + .../Views/DBViews/DispenserTypesView.xaml.cs | 32 + .../Views/DBViews/DispenserView.xaml | 29 + .../Views/DBViews/DispenserView.xaml.cs | 28 + .../Views/DBViews/DispensersView.xaml | 24 + .../Views/DBViews/DispensersView.xaml.cs | 32 + .../Views/DBViews/EmbeddedFirmwareVersionView.xaml | 25 + .../DBViews/EmbeddedFirmwareVersionView.xaml.cs | 28 + .../DBViews/EmbeddedFirmwareVersionsView.xaml | 23 + .../DBViews/EmbeddedFirmwareVersionsView.xaml.cs | 32 + .../Views/DBViews/EmbeddedSoftwareVersionView.xaml | 25 + .../DBViews/EmbeddedSoftwareVersionView.xaml.cs | 28 + .../DBViews/EmbeddedSoftwareVersionsView.xaml | 23 + .../DBViews/EmbeddedSoftwareVersionsView.xaml.cs | 32 + .../Views/DBViews/HardwareVersionView.xaml | 25 + .../Views/DBViews/HardwareVersionView.xaml.cs | 28 + .../Views/DBViews/HardwareVersionsView.xaml | 23 + .../Views/DBViews/HardwareVersionsView.xaml.cs | 32 + .../Views/DBViews/IdsPackView.xaml | 64 + .../Views/DBViews/IdsPackView.xaml.cs | 28 + .../Views/DBViews/IdsPacksView.xaml | 57 + .../Views/DBViews/IdsPacksView.xaml.cs | 32 + .../Views/DBViews/LiquidView.xaml | 42 + .../Views/DBViews/LiquidView.xaml.cs | 28 + .../Views/DBViews/LiquidsView.xaml | 41 + .../Views/DBViews/LiquidsView.xaml.cs | 32 + .../Views/DBViews/MachineVersionView.xaml | 27 + .../Views/DBViews/MachineVersionView.xaml.cs | 28 + .../Views/DBViews/MachineVersionsView.xaml | 24 + .../Views/DBViews/MachineVersionsView.xaml.cs | 32 + .../Views/DBViews/MachinesView.xaml | 2 +- .../Views/DBViews/PermissionsView.xaml | 2 +- .../Views/DBViews/RolesView.xaml | 2 +- .../Views/DBViews/UserView.xaml | 2 +- .../Views/DBViews/UsersView.xaml | 2 +- .../Tango.MachineStudio.DB/Views/MainDBView.xaml | 120 +- .../Views/MainDBView.xaml.cs | 51 +- .../Windows/DBDialogWindow.xaml | 32 + .../Windows/DBDialogWindow.xaml.cs | 68 + .../Modules/Tango.MachineStudio.DB/packages.config | 2 + .../Controls/MdiContainerControl.xaml | 2 +- .../ExtensionMethods/IStudioMessageExtensions.cs | 15 + .../ExtensionMethods/UserExtensions.cs | 2 +- .../Tango.MachineStudio.Common/IStudioModule.cs | 2 +- .../Messages/IStudioMessage.cs | 13 + .../Notifications/INotificationProvider.cs | 30 +- .../Notifications/TaskItem.cs | 41 + .../StudioApplication/IShutdownRequestBlocker.cs | 13 + .../StudioApplication/IStudioApplicationManager.cs | 13 + .../Tango.MachineStudio.Common/StudioViewModel.cs | 25 + .../Tango.MachineStudio.Common.csproj | 22 + .../ValidationRules/Required.cs | 18 + .../Tango.MachineStudio.Common/packages.config | 2 + .../Tango.MachineStudio.UI/App.xaml.cs | 4 - .../Tango.MachineStudio.UI/Images/account.png | Bin 0 -> 3373 bytes .../Tango.MachineStudio.UI/MainWindow.xaml.cs | 11 +- .../Notifications/DefaultNotificationProvider.cs | 104 +- .../Notifications/DialogWindow.xaml | 10 +- .../Notifications/DialogWindow.xaml.cs | 12 + .../Notifications/MessageBoxWindow.xaml | 40 + .../Notifications/MessageBoxWindow.xaml.cs | 83 ++ .../DefaultStudioApplicationManager.cs | 53 + .../Tango.MachineStudio.UI.csproj | 18 +- .../Tango.MachineStudio.UI/ViewModelLocator.cs | 4 + .../ViewModels/LoadingViewVM.cs | 50 +- .../ViewModels/LoginViewVM.cs | 57 +- .../ViewModels/MainViewVM.cs | 17 +- .../Tango.MachineStudio.UI/Views/LoadingView.xaml | 4 +- .../Tango.MachineStudio.UI/Views/LoginView.xaml | 32 +- .../Tango.MachineStudio.UI/Views/LoginView.xaml.cs | 35 +- .../Tango.MachineStudio.UI/Views/MainView.xaml | 105 +- .../Tango.MachineStudio.UI/Views/ShutdownView.xaml | 15 +- .../Tango.MachineStudio.UI/packages.config | 1 + .../Visual_Studio/Tango.CodeGeneration/Class.cs | 2 +- .../Tango.CodeGeneration/EntityCodeFileJava.cs | 22 + .../Tango.CodeGeneration/EnumerationFileJava.cs | 20 + .../Tango.CodeGeneration/ObservablesAdapterFile.cs | 13 + .../Tango.CodeGeneration.csproj | 8 + .../Tango.CodeGeneration/TangoDAOJavaFile.cs | 26 + .../Templates/EntityCodeFileJava.cshtml | 59 + .../Templates/EnumerationFileJava.cshtml | 23 + .../Templates/ObservablesAdapterFile.cshtml | 46 + .../Templates/TangoDAOJavaFile.cshtml | 27 + .../Chromes/Implementation/ButtonChrome.cs | 272 ++++ .../Tango.ColorPicker/Chromes/Themes/Generic.xaml | 228 +++ .../Tango.ColorPicker/ColorBlendConverter.cs | 82 ++ .../ColorCanvas/Implementation/ColorCanvas.cs | 602 ++++++++ .../Implementation/ColorSpectrumSlider.cs | 111 ++ .../ColorCanvas/Themes/Generic.xaml | 602 ++++++++ .../ColorPicker/Implementation/ColorItem.cs | 53 + .../ColorPicker/Implementation/ColorPicker.cs | 770 ++++++++++ .../ColorPicker/Implementation/ColorSorter.cs | 77 + .../ColorPicker/Themes/Generic.xaml | 356 +++++ .../ColorToSolidColorBrushConverter.cs | 67 + .../Tango.ColorPicker/ColorUtilities.cs | 205 +++ .../Visual_Studio/Tango.ColorPicker/HsvColor.cs | 32 + .../Tango.ColorPicker/InverseBoolConverter.cs | 38 + .../Tango.ColorPicker/KeyboardUtilities.cs | 33 + .../Tango.ColorPicker/Properties/AssemblyInfo.cs | 18 + .../Properties/Resources.Designer.cs | 63 + .../Tango.ColorPicker/Properties/Resources.resx | 117 ++ .../Properties/Settings.Designer.cs | 26 + .../Tango.ColorPicker/Properties/Settings.settings | 7 + .../Tango.ColorPicker/ResourceKeys.cs | 61 + .../Tango.ColorPicker/Tango.ColorPicker.csproj | 159 +++ .../Tango.ColorPicker/Themes/Brushes.xaml | 216 +++ .../Tango.ColorPicker/Themes/Buttons.xaml | 49 + .../Tango.ColorPicker/Themes/Common.xaml | 234 +++ .../Tango.ColorPicker/Themes/Generic.xaml | 12 + .../Tango.ColorPicker/Themes/Glyphs.xaml | 67 + .../Tango.ColorPicker/WindowColors.cs | 126 ++ .../Tango.ColorPicker/WindowControl.cs | 834 +++++++++++ .../Tango.ColorPicker/packages.config | 5 + .../Tango.Core/Cryptography/ICryptographer.cs | 16 + .../Cryptography/Rfc2898Cryptographer.cs | 70 + .../ExtensionMethods/IServiceLocatorExtensions.cs | 22 + .../ExtensionMethods/StringExtensions.cs | 4 +- .../Tango.Core/Helpers/ColorHelper.cs | 40 + .../Tango.Core/Helpers/ThreadsHelper.cs | 22 + .../Tango.Core/Properties/Resources.Designer.cs | 72 + .../Tango.Core/Properties/Resources.resx | 124 ++ .../Tango.Core/Software - Shortcut.lnk | Bin 0 -> 956 bytes .../Visual_Studio/Tango.Core/Tango.Core.csproj | 36 + .../Tango.Core/Threading/StaThreadHelper.cs | 23 + Software/Visual_Studio/Tango.Core/packages.config | 3 + .../Tango.DAL.Local/DB/LocalADO.Context.cs | 1 - .../Visual_Studio/Tango.DAL.Local/DB/LocalADO.edmx | 39 - .../Tango.DAL.Local/DB/LocalADO.edmx.diagram | 31 +- .../DB/MACHINE_VERSIONS_CONFIGURATIONS.cs | 25 - .../Tango.DAL.Local/Tango.DAL.Local.csproj | 3 - .../Entities/ApplicationDisplayPanelVersion.cs | 38 + .../Entities/ApplicationFirmwareVersion.cs | 38 + .../Entities/ApplicationOsVersion.cs | 38 + .../Entities/ApplicationVersion.cs | 38 + .../Tango.DAL.Observables/Entities/Cartridge.cs | 19 + .../Entities/CartridgeType.cs | 38 + .../Entities/Configuration.cs | 52 +- .../Tango.DAL.Observables/Entities/Dispenser.cs | 19 + .../Entities/DispenserType.cs | 38 + .../Entities/EmbeddedFirmwareVersion.cs | 38 + .../Entities/EmbeddedSoftwareVersion.cs | 38 + .../Tango.DAL.Observables/Entities/FiberSynth.cs | 98 ++ .../Entities/FiberSynthesis.cs | 98 -- .../Entities/HardwareVersion.cs | 38 + .../Tango.DAL.Observables/Entities/IdsPack.cs | 19 + .../Tango.DAL.Observables/Entities/Liquid.cs | 19 + .../Entities/MachineVersion.cs | 52 +- .../Entities/MachineVersionsConfiguration.cs | 114 -- .../Entities/PermissionsEnum.cs | 31 - .../Tango.DAL.Observables/Entities/Rml.cs | 24 +- .../Tango.DAL.Observables/Entities/RolesEnum.cs | 43 - .../Tango.DAL.Observables/Enumerations/Actions.cs | 12 + .../Enumerations/CartridgeTypes.cs | 19 + .../Enumerations/DispenserTypes.cs | 19 + .../Tango.DAL.Observables/Enumerations/Events.cs | 12 + .../Enumerations/FiberShapes.cs | 12 + .../Enumerations/FiberSynthes.cs | 12 + .../Enumerations/FiberSynthesises.cs | 12 + .../Enumerations/FiberSynths.cs | 12 + .../Enumerations/LinearMassDensityUnits.cs | 12 + .../Tango.DAL.Observables/Enumerations/Liquids.cs | 25 + .../Enumerations/MediaConditions.cs | 12 + .../Enumerations/MediaMaterials.cs | 12 + .../Enumerations/MediaPurposes.cs | 12 + .../Enumerations/Permissions.cs | 31 + .../Tango.DAL.Observables/Enumerations/Roles.cs | 43 + .../Tango.DAL.Observables/IObservableEntity.cs | 4 + .../Tango.DAL.Observables/ObservableEntity.cs | 52 +- .../ObservablesEntitiesAdapter.cs | 87 +- .../ObservablesEntitiesAdapterExtension.cs | 1499 ++++++++++++++++++++ .../Tango.DAL.Observables/ObservablesGenerator.cs | 209 ++- .../Tango.DAL.Observables.csproj | 24 +- .../Tango.DAL.Observables/packages.config | 42 + .../DB/APPLICATION_DISPLAY_PANEL_VERSIONS.cs | 2 + .../DB/APPLICATION_FIRMWARE_VERSIONS.cs | 2 + .../Tango.DAL.Remote/DB/APPLICATION_OS_VERSIONS.cs | 2 + .../Tango.DAL.Remote/DB/APPLICATION_VERSIONS.cs | 2 + .../Visual_Studio/Tango.DAL.Remote/DB/CARTRIDGE.cs | 1 + .../Tango.DAL.Remote/DB/CARTRIDGE_TYPES.cs | 2 + .../Tango.DAL.Remote/DB/CONFIGURATION.cs | 8 +- .../Visual_Studio/Tango.DAL.Remote/DB/DISPENSER.cs | 1 + .../Tango.DAL.Remote/DB/DISPENSER_TYPES.cs | 2 + .../DB/EMBEDDED_FIRMWARE_VERSIONS.cs | 2 + .../DB/EMBEDDED_SOFTWARE_VERSIONS.cs | 2 + .../Tango.DAL.Remote/DB/FIBER_SYNTHESISES.cs | 33 - .../Tango.DAL.Remote/DB/FIBER_SYNTHS.cs | 33 + .../Tango.DAL.Remote/DB/HARDWARE_VERSIONS.cs | 2 + .../Visual_Studio/Tango.DAL.Remote/DB/IDS_PACKS.cs | 1 + .../Visual_Studio/Tango.DAL.Remote/DB/LIQUID.cs | 1 + .../Tango.DAL.Remote/DB/MACHINE_VERSIONS.cs | 6 +- .../DB/MACHINE_VERSIONS_CONFIGURATIONS.cs | 27 - Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 4 +- .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 3 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 274 ++-- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 84 +- .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 5 +- .../Visual_Studio/Tango.Settings/MachineStudio.cs | 18 + .../Tango.Settings/SettingsCollection.cs | 3 + .../Tango.Settings/Tango.Settings.csproj | 1 + .../Controls/MultiTransitionControl.xaml.cs | 13 + .../Converters/ColorToIntegerConverter.cs | 25 + .../Tango.SharedUI/Tango.SharedUI.csproj | 2 + Software/Visual_Studio/Tango.SharedUI/ViewModel.cs | 57 +- .../Tango.UnitTesting/CodeGeneration_TST.cs | 2 +- Software/Visual_Studio/Tango.sln | 16 +- .../Tango.DBObservablesGenerator.CLI/Program.cs | 17 +- 355 files changed, 34643 insertions(+), 1435 deletions(-) create mode 100644 Software/Android_Studio/Tango.Core/src/main/java/com/twine/tango/core/DescriptionAnnotation.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/DateConverter.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/Entity.java delete mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/OrganizationsDAO.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/TangoDAO.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Action.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationDisplayPanelVersion.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationFirmwareVersion.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationOsVersion.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationVersion.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cartridge.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/CartridgeType.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Configuration.java delete mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DateConverter.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Dispenser.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DispenserType.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedFirmwareVersion.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedSoftwareVersion.java delete mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Entity.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Event.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventsAction.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberShape.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberSynth.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/HardwareVersion.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/IdsPack.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LinearMassDensityUnit.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Liquid.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidsRml.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Machine.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachineVersion.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesConfiguration.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesEvent.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaColor.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaCondition.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaMaterial.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaPurpose.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Permission.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Rml.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Role.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/RolesPermission.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/SyncConfiguration.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/User.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/UsersRole.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Actions.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/CartridgeTypes.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/DispenserTypes.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/EnumDemo.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Events.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberShapes.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberSynths.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LinearMassDensityUnits.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Liquids.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaConditions.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaMaterials.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaPurposes.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Permissions.java create mode 100644 Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Roles.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/ErrorCodeOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeReadRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeReadResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorResponseOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveRequestOuterClass.java create mode 100644 Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveResponseOuterClass.java create mode 100644 Software/DB/Tango.db-journal create mode 100644 Software/Graphics/account.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/IStudioMessage.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/TaskItem.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ValidationRules/Required.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/account.png create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFileJava.cs create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/EnumerationFileJava.cs create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/ObservablesAdapterFile.cs create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/TangoDAOJavaFile.cs create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/Templates/EntityCodeFileJava.cshtml create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/Templates/EnumerationFileJava.cshtml create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/Templates/ObservablesAdapterFile.cshtml create mode 100644 Software/Visual_Studio/Tango.CodeGeneration/Templates/TangoDAOJavaFile.cshtml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Chromes/Implementation/ButtonChrome.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Chromes/Themes/Generic.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorBlendConverter.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorCanvas.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorSpectrumSlider.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Themes/Generic.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorItem.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorPicker.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorSorter.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Themes/Generic.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorToSolidColorBrushConverter.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ColorUtilities.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/HsvColor.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/InverseBoolConverter.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/KeyboardUtilities.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Properties/Resources.resx create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Properties/Settings.settings create mode 100644 Software/Visual_Studio/Tango.ColorPicker/ResourceKeys.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Tango.ColorPicker.csproj create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Themes/Brushes.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Themes/Buttons.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Themes/Common.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Themes/Generic.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/Themes/Glyphs.xaml create mode 100644 Software/Visual_Studio/Tango.ColorPicker/WindowColors.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/WindowControl.cs create mode 100644 Software/Visual_Studio/Tango.ColorPicker/packages.config create mode 100644 Software/Visual_Studio/Tango.Core/Cryptography/ICryptographer.cs create mode 100644 Software/Visual_Studio/Tango.Core/Cryptography/Rfc2898Cryptographer.cs create mode 100644 Software/Visual_Studio/Tango.Core/ExtensionMethods/IServiceLocatorExtensions.cs create mode 100644 Software/Visual_Studio/Tango.Core/Helpers/ColorHelper.cs create mode 100644 Software/Visual_Studio/Tango.Core/Helpers/ThreadsHelper.cs create mode 100644 Software/Visual_Studio/Tango.Core/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/Tango.Core/Properties/Resources.resx create mode 100644 Software/Visual_Studio/Tango.Core/Software - Shortcut.lnk create mode 100644 Software/Visual_Studio/Tango.Core/Threading/StaThreadHelper.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Local/DB/MACHINE_VERSIONS_CONFIGURATIONS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberSynth.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/FiberSynthesis.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/MachineVersionsConfiguration.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/PermissionsEnum.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Entities/RolesEnum.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/Actions.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/CartridgeTypes.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/DispenserTypes.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/Events.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/FiberShapes.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/FiberSynthes.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/FiberSynthesises.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/FiberSynths.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/LinearMassDensityUnits.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/Liquids.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MediaConditions.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MediaMaterials.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/MediaPurposes.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/Permissions.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/Enumerations/Roles.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Observables/ObservablesEntitiesAdapterExtension.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHESISES.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/FIBER_SYNTHS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE_VERSIONS_CONFIGURATIONS.cs create mode 100644 Software/Visual_Studio/Tango.Settings/MachineStudio.cs create mode 100644 Software/Visual_Studio/Tango.SharedUI/Converters/ColorToIntegerConverter.cs (limited to 'Software') diff --git a/Software/Android_Studio/Tango.Core/src/main/java/com/twine/tango/core/DescriptionAnnotation.java b/Software/Android_Studio/Tango.Core/src/main/java/com/twine/tango/core/DescriptionAnnotation.java new file mode 100644 index 000000000..31c0e587a --- /dev/null +++ b/Software/Android_Studio/Tango.Core/src/main/java/com/twine/tango/core/DescriptionAnnotation.java @@ -0,0 +1,17 @@ +package com.twine.tango.core; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface DescriptionAnnotation { + /** + * Field description. + * + * @return the string + */ + String description() default ""; +} \ No newline at end of file diff --git a/Software/Android_Studio/Tango.DAL/build.gradle b/Software/Android_Studio/Tango.DAL/build.gradle index efd90c7c5..86c71c619 100644 --- a/Software/Android_Studio/Tango.DAL/build.gradle +++ b/Software/Android_Studio/Tango.DAL/build.gradle @@ -49,6 +49,7 @@ dependencies { compile globalDependencies.logging compile globalDependencies.storage + compile globalDependencies.joda compile group: 'commons-io', name: 'commons-io', version: '2.4' } @@ -60,4 +61,16 @@ task copyFiles(type: Copy) { rename ('Tango.db', 'tangodb') } -preBuild.dependsOn(copyFiles) \ No newline at end of file +//Generate DAL Entities. +task generateEntities(type: Exec, description: 'Generate DAL Entities') { + + commandLine '..\\Visual_Studio\\Build\\Debug\\dbobgen.exe', 'src\\main\\java\\com\\twine\\tango\\dal', '-java', + + ext.output = { + return standardOutput.toString() + } +} + +preBuild.dependsOn(copyFiles) + +preBuild.dependsOn(generateEntities) \ No newline at end of file diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/DateConverter.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/DateConverter.java new file mode 100644 index 000000000..165d0f161 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/DateConverter.java @@ -0,0 +1,35 @@ +package com.twine.tango.dal; +import com.raizlabs.android.dbflow.converter.TypeConverter; +import com.twine.tango.dal.enumerations.EnumDemo; + +import org.joda.time.DateTime; +import org.joda.time.format.DateTimeFormat; +import org.joda.time.format.DateTimeFormatter; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + + +/** + * Represents a DBFlow string to date converter used to parse and store SQLite dates. + */ +@com.raizlabs.android.dbflow.annotation.TypeConverter +public class DateConverter extends TypeConverter +{ + + @Override + public String getDBValue(DateTime model) + { + DateTimeFormatter dtfOut = DateTimeFormat.forPattern("yyyy-MM-dd hh:mm:ss"); + return dtfOut.print(model); + } + + @Override + public DateTime getModelValue(String data) + { + DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy-MM-dd hh:mm:ss"); + DateTime jodatime = dtf.parseDateTime(data); + return jodatime; + } +} 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 new file mode 100644 index 000000000..fd41d9230 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/Entity.java @@ -0,0 +1,120 @@ +package com.twine.tango.dal; + +import com.raizlabs.android.dbflow.annotation.Column; +import com.raizlabs.android.dbflow.annotation.PrimaryKey; +import com.raizlabs.android.dbflow.rx2.structure.BaseRXModel; + +import org.joda.time.DateTime; +import org.joda.time.DateTimeZone; + +import java.util.UUID; + + +/** + * Represents a DAL base entity. + * contains the basic columns/properties which are in common to all entities. + */ +public class Entity extends BaseRXModel +{ + @Column(name = "ID") + private int id; + + @Column(name = "GUID") + @PrimaryKey + private String guid; + + @Column(name = "LAST_UPDATED",typeConverter = DateConverter.class) + private DateTime last_updated; + + @Column(name = "DELETED") + private boolean deleted; + + /** + * Gets id. + * + * @return the id + */ + public int getId() + { + return id; + } + + /** + * Sets id. + * + * @param id the id + */ + public void setId(int id) + { + this.id = id; + } + + /** + * Gets guid. + * + * @return the guid + */ + public String getGuid() + { + return guid; + } + + /** + * Sets guid. + * + * @param guid the guid + */ + public void setGuid(String guid) + { + this.guid = guid; + } + + /** + * Gets last updated. + * + * @return the last updated + */ + public DateTime getLast_updated() + { + return last_updated; + } + + /** + * Sets last updated. + * + * @param last_updated the last updated + */ + public void setLast_updated(DateTime last_updated) + { + 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. + */ + public Entity() + { + setGuid(UUID.randomUUID().toString()); + setLast_updated(DateTime.now(DateTimeZone.UTC)); + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/OrganizationsDAO.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/OrganizationsDAO.java deleted file mode 100644 index 2fb669bbb..000000000 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/OrganizationsDAO.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.twine.tango.dal.dao; - -import com.raizlabs.android.dbflow.sql.language.SQLite; -import com.twine.tango.dal.entities.Organization; - -import java.util.List; - -/** - * Created by Roy on 12/2/2017. - */ - -public class OrganizationsDAO -{ - public static List getAllOrganizations() - { - return SQLite.select().from(Organization.class).queryList(); - } -} 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 new file mode 100644 index 000000000..e02fc0b3f --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/dao/TangoDAO.java @@ -0,0 +1,438 @@ +package com.twine.tango.dal.dao; + +import com.raizlabs.android.dbflow.sql.language.SQLite; +import com.twine.tango.dal.entities.Action; +import com.twine.tango.dal.entities.Address; +import com.twine.tango.dal.entities.ApplicationDisplayPanelVersion; +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.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.Event; +import com.twine.tango.dal.entities.EventsAction; +import com.twine.tango.dal.entities.FiberShape; +import com.twine.tango.dal.entities.FiberSynth; +import com.twine.tango.dal.entities.HardwareVersion; +import com.twine.tango.dal.entities.IdsPack; +import com.twine.tango.dal.entities.LinearMassDensityUnit; +import com.twine.tango.dal.entities.Liquid; +import com.twine.tango.dal.entities.LiquidsRml; +import com.twine.tango.dal.entities.MachineVersion; +import com.twine.tango.dal.entities.Machine; +import com.twine.tango.dal.entities.MachinesConfiguration; +import com.twine.tango.dal.entities.MachinesEvent; +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.Organization; +import com.twine.tango.dal.entities.Permission; +import com.twine.tango.dal.entities.Rml; +import com.twine.tango.dal.entities.Role; +import com.twine.tango.dal.entities.RolesPermission; +import com.twine.tango.dal.entities.SyncConfiguration; +import com.twine.tango.dal.entities.User; +import com.twine.tango.dal.entities.UsersRole; +import java.util.List; + +public class TangoDAO +{ + + /** + * Gets all the Actions from database. + * + * @return all Actions + */ + public static List getAllActions() + { + return SQLite.select().from(Action.class).queryList(); + } + + /** + * Gets all the Addresses from database. + * + * @return all Addresses + */ + public static List
getAllAddresses() + { + return SQLite.select().from(Address.class).queryList(); + } + + /** + * Gets all the ApplicationDisplayPanelVersions from database. + * + * @return all ApplicationDisplayPanelVersions + */ + public static List getAllApplicationDisplayPanelVersions() + { + return SQLite.select().from(ApplicationDisplayPanelVersion.class).queryList(); + } + + /** + * Gets all the ApplicationFirmwareVersions from database. + * + * @return all ApplicationFirmwareVersions + */ + public static List getAllApplicationFirmwareVersions() + { + return SQLite.select().from(ApplicationFirmwareVersion.class).queryList(); + } + + /** + * Gets all the ApplicationOsVersions from database. + * + * @return all ApplicationOsVersions + */ + public static List getAllApplicationOsVersions() + { + return SQLite.select().from(ApplicationOsVersion.class).queryList(); + } + + /** + * Gets all the ApplicationVersions from database. + * + * @return all ApplicationVersions + */ + public static List getAllApplicationVersions() + { + return SQLite.select().from(ApplicationVersion.class).queryList(); + } + + /** + * Gets all the CartridgeTypes from database. + * + * @return all CartridgeTypes + */ + public static List getAllCartridgeTypes() + { + return SQLite.select().from(CartridgeType.class).queryList(); + } + + /** + * Gets all the Cartridges from database. + * + * @return all Cartridges + */ + public static List getAllCartridges() + { + return SQLite.select().from(Cartridge.class).queryList(); + } + + /** + * Gets all the Configurations from database. + * + * @return all Configurations + */ + public static List getAllConfigurations() + { + return SQLite.select().from(Configuration.class).queryList(); + } + + /** + * Gets all the Contacts from database. + * + * @return all Contacts + */ + public static List getAllContacts() + { + return SQLite.select().from(Contact.class).queryList(); + } + + /** + * Gets all the DispenserTypes from database. + * + * @return all DispenserTypes + */ + public static List getAllDispenserTypes() + { + 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. + * + * @return all EmbeddedFirmwareVersions + */ + public static List getAllEmbeddedFirmwareVersions() + { + return SQLite.select().from(EmbeddedFirmwareVersion.class).queryList(); + } + + /** + * Gets all the EmbeddedSoftwareVersions from database. + * + * @return all EmbeddedSoftwareVersions + */ + public static List getAllEmbeddedSoftwareVersions() + { + return SQLite.select().from(EmbeddedSoftwareVersion.class).queryList(); + } + + /** + * Gets all the Events from database. + * + * @return all Events + */ + public static List getAllEvents() + { + return SQLite.select().from(Event.class).queryList(); + } + + /** + * Gets all the EventsActions from database. + * + * @return all EventsActions + */ + public static List getAllEventsActions() + { + return SQLite.select().from(EventsAction.class).queryList(); + } + + /** + * Gets all the FiberShapes from database. + * + * @return all FiberShapes + */ + public static List getAllFiberShapes() + { + return SQLite.select().from(FiberShape.class).queryList(); + } + + /** + * Gets all the FiberSynths from database. + * + * @return all FiberSynths + */ + public static List getAllFiberSynths() + { + return SQLite.select().from(FiberSynth.class).queryList(); + } + + /** + * Gets all the HardwareVersions from database. + * + * @return all HardwareVersions + */ + public static List getAllHardwareVersions() + { + return SQLite.select().from(HardwareVersion.class).queryList(); + } + + /** + * Gets all the IdsPacks from database. + * + * @return all IdsPacks + */ + public static List getAllIdsPacks() + { + return SQLite.select().from(IdsPack.class).queryList(); + } + + /** + * Gets all the LinearMassDensityUnits from database. + * + * @return all LinearMassDensityUnits + */ + public static List getAllLinearMassDensityUnits() + { + return SQLite.select().from(LinearMassDensityUnit.class).queryList(); + } + + /** + * Gets all the Liquids from database. + * + * @return all Liquids + */ + public static List getAllLiquids() + { + return SQLite.select().from(Liquid.class).queryList(); + } + + /** + * Gets all the LiquidsRmls from database. + * + * @return all LiquidsRmls + */ + public static List getAllLiquidsRmls() + { + return SQLite.select().from(LiquidsRml.class).queryList(); + } + + /** + * Gets all the MachineVersions from database. + * + * @return all MachineVersions + */ + public static List getAllMachineVersions() + { + return SQLite.select().from(MachineVersion.class).queryList(); + } + + /** + * Gets all the Machines from database. + * + * @return all Machines + */ + public static List getAllMachines() + { + return SQLite.select().from(Machine.class).queryList(); + } + + /** + * Gets all the MachinesConfigurations from database. + * + * @return all MachinesConfigurations + */ + public static List getAllMachinesConfigurations() + { + return SQLite.select().from(MachinesConfiguration.class).queryList(); + } + + /** + * Gets all the MachinesEvents from database. + * + * @return all MachinesEvents + */ + public static List getAllMachinesEvents() + { + return SQLite.select().from(MachinesEvent.class).queryList(); + } + + /** + * Gets all the MediaColors from database. + * + * @return all MediaColors + */ + public static List getAllMediaColors() + { + return SQLite.select().from(MediaColor.class).queryList(); + } + + /** + * Gets all the MediaConditions from database. + * + * @return all MediaConditions + */ + public static List getAllMediaConditions() + { + return SQLite.select().from(MediaCondition.class).queryList(); + } + + /** + * Gets all the MediaMaterials from database. + * + * @return all MediaMaterials + */ + public static List getAllMediaMaterials() + { + return SQLite.select().from(MediaMaterial.class).queryList(); + } + + /** + * Gets all the MediaPurposes from database. + * + * @return all MediaPurposes + */ + public static List getAllMediaPurposes() + { + return SQLite.select().from(MediaPurpose.class).queryList(); + } + + /** + * Gets all the Organizations from database. + * + * @return all Organizations + */ + public static List getAllOrganizations() + { + return SQLite.select().from(Organization.class).queryList(); + } + + /** + * Gets all the Permissions from database. + * + * @return all Permissions + */ + public static List getAllPermissions() + { + return SQLite.select().from(Permission.class).queryList(); + } + + /** + * Gets all the Rmls from database. + * + * @return all Rmls + */ + public static List getAllRmls() + { + return SQLite.select().from(Rml.class).queryList(); + } + + /** + * Gets all the Roles from database. + * + * @return all Roles + */ + public static List getAllRoles() + { + return SQLite.select().from(Role.class).queryList(); + } + + /** + * Gets all the RolesPermissions from database. + * + * @return all RolesPermissions + */ + public static List getAllRolesPermissions() + { + return SQLite.select().from(RolesPermission.class).queryList(); + } + + /** + * Gets all the SyncConfigurations from database. + * + * @return all SyncConfigurations + */ + public static List getAllSyncConfigurations() + { + return SQLite.select().from(SyncConfiguration.class).queryList(); + } + + /** + * Gets all the Users from database. + * + * @return all Users + */ + public static List getAllUsers() + { + return SQLite.select().from(User.class).queryList(); + } + + /** + * Gets all the UsersRoles from database. + * + * @return all UsersRoles + */ + public static List getAllUsersRoles() + { + return SQLite.select().from(UsersRole.class).queryList(); + } + +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Action.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Action.java new file mode 100644 index 000000000..ac0cb892f --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Action.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 = "ACTIONS", database = TangoDB.class) + public class Action extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + @Column(name = "DESCRIPTION") + private String description; + + + + + /** + * 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 Description. + * + * return the Description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the Description. + * + * @param description the Description + */ + public void setDescription(String description) + { + this.description = description; + } + + } 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 116f1af88..199d8f923 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 @@ -1,174 +1,198 @@ 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; -/** - * Represents the DAL Address entity. - */ -@Table(name = "ADDRESSES", database = TangoDB.class) -public class Address extends Entity -{ - @Column(name = "ADDRESS") - private String address; - - @Column(name = "LOCALITY") - private String locality; - - @Column(name = "COUNTRY") - private String country; - - @Column(name = "CITY") - private String city; - - @Column(name = "STATE") - private String state; - - @Column(name = "COUNTRY_CODE") - private String country_code; - - @Column(name = "POSTAL_CODE") - private String postal_code; - - /** - * Gets the address. - * - * @return the address - */ - public String getAddress() + @Table(name = "ADDRESSES", database = TangoDB.class) + public class Address extends Entity { - return address; - } - /** - * Sets address. - * - * @param address the address - */ - public void setAddress(String address) - { - this.address = address; - } + @Column(name = "ADDRESS_STRING") + private String addressString; + - /** - * Gets locality. - * - * @return the locality - */ - public String getLocality() - { - return locality; - } - /** - * Sets locality. - * - * @param locality the locality - */ - public void setLocality(String locality) - { - this.locality = locality; - } + @Column(name = "LOCALITY") + private String locality; + - /** - * Gets country. - * - * @return the country - */ - public String getCountry() - { - return country; - } - /** - * Sets country. - * - * @param country the country - */ - public void setCountry(String country) - { - this.country = country; - } + @Column(name = "COUNTRY") + private String country; + - /** - * Gets city. - * - * @return the city - */ - public String getCity() - { - return city; - } - /** - * Sets city. - * - * @param city the city - */ - public void setCity(String city) - { - this.city = city; - } + @Column(name = "CITY") + private String city; + - /** - * Gets state. - * - * @return the state - */ - public String getState() - { - return state; - } - /** - * Sets state. - * - * @param state the state - */ - public void setState(String state) - { - this.state = state; - } + @Column(name = "STATE") + private String state; + - /** - * Gets country code. - * - * @return the country code - */ - public String getCountry_code() - { - return country_code; - } - /** - * Sets country code. - * - * @param country_code the country code - */ - public void setCountry_code(String country_code) - { - this.country_code = country_code; - } + @Column(name = "COUNTRY_CODE") + private String countryCode; + - /** - * Gets postal code. - * - * @return the postal code - */ - public String getPostal_code() - { - return postal_code; - } - /** - * Sets postal code. - * - * @param postal_code the postal code - */ - public void setPostal_code(String postal_code) - { - this.postal_code = postal_code; + @Column(name = "POSTAL_CODE") + private String postalCode; + + + + + /** + * Gets the AddressString. + * + * return the AddressString + */ + public String getAddressString() + { + return addressString; + } + + /** + * Sets the AddressString. + * + * @param addressString the AddressString + */ + public void setAddressString(String addressString) + { + this.addressString = addressString; + } + + + /** + * Gets the Locality. + * + * return the Locality + */ + public String getLocality() + { + return locality; + } + + /** + * Sets the Locality. + * + * @param locality the Locality + */ + public void setLocality(String locality) + { + this.locality = locality; + } + + + /** + * Gets the Country. + * + * return the Country + */ + public String getCountry() + { + return country; + } + + /** + * Sets the Country. + * + * @param country the Country + */ + public void setCountry(String country) + { + this.country = country; + } + + + /** + * Gets the City. + * + * return the City + */ + public String getCity() + { + return city; + } + + /** + * Sets the City. + * + * @param city the City + */ + public void setCity(String city) + { + this.city = city; + } + + + /** + * Gets the State. + * + * return the State + */ + public String getState() + { + return state; + } + + /** + * Sets the State. + * + * @param state the State + */ + public void setState(String state) + { + this.state = state; + } + + + /** + * Gets the CountryCode. + * + * return the CountryCode + */ + public String getCountryCode() + { + return countryCode; + } + + /** + * Sets the CountryCode. + * + * @param countryCode the CountryCode + */ + public void setCountryCode(String countryCode) + { + this.countryCode = countryCode; + } + + + /** + * Gets the PostalCode. + * + * return the PostalCode + */ + public String getPostalCode() + { + return postalCode; + } + + /** + * Sets the PostalCode. + * + * @param postalCode the PostalCode + */ + public void setPostalCode(String postalCode) + { + this.postalCode = postalCode; + } + } -} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationDisplayPanelVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationDisplayPanelVersion.java new file mode 100644 index 000000000..d046d063f --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationDisplayPanelVersion.java @@ -0,0 +1,68 @@ +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 = "APPLICATION_DISPLAY_PANEL_VERSIONS", database = TangoDB.class) + public class ApplicationDisplayPanelVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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 Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationFirmwareVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationFirmwareVersion.java new file mode 100644 index 000000000..6a417c5c0 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationFirmwareVersion.java @@ -0,0 +1,68 @@ +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 = "APPLICATION_FIRMWARE_VERSIONS", database = TangoDB.class) + public class ApplicationFirmwareVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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 Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationOsVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationOsVersion.java new file mode 100644 index 000000000..0b443a664 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationOsVersion.java @@ -0,0 +1,68 @@ +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 = "APPLICATION_OS_VERSIONS", database = TangoDB.class) + public class ApplicationOsVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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 Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationVersion.java new file mode 100644 index 000000000..05c7e75b5 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/ApplicationVersion.java @@ -0,0 +1,68 @@ +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 = "APPLICATION_VERSIONS", database = TangoDB.class) + public class ApplicationVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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 Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cartridge.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cartridge.java new file mode 100644 index 000000000..8bb0deea8 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Cartridge.java @@ -0,0 +1,68 @@ +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 = "CARTRIDGES", database = TangoDB.class) + public class Cartridge extends Entity + { + + @Column(name = "SERIAL_NUMBER") + private String serialNumber; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "CARTRIDGE_TYPE_GUID", foreignKeyColumnName = "GUID")}) + private CartridgeType cartridgeType; + + + + + /** + * Gets the SerialNumber. + * + * return the SerialNumber + */ + public String getSerialNumber() + { + return serialNumber; + } + + /** + * Sets the SerialNumber. + * + * @param serialNumber the SerialNumber + */ + public void setSerialNumber(String serialNumber) + { + this.serialNumber = serialNumber; + } + + + /** + * Gets the CartridgeType. + * + * return the CartridgeType + */ + public CartridgeType getCartridgeType() + { + return cartridgeType; + } + + /** + * Sets the CartridgeType. + * + * @param cartridgeType the CartridgeType + */ + public void setCartridgeType(CartridgeType cartridgeType) + { + this.cartridgeType = cartridgeType; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/CartridgeType.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/CartridgeType.java new file mode 100644 index 000000000..1153665ea --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/CartridgeType.java @@ -0,0 +1,68 @@ +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 = "CARTRIDGE_TYPES", database = TangoDB.class) + public class CartridgeType extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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; + } + + } 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 new file mode 100644 index 000000000..13aeec266 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Configuration.java @@ -0,0 +1,250 @@ +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 = "CONFIGURATIONS", database = TangoDB.class) + public class Configuration extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "CREATION_DATE") + private DateTime creationDate; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_DISPLAY_PANEL_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationDisplayPanelVersion applicationDisplayPanelVersion; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_FIRMWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationFirmwareVersion applicationFirmwareVersion; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_OS_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationOsVersion applicationOsVersion; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "APPLICATION_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private ApplicationVersion applicationVersion; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "EMBEDDED_FIRMWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private EmbeddedFirmwareVersion embeddedFirmwareVersion; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "EMBEDDED_SOFTWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private EmbeddedSoftwareVersion embeddedSoftwareVersion; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "HARDWARE_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private HardwareVersion hardwareVersion; + + + + + /** + * 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 CreationDate. + * + * return the CreationDate + */ + public DateTime getCreationDate() + { + return creationDate; + } + + /** + * Sets the CreationDate. + * + * @param creationDate the CreationDate + */ + public void setCreationDate(DateTime creationDate) + { + this.creationDate = creationDate; + } + + + /** + * Gets the ApplicationDisplayPanelVersion. + * + * return the ApplicationDisplayPanelVersion + */ + public ApplicationDisplayPanelVersion getApplicationDisplayPanelVersion() + { + return applicationDisplayPanelVersion; + } + + /** + * Sets the ApplicationDisplayPanelVersion. + * + * @param applicationDisplayPanelVersion the ApplicationDisplayPanelVersion + */ + public void setApplicationDisplayPanelVersion(ApplicationDisplayPanelVersion applicationDisplayPanelVersion) + { + this.applicationDisplayPanelVersion = applicationDisplayPanelVersion; + } + + + /** + * Gets the ApplicationFirmwareVersion. + * + * return the ApplicationFirmwareVersion + */ + public ApplicationFirmwareVersion getApplicationFirmwareVersion() + { + return applicationFirmwareVersion; + } + + /** + * Sets the ApplicationFirmwareVersion. + * + * @param applicationFirmwareVersion the ApplicationFirmwareVersion + */ + public void setApplicationFirmwareVersion(ApplicationFirmwareVersion applicationFirmwareVersion) + { + this.applicationFirmwareVersion = applicationFirmwareVersion; + } + + + /** + * Gets the ApplicationOsVersion. + * + * return the ApplicationOsVersion + */ + public ApplicationOsVersion getApplicationOsVersion() + { + return applicationOsVersion; + } + + /** + * Sets the ApplicationOsVersion. + * + * @param applicationOsVersion the ApplicationOsVersion + */ + public void setApplicationOsVersion(ApplicationOsVersion applicationOsVersion) + { + this.applicationOsVersion = applicationOsVersion; + } + + + /** + * Gets the ApplicationVersion. + * + * return the ApplicationVersion + */ + public ApplicationVersion getApplicationVersion() + { + return applicationVersion; + } + + /** + * Sets the ApplicationVersion. + * + * @param applicationVersion the ApplicationVersion + */ + public void setApplicationVersion(ApplicationVersion applicationVersion) + { + this.applicationVersion = applicationVersion; + } + + + /** + * Gets the EmbeddedFirmwareVersion. + * + * return the EmbeddedFirmwareVersion + */ + public EmbeddedFirmwareVersion getEmbeddedFirmwareVersion() + { + return embeddedFirmwareVersion; + } + + /** + * Sets the EmbeddedFirmwareVersion. + * + * @param embeddedFirmwareVersion the EmbeddedFirmwareVersion + */ + public void setEmbeddedFirmwareVersion(EmbeddedFirmwareVersion embeddedFirmwareVersion) + { + this.embeddedFirmwareVersion = embeddedFirmwareVersion; + } + + + /** + * Gets the EmbeddedSoftwareVersion. + * + * return the EmbeddedSoftwareVersion + */ + public EmbeddedSoftwareVersion getEmbeddedSoftwareVersion() + { + return embeddedSoftwareVersion; + } + + /** + * Sets the EmbeddedSoftwareVersion. + * + * @param embeddedSoftwareVersion the EmbeddedSoftwareVersion + */ + public void setEmbeddedSoftwareVersion(EmbeddedSoftwareVersion embeddedSoftwareVersion) + { + this.embeddedSoftwareVersion = embeddedSoftwareVersion; + } + + + /** + * Gets the HardwareVersion. + * + * return the HardwareVersion + */ + public HardwareVersion getHardwareVersion() + { + return hardwareVersion; + } + + /** + * Sets the HardwareVersion. + * + * @param hardwareVersion the HardwareVersion + */ + public void setHardwareVersion(HardwareVersion hardwareVersion) + { + this.hardwareVersion = hardwareVersion; + } + + } 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 a8a1bddac..d4bc21b34 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 @@ -1,151 +1,172 @@ 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; -/** - * Represents the DAL Contact entity. - */ -@Table(name = "CONTACTS", database = TangoDB.class) -public class Contact extends Entity -{ - @Column(name = "FIRST_NAME") - private String first_name; - - @Column(name = "LAST_NAME") - private String last_name; - - @Column(name = "FULL_NAME") - private String full_name; - - @Column(name = "EMAIL") - private String email; - - @Column(name = "PHONE_NUMBER") - private String phone_number; - - @Column(name = "FAX") - private String fax; - - /** - * Gets first name. - * - * @return the first name - */ - public String getFirst_name() + @Table(name = "CONTACTS", database = TangoDB.class) + public class Contact extends Entity { - return first_name; - } - /** - * Sets first name. - * - * @param first_name the first name - */ - public void setFirst_name(String first_name) - { - this.first_name = first_name; - } + @Column(name = "FIRST_NAME") + private String firstName; + - /** - * Gets last name. - * - * @return the last name - */ - public String getLast_name() - { - return last_name; - } - /** - * Sets last name. - * - * @param last_name the last name - */ - public void setLast_name(String last_name) - { - this.last_name = last_name; - } + @Column(name = "LAST_NAME") + private String lastName; + - /** - * Gets full name. - * - * @return the full name - */ - public String getFull_name() - { - return full_name; - } - /** - * Sets full name. - * - * @param full_name the full name - */ - public void setFull_name(String full_name) - { - this.full_name = full_name; - } + @Column(name = "FULL_NAME") + private String fullName; + - /** - * Gets email. - * - * @return the email - */ - public String getEmail() - { - return email; - } - /** - * Sets email. - * - * @param email the email - */ - public void setEmail(String email) - { - this.email = email; - } + @Column(name = "EMAIL") + private String email; + - /** - * Gets phone number. - * - * @return the phone number - */ - public String getPhone_number() - { - return phone_number; - } - /** - * Sets phone number. - * - * @param phone_number the phone number - */ - public void setPhone_number(String phone_number) - { - this.phone_number = phone_number; - } + @Column(name = "PHONE_NUMBER") + private String phoneNumber; + - /** - * Gets fax. - * - * @return the fax - */ - public String getFax() - { - return fax; - } - /** - * Sets fax. - * - * @param fax the fax - */ - public void setFax(String fax) - { - this.fax = fax; + @Column(name = "FAX") + private String fax; + + + + + /** + * Gets the FirstName. + * + * return the FirstName + */ + public String getFirstName() + { + return firstName; + } + + /** + * Sets the FirstName. + * + * @param firstName the FirstName + */ + public void setFirstName(String firstName) + { + this.firstName = firstName; + } + + + /** + * Gets the LastName. + * + * return the LastName + */ + public String getLastName() + { + return lastName; + } + + /** + * Sets the LastName. + * + * @param lastName the LastName + */ + public void setLastName(String lastName) + { + this.lastName = lastName; + } + + + /** + * Gets the FullName. + * + * return the FullName + */ + public String getFullName() + { + return fullName; + } + + /** + * Sets the FullName. + * + * @param fullName the FullName + */ + public void setFullName(String fullName) + { + this.fullName = fullName; + } + + + /** + * Gets the Email. + * + * return the Email + */ + public String getEmail() + { + return email; + } + + /** + * Sets the Email. + * + * @param email the Email + */ + public void setEmail(String email) + { + this.email = email; + } + + + /** + * Gets the PhoneNumber. + * + * return the PhoneNumber + */ + public String getPhoneNumber() + { + return phoneNumber; + } + + /** + * Sets the PhoneNumber. + * + * @param phoneNumber the PhoneNumber + */ + public void setPhoneNumber(String phoneNumber) + { + this.phoneNumber = phoneNumber; + } + + + /** + * Gets the Fax. + * + * return the Fax + */ + public String getFax() + { + return fax; + } + + /** + * Sets the Fax. + * + * @param fax the Fax + */ + public void setFax(String fax) + { + this.fax = fax; + } + } -} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DateConverter.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DateConverter.java deleted file mode 100644 index 71d5d5301..000000000 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DateConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.twine.tango.dal.entities; -import com.raizlabs.android.dbflow.converter.TypeConverter; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - - -/** - * Represents a DBFlow string to date converter used to parse and store SQLite dates. - */ -@com.raizlabs.android.dbflow.annotation.TypeConverter -public class DateConverter extends TypeConverter -{ - - @Override - public String getDBValue(Date model) - { - return android.text.format.DateFormat.format("yyyy-MM-dd hh:mm:ss", model).toString(); - } - - @Override - public Date getModelValue(String data) - { - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); - Date date = null; - try - { - date = format.parse(data); - } catch (ParseException e) - { - e.printStackTrace(); - } - return date; - } -} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Dispenser.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Dispenser.java new file mode 100644 index 000000000..a00ae780e --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Dispenser.java @@ -0,0 +1,68 @@ +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 = "DISPENSERS", database = TangoDB.class) + public class Dispenser extends Entity + { + + @Column(name = "SERIAL_NUMBER") + private String serialNumber; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "DISPENSER_TYPE_GUID", foreignKeyColumnName = "GUID")}) + private DispenserType dispenserType; + + + + + /** + * Gets the SerialNumber. + * + * return the SerialNumber + */ + public String getSerialNumber() + { + return serialNumber; + } + + /** + * Sets the SerialNumber. + * + * @param serialNumber the SerialNumber + */ + public void setSerialNumber(String serialNumber) + { + this.serialNumber = serialNumber; + } + + + /** + * Gets the DispenserType. + * + * return the DispenserType + */ + public DispenserType getDispenserType() + { + return dispenserType; + } + + /** + * Sets the DispenserType. + * + * @param dispenserType the DispenserType + */ + public void setDispenserType(DispenserType dispenserType) + { + this.dispenserType = dispenserType; + } + + } 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 new file mode 100644 index 000000000..321ba241b --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/DispenserType.java @@ -0,0 +1,68 @@ +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 = "DISPENSER_TYPES", database = TangoDB.class) + public class DispenserType extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedFirmwareVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedFirmwareVersion.java new file mode 100644 index 000000000..9e8a1fe78 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedFirmwareVersion.java @@ -0,0 +1,68 @@ +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 = "EMBEDDED_FIRMWARE_VERSIONS", database = TangoDB.class) + public class EmbeddedFirmwareVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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 Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedSoftwareVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedSoftwareVersion.java new file mode 100644 index 000000000..1c4d67a2c --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EmbeddedSoftwareVersion.java @@ -0,0 +1,68 @@ +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 = "EMBEDDED_SOFTWARE_VERSIONS", database = TangoDB.class) + public class EmbeddedSoftwareVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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 Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Entity.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Entity.java deleted file mode 100644 index 64b24b00c..000000000 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Entity.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.twine.tango.dal.entities; - -import com.raizlabs.android.dbflow.annotation.Column; -import com.raizlabs.android.dbflow.annotation.PrimaryKey; -import com.raizlabs.android.dbflow.rx2.structure.BaseRXModel; - -import java.util.Date; -import java.util.UUID; - - -/** - * Represents a DAL base entity. - * contains the basic columns/properties which are in common to all entities. - */ -public class Entity extends BaseRXModel -{ - @Column(name = "ID") - private int id; - - @Column(name = "GUID") - @PrimaryKey - private String guid; - - @Column(name = "LAST_UPDATED",typeConverter = DateConverter.class) - private Date last_updated; - - @Column(name = "DELETED") - private boolean deleted; - - /** - * Gets id. - * - * @return the id - */ - public int getId() - { - return id; - } - - /** - * Sets id. - * - * @param id the id - */ - public void setId(int id) - { - this.id = id; - } - - /** - * Gets guid. - * - * @return the guid - */ - public String getGuid() - { - return guid; - } - - /** - * Sets guid. - * - * @param guid the guid - */ - public void setGuid(String guid) - { - this.guid = guid; - } - - /** - * Gets last updated. - * - * @return the last updated - */ - public Date getLast_updated() - { - return last_updated; - } - - /** - * Sets last updated. - * - * @param last_updated the last updated - */ - public void setLast_updated(Date last_updated) - { - 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. - */ - public Entity() - { - setGuid(UUID.randomUUID().toString()); - setLast_updated(new Date()); - } -} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Event.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Event.java new file mode 100644 index 000000000..e6c5b562b --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Event.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 = "EVENTS", database = TangoDB.class) + public class Event extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + @Column(name = "DESCRIPTION") + private String description; + + + + + /** + * 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 Description. + * + * return the Description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the Description. + * + * @param description the Description + */ + public void setDescription(String description) + { + this.description = description; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventsAction.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventsAction.java new file mode 100644 index 000000000..6019137ce --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/EventsAction.java @@ -0,0 +1,68 @@ +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 = "EVENTS_ACTIONS", database = TangoDB.class) + public class EventsAction extends Entity + { + + @ForeignKey(references = { @ForeignKeyReference(columnName = "ACTION_GUID", foreignKeyColumnName = "GUID")}) + private Action action; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "EVENT_GUID", foreignKeyColumnName = "GUID")}) + private Event event; + + + + + /** + * Gets the Action. + * + * return the Action + */ + public Action getAction() + { + return action; + } + + /** + * Sets the Action. + * + * @param action the Action + */ + public void setAction(Action action) + { + this.action = action; + } + + + /** + * Gets the Event. + * + * return the Event + */ + public Event getEvent() + { + return event; + } + + /** + * Sets the Event. + * + * @param event the Event + */ + public void setEvent(Event event) + { + this.event = event; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberShape.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberShape.java new file mode 100644 index 000000000..3005518f6 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberShape.java @@ -0,0 +1,68 @@ +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 = "FIBER_SHAPES", database = TangoDB.class) + public class FiberShape extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "CODE") + private int 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 Code. + * + * return the Code + */ + public int getCode() + { + return code; + } + + /** + * Sets the Code. + * + * @param code the Code + */ + public void setCode(int code) + { + this.code = code; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberSynth.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberSynth.java new file mode 100644 index 000000000..b1fe190c2 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/FiberSynth.java @@ -0,0 +1,68 @@ +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 = "FIBER_SYNTHS", database = TangoDB.class) + public class FiberSynth extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "CODE") + private int 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 Code. + * + * return the Code + */ + public int getCode() + { + return code; + } + + /** + * Sets the Code. + * + * @param code the Code + */ + public void setCode(int code) + { + this.code = code; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/HardwareVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/HardwareVersion.java new file mode 100644 index 000000000..a6599f20e --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/HardwareVersion.java @@ -0,0 +1,68 @@ +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 = "HARDWARE_VERSIONS", database = TangoDB.class) + public class HardwareVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + + /** + * 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 Name. + * + * return the Name + */ + public String getName() + { + return name; + } + + /** + * Sets the Name. + * + * @param name the Name + */ + public void setName(String name) + { + this.name = name; + } + + } 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 new file mode 100644 index 000000000..0bdabfc83 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/IdsPack.java @@ -0,0 +1,146 @@ +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 = "IDS_PACKS", database = TangoDB.class) + public class IdsPack extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "CARTRIDGE_GUID", foreignKeyColumnName = "GUID")}) + private Cartridge cartridge; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "CONFIGURATION_GUID", foreignKeyColumnName = "GUID")}) + private Configuration configuration; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "DISPENSER_GUID", foreignKeyColumnName = "GUID")}) + private Dispenser dispenser; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "LIQUID_GUID", foreignKeyColumnName = "GUID")}) + private Liquid liquid; + + + + + /** + * 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 Cartridge. + * + * return the Cartridge + */ + public Cartridge getCartridge() + { + return cartridge; + } + + /** + * Sets the Cartridge. + * + * @param cartridge the Cartridge + */ + public void setCartridge(Cartridge cartridge) + { + this.cartridge = cartridge; + } + + + /** + * Gets the Configuration. + * + * return the Configuration + */ + public Configuration getConfiguration() + { + return configuration; + } + + /** + * Sets the Configuration. + * + * @param configuration the Configuration + */ + public void setConfiguration(Configuration configuration) + { + this.configuration = configuration; + } + + + /** + * Gets the Dispenser. + * + * return the Dispenser + */ + public Dispenser getDispenser() + { + return dispenser; + } + + /** + * Sets the Dispenser. + * + * @param dispenser the Dispenser + */ + public void setDispenser(Dispenser dispenser) + { + this.dispenser = dispenser; + } + + + /** + * Gets the Liquid. + * + * return the Liquid + */ + public Liquid getLiquid() + { + return liquid; + } + + /** + * Sets the Liquid. + * + * @param liquid the Liquid + */ + public void setLiquid(Liquid liquid) + { + this.liquid = liquid; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LinearMassDensityUnit.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LinearMassDensityUnit.java new file mode 100644 index 000000000..a88127dd6 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LinearMassDensityUnit.java @@ -0,0 +1,68 @@ +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 = "LINEAR_MASS_DENSITY_UNITS", database = TangoDB.class) + public class LinearMassDensityUnit extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "CODE") + private int 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 Code. + * + * return the Code + */ + public int getCode() + { + return code; + } + + /** + * Sets the Code. + * + * @param code the Code + */ + public void setCode(int code) + { + this.code = code; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Liquid.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Liquid.java new file mode 100644 index 000000000..6d43161f7 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Liquid.java @@ -0,0 +1,120 @@ +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 = "LIQUIDS", database = TangoDB.class) + public class Liquid extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "COLOR") + private int color; + + + + + /** + * 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 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 Color. + * + * return the Color + */ + public int getColor() + { + return color; + } + + /** + * Sets the Color. + * + * @param color the Color + */ + public void setColor(int color) + { + this.color = color; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidsRml.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidsRml.java new file mode 100644 index 000000000..ea79f4741 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/LiquidsRml.java @@ -0,0 +1,68 @@ +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 = "LIQUIDS_RMLS", database = TangoDB.class) + public class LiquidsRml extends Entity + { + + @ForeignKey(references = { @ForeignKeyReference(columnName = "LIQUID_GUID", foreignKeyColumnName = "GUID")}) + private Liquid liquid; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "RML_GUID", foreignKeyColumnName = "GUID")}) + private Rml rml; + + + + + /** + * Gets the Liquid. + * + * return the Liquid + */ + public Liquid getLiquid() + { + return liquid; + } + + /** + * Sets the Liquid. + * + * @param liquid the Liquid + */ + public void setLiquid(Liquid liquid) + { + this.liquid = liquid; + } + + + /** + * 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/Machine.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Machine.java new file mode 100644 index 000000000..d91a1d4cf --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Machine.java @@ -0,0 +1,146 @@ +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 = "MACHINES", database = TangoDB.class) + public class Machine extends Entity + { + + @Column(name = "SERIAL_NUMBER") + private String serialNumber; + + + + @Column(name = "NAME") + private String name; + + + + @Column(name = "PRODUCTION_DATE") + private DateTime productionDate; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MACHINE_VERSION_GUID", foreignKeyColumnName = "GUID")}) + private MachineVersion machineVersion; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "ORGANIZATION_GUID", foreignKeyColumnName = "GUID")}) + private Organization organization; + + + + + /** + * Gets the SerialNumber. + * + * return the SerialNumber + */ + public String getSerialNumber() + { + return serialNumber; + } + + /** + * Sets the SerialNumber. + * + * @param serialNumber the SerialNumber + */ + public void setSerialNumber(String serialNumber) + { + this.serialNumber = serialNumber; + } + + + /** + * 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 ProductionDate. + * + * return the ProductionDate + */ + public DateTime getProductionDate() + { + return productionDate; + } + + /** + * Sets the ProductionDate. + * + * @param productionDate the ProductionDate + */ + public void setProductionDate(DateTime productionDate) + { + this.productionDate = productionDate; + } + + + /** + * Gets the MachineVersion. + * + * return the MachineVersion + */ + public MachineVersion getMachineVersion() + { + return machineVersion; + } + + /** + * Sets the MachineVersion. + * + * @param machineVersion the MachineVersion + */ + public void setMachineVersion(MachineVersion machineVersion) + { + this.machineVersion = machineVersion; + } + + + /** + * Gets the Organization. + * + * return the Organization + */ + public Organization getOrganization() + { + return organization; + } + + /** + * Sets the Organization. + * + * @param organization the Organization + */ + public void setOrganization(Organization organization) + { + this.organization = organization; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachineVersion.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachineVersion.java new file mode 100644 index 000000000..832428f73 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachineVersion.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 = "MACHINE_VERSIONS", database = TangoDB.class) + public class MachineVersion extends Entity + { + + @Column(name = "VERSION") + private Double version; + + + + @Column(name = "NAME") + private String name; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "CONFIGURATION_GUID", foreignKeyColumnName = "GUID")}) + private Configuration configuration; + + + + + /** + * 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 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 Configuration. + * + * return the Configuration + */ + public Configuration getConfiguration() + { + return configuration; + } + + /** + * Sets the Configuration. + * + * @param configuration the Configuration + */ + public void setConfiguration(Configuration configuration) + { + this.configuration = configuration; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesConfiguration.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesConfiguration.java new file mode 100644 index 000000000..1325eb93a --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesConfiguration.java @@ -0,0 +1,68 @@ +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 = "MACHINES_CONFIGURATIONS", database = TangoDB.class) + public class MachinesConfiguration extends Entity + { + + @ForeignKey(references = { @ForeignKeyReference(columnName = "CONFIGURATION_GUID", foreignKeyColumnName = "GUID")}) + private Configuration configuration; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MACHINE_GUID", foreignKeyColumnName = "GUID")}) + private Machine machine; + + + + + /** + * Gets the Configuration. + * + * return the Configuration + */ + public Configuration getConfiguration() + { + return configuration; + } + + /** + * Sets the Configuration. + * + * @param configuration the Configuration + */ + public void setConfiguration(Configuration configuration) + { + this.configuration = configuration; + } + + + /** + * 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/MachinesEvent.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesEvent.java new file mode 100644 index 000000000..15b55c35c --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MachinesEvent.java @@ -0,0 +1,146 @@ +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 = "MACHINES_EVENTS", database = TangoDB.class) + public class MachinesEvent extends Entity + { + + @Column(name = "DATE_TIME") + private DateTime dateTime; + + + + @Column(name = "DESCRIPTION") + private String description; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "EVENT_GUID", foreignKeyColumnName = "GUID")}) + private Event event; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MACHINE_GUID", foreignKeyColumnName = "GUID")}) + private Machine machine; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "USER_GUID", foreignKeyColumnName = "GUID")}) + private User user; + + + + + /** + * Gets the DateTime. + * + * return the DateTime + */ + public DateTime getDateTime() + { + return dateTime; + } + + /** + * Sets the DateTime. + * + * @param dateTime the DateTime + */ + public void setDateTime(DateTime dateTime) + { + this.dateTime = dateTime; + } + + + /** + * 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 Event. + * + * return the Event + */ + public Event getEvent() + { + return event; + } + + /** + * Sets the Event. + * + * @param event the Event + */ + public void setEvent(Event event) + { + this.event = event; + } + + + /** + * 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; + } + + + /** + * Gets the User. + * + * return the User + */ + public User getUser() + { + return user; + } + + /** + * Sets the User. + * + * @param user the User + */ + public void setUser(User user) + { + this.user = user; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaColor.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaColor.java new file mode 100644 index 000000000..1410a87e5 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaColor.java @@ -0,0 +1,42 @@ +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 = "MEDIA_COLORS", database = TangoDB.class) + public class MediaColor extends Entity + { + + @Column(name = "COLOR") + private int color; + + + + + /** + * Gets the Color. + * + * return the Color + */ + public int getColor() + { + return color; + } + + /** + * Sets the Color. + * + * @param color the Color + */ + public void setColor(int color) + { + this.color = color; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaCondition.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaCondition.java new file mode 100644 index 000000000..405eb81b4 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaCondition.java @@ -0,0 +1,68 @@ +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 = "MEDIA_CONDITIONS", database = TangoDB.class) + public class MediaCondition extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "CODE") + private int 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 Code. + * + * return the Code + */ + public int getCode() + { + return code; + } + + /** + * Sets the Code. + * + * @param code the Code + */ + public void setCode(int code) + { + this.code = code; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaMaterial.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaMaterial.java new file mode 100644 index 000000000..2b3e4a333 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaMaterial.java @@ -0,0 +1,68 @@ +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 = "MEDIA_MATERIALS", database = TangoDB.class) + public class MediaMaterial extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "CODE") + private int 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 Code. + * + * return the Code + */ + public int getCode() + { + return code; + } + + /** + * Sets the Code. + * + * @param code the Code + */ + public void setCode(int code) + { + this.code = code; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaPurpose.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaPurpose.java new file mode 100644 index 000000000..e2e8f81b7 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/MediaPurpose.java @@ -0,0 +1,68 @@ +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 = "MEDIA_PURPOSES", database = TangoDB.class) + public class MediaPurpose extends Entity + { + + @Column(name = "NAME") + private String name; + + + + @Column(name = "CODE") + private int 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 Code. + * + * return the Code + */ + public int getCode() + { + return code; + } + + /** + * Sets the Code. + * + * @param code the Code + */ + public void setCode(int code) + { + this.code = code; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Organization.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Organization.java index 870b80ad3..4cc0e0955 100644 --- a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Organization.java +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Organization.java @@ -4,81 +4,91 @@ 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; -/** - * Represents the DAL Organization entity. - */ -@Table(name = "ORGANIZATIONS", database = TangoDB.class) -public class Organization extends Entity -{ - @Column(name = "NAME") - private String name; - - @ForeignKey(references = {@ForeignKeyReference(columnName = "CONTACT_GUID", foreignKeyColumnName = "GUID")}) - private Contact contact; - - @ForeignKey(references = {@ForeignKeyReference(columnName = "ADDRESS_GUID", foreignKeyColumnName = "GUID")}) - private Address address; - - /** - * Gets name. - * - * @return the name - */ - public String getName() + @Table(name = "ORGANIZATIONS", database = TangoDB.class) + public class Organization extends Entity { - return name; - } - /** - * Sets name. - * - * @param name the name - */ - public void setName(String name) - { - this.name = name; - } + @Column(name = "NAME") + private String name; + - /** - * Gets contact. - * - * @return the contact - */ - public Contact getContact() - { - return contact; - } - /** - * Sets contact. - * - * @param contact the contact - */ - public void setContact(Contact contact) - { - this.contact = contact; - } + @ForeignKey(references = { @ForeignKeyReference(columnName = "ADDRESS_GUID", foreignKeyColumnName = "GUID")}) + private Address address; + - /** - * Gets address. - * - * @return the address - */ - public Address getAddress() - { - return address; - } - /** - * Sets address. - * - * @param address the address - */ - public void setAddress(Address address) - { - this.address = address; + @ForeignKey(references = { @ForeignKeyReference(columnName = "CONTACT_GUID", foreignKeyColumnName = "GUID")}) + private Contact contact; + + + + + /** + * 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 Address. + * + * return the Address + */ + public Address getAddress() + { + return address; + } + + /** + * Sets the Address. + * + * @param address the Address + */ + public void setAddress(Address address) + { + this.address = address; + } + + + /** + * Gets the Contact. + * + * return the Contact + */ + public Contact getContact() + { + return contact; + } + + /** + * Sets the Contact. + * + * @param contact the Contact + */ + public void setContact(Contact contact) + { + this.contact = contact; + } + } -} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Permission.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Permission.java new file mode 100644 index 000000000..993ca374e --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Permission.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 = "PERMISSIONS", database = TangoDB.class) + public class Permission extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + @Column(name = "DESCRIPTION") + private String description; + + + + + /** + * 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 Description. + * + * return the Description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the Description. + * + * @param description the Description + */ + public void setDescription(String description) + { + this.description = description; + } + + } 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 new file mode 100644 index 000000000..5f7fe528d --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Rml.java @@ -0,0 +1,484 @@ +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 = "RMLS", database = TangoDB.class) + public class Rml extends Entity + { + + @Column(name = "MANUFACTURER") + private String manufacturer; + + + + @Column(name = "FIBER_SIZE") + private Double fiberSize; + + + + @Column(name = "NUMBER_OF_FIBER") + private int numberOfFiber; + + + + @Column(name = "PLIES_PER_FIBER") + private int pliesPerFiber; + + + + @Column(name = "PLIES_PER_THREAD") + private int pliesPerThread; + + + + @Column(name = "TWISTED") + private Boolean twisted; + + + + @Column(name = "AIR_ENTANGLEMENT") + private Boolean airEntanglement; + + + + @Column(name = "LUBRICANT") + private Boolean lubricant; + + + + @Column(name = "TENSILE_STRENGTH") + private Double tensileStrength; + + + + @Column(name = "ELONGATION_AT_BREAK_PERCENTAGE") + private Double elongationAtBreakPercentage; + + + + @Column(name = "ESTIMATED_THREAD_DIAMETER") + private Double estimatedThreadDiameter; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "FIBER_SHAPE_GUID", foreignKeyColumnName = "GUID")}) + private FiberShape fiberShape; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "FIBER_SYNTH_GUID", foreignKeyColumnName = "GUID")}) + private FiberSynth fiberSynth; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "LINEAR_MASS_DENSITY_UNIT_GUID", foreignKeyColumnName = "GUID")}) + private LinearMassDensityUnit linearMassDensityUnit; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_COLOR_GUID", foreignKeyColumnName = "GUID")}) + private MediaColor mediaColor; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_CONDITION_GUID", foreignKeyColumnName = "GUID")}) + private MediaCondition mediaCondition; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_MATERIAL_GUID", foreignKeyColumnName = "GUID")}) + private MediaMaterial mediaMaterial; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "MEDIA_PURPOSE_GUID", foreignKeyColumnName = "GUID")}) + private MediaPurpose mediaPurpose; + + + + + /** + * Gets the Manufacturer. + * + * return the Manufacturer + */ + public String getManufacturer() + { + return manufacturer; + } + + /** + * Sets the Manufacturer. + * + * @param manufacturer the Manufacturer + */ + public void setManufacturer(String manufacturer) + { + this.manufacturer = manufacturer; + } + + + /** + * Gets the FiberSize. + * + * return the FiberSize + */ + public Double getFiberSize() + { + return fiberSize; + } + + /** + * Sets the FiberSize. + * + * @param fiberSize the FiberSize + */ + public void setFiberSize(Double fiberSize) + { + this.fiberSize = fiberSize; + } + + + /** + * Gets the NumberOfFiber. + * + * return the NumberOfFiber + */ + public int getNumberOfFiber() + { + return numberOfFiber; + } + + /** + * Sets the NumberOfFiber. + * + * @param numberOfFiber the NumberOfFiber + */ + public void setNumberOfFiber(int numberOfFiber) + { + this.numberOfFiber = numberOfFiber; + } + + + /** + * Gets the PliesPerFiber. + * + * return the PliesPerFiber + */ + public int getPliesPerFiber() + { + return pliesPerFiber; + } + + /** + * Sets the PliesPerFiber. + * + * @param pliesPerFiber the PliesPerFiber + */ + public void setPliesPerFiber(int pliesPerFiber) + { + this.pliesPerFiber = pliesPerFiber; + } + + + /** + * Gets the PliesPerThread. + * + * return the PliesPerThread + */ + public int getPliesPerThread() + { + return pliesPerThread; + } + + /** + * Sets the PliesPerThread. + * + * @param pliesPerThread the PliesPerThread + */ + public void setPliesPerThread(int pliesPerThread) + { + this.pliesPerThread = pliesPerThread; + } + + + /** + * Gets the Twisted. + * + * return the Twisted + */ + public Boolean isTwisted() + { + return twisted; + } + + /** + * Sets the Twisted. + * + * @param twisted the Twisted + */ + public void setTwisted(Boolean twisted) + { + this.twisted = twisted; + } + + + /** + * Gets the AirEntanglement. + * + * return the AirEntanglement + */ + public Boolean isAirEntanglement() + { + return airEntanglement; + } + + /** + * Sets the AirEntanglement. + * + * @param airEntanglement the AirEntanglement + */ + public void setAirEntanglement(Boolean airEntanglement) + { + this.airEntanglement = airEntanglement; + } + + + /** + * Gets the Lubricant. + * + * return the Lubricant + */ + public Boolean isLubricant() + { + return lubricant; + } + + /** + * Sets the Lubricant. + * + * @param lubricant the Lubricant + */ + public void setLubricant(Boolean lubricant) + { + this.lubricant = lubricant; + } + + + /** + * Gets the TensileStrength. + * + * return the TensileStrength + */ + public Double getTensileStrength() + { + return tensileStrength; + } + + /** + * Sets the TensileStrength. + * + * @param tensileStrength the TensileStrength + */ + public void setTensileStrength(Double tensileStrength) + { + this.tensileStrength = tensileStrength; + } + + + /** + * Gets the ElongationAtBreakPercentage. + * + * return the ElongationAtBreakPercentage + */ + public Double getElongationAtBreakPercentage() + { + return elongationAtBreakPercentage; + } + + /** + * Sets the ElongationAtBreakPercentage. + * + * @param elongationAtBreakPercentage the ElongationAtBreakPercentage + */ + public void setElongationAtBreakPercentage(Double elongationAtBreakPercentage) + { + this.elongationAtBreakPercentage = elongationAtBreakPercentage; + } + + + /** + * Gets the EstimatedThreadDiameter. + * + * return the EstimatedThreadDiameter + */ + public Double getEstimatedThreadDiameter() + { + return estimatedThreadDiameter; + } + + /** + * Sets the EstimatedThreadDiameter. + * + * @param estimatedThreadDiameter the EstimatedThreadDiameter + */ + public void setEstimatedThreadDiameter(Double estimatedThreadDiameter) + { + this.estimatedThreadDiameter = estimatedThreadDiameter; + } + + + /** + * Gets the FiberShape. + * + * return the FiberShape + */ + public FiberShape getFiberShape() + { + return fiberShape; + } + + /** + * Sets the FiberShape. + * + * @param fiberShape the FiberShape + */ + public void setFiberShape(FiberShape fiberShape) + { + this.fiberShape = fiberShape; + } + + + /** + * Gets the FiberSynth. + * + * return the FiberSynth + */ + public FiberSynth getFiberSynth() + { + return fiberSynth; + } + + /** + * Sets the FiberSynth. + * + * @param fiberSynth the FiberSynth + */ + public void setFiberSynth(FiberSynth fiberSynth) + { + this.fiberSynth = fiberSynth; + } + + + /** + * Gets the LinearMassDensityUnit. + * + * return the LinearMassDensityUnit + */ + public LinearMassDensityUnit getLinearMassDensityUnit() + { + return linearMassDensityUnit; + } + + /** + * Sets the LinearMassDensityUnit. + * + * @param linearMassDensityUnit the LinearMassDensityUnit + */ + public void setLinearMassDensityUnit(LinearMassDensityUnit linearMassDensityUnit) + { + this.linearMassDensityUnit = linearMassDensityUnit; + } + + + /** + * Gets the MediaColor. + * + * return the MediaColor + */ + public MediaColor getMediaColor() + { + return mediaColor; + } + + /** + * Sets the MediaColor. + * + * @param mediaColor the MediaColor + */ + public void setMediaColor(MediaColor mediaColor) + { + this.mediaColor = mediaColor; + } + + + /** + * Gets the MediaCondition. + * + * return the MediaCondition + */ + public MediaCondition getMediaCondition() + { + return mediaCondition; + } + + /** + * Sets the MediaCondition. + * + * @param mediaCondition the MediaCondition + */ + public void setMediaCondition(MediaCondition mediaCondition) + { + this.mediaCondition = mediaCondition; + } + + + /** + * Gets the MediaMaterial. + * + * return the MediaMaterial + */ + public MediaMaterial getMediaMaterial() + { + return mediaMaterial; + } + + /** + * Sets the MediaMaterial. + * + * @param mediaMaterial the MediaMaterial + */ + public void setMediaMaterial(MediaMaterial mediaMaterial) + { + this.mediaMaterial = mediaMaterial; + } + + + /** + * Gets the MediaPurpose. + * + * return the MediaPurpose + */ + public MediaPurpose getMediaPurpose() + { + return mediaPurpose; + } + + /** + * Sets the MediaPurpose. + * + * @param mediaPurpose the MediaPurpose + */ + public void setMediaPurpose(MediaPurpose mediaPurpose) + { + this.mediaPurpose = mediaPurpose; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Role.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Role.java new file mode 100644 index 000000000..67af86526 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/Role.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 = "ROLES", database = TangoDB.class) + public class Role extends Entity + { + + @Column(name = "CODE") + private int code; + + + + @Column(name = "NAME") + private String name; + + + + @Column(name = "DESCRIPTION") + private String description; + + + + + /** + * 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 Description. + * + * return the Description + */ + public String getDescription() + { + return description; + } + + /** + * Sets the Description. + * + * @param description the Description + */ + public void setDescription(String description) + { + this.description = description; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/RolesPermission.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/RolesPermission.java new file mode 100644 index 000000000..6fe88c192 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/RolesPermission.java @@ -0,0 +1,68 @@ +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 = "ROLES_PERMISSIONS", database = TangoDB.class) + public class RolesPermission extends Entity + { + + @ForeignKey(references = { @ForeignKeyReference(columnName = "PERMISSION_GUID", foreignKeyColumnName = "GUID")}) + private Permission permission; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "ROLE_GUID", foreignKeyColumnName = "GUID")}) + private Role role; + + + + + /** + * Gets the Permission. + * + * return the Permission + */ + public Permission getPermission() + { + return permission; + } + + /** + * Sets the Permission. + * + * @param permission the Permission + */ + public void setPermission(Permission permission) + { + this.permission = permission; + } + + + /** + * Gets the Role. + * + * return the Role + */ + public Role getRole() + { + return role; + } + + /** + * Sets the Role. + * + * @param role the Role + */ + public void setRole(Role role) + { + this.role = role; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/SyncConfiguration.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/SyncConfiguration.java new file mode 100644 index 000000000..e4f95db71 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/SyncConfiguration.java @@ -0,0 +1,16 @@ +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 = "SYNC_CONFIGURATIONS", database = TangoDB.class) + public class SyncConfiguration extends Entity + { + + } 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 new file mode 100644 index 000000000..5a346a620 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/User.java @@ -0,0 +1,146 @@ +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 = "USERS", database = TangoDB.class) + public class User extends Entity + { + + @Column(name = "EMAIL") + private String email; + + + + @Column(name = "PASSWORD") + private String password; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "ADDRESS_GUID", foreignKeyColumnName = "GUID")}) + private Address address; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "CONTACT_GUID", foreignKeyColumnName = "GUID")}) + private Contact contact; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "ORGANIZATION_GUID", foreignKeyColumnName = "GUID")}) + private Organization organization; + + + + + /** + * Gets the Email. + * + * return the Email + */ + public String getEmail() + { + return email; + } + + /** + * Sets the Email. + * + * @param email the Email + */ + public void setEmail(String email) + { + this.email = email; + } + + + /** + * Gets the Password. + * + * return the Password + */ + public String getPassword() + { + return password; + } + + /** + * Sets the Password. + * + * @param password the Password + */ + public void setPassword(String password) + { + this.password = password; + } + + + /** + * Gets the Address. + * + * return the Address + */ + public Address getAddress() + { + return address; + } + + /** + * Sets the Address. + * + * @param address the Address + */ + public void setAddress(Address address) + { + this.address = address; + } + + + /** + * Gets the Contact. + * + * return the Contact + */ + public Contact getContact() + { + return contact; + } + + /** + * Sets the Contact. + * + * @param contact the Contact + */ + public void setContact(Contact contact) + { + this.contact = contact; + } + + + /** + * Gets the Organization. + * + * return the Organization + */ + public Organization getOrganization() + { + return organization; + } + + /** + * Sets the Organization. + * + * @param organization the Organization + */ + public void setOrganization(Organization organization) + { + this.organization = organization; + } + + } 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 new file mode 100644 index 000000000..ad1c44bd1 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/entities/UsersRole.java @@ -0,0 +1,68 @@ +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 = "USERS_ROLES", database = TangoDB.class) + public class UsersRole extends Entity + { + + @ForeignKey(references = { @ForeignKeyReference(columnName = "ROLE_GUID", foreignKeyColumnName = "GUID")}) + private Role role; + + + + @ForeignKey(references = { @ForeignKeyReference(columnName = "USER_GUID", foreignKeyColumnName = "GUID")}) + private User user; + + + + + /** + * Gets the Role. + * + * return the Role + */ + public Role getRole() + { + return role; + } + + /** + * Sets the Role. + * + * @param role the Role + */ + public void setRole(Role role) + { + this.role = role; + } + + + /** + * Gets the User. + * + * return the User + */ + public User getUser() + { + return user; + } + + /** + * Sets the User. + * + * @param user the User + */ + public void setUser(User user) + { + this.user = user; + } + + } diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Actions.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Actions.java new file mode 100644 index 000000000..55eebeb78 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Actions.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum Actions +{ + ; + + private int value; + + Actions(int value) + { + this.value = value; + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/CartridgeTypes.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/CartridgeTypes.java new file mode 100644 index 000000000..7be6a56e6 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/CartridgeTypes.java @@ -0,0 +1,19 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum CartridgeTypes +{ + + @DescriptionAnnotation(description = "Cartridge 1") + Cartridge1(1), + + ; + + private int value; + + CartridgeTypes(int value) + { + this.value = value; + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/DispenserTypes.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/DispenserTypes.java new file mode 100644 index 000000000..dc6ccf001 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/DispenserTypes.java @@ -0,0 +1,19 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum DispenserTypes +{ + + @DescriptionAnnotation(description = "Dispenser 1") + Dispenser1(1), + + ; + + private int value; + + DispenserTypes(int value) + { + this.value = value; + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/EnumDemo.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/EnumDemo.java new file mode 100644 index 000000000..a92d6aefa --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/EnumDemo.java @@ -0,0 +1,20 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum EnumDemo +{ + @DescriptionAnnotation(description = "Hi") + PENNY(1), + NICKLE(5), + DIME(10), + QUARTER(25); + + + private int value; + + EnumDemo(int value) + { + this.value = value; + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Events.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Events.java new file mode 100644 index 000000000..bfa2e1758 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Events.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum Events +{ + ; + + private int value; + + Events(int value) + { + this.value = value; + } +} 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 new file mode 100644 index 000000000..d146cd79a --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberShapes.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum FiberShapes +{ + ; + + private int value; + + FiberShapes(int value) + { + this.value = 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 new file mode 100644 index 000000000..0b8b6384d --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/FiberSynths.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum FiberSynths +{ + ; + + private int value; + + FiberSynths(int value) + { + this.value = 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 new file mode 100644 index 000000000..495a187f1 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/LinearMassDensityUnits.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum LinearMassDensityUnits +{ + ; + + private int value; + + LinearMassDensityUnits(int value) + { + this.value = value; + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Liquids.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Liquids.java new file mode 100644 index 000000000..ca82d56ad --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Liquids.java @@ -0,0 +1,22 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum Liquids +{ + + @DescriptionAnnotation(description = "Cyan") + Cyan(1), + + @DescriptionAnnotation(description = "Magenta") + Magenta(2), + + ; + + private int value; + + Liquids(int value) + { + this.value = 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 new file mode 100644 index 000000000..7fc83ad16 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaConditions.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum MediaConditions +{ + ; + + private int value; + + MediaConditions(int value) + { + this.value = 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 new file mode 100644 index 000000000..ca2b458af --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaMaterials.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum MediaMaterials +{ + ; + + private int value; + + MediaMaterials(int value) + { + this.value = 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 new file mode 100644 index 000000000..8cf72e8e0 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/MediaPurposes.java @@ -0,0 +1,15 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum MediaPurposes +{ + ; + + private int value; + + MediaPurposes(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 new file mode 100644 index 000000000..cb3cc1c56 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Permissions.java @@ -0,0 +1,25 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum Permissions +{ + + @DescriptionAnnotation(description = "Allows loading the technician module in Machine Studio") + RunTechnicianModule(0), + + @DescriptionAnnotation(description = "Allows loading the developer module in Machine Studio") + RunDeveloperModule(1), + + @DescriptionAnnotation(description = "Allows loading the database module in Machine Studio") + RunDataBaseModule(2), + + ; + + private int value; + + Permissions(int value) + { + this.value = value; + } +} diff --git a/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Roles.java b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Roles.java new file mode 100644 index 000000000..8be545370 --- /dev/null +++ b/Software/Android_Studio/Tango.DAL/src/main/java/com/twine/tango/dal/enumerations/Roles.java @@ -0,0 +1,31 @@ +package com.twine.tango.dal.enumerations; + +import com.twine.tango.core.DescriptionAnnotation; + +public enum Roles +{ + + @DescriptionAnnotation(description = "User with standard permissions") + User(0), + + @DescriptionAnnotation(description = "Twine administrator") + Administrator(1), + + @DescriptionAnnotation(description = "Twine technician") + Technician(2), + + @DescriptionAnnotation(description = "Twine Research and development") + Developer(3), + + @DescriptionAnnotation(description = "Role Description") + SomeRole(4), + + ; + + private int value; + + Roles(int value) + { + this.value = 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 f27e1a63f..277930e15 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/ErrorCodeOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/ErrorCodeOuterClass.java new file mode 100644 index 000000000..935c1071f --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/ErrorCodeOuterClass.java @@ -0,0 +1,143 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ErrorCode.proto + +package com.twine.tango.pmr.common; + +public final class ErrorCodeOuterClass { + private ErrorCodeOuterClass() {} + 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.Common.ErrorCode} + */ + public enum ErrorCode + implements com.google.protobuf.ProtocolMessageEnum { + /** + * NONE = 0; + */ + NONE(0), + /** + * BAD_CRC = 1; + */ + BAD_CRC(1), + UNRECOGNIZED(-1), + ; + + /** + * NONE = 0; + */ + public static final int NONE_VALUE = 0; + /** + * BAD_CRC = 1; + */ + public static final int BAD_CRC_VALUE = 1; + + + 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 ErrorCode valueOf(int value) { + return forNumber(value); + } + + public static ErrorCode forNumber(int value) { + switch (value) { + case 0: return NONE; + case 1: return BAD_CRC; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ErrorCode> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ErrorCode findValueByNumber(int number) { + return ErrorCode.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.common.ErrorCodeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final ErrorCode[] VALUES = values(); + + public static ErrorCode 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 ErrorCode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:Tango.PMR.Common.ErrorCode) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017ErrorCode.proto\022\020Tango.PMR.Common*\"\n\tE" + + "rrorCode\022\010\n\004NONE\020\000\022\013\n\007BAD_CRC\020\001B\034\n\032com.t" + + "wine.tango.pmr.commonb\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); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java index c4919dae3..fe9919195 100644 --- a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/common/MessageContainerOuterClass.java @@ -51,6 +51,20 @@ public final class MessageContainerOuterClass { * bytes Data = 5; */ com.google.protobuf.ByteString getData(); + + /** + * uint32 CRC = 6; + */ + int getCRC(); + + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + int getErrorValue(); + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode getError(); } /** * Protobuf type {@code Tango.PMR.Common.MessageContainer} @@ -70,6 +84,8 @@ public final class MessageContainerOuterClass { continuous_ = false; completed_ = false; data_ = com.google.protobuf.ByteString.EMPTY; + cRC_ = 0; + error_ = 0; } @java.lang.Override @@ -127,6 +143,17 @@ public final class MessageContainerOuterClass { data_ = input.readBytes(); break; } + case 48: { + + cRC_ = input.readUInt32(); + break; + } + case 56: { + int rawValue = input.readEnum(); + + error_ = rawValue; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -228,6 +255,31 @@ public final class MessageContainerOuterClass { return data_; } + public static final int CRC_FIELD_NUMBER = 6; + private int cRC_; + /** + * uint32 CRC = 6; + */ + public int getCRC() { + return cRC_; + } + + public static final int ERROR_FIELD_NUMBER = 7; + private int error_; + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + public int getErrorValue() { + return error_; + } + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + public com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode getError() { + com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode result = com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode.valueOf(error_); + return result == null ? com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -255,6 +307,12 @@ public final class MessageContainerOuterClass { if (!data_.isEmpty()) { output.writeBytes(5, data_); } + if (cRC_ != 0) { + output.writeUInt32(6, cRC_); + } + if (error_ != com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode.NONE.getNumber()) { + output.writeEnum(7, error_); + } unknownFields.writeTo(output); } @@ -282,6 +340,14 @@ public final class MessageContainerOuterClass { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, data_); } + if (cRC_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, cRC_); + } + if (error_ != com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode.NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, error_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -307,6 +373,9 @@ public final class MessageContainerOuterClass { == other.getCompleted()); result = result && getData() .equals(other.getData()); + result = result && (getCRC() + == other.getCRC()); + result = result && error_ == other.error_; result = result && unknownFields.equals(other.unknownFields); return result; } @@ -330,6 +399,10 @@ public final class MessageContainerOuterClass { getCompleted()); hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + CRC_FIELD_NUMBER; + hash = (53 * hash) + getCRC(); + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + error_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -469,6 +542,10 @@ public final class MessageContainerOuterClass { data_ = com.google.protobuf.ByteString.EMPTY; + cRC_ = 0; + + error_ = 0; + return this; } @@ -496,6 +573,8 @@ public final class MessageContainerOuterClass { result.continuous_ = continuous_; result.completed_ = completed_; result.data_ = data_; + result.cRC_ = cRC_; + result.error_ = error_; onBuilt(); return result; } @@ -553,6 +632,12 @@ public final class MessageContainerOuterClass { if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); } + if (other.getCRC() != 0) { + setCRC(other.getCRC()); + } + if (other.error_ != 0) { + setErrorValue(other.getErrorValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -773,6 +858,76 @@ public final class MessageContainerOuterClass { onChanged(); return this; } + + private int cRC_ ; + /** + * uint32 CRC = 6; + */ + public int getCRC() { + return cRC_; + } + /** + * uint32 CRC = 6; + */ + public Builder setCRC(int value) { + + cRC_ = value; + onChanged(); + return this; + } + /** + * uint32 CRC = 6; + */ + public Builder clearCRC() { + + cRC_ = 0; + onChanged(); + return this; + } + + private int error_ = 0; + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + public int getErrorValue() { + return error_; + } + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + public Builder setErrorValue(int value) { + error_ = value; + onChanged(); + return this; + } + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + public com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode getError() { + com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode result = com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode.valueOf(error_); + return result == null ? com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode.UNRECOGNIZED : result; + } + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + public Builder setError(com.twine.tango.pmr.common.ErrorCodeOuterClass.ErrorCode value) { + if (value == null) { + throw new NullPointerException(); + } + + error_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Tango.PMR.Common.ErrorCode Error = 7; + */ + public Builder clearError() { + + error_ = 0; + onChanged(); + return this; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); @@ -837,11 +992,13 @@ public final class MessageContainerOuterClass { static { java.lang.String[] descriptorData = { "\n\026MessageContainer.proto\022\020Tango.PMR.Comm" + - "on\032\021MessageType.proto\"\203\001\n\020MessageContain" + - "er\022+\n\004Type\030\001 \001(\0162\035.Tango.PMR.Common.Mess" + - "ageType\022\r\n\005Token\030\002 \001(\t\022\022\n\nContinuous\030\003 \001" + - "(\010\022\021\n\tCompleted\030\004 \001(\010\022\014\n\004Data\030\005 \001(\014B\034\n\032c" + - "om.twine.tango.pmr.commonb\006proto3" + "on\032\021MessageType.proto\032\017ErrorCode.proto\"\274" + + "\001\n\020MessageContainer\022+\n\004Type\030\001 \001(\0162\035.Tang" + + "o.PMR.Common.MessageType\022\r\n\005Token\030\002 \001(\t\022" + + "\022\n\nContinuous\030\003 \001(\010\022\021\n\tCompleted\030\004 \001(\010\022\014" + + "\n\004Data\030\005 \001(\014\022\013\n\003CRC\030\006 \001(\r\022*\n\005Error\030\007 \001(\016" + + "2\033.Tango.PMR.Common.ErrorCodeB\034\n\032com.twi" + + "ne.tango.pmr.commonb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -855,14 +1012,16 @@ public final class MessageContainerOuterClass { .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.twine.tango.pmr.common.MessageTypeOuterClass.getDescriptor(), + com.twine.tango.pmr.common.ErrorCodeOuterClass.getDescriptor(), }, assigner); internal_static_Tango_PMR_Common_MessageContainer_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_Tango_PMR_Common_MessageContainer_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_Tango_PMR_Common_MessageContainer_descriptor, - new java.lang.String[] { "Type", "Token", "Continuous", "Completed", "Data", }); + new java.lang.String[] { "Type", "Token", "Continuous", "Completed", "Data", "CRC", "Error", }); com.twine.tango.pmr.common.MessageTypeOuterClass.getDescriptor(); + com.twine.tango.pmr.common.ErrorCodeOuterClass.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) 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 45185ab6d..a58b36456 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 @@ -47,6 +47,102 @@ public final class MessageTypeOuterClass { * ProgressResponse = 6; */ ProgressResponse(6), + /** + * StubCartridgeReadRequest = 7; + */ + StubCartridgeReadRequest(7), + /** + * StubCartridgeReadResponse = 8; + */ + StubCartridgeReadResponse(8), + /** + * StubCartridgeWriteRequest = 9; + */ + StubCartridgeWriteRequest(9), + /** + * StubCartridgeWriteResponse = 10; + */ + StubCartridgeWriteResponse(10), + /** + * StubDispenserRequest = 11; + */ + StubDispenserRequest(11), + /** + * StubDispenserResponse = 12; + */ + StubDispenserResponse(12), + /** + * StubGPIOReadBitRequest = 13; + */ + StubGPIOReadBitRequest(13), + /** + * StubGPIOReadBitResponse = 14; + */ + StubGPIOReadBitResponse(14), + /** + * StubGPIOReadByteRequest = 15; + */ + StubGPIOReadByteRequest(15), + /** + * StubGPIOReadByteResponse = 16; + */ + StubGPIOReadByteResponse(16), + /** + * StubGPIOWriteBitRequest = 17; + */ + StubGPIOWriteBitRequest(17), + /** + * StubGPIOWriteBitResponse = 18; + */ + StubGPIOWriteBitResponse(18), + /** + * StubGPIOWriteByteRequest = 19; + */ + StubGPIOWriteByteRequest(19), + /** + * StubGPIOWriteByteResponse = 20; + */ + StubGPIOWriteByteResponse(20), + /** + * StubHeaterRequest = 21; + */ + StubHeaterRequest(21), + /** + * StubHeaterResponse = 22; + */ + StubHeaterResponse(22), + /** + * StubMotorEncoderRequest = 23; + */ + StubMotorEncoderRequest(23), + /** + * StubMotorEncoderResponse = 24; + */ + StubMotorEncoderResponse(24), + /** + * StubOptLimitSwitchRequest = 25; + */ + StubOptLimitSwitchRequest(25), + /** + * StubOptLimitSwitchResponse = 26; + */ + StubOptLimitSwitchResponse(26), + /** + * StubSteperMotorRequest = 27; + */ + StubSteperMotorRequest(27), + /** + * StubSteperMotorResponse = 28; + */ + StubSteperMotorResponse(28), + /** + * StubValveRequest = 29; + */ + StubValveRequest(29), + /** + * StubValveResponse = 30; + */ + StubValveResponse(30), UNRECOGNIZED(-1), ; @@ -78,6 +174,102 @@ public final class MessageTypeOuterClass { * ProgressResponse = 6; */ public static final int ProgressResponse_VALUE = 6; + /** + * StubCartridgeReadRequest = 7; + */ + public static final int StubCartridgeReadRequest_VALUE = 7; + /** + * StubCartridgeReadResponse = 8; + */ + public static final int StubCartridgeReadResponse_VALUE = 8; + /** + * StubCartridgeWriteRequest = 9; + */ + public static final int StubCartridgeWriteRequest_VALUE = 9; + /** + * StubCartridgeWriteResponse = 10; + */ + public static final int StubCartridgeWriteResponse_VALUE = 10; + /** + * StubDispenserRequest = 11; + */ + public static final int StubDispenserRequest_VALUE = 11; + /** + * StubDispenserResponse = 12; + */ + public static final int StubDispenserResponse_VALUE = 12; + /** + * StubGPIOReadBitRequest = 13; + */ + public static final int StubGPIOReadBitRequest_VALUE = 13; + /** + * StubGPIOReadBitResponse = 14; + */ + public static final int StubGPIOReadBitResponse_VALUE = 14; + /** + * StubGPIOReadByteRequest = 15; + */ + public static final int StubGPIOReadByteRequest_VALUE = 15; + /** + * StubGPIOReadByteResponse = 16; + */ + public static final int StubGPIOReadByteResponse_VALUE = 16; + /** + * StubGPIOWriteBitRequest = 17; + */ + public static final int StubGPIOWriteBitRequest_VALUE = 17; + /** + * StubGPIOWriteBitResponse = 18; + */ + public static final int StubGPIOWriteBitResponse_VALUE = 18; + /** + * StubGPIOWriteByteRequest = 19; + */ + public static final int StubGPIOWriteByteRequest_VALUE = 19; + /** + * StubGPIOWriteByteResponse = 20; + */ + public static final int StubGPIOWriteByteResponse_VALUE = 20; + /** + * StubHeaterRequest = 21; + */ + public static final int StubHeaterRequest_VALUE = 21; + /** + * StubHeaterResponse = 22; + */ + public static final int StubHeaterResponse_VALUE = 22; + /** + * StubMotorEncoderRequest = 23; + */ + public static final int StubMotorEncoderRequest_VALUE = 23; + /** + * StubMotorEncoderResponse = 24; + */ + public static final int StubMotorEncoderResponse_VALUE = 24; + /** + * StubOptLimitSwitchRequest = 25; + */ + public static final int StubOptLimitSwitchRequest_VALUE = 25; + /** + * StubOptLimitSwitchResponse = 26; + */ + public static final int StubOptLimitSwitchResponse_VALUE = 26; + /** + * StubSteperMotorRequest = 27; + */ + public static final int StubSteperMotorRequest_VALUE = 27; + /** + * StubSteperMotorResponse = 28; + */ + public static final int StubSteperMotorResponse_VALUE = 28; + /** + * StubValveRequest = 29; + */ + public static final int StubValveRequest_VALUE = 29; + /** + * StubValveResponse = 30; + */ + public static final int StubValveResponse_VALUE = 30; public final int getNumber() { @@ -105,6 +297,30 @@ public final class MessageTypeOuterClass { case 4: return CalculateResponse; case 5: return ProgressRequest; case 6: return ProgressResponse; + case 7: return StubCartridgeReadRequest; + case 8: return StubCartridgeReadResponse; + case 9: return StubCartridgeWriteRequest; + case 10: return StubCartridgeWriteResponse; + case 11: return StubDispenserRequest; + case 12: return StubDispenserResponse; + case 13: return StubGPIOReadBitRequest; + case 14: return StubGPIOReadBitResponse; + case 15: return StubGPIOReadByteRequest; + case 16: return StubGPIOReadByteResponse; + case 17: return StubGPIOWriteBitRequest; + case 18: return StubGPIOWriteBitResponse; + case 19: return StubGPIOWriteByteRequest; + case 20: return StubGPIOWriteByteResponse; + case 21: return StubHeaterRequest; + case 22: return StubHeaterResponse; + case 23: return StubMotorEncoderRequest; + case 24: return StubMotorEncoderResponse; + case 25: return StubOptLimitSwitchRequest; + case 26: return StubOptLimitSwitchResponse; + case 27: return StubSteperMotorRequest; + case 28: return StubSteperMotorResponse; + case 29: return StubValveRequest; + case 30: return StubValveResponse; default: return null; } } @@ -166,12 +382,29 @@ public final class MessageTypeOuterClass { descriptor; static { java.lang.String[] descriptorData = { - "\n\021MessageType.proto\022\020Tango.PMR.Common*\204\001" + + "\n\021MessageType.proto\022\020Tango.PMR.Common*\260\006" + "\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" + - "ssResponse\020\006B\034\n\032com.twine.tango.pmr.comm" + - "onb\006proto3" + "ssResponse\020\006\022\034\n\030StubCartridgeReadRequest" + + "\020\007\022\035\n\031StubCartridgeReadResponse\020\010\022\035\n\031Stu" + + "bCartridgeWriteRequest\020\t\022\036\n\032StubCartridg" + + "eWriteResponse\020\n\022\030\n\024StubDispenserRequest" + + "\020\013\022\031\n\025StubDispenserResponse\020\014\022\032\n\026StubGPI" + + "OReadBitRequest\020\r\022\033\n\027StubGPIOReadBitResp", + "onse\020\016\022\033\n\027StubGPIOReadByteRequest\020\017\022\034\n\030S" + + "tubGPIOReadByteResponse\020\020\022\033\n\027StubGPIOWri" + + "teBitRequest\020\021\022\034\n\030StubGPIOWriteBitRespon" + + "se\020\022\022\034\n\030StubGPIOWriteByteRequest\020\023\022\035\n\031St" + + "ubGPIOWriteByteResponse\020\024\022\025\n\021StubHeaterR" + + "equest\020\025\022\026\n\022StubHeaterResponse\020\026\022\033\n\027Stub" + + "MotorEncoderRequest\020\027\022\034\n\030StubMotorEncode" + + "rResponse\020\030\022\035\n\031StubOptLimitSwitchRequest" + + "\020\031\022\036\n\032StubOptLimitSwitchResponse\020\032\022\032\n\026St" + + "ubSteperMotorRequest\020\033\022\033\n\027StubSteperMoto", + "rResponse\020\034\022\024\n\020StubValveRequest\020\035\022\025\n\021Stu" + + "bValveResponse\020\036B\034\n\032com.twine.tango.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/stubs/StubCartridgeReadRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeReadRequestOuterClass.java new file mode 100644 index 000000000..baed0890f --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeReadRequestOuterClass.java @@ -0,0 +1,525 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubCartridgeReadRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubCartridgeReadRequestOuterClass { + private StubCartridgeReadRequestOuterClass() {} + 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 StubCartridgeReadRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubCartridgeReadRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..7
+     * 
+ * + * uint32 CartridgeId = 1; + */ + int getCartridgeId(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubCartridgeReadRequest} + */ + public static final class StubCartridgeReadRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubCartridgeReadRequest) + StubCartridgeReadRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubCartridgeReadRequest.newBuilder() to construct. + private StubCartridgeReadRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubCartridgeReadRequest() { + cartridgeId_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubCartridgeReadRequest( + 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: { + + cartridgeId_ = input.readUInt32(); + 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.stubs.StubCartridgeReadRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest.class, com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest.Builder.class); + } + + public static final int CARTRIDGEID_FIELD_NUMBER = 1; + private int cartridgeId_; + /** + *
+     *0..7
+     * 
+ * + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + + 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 (cartridgeId_ != 0) { + output.writeUInt32(1, cartridgeId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cartridgeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, cartridgeId_); + } + 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest other = (com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest) obj; + + boolean result = true; + result = result && (getCartridgeId() + == other.getCartridgeId()); + 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) + CARTRIDGEID_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest 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.Stubs.StubCartridgeReadRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubCartridgeReadRequest) + com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest.class, com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest.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(); + cartridgeId_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest build() { + com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest buildPartial() { + com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest result = new com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest(this); + result.cartridgeId_ = cartridgeId_; + 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest other) { + if (other == com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest.getDefaultInstance()) return this; + if (other.getCartridgeId() != 0) { + setCartridgeId(other.getCartridgeId()); + } + 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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cartridgeId_ ; + /** + *
+       *0..7
+       * 
+ * + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + /** + *
+       *0..7
+       * 
+ * + * uint32 CartridgeId = 1; + */ + public Builder setCartridgeId(int value) { + + cartridgeId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..7
+       * 
+ * + * uint32 CartridgeId = 1; + */ + public Builder clearCartridgeId() { + + cartridgeId_ = 0; + 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.Stubs.StubCartridgeReadRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubCartridgeReadRequest) + private static final com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest(); + } + + public static com.twine.tango.pmr.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubCartridgeReadRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubCartridgeReadRequest(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.stubs.StubCartridgeReadRequestOuterClass.StubCartridgeReadRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_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\036StubCartridgeReadRequest.proto\022\017Tango." + + "PMR.Stubs\"/\n\030StubCartridgeReadRequest\022\023\n" + + "\013CartridgeId\030\001 \001(\rB\033\n\031com.twine.tango.pm" + + "r.stubsb\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_Stubs_StubCartridgeReadRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubCartridgeReadRequest_descriptor, + new java.lang.String[] { "CartridgeId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeReadResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeReadResponseOuterClass.java new file mode 100644 index 000000000..eb7fd4cb6 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeReadResponseOuterClass.java @@ -0,0 +1,824 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubCartridgeReadResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubCartridgeReadResponseOuterClass { + private StubCartridgeReadResponseOuterClass() {} + 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 StubCartridgeReadResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubCartridgeReadResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 CartridgeId = 1; + */ + int getCartridgeId(); + + /** + * uint32 CartridgeColor = 3; + */ + int getCartridgeColor(); + + /** + * uint32 CartridgeVersion = 4; + */ + int getCartridgeVersion(); + + /** + * uint32 CartridgeData = 5; + */ + int getCartridgeData(); + + /** + * bool CartridgeUsed = 6; + */ + boolean getCartridgeUsed(); + + /** + * uint32 Status = 8; + */ + int getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubCartridgeReadResponse} + */ + public static final class StubCartridgeReadResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubCartridgeReadResponse) + StubCartridgeReadResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubCartridgeReadResponse.newBuilder() to construct. + private StubCartridgeReadResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubCartridgeReadResponse() { + cartridgeId_ = 0; + cartridgeColor_ = 0; + cartridgeVersion_ = 0; + cartridgeData_ = 0; + cartridgeUsed_ = false; + status_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubCartridgeReadResponse( + 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: { + + cartridgeId_ = input.readUInt32(); + break; + } + case 24: { + + cartridgeColor_ = input.readUInt32(); + break; + } + case 32: { + + cartridgeVersion_ = input.readUInt32(); + break; + } + case 40: { + + cartridgeData_ = input.readUInt32(); + break; + } + case 48: { + + cartridgeUsed_ = input.readBool(); + break; + } + case 64: { + + status_ = input.readUInt32(); + 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.stubs.StubCartridgeReadResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse.class, com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse.Builder.class); + } + + public static final int CARTRIDGEID_FIELD_NUMBER = 1; + private int cartridgeId_; + /** + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + + public static final int CARTRIDGECOLOR_FIELD_NUMBER = 3; + private int cartridgeColor_; + /** + * uint32 CartridgeColor = 3; + */ + public int getCartridgeColor() { + return cartridgeColor_; + } + + public static final int CARTRIDGEVERSION_FIELD_NUMBER = 4; + private int cartridgeVersion_; + /** + * uint32 CartridgeVersion = 4; + */ + public int getCartridgeVersion() { + return cartridgeVersion_; + } + + public static final int CARTRIDGEDATA_FIELD_NUMBER = 5; + private int cartridgeData_; + /** + * uint32 CartridgeData = 5; + */ + public int getCartridgeData() { + return cartridgeData_; + } + + public static final int CARTRIDGEUSED_FIELD_NUMBER = 6; + private boolean cartridgeUsed_; + /** + * bool CartridgeUsed = 6; + */ + public boolean getCartridgeUsed() { + return cartridgeUsed_; + } + + public static final int STATUS_FIELD_NUMBER = 8; + private int status_; + /** + * uint32 Status = 8; + */ + public int getStatus() { + return status_; + } + + 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 (cartridgeId_ != 0) { + output.writeUInt32(1, cartridgeId_); + } + if (cartridgeColor_ != 0) { + output.writeUInt32(3, cartridgeColor_); + } + if (cartridgeVersion_ != 0) { + output.writeUInt32(4, cartridgeVersion_); + } + if (cartridgeData_ != 0) { + output.writeUInt32(5, cartridgeData_); + } + if (cartridgeUsed_ != false) { + output.writeBool(6, cartridgeUsed_); + } + if (status_ != 0) { + output.writeUInt32(8, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cartridgeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, cartridgeId_); + } + if (cartridgeColor_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, cartridgeColor_); + } + if (cartridgeVersion_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, cartridgeVersion_); + } + if (cartridgeData_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, cartridgeData_); + } + if (cartridgeUsed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, cartridgeUsed_); + } + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, status_); + } + 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse other = (com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse) obj; + + boolean result = true; + result = result && (getCartridgeId() + == other.getCartridgeId()); + result = result && (getCartridgeColor() + == other.getCartridgeColor()); + result = result && (getCartridgeVersion() + == other.getCartridgeVersion()); + result = result && (getCartridgeData() + == other.getCartridgeData()); + result = result && (getCartridgeUsed() + == other.getCartridgeUsed()); + result = result && (getStatus() + == other.getStatus()); + 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) + CARTRIDGEID_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeId(); + hash = (37 * hash) + CARTRIDGECOLOR_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeColor(); + hash = (37 * hash) + CARTRIDGEVERSION_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeVersion(); + hash = (37 * hash) + CARTRIDGEDATA_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeData(); + hash = (37 * hash) + CARTRIDGEUSED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCartridgeUsed()); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse 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.Stubs.StubCartridgeReadResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubCartridgeReadResponse) + com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse.class, com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse.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(); + cartridgeId_ = 0; + + cartridgeColor_ = 0; + + cartridgeVersion_ = 0; + + cartridgeData_ = 0; + + cartridgeUsed_ = false; + + status_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse build() { + com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse buildPartial() { + com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse result = new com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse(this); + result.cartridgeId_ = cartridgeId_; + result.cartridgeColor_ = cartridgeColor_; + result.cartridgeVersion_ = cartridgeVersion_; + result.cartridgeData_ = cartridgeData_; + result.cartridgeUsed_ = cartridgeUsed_; + result.status_ = status_; + 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse other) { + if (other == com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse.getDefaultInstance()) return this; + if (other.getCartridgeId() != 0) { + setCartridgeId(other.getCartridgeId()); + } + if (other.getCartridgeColor() != 0) { + setCartridgeColor(other.getCartridgeColor()); + } + if (other.getCartridgeVersion() != 0) { + setCartridgeVersion(other.getCartridgeVersion()); + } + if (other.getCartridgeData() != 0) { + setCartridgeData(other.getCartridgeData()); + } + if (other.getCartridgeUsed() != false) { + setCartridgeUsed(other.getCartridgeUsed()); + } + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + 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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cartridgeId_ ; + /** + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + /** + * uint32 CartridgeId = 1; + */ + public Builder setCartridgeId(int value) { + + cartridgeId_ = value; + onChanged(); + return this; + } + /** + * uint32 CartridgeId = 1; + */ + public Builder clearCartridgeId() { + + cartridgeId_ = 0; + onChanged(); + return this; + } + + private int cartridgeColor_ ; + /** + * uint32 CartridgeColor = 3; + */ + public int getCartridgeColor() { + return cartridgeColor_; + } + /** + * uint32 CartridgeColor = 3; + */ + public Builder setCartridgeColor(int value) { + + cartridgeColor_ = value; + onChanged(); + return this; + } + /** + * uint32 CartridgeColor = 3; + */ + public Builder clearCartridgeColor() { + + cartridgeColor_ = 0; + onChanged(); + return this; + } + + private int cartridgeVersion_ ; + /** + * uint32 CartridgeVersion = 4; + */ + public int getCartridgeVersion() { + return cartridgeVersion_; + } + /** + * uint32 CartridgeVersion = 4; + */ + public Builder setCartridgeVersion(int value) { + + cartridgeVersion_ = value; + onChanged(); + return this; + } + /** + * uint32 CartridgeVersion = 4; + */ + public Builder clearCartridgeVersion() { + + cartridgeVersion_ = 0; + onChanged(); + return this; + } + + private int cartridgeData_ ; + /** + * uint32 CartridgeData = 5; + */ + public int getCartridgeData() { + return cartridgeData_; + } + /** + * uint32 CartridgeData = 5; + */ + public Builder setCartridgeData(int value) { + + cartridgeData_ = value; + onChanged(); + return this; + } + /** + * uint32 CartridgeData = 5; + */ + public Builder clearCartridgeData() { + + cartridgeData_ = 0; + onChanged(); + return this; + } + + private boolean cartridgeUsed_ ; + /** + * bool CartridgeUsed = 6; + */ + public boolean getCartridgeUsed() { + return cartridgeUsed_; + } + /** + * bool CartridgeUsed = 6; + */ + public Builder setCartridgeUsed(boolean value) { + + cartridgeUsed_ = value; + onChanged(); + return this; + } + /** + * bool CartridgeUsed = 6; + */ + public Builder clearCartridgeUsed() { + + cartridgeUsed_ = false; + onChanged(); + return this; + } + + private int status_ ; + /** + * uint32 Status = 8; + */ + public int getStatus() { + return status_; + } + /** + * uint32 Status = 8; + */ + public Builder setStatus(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * uint32 Status = 8; + */ + public Builder clearStatus() { + + status_ = 0; + 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.Stubs.StubCartridgeReadResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubCartridgeReadResponse) + private static final com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse(); + } + + public static com.twine.tango.pmr.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubCartridgeReadResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubCartridgeReadResponse(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.stubs.StubCartridgeReadResponseOuterClass.StubCartridgeReadResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_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\037StubCartridgeReadResponse.proto\022\017Tango" + + ".PMR.Stubs\"\240\001\n\031StubCartridgeReadResponse" + + "\022\023\n\013CartridgeId\030\001 \001(\r\022\026\n\016CartridgeColor\030" + + "\003 \001(\r\022\030\n\020CartridgeVersion\030\004 \001(\r\022\025\n\rCartr" + + "idgeData\030\005 \001(\r\022\025\n\rCartridgeUsed\030\006 \001(\010\022\016\n" + + "\006Status\030\010 \001(\rB\033\n\031com.twine.tango.pmr.stu" + + "bsb\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_Stubs_StubCartridgeReadResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubCartridgeReadResponse_descriptor, + new java.lang.String[] { "CartridgeId", "CartridgeColor", "CartridgeVersion", "CartridgeData", "CartridgeUsed", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteRequestOuterClass.java new file mode 100644 index 000000000..d379d450b --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteRequestOuterClass.java @@ -0,0 +1,815 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubCartridgeWriteRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubCartridgeWriteRequestOuterClass { + private StubCartridgeWriteRequestOuterClass() {} + 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 StubCartridgeWriteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubCartridgeWriteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..7
+     * 
+ * + * uint32 CartridgeId = 1; + */ + int getCartridgeId(); + + /** + *
+     * 
+ * + * uint32 CartridgeColor = 2; + */ + int getCartridgeColor(); + + /** + * uint32 CartridgeVersion = 3; + */ + int getCartridgeVersion(); + + /** + * uint32 CartridgeData = 4; + */ + int getCartridgeData(); + + /** + *
+     * 0 - new 1- used
+     * 
+ * + * bool CartridgeUsed = 5; + */ + boolean getCartridgeUsed(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubCartridgeWriteRequest} + */ + public static final class StubCartridgeWriteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubCartridgeWriteRequest) + StubCartridgeWriteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubCartridgeWriteRequest.newBuilder() to construct. + private StubCartridgeWriteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubCartridgeWriteRequest() { + cartridgeId_ = 0; + cartridgeColor_ = 0; + cartridgeVersion_ = 0; + cartridgeData_ = 0; + cartridgeUsed_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubCartridgeWriteRequest( + 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: { + + cartridgeId_ = input.readUInt32(); + break; + } + case 16: { + + cartridgeColor_ = input.readUInt32(); + break; + } + case 24: { + + cartridgeVersion_ = input.readUInt32(); + break; + } + case 32: { + + cartridgeData_ = input.readUInt32(); + break; + } + case 40: { + + cartridgeUsed_ = 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.stubs.StubCartridgeWriteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest.class, com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest.Builder.class); + } + + public static final int CARTRIDGEID_FIELD_NUMBER = 1; + private int cartridgeId_; + /** + *
+     *0..7
+     * 
+ * + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + + public static final int CARTRIDGECOLOR_FIELD_NUMBER = 2; + private int cartridgeColor_; + /** + *
+     * 
+ * + * uint32 CartridgeColor = 2; + */ + public int getCartridgeColor() { + return cartridgeColor_; + } + + public static final int CARTRIDGEVERSION_FIELD_NUMBER = 3; + private int cartridgeVersion_; + /** + * uint32 CartridgeVersion = 3; + */ + public int getCartridgeVersion() { + return cartridgeVersion_; + } + + public static final int CARTRIDGEDATA_FIELD_NUMBER = 4; + private int cartridgeData_; + /** + * uint32 CartridgeData = 4; + */ + public int getCartridgeData() { + return cartridgeData_; + } + + public static final int CARTRIDGEUSED_FIELD_NUMBER = 5; + private boolean cartridgeUsed_; + /** + *
+     * 0 - new 1- used
+     * 
+ * + * bool CartridgeUsed = 5; + */ + public boolean getCartridgeUsed() { + return cartridgeUsed_; + } + + 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 (cartridgeId_ != 0) { + output.writeUInt32(1, cartridgeId_); + } + if (cartridgeColor_ != 0) { + output.writeUInt32(2, cartridgeColor_); + } + if (cartridgeVersion_ != 0) { + output.writeUInt32(3, cartridgeVersion_); + } + if (cartridgeData_ != 0) { + output.writeUInt32(4, cartridgeData_); + } + if (cartridgeUsed_ != false) { + output.writeBool(5, cartridgeUsed_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cartridgeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, cartridgeId_); + } + if (cartridgeColor_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, cartridgeColor_); + } + if (cartridgeVersion_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, cartridgeVersion_); + } + if (cartridgeData_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, cartridgeData_); + } + if (cartridgeUsed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, cartridgeUsed_); + } + 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest other = (com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest) obj; + + boolean result = true; + result = result && (getCartridgeId() + == other.getCartridgeId()); + result = result && (getCartridgeColor() + == other.getCartridgeColor()); + result = result && (getCartridgeVersion() + == other.getCartridgeVersion()); + result = result && (getCartridgeData() + == other.getCartridgeData()); + result = result && (getCartridgeUsed() + == other.getCartridgeUsed()); + 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) + CARTRIDGEID_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeId(); + hash = (37 * hash) + CARTRIDGECOLOR_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeColor(); + hash = (37 * hash) + CARTRIDGEVERSION_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeVersion(); + hash = (37 * hash) + CARTRIDGEDATA_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeData(); + hash = (37 * hash) + CARTRIDGEUSED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCartridgeUsed()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest 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.Stubs.StubCartridgeWriteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubCartridgeWriteRequest) + com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest.class, com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest.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(); + cartridgeId_ = 0; + + cartridgeColor_ = 0; + + cartridgeVersion_ = 0; + + cartridgeData_ = 0; + + cartridgeUsed_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest build() { + com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest buildPartial() { + com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest result = new com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest(this); + result.cartridgeId_ = cartridgeId_; + result.cartridgeColor_ = cartridgeColor_; + result.cartridgeVersion_ = cartridgeVersion_; + result.cartridgeData_ = cartridgeData_; + result.cartridgeUsed_ = cartridgeUsed_; + 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest other) { + if (other == com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest.getDefaultInstance()) return this; + if (other.getCartridgeId() != 0) { + setCartridgeId(other.getCartridgeId()); + } + if (other.getCartridgeColor() != 0) { + setCartridgeColor(other.getCartridgeColor()); + } + if (other.getCartridgeVersion() != 0) { + setCartridgeVersion(other.getCartridgeVersion()); + } + if (other.getCartridgeData() != 0) { + setCartridgeData(other.getCartridgeData()); + } + if (other.getCartridgeUsed() != false) { + setCartridgeUsed(other.getCartridgeUsed()); + } + 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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cartridgeId_ ; + /** + *
+       *0..7
+       * 
+ * + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + /** + *
+       *0..7
+       * 
+ * + * uint32 CartridgeId = 1; + */ + public Builder setCartridgeId(int value) { + + cartridgeId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..7
+       * 
+ * + * uint32 CartridgeId = 1; + */ + public Builder clearCartridgeId() { + + cartridgeId_ = 0; + onChanged(); + return this; + } + + private int cartridgeColor_ ; + /** + *
+       * 
+ * + * uint32 CartridgeColor = 2; + */ + public int getCartridgeColor() { + return cartridgeColor_; + } + /** + *
+       * 
+ * + * uint32 CartridgeColor = 2; + */ + public Builder setCartridgeColor(int value) { + + cartridgeColor_ = value; + onChanged(); + return this; + } + /** + *
+       * 
+ * + * uint32 CartridgeColor = 2; + */ + public Builder clearCartridgeColor() { + + cartridgeColor_ = 0; + onChanged(); + return this; + } + + private int cartridgeVersion_ ; + /** + * uint32 CartridgeVersion = 3; + */ + public int getCartridgeVersion() { + return cartridgeVersion_; + } + /** + * uint32 CartridgeVersion = 3; + */ + public Builder setCartridgeVersion(int value) { + + cartridgeVersion_ = value; + onChanged(); + return this; + } + /** + * uint32 CartridgeVersion = 3; + */ + public Builder clearCartridgeVersion() { + + cartridgeVersion_ = 0; + onChanged(); + return this; + } + + private int cartridgeData_ ; + /** + * uint32 CartridgeData = 4; + */ + public int getCartridgeData() { + return cartridgeData_; + } + /** + * uint32 CartridgeData = 4; + */ + public Builder setCartridgeData(int value) { + + cartridgeData_ = value; + onChanged(); + return this; + } + /** + * uint32 CartridgeData = 4; + */ + public Builder clearCartridgeData() { + + cartridgeData_ = 0; + onChanged(); + return this; + } + + private boolean cartridgeUsed_ ; + /** + *
+       * 0 - new 1- used
+       * 
+ * + * bool CartridgeUsed = 5; + */ + public boolean getCartridgeUsed() { + return cartridgeUsed_; + } + /** + *
+       * 0 - new 1- used
+       * 
+ * + * bool CartridgeUsed = 5; + */ + public Builder setCartridgeUsed(boolean value) { + + cartridgeUsed_ = value; + onChanged(); + return this; + } + /** + *
+       * 0 - new 1- used
+       * 
+ * + * bool CartridgeUsed = 5; + */ + public Builder clearCartridgeUsed() { + + cartridgeUsed_ = 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.Stubs.StubCartridgeWriteRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubCartridgeWriteRequest) + private static final com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest(); + } + + public static com.twine.tango.pmr.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubCartridgeWriteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubCartridgeWriteRequest(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.stubs.StubCartridgeWriteRequestOuterClass.StubCartridgeWriteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_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\037StubCartridgeWriteRequest.proto\022\017Tango" + + ".PMR.Stubs\"\220\001\n\031StubCartridgeWriteRequest" + + "\022\023\n\013CartridgeId\030\001 \001(\r\022\026\n\016CartridgeColor\030" + + "\002 \001(\r\022\030\n\020CartridgeVersion\030\003 \001(\r\022\025\n\rCartr" + + "idgeData\030\004 \001(\r\022\025\n\rCartridgeUsed\030\005 \001(\010B\033\n" + + "\031com.twine.tango.pmr.stubsb\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_Stubs_StubCartridgeWriteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubCartridgeWriteRequest_descriptor, + new java.lang.String[] { "CartridgeId", "CartridgeColor", "CartridgeVersion", "CartridgeData", "CartridgeUsed", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteResponseOuterClass.java new file mode 100644 index 000000000..12795b75c --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubCartridgeWriteResponseOuterClass.java @@ -0,0 +1,568 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubCartridgeWriteResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubCartridgeWriteResponseOuterClass { + private StubCartridgeWriteResponseOuterClass() {} + 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 StubCartridgeWriteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubCartridgeWriteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * uint32 CartridgeId = 1; + */ + int getCartridgeId(); + + /** + * uint32 Status = 8; + */ + int getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubCartridgeWriteResponse} + */ + public static final class StubCartridgeWriteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubCartridgeWriteResponse) + StubCartridgeWriteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubCartridgeWriteResponse.newBuilder() to construct. + private StubCartridgeWriteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubCartridgeWriteResponse() { + cartridgeId_ = 0; + status_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubCartridgeWriteResponse( + 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: { + + cartridgeId_ = input.readUInt32(); + break; + } + case 64: { + + status_ = input.readUInt32(); + 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.stubs.StubCartridgeWriteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse.class, com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse.Builder.class); + } + + public static final int CARTRIDGEID_FIELD_NUMBER = 1; + private int cartridgeId_; + /** + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + + public static final int STATUS_FIELD_NUMBER = 8; + private int status_; + /** + * uint32 Status = 8; + */ + public int getStatus() { + return status_; + } + + 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 (cartridgeId_ != 0) { + output.writeUInt32(1, cartridgeId_); + } + if (status_ != 0) { + output.writeUInt32(8, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cartridgeId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, cartridgeId_); + } + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, status_); + } + 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse other = (com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse) obj; + + boolean result = true; + result = result && (getCartridgeId() + == other.getCartridgeId()); + result = result && (getStatus() + == other.getStatus()); + 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) + CARTRIDGEID_FIELD_NUMBER; + hash = (53 * hash) + getCartridgeId(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse 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.Stubs.StubCartridgeWriteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubCartridgeWriteResponse) + com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse.class, com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse.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(); + cartridgeId_ = 0; + + status_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse build() { + com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse buildPartial() { + com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse result = new com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse(this); + result.cartridgeId_ = cartridgeId_; + result.status_ = status_; + 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse other) { + if (other == com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse.getDefaultInstance()) return this; + if (other.getCartridgeId() != 0) { + setCartridgeId(other.getCartridgeId()); + } + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + 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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int cartridgeId_ ; + /** + * uint32 CartridgeId = 1; + */ + public int getCartridgeId() { + return cartridgeId_; + } + /** + * uint32 CartridgeId = 1; + */ + public Builder setCartridgeId(int value) { + + cartridgeId_ = value; + onChanged(); + return this; + } + /** + * uint32 CartridgeId = 1; + */ + public Builder clearCartridgeId() { + + cartridgeId_ = 0; + onChanged(); + return this; + } + + private int status_ ; + /** + * uint32 Status = 8; + */ + public int getStatus() { + return status_; + } + /** + * uint32 Status = 8; + */ + public Builder setStatus(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * uint32 Status = 8; + */ + public Builder clearStatus() { + + status_ = 0; + 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.Stubs.StubCartridgeWriteResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubCartridgeWriteResponse) + private static final com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse(); + } + + public static com.twine.tango.pmr.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubCartridgeWriteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubCartridgeWriteResponse(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.stubs.StubCartridgeWriteResponseOuterClass.StubCartridgeWriteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_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 StubCartridgeWriteResponse.proto\022\017Tang" + + "o.PMR.Stubs\"A\n\032StubCartridgeWriteRespons" + + "e\022\023\n\013CartridgeId\030\001 \001(\r\022\016\n\006Status\030\010 \001(\rB\033" + + "\n\031com.twine.tango.pmr.stubsb\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_Stubs_StubCartridgeWriteResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubCartridgeWriteResponse_descriptor, + new java.lang.String[] { "CartridgeId", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserRequestOuterClass.java new file mode 100644 index 000000000..e169dfd16 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserRequestOuterClass.java @@ -0,0 +1,841 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubDispenserRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubDispenserRequestOuterClass { + private StubDispenserRequestOuterClass() {} + 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 StubDispenserRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubDispenserRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..7
+     * 
+ * + * uint32 DispenserId = 1; + */ + int getDispenserId(); + + /** + *
+     * 1-start 0-stop
+     * 
+ * + * bool Start = 2; + */ + boolean getStart(); + + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool SetDirection = 3; + */ + boolean getSetDirection(); + + /** + *
+     * No. of steps for 360 deg.
+     * 
+ * + * int32 SetMicrostepDivision = 4; + */ + int getSetMicrostepDivision(); + + /** + * int32 SetSpeed = 5; + */ + int getSetSpeed(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubDispenserRequest} + */ + public static final class StubDispenserRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubDispenserRequest) + StubDispenserRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubDispenserRequest.newBuilder() to construct. + private StubDispenserRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubDispenserRequest() { + dispenserId_ = 0; + start_ = false; + setDirection_ = false; + setMicrostepDivision_ = 0; + setSpeed_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubDispenserRequest( + 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: { + + dispenserId_ = input.readUInt32(); + break; + } + case 16: { + + start_ = input.readBool(); + break; + } + case 24: { + + setDirection_ = input.readBool(); + break; + } + case 32: { + + setMicrostepDivision_ = input.readInt32(); + break; + } + case 40: { + + setSpeed_ = input.readInt32(); + 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.stubs.StubDispenserRequestOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest.class, com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest.Builder.class); + } + + public static final int DISPENSERID_FIELD_NUMBER = 1; + private int dispenserId_; + /** + *
+     * 0..7
+     * 
+ * + * uint32 DispenserId = 1; + */ + public int getDispenserId() { + return dispenserId_; + } + + public static final int START_FIELD_NUMBER = 2; + private boolean start_; + /** + *
+     * 1-start 0-stop
+     * 
+ * + * bool Start = 2; + */ + public boolean getStart() { + return start_; + } + + public static final int SETDIRECTION_FIELD_NUMBER = 3; + private boolean setDirection_; + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool SetDirection = 3; + */ + public boolean getSetDirection() { + return setDirection_; + } + + public static final int SETMICROSTEPDIVISION_FIELD_NUMBER = 4; + private int setMicrostepDivision_; + /** + *
+     * No. of steps for 360 deg.
+     * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public int getSetMicrostepDivision() { + return setMicrostepDivision_; + } + + public static final int SETSPEED_FIELD_NUMBER = 5; + private int setSpeed_; + /** + * int32 SetSpeed = 5; + */ + public int getSetSpeed() { + return setSpeed_; + } + + 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 (dispenserId_ != 0) { + output.writeUInt32(1, dispenserId_); + } + if (start_ != false) { + output.writeBool(2, start_); + } + if (setDirection_ != false) { + output.writeBool(3, setDirection_); + } + if (setMicrostepDivision_ != 0) { + output.writeInt32(4, setMicrostepDivision_); + } + if (setSpeed_ != 0) { + output.writeInt32(5, setSpeed_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dispenserId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, dispenserId_); + } + if (start_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, start_); + } + if (setDirection_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, setDirection_); + } + if (setMicrostepDivision_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, setMicrostepDivision_); + } + if (setSpeed_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, setSpeed_); + } + 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest other = (com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest) obj; + + boolean result = true; + result = result && (getDispenserId() + == other.getDispenserId()); + result = result && (getStart() + == other.getStart()); + result = result && (getSetDirection() + == other.getSetDirection()); + result = result && (getSetMicrostepDivision() + == other.getSetMicrostepDivision()); + result = result && (getSetSpeed() + == other.getSetSpeed()); + 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) + DISPENSERID_FIELD_NUMBER; + hash = (53 * hash) + getDispenserId(); + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStart()); + hash = (37 * hash) + SETDIRECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSetDirection()); + hash = (37 * hash) + SETMICROSTEPDIVISION_FIELD_NUMBER; + hash = (53 * hash) + getSetMicrostepDivision(); + hash = (37 * hash) + SETSPEED_FIELD_NUMBER; + hash = (53 * hash) + getSetSpeed(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest 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.Stubs.StubDispenserRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubDispenserRequest) + com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest.class, com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest.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(); + dispenserId_ = 0; + + start_ = false; + + setDirection_ = false; + + setMicrostepDivision_ = 0; + + setSpeed_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest build() { + com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest buildPartial() { + com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest result = new com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest(this); + result.dispenserId_ = dispenserId_; + result.start_ = start_; + result.setDirection_ = setDirection_; + result.setMicrostepDivision_ = setMicrostepDivision_; + result.setSpeed_ = setSpeed_; + 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest other) { + if (other == com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest.getDefaultInstance()) return this; + if (other.getDispenserId() != 0) { + setDispenserId(other.getDispenserId()); + } + if (other.getStart() != false) { + setStart(other.getStart()); + } + if (other.getSetDirection() != false) { + setSetDirection(other.getSetDirection()); + } + if (other.getSetMicrostepDivision() != 0) { + setSetMicrostepDivision(other.getSetMicrostepDivision()); + } + if (other.getSetSpeed() != 0) { + setSetSpeed(other.getSetSpeed()); + } + 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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dispenserId_ ; + /** + *
+       * 0..7
+       * 
+ * + * uint32 DispenserId = 1; + */ + public int getDispenserId() { + return dispenserId_; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 DispenserId = 1; + */ + public Builder setDispenserId(int value) { + + dispenserId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 DispenserId = 1; + */ + public Builder clearDispenserId() { + + dispenserId_ = 0; + onChanged(); + return this; + } + + private boolean start_ ; + /** + *
+       * 1-start 0-stop
+       * 
+ * + * bool Start = 2; + */ + public boolean getStart() { + return start_; + } + /** + *
+       * 1-start 0-stop
+       * 
+ * + * bool Start = 2; + */ + public Builder setStart(boolean value) { + + start_ = value; + onChanged(); + return this; + } + /** + *
+       * 1-start 0-stop
+       * 
+ * + * bool Start = 2; + */ + public Builder clearStart() { + + start_ = false; + onChanged(); + return this; + } + + private boolean setDirection_ ; + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool SetDirection = 3; + */ + public boolean getSetDirection() { + return setDirection_; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool SetDirection = 3; + */ + public Builder setSetDirection(boolean value) { + + setDirection_ = value; + onChanged(); + return this; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool SetDirection = 3; + */ + public Builder clearSetDirection() { + + setDirection_ = false; + onChanged(); + return this; + } + + private int setMicrostepDivision_ ; + /** + *
+       * No. of steps for 360 deg.
+       * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public int getSetMicrostepDivision() { + return setMicrostepDivision_; + } + /** + *
+       * No. of steps for 360 deg.
+       * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public Builder setSetMicrostepDivision(int value) { + + setMicrostepDivision_ = value; + onChanged(); + return this; + } + /** + *
+       * No. of steps for 360 deg.
+       * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public Builder clearSetMicrostepDivision() { + + setMicrostepDivision_ = 0; + onChanged(); + return this; + } + + private int setSpeed_ ; + /** + * int32 SetSpeed = 5; + */ + public int getSetSpeed() { + return setSpeed_; + } + /** + * int32 SetSpeed = 5; + */ + public Builder setSetSpeed(int value) { + + setSpeed_ = value; + onChanged(); + return this; + } + /** + * int32 SetSpeed = 5; + */ + public Builder clearSetSpeed() { + + setSpeed_ = 0; + 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.Stubs.StubDispenserRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubDispenserRequest) + private static final com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest(); + } + + public static com.twine.tango.pmr.stubs.StubDispenserRequestOuterClass.StubDispenserRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubDispenserRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubDispenserRequest(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.stubs.StubDispenserRequestOuterClass.StubDispenserRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubDispenserRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubDispenserRequest_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\032StubDispenserRequest.proto\022\017Tango.PMR." + + "Stubs\"\200\001\n\024StubDispenserRequest\022\023\n\013Dispen" + + "serId\030\001 \001(\r\022\r\n\005Start\030\002 \001(\010\022\024\n\014SetDirecti" + + "on\030\003 \001(\010\022\034\n\024SetMicrostepDivision\030\004 \001(\005\022\020" + + "\n\010SetSpeed\030\005 \001(\005B\033\n\031com.twine.tango.pmr." + + "stubsb\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_Stubs_StubDispenserRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubDispenserRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubDispenserRequest_descriptor, + new java.lang.String[] { "DispenserId", "Start", "SetDirection", "SetMicrostepDivision", "SetSpeed", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserResponseOuterClass.java new file mode 100644 index 000000000..8f6354be7 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubDispenserResponseOuterClass.java @@ -0,0 +1,771 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubDispenserResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubDispenserResponseOuterClass { + private StubDispenserResponseOuterClass() {} + 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 StubDispenserResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubDispenserResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..7
+     * 
+ * + * uint32 DispenserId = 1; + */ + int getDispenserId(); + + /** + *
+     * 
+ * + * uint32 DispenserPosition = 2; + */ + int getDispenserPosition(); + + /** + *
+     * 1- critical 2- level 3- overflow
+     * 
+ * + * uint32 InkWorningLevel = 3; + */ + int getInkWorningLevel(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 4; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubDispenserResponse} + */ + public static final class StubDispenserResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubDispenserResponse) + StubDispenserResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubDispenserResponse.newBuilder() to construct. + private StubDispenserResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubDispenserResponse() { + dispenserId_ = 0; + dispenserPosition_ = 0; + inkWorningLevel_ = 0; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubDispenserResponse( + 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: { + + dispenserId_ = input.readUInt32(); + break; + } + case 16: { + + dispenserPosition_ = input.readUInt32(); + break; + } + case 24: { + + inkWorningLevel_ = input.readUInt32(); + break; + } + case 32: { + + status_ = 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.stubs.StubDispenserResponseOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse.class, com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse.Builder.class); + } + + public static final int DISPENSERID_FIELD_NUMBER = 1; + private int dispenserId_; + /** + *
+     * 0..7
+     * 
+ * + * uint32 DispenserId = 1; + */ + public int getDispenserId() { + return dispenserId_; + } + + public static final int DISPENSERPOSITION_FIELD_NUMBER = 2; + private int dispenserPosition_; + /** + *
+     * 
+ * + * uint32 DispenserPosition = 2; + */ + public int getDispenserPosition() { + return dispenserPosition_; + } + + public static final int INKWORNINGLEVEL_FIELD_NUMBER = 3; + private int inkWorningLevel_; + /** + *
+     * 1- critical 2- level 3- overflow
+     * 
+ * + * uint32 InkWorningLevel = 3; + */ + public int getInkWorningLevel() { + return inkWorningLevel_; + } + + public static final int STATUS_FIELD_NUMBER = 4; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 4; + */ + public boolean getStatus() { + return status_; + } + + 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 (dispenserId_ != 0) { + output.writeUInt32(1, dispenserId_); + } + if (dispenserPosition_ != 0) { + output.writeUInt32(2, dispenserPosition_); + } + if (inkWorningLevel_ != 0) { + output.writeUInt32(3, inkWorningLevel_); + } + if (status_ != false) { + output.writeBool(4, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dispenserId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, dispenserId_); + } + if (dispenserPosition_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, dispenserPosition_); + } + if (inkWorningLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, inkWorningLevel_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, status_); + } + 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse other = (com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse) obj; + + boolean result = true; + result = result && (getDispenserId() + == other.getDispenserId()); + result = result && (getDispenserPosition() + == other.getDispenserPosition()); + result = result && (getInkWorningLevel() + == other.getInkWorningLevel()); + result = result && (getStatus() + == other.getStatus()); + 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) + DISPENSERID_FIELD_NUMBER; + hash = (53 * hash) + getDispenserId(); + hash = (37 * hash) + DISPENSERPOSITION_FIELD_NUMBER; + hash = (53 * hash) + getDispenserPosition(); + hash = (37 * hash) + INKWORNINGLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getInkWorningLevel(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse 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.Stubs.StubDispenserResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubDispenserResponse) + com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse.class, com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse.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(); + dispenserId_ = 0; + + dispenserPosition_ = 0; + + inkWorningLevel_ = 0; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.internal_static_Tango_PMR_Stubs_StubDispenserResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse build() { + com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse buildPartial() { + com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse result = new com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse(this); + result.dispenserId_ = dispenserId_; + result.dispenserPosition_ = dispenserPosition_; + result.inkWorningLevel_ = inkWorningLevel_; + result.status_ = status_; + 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse other) { + if (other == com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse.getDefaultInstance()) return this; + if (other.getDispenserId() != 0) { + setDispenserId(other.getDispenserId()); + } + if (other.getDispenserPosition() != 0) { + setDispenserPosition(other.getDispenserPosition()); + } + if (other.getInkWorningLevel() != 0) { + setInkWorningLevel(other.getInkWorningLevel()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dispenserId_ ; + /** + *
+       * 0..7
+       * 
+ * + * uint32 DispenserId = 1; + */ + public int getDispenserId() { + return dispenserId_; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 DispenserId = 1; + */ + public Builder setDispenserId(int value) { + + dispenserId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 DispenserId = 1; + */ + public Builder clearDispenserId() { + + dispenserId_ = 0; + onChanged(); + return this; + } + + private int dispenserPosition_ ; + /** + *
+       * 
+ * + * uint32 DispenserPosition = 2; + */ + public int getDispenserPosition() { + return dispenserPosition_; + } + /** + *
+       * 
+ * + * uint32 DispenserPosition = 2; + */ + public Builder setDispenserPosition(int value) { + + dispenserPosition_ = value; + onChanged(); + return this; + } + /** + *
+       * 
+ * + * uint32 DispenserPosition = 2; + */ + public Builder clearDispenserPosition() { + + dispenserPosition_ = 0; + onChanged(); + return this; + } + + private int inkWorningLevel_ ; + /** + *
+       * 1- critical 2- level 3- overflow
+       * 
+ * + * uint32 InkWorningLevel = 3; + */ + public int getInkWorningLevel() { + return inkWorningLevel_; + } + /** + *
+       * 1- critical 2- level 3- overflow
+       * 
+ * + * uint32 InkWorningLevel = 3; + */ + public Builder setInkWorningLevel(int value) { + + inkWorningLevel_ = value; + onChanged(); + return this; + } + /** + *
+       * 1- critical 2- level 3- overflow
+       * 
+ * + * uint32 InkWorningLevel = 3; + */ + public Builder clearInkWorningLevel() { + + inkWorningLevel_ = 0; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 4; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 4; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 4; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubDispenserResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubDispenserResponse) + private static final com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse(); + } + + public static com.twine.tango.pmr.stubs.StubDispenserResponseOuterClass.StubDispenserResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubDispenserResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubDispenserResponse(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.stubs.StubDispenserResponseOuterClass.StubDispenserResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubDispenserResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubDispenserResponse_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\033StubDispenserResponse.proto\022\017Tango.PMR" + + ".Stubs\"p\n\025StubDispenserResponse\022\023\n\013Dispe" + + "nserId\030\001 \001(\r\022\031\n\021DispenserPosition\030\002 \001(\r\022" + + "\027\n\017InkWorningLevel\030\003 \001(\r\022\016\n\006Status\030\004 \001(\010" + + "B\033\n\031com.twine.tango.pmr.stubsb\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_Stubs_StubDispenserResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubDispenserResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubDispenserResponse_descriptor, + new java.lang.String[] { "DispenserId", "DispenserPosition", "InkWorningLevel", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitRequestOuterClass.java new file mode 100644 index 000000000..504cfbacb --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitRequestOuterClass.java @@ -0,0 +1,608 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOReadBitRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOReadBitRequestOuterClass { + private StubGPIOReadBitRequestOuterClass() {} + 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 StubGPIOReadBitRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOReadBitRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + int getPinId(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOReadBitRequest} + */ + public static final class StubGPIOReadBitRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOReadBitRequest) + StubGPIOReadBitRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOReadBitRequest.newBuilder() to construct. + private StubGPIOReadBitRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOReadBitRequest() { + portId_ = 0; + pinId_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOReadBitRequest( + 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: { + + portId_ = input.readUInt32(); + break; + } + case 16: { + + pinId_ = input.readUInt32(); + 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.stubs.StubGPIOReadBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest.class, com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + public static final int PINID_FIELD_NUMBER = 2; + private int pinId_; + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + if (pinId_ != 0) { + output.writeUInt32(2, pinId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + if (pinId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, pinId_); + } + 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest other = (com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + result = result && (getPinId() + == other.getPinId()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (37 * hash) + PINID_FIELD_NUMBER; + hash = (53 * hash) + getPinId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest 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.Stubs.StubGPIOReadBitRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOReadBitRequest) + com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest.class, com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest.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(); + portId_ = 0; + + pinId_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest build() { + com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest result = new com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest(this); + result.portId_ = portId_; + result.pinId_ = pinId_; + 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + if (other.getPinId() != 0) { + setPinId(other.getPinId()); + } + 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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + onChanged(); + return this; + } + + private int pinId_ ; + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder setPinId(int value) { + + pinId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder clearPinId() { + + pinId_ = 0; + 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.Stubs.StubGPIOReadBitRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOReadBitRequest) + private static final com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOReadBitRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOReadBitRequest(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.stubs.StubGPIOReadBitRequestOuterClass.StubGPIOReadBitRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_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\034StubGPIOReadBitRequest.proto\022\017Tango.PM" + + "R.Stubs\"7\n\026StubGPIOReadBitRequest\022\016\n\006Por" + + "tId\030\001 \001(\r\022\r\n\005PinId\030\002 \001(\rB\033\n\031com.twine.ta" + + "ngo.pmr.stubsb\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_Stubs_StubGPIOReadBitRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOReadBitRequest_descriptor, + new java.lang.String[] { "PortId", "PinId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitResponseOuterClass.java new file mode 100644 index 000000000..a1749ecc8 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadBitResponseOuterClass.java @@ -0,0 +1,757 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOReadBitResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOReadBitResponseOuterClass { + private StubGPIOReadBitResponseOuterClass() {} + 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 StubGPIOReadBitResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOReadBitResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + int getPinId(); + + /** + * bool BitValue = 3; + */ + boolean getBitValue(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 4; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOReadBitResponse} + */ + public static final class StubGPIOReadBitResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOReadBitResponse) + StubGPIOReadBitResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOReadBitResponse.newBuilder() to construct. + private StubGPIOReadBitResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOReadBitResponse() { + portId_ = 0; + pinId_ = 0; + bitValue_ = false; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOReadBitResponse( + 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: { + + portId_ = input.readUInt32(); + break; + } + case 16: { + + pinId_ = input.readUInt32(); + break; + } + case 24: { + + bitValue_ = input.readBool(); + break; + } + case 32: { + + status_ = 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.stubs.StubGPIOReadBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse.class, com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + public static final int PINID_FIELD_NUMBER = 2; + private int pinId_; + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + + public static final int BITVALUE_FIELD_NUMBER = 3; + private boolean bitValue_; + /** + * bool BitValue = 3; + */ + public boolean getBitValue() { + return bitValue_; + } + + public static final int STATUS_FIELD_NUMBER = 4; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 4; + */ + public boolean getStatus() { + return status_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + if (pinId_ != 0) { + output.writeUInt32(2, pinId_); + } + if (bitValue_ != false) { + output.writeBool(3, bitValue_); + } + if (status_ != false) { + output.writeBool(4, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + if (pinId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, pinId_); + } + if (bitValue_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, bitValue_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, status_); + } + 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse other = (com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + result = result && (getPinId() + == other.getPinId()); + result = result && (getBitValue() + == other.getBitValue()); + result = result && (getStatus() + == other.getStatus()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (37 * hash) + PINID_FIELD_NUMBER; + hash = (53 * hash) + getPinId(); + hash = (37 * hash) + BITVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBitValue()); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse 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.Stubs.StubGPIOReadBitResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOReadBitResponse) + com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse.class, com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse.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(); + portId_ = 0; + + pinId_ = 0; + + bitValue_ = false; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse build() { + com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse result = new com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse(this); + result.portId_ = portId_; + result.pinId_ = pinId_; + result.bitValue_ = bitValue_; + result.status_ = status_; + 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + if (other.getPinId() != 0) { + setPinId(other.getPinId()); + } + if (other.getBitValue() != false) { + setBitValue(other.getBitValue()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + onChanged(); + return this; + } + + private int pinId_ ; + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder setPinId(int value) { + + pinId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder clearPinId() { + + pinId_ = 0; + onChanged(); + return this; + } + + private boolean bitValue_ ; + /** + * bool BitValue = 3; + */ + public boolean getBitValue() { + return bitValue_; + } + /** + * bool BitValue = 3; + */ + public Builder setBitValue(boolean value) { + + bitValue_ = value; + onChanged(); + return this; + } + /** + * bool BitValue = 3; + */ + public Builder clearBitValue() { + + bitValue_ = false; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 4; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 4; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 4; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubGPIOReadBitResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOReadBitResponse) + private static final com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOReadBitResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOReadBitResponse(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.stubs.StubGPIOReadBitResponseOuterClass.StubGPIOReadBitResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_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\035StubGPIOReadBitResponse.proto\022\017Tango.P" + + "MR.Stubs\"Z\n\027StubGPIOReadBitResponse\022\016\n\006P" + + "ortId\030\001 \001(\r\022\r\n\005PinId\030\002 \001(\r\022\020\n\010BitValue\030\003" + + " \001(\010\022\016\n\006Status\030\004 \001(\010B\033\n\031com.twine.tango." + + "pmr.stubsb\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_Stubs_StubGPIOReadBitResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOReadBitResponse_descriptor, + new java.lang.String[] { "PortId", "PinId", "BitValue", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteRequestOuterClass.java new file mode 100644 index 000000000..1ff44f3a9 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteRequestOuterClass.java @@ -0,0 +1,525 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOReadByteRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOReadByteRequestOuterClass { + private StubGPIOReadByteRequestOuterClass() {} + 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 StubGPIOReadByteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOReadByteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOReadByteRequest} + */ + public static final class StubGPIOReadByteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOReadByteRequest) + StubGPIOReadByteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOReadByteRequest.newBuilder() to construct. + private StubGPIOReadByteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOReadByteRequest() { + portId_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOReadByteRequest( + 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: { + + portId_ = input.readUInt32(); + 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.stubs.StubGPIOReadByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest.class, com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest other = (com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest 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.Stubs.StubGPIOReadByteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOReadByteRequest) + com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest.class, com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest.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(); + portId_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest build() { + com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest result = new com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest(this); + result.portId_ = portId_; + 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + 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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + 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.Stubs.StubGPIOReadByteRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOReadByteRequest) + private static final com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOReadByteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOReadByteRequest(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.stubs.StubGPIOReadByteRequestOuterClass.StubGPIOReadByteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_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\035StubGPIOReadByteRequest.proto\022\017Tango.P" + + "MR.Stubs\")\n\027StubGPIOReadByteRequest\022\016\n\006P" + + "ortId\030\001 \001(\rB\033\n\031com.twine.tango.pmr.stubs" + + "b\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_Stubs_StubGPIOReadByteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOReadByteRequest_descriptor, + new java.lang.String[] { "PortId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteResponseOuterClass.java new file mode 100644 index 000000000..757afbb4a --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOReadByteResponseOuterClass.java @@ -0,0 +1,673 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOReadByteResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOReadByteResponseOuterClass { + private StubGPIOReadByteResponseOuterClass() {} + 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 StubGPIOReadByteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOReadByteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + + /** + * uint32 ByteValue = 2; + */ + int getByteValue(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool status = 3; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOReadByteResponse} + */ + public static final class StubGPIOReadByteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOReadByteResponse) + StubGPIOReadByteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOReadByteResponse.newBuilder() to construct. + private StubGPIOReadByteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOReadByteResponse() { + portId_ = 0; + byteValue_ = 0; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOReadByteResponse( + 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: { + + portId_ = input.readUInt32(); + break; + } + case 16: { + + byteValue_ = input.readUInt32(); + break; + } + case 24: { + + status_ = 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.stubs.StubGPIOReadByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse.class, com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + public static final int BYTEVALUE_FIELD_NUMBER = 2; + private int byteValue_; + /** + * uint32 ByteValue = 2; + */ + public int getByteValue() { + return byteValue_; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool status = 3; + */ + public boolean getStatus() { + return status_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + if (byteValue_ != 0) { + output.writeUInt32(2, byteValue_); + } + if (status_ != false) { + output.writeBool(3, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + if (byteValue_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, byteValue_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } + 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse other = (com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + result = result && (getByteValue() + == other.getByteValue()); + result = result && (getStatus() + == other.getStatus()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (37 * hash) + BYTEVALUE_FIELD_NUMBER; + hash = (53 * hash) + getByteValue(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse 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.Stubs.StubGPIOReadByteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOReadByteResponse) + com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse.class, com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse.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(); + portId_ = 0; + + byteValue_ = 0; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse build() { + com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse result = new com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse(this); + result.portId_ = portId_; + result.byteValue_ = byteValue_; + result.status_ = status_; + 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + if (other.getByteValue() != 0) { + setByteValue(other.getByteValue()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + onChanged(); + return this; + } + + private int byteValue_ ; + /** + * uint32 ByteValue = 2; + */ + public int getByteValue() { + return byteValue_; + } + /** + * uint32 ByteValue = 2; + */ + public Builder setByteValue(int value) { + + byteValue_ = value; + onChanged(); + return this; + } + /** + * uint32 ByteValue = 2; + */ + public Builder clearByteValue() { + + byteValue_ = 0; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool status = 3; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool status = 3; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubGPIOReadByteResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOReadByteResponse) + private static final com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOReadByteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOReadByteResponse(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.stubs.StubGPIOReadByteResponseOuterClass.StubGPIOReadByteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_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\036StubGPIOReadByteResponse.proto\022\017Tango." + + "PMR.Stubs\"M\n\030StubGPIOReadByteResponse\022\016\n" + + "\006PortId\030\001 \001(\r\022\021\n\tByteValue\030\002 \001(\r\022\016\n\006stat" + + "us\030\003 \001(\010B\033\n\031com.twine.tango.pmr.stubsb\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_Stubs_StubGPIOReadByteResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOReadByteResponse_descriptor, + new java.lang.String[] { "PortId", "ByteValue", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitRequestOuterClass.java new file mode 100644 index 000000000..7672c3cbb --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitRequestOuterClass.java @@ -0,0 +1,673 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOWriteBitRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOWriteBitRequestOuterClass { + private StubGPIOWriteBitRequestOuterClass() {} + 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 StubGPIOWriteBitRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOWriteBitRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + int getPinId(); + + /** + * bool BitToWrite = 3; + */ + boolean getBitToWrite(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOWriteBitRequest} + */ + public static final class StubGPIOWriteBitRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOWriteBitRequest) + StubGPIOWriteBitRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOWriteBitRequest.newBuilder() to construct. + private StubGPIOWriteBitRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOWriteBitRequest() { + portId_ = 0; + pinId_ = 0; + bitToWrite_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOWriteBitRequest( + 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: { + + portId_ = input.readUInt32(); + break; + } + case 16: { + + pinId_ = input.readUInt32(); + break; + } + case 24: { + + bitToWrite_ = 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.stubs.StubGPIOWriteBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest.class, com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + public static final int PINID_FIELD_NUMBER = 2; + private int pinId_; + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + + public static final int BITTOWRITE_FIELD_NUMBER = 3; + private boolean bitToWrite_; + /** + * bool BitToWrite = 3; + */ + public boolean getBitToWrite() { + return bitToWrite_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + if (pinId_ != 0) { + output.writeUInt32(2, pinId_); + } + if (bitToWrite_ != false) { + output.writeBool(3, bitToWrite_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + if (pinId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, pinId_); + } + if (bitToWrite_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, bitToWrite_); + } + 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest other = (com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + result = result && (getPinId() + == other.getPinId()); + result = result && (getBitToWrite() + == other.getBitToWrite()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (37 * hash) + PINID_FIELD_NUMBER; + hash = (53 * hash) + getPinId(); + hash = (37 * hash) + BITTOWRITE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBitToWrite()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest 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.Stubs.StubGPIOWriteBitRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOWriteBitRequest) + com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest.class, com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest.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(); + portId_ = 0; + + pinId_ = 0; + + bitToWrite_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest build() { + com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest result = new com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest(this); + result.portId_ = portId_; + result.pinId_ = pinId_; + result.bitToWrite_ = bitToWrite_; + 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + if (other.getPinId() != 0) { + setPinId(other.getPinId()); + } + if (other.getBitToWrite() != false) { + setBitToWrite(other.getBitToWrite()); + } + 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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + onChanged(); + return this; + } + + private int pinId_ ; + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder setPinId(int value) { + + pinId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder clearPinId() { + + pinId_ = 0; + onChanged(); + return this; + } + + private boolean bitToWrite_ ; + /** + * bool BitToWrite = 3; + */ + public boolean getBitToWrite() { + return bitToWrite_; + } + /** + * bool BitToWrite = 3; + */ + public Builder setBitToWrite(boolean value) { + + bitToWrite_ = value; + onChanged(); + return this; + } + /** + * bool BitToWrite = 3; + */ + public Builder clearBitToWrite() { + + bitToWrite_ = 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.Stubs.StubGPIOWriteBitRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOWriteBitRequest) + private static final com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOWriteBitRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOWriteBitRequest(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.stubs.StubGPIOWriteBitRequestOuterClass.StubGPIOWriteBitRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_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\035StubGPIOWriteBitRequest.proto\022\017Tango.P" + + "MR.Stubs\"L\n\027StubGPIOWriteBitRequest\022\016\n\006P" + + "ortId\030\001 \001(\r\022\r\n\005PinId\030\002 \001(\r\022\022\n\nBitToWrite" + + "\030\003 \001(\010B\033\n\031com.twine.tango.pmr.stubsb\006pro" + + "to3" + }; + 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_Stubs_StubGPIOWriteBitRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitRequest_descriptor, + new java.lang.String[] { "PortId", "PinId", "BitToWrite", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitResponseOuterClass.java new file mode 100644 index 000000000..cfc6f784c --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteBitResponseOuterClass.java @@ -0,0 +1,693 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOWriteBitResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOWriteBitResponseOuterClass { + private StubGPIOWriteBitResponseOuterClass() {} + 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 StubGPIOWriteBitResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOWriteBitResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + int getPinId(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOWriteBitResponse} + */ + public static final class StubGPIOWriteBitResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOWriteBitResponse) + StubGPIOWriteBitResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOWriteBitResponse.newBuilder() to construct. + private StubGPIOWriteBitResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOWriteBitResponse() { + portId_ = 0; + pinId_ = 0; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOWriteBitResponse( + 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: { + + portId_ = input.readUInt32(); + break; + } + case 16: { + + pinId_ = input.readUInt32(); + break; + } + case 24: { + + status_ = 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.stubs.StubGPIOWriteBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse.class, com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + public static final int PINID_FIELD_NUMBER = 2; + private int pinId_; + /** + *
+     * 0..7
+     * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + if (pinId_ != 0) { + output.writeUInt32(2, pinId_); + } + if (status_ != false) { + output.writeBool(3, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + if (pinId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, pinId_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } + 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse other = (com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + result = result && (getPinId() + == other.getPinId()); + result = result && (getStatus() + == other.getStatus()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (37 * hash) + PINID_FIELD_NUMBER; + hash = (53 * hash) + getPinId(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse 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.Stubs.StubGPIOWriteBitResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOWriteBitResponse) + com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse.class, com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse.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(); + portId_ = 0; + + pinId_ = 0; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse build() { + com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse result = new com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse(this); + result.portId_ = portId_; + result.pinId_ = pinId_; + result.status_ = status_; + 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + if (other.getPinId() != 0) { + setPinId(other.getPinId()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + onChanged(); + return this; + } + + private int pinId_ ; + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public int getPinId() { + return pinId_; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder setPinId(int value) { + + pinId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..7
+       * 
+ * + * uint32 PinId = 2; + */ + public Builder clearPinId() { + + pinId_ = 0; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubGPIOWriteBitResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOWriteBitResponse) + private static final com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOWriteBitResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOWriteBitResponse(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.stubs.StubGPIOWriteBitResponseOuterClass.StubGPIOWriteBitResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_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\036StubGPIOWriteBitResponse.proto\022\017Tango." + + "PMR.Stubs\"I\n\030StubGPIOWriteBitResponse\022\016\n" + + "\006PortId\030\001 \001(\r\022\r\n\005PinId\030\002 \001(\r\022\016\n\006Status\030\003" + + " \001(\010B\033\n\031com.twine.tango.pmr.stubsb\006proto" + + "3" + }; + 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_Stubs_StubGPIOWriteBitResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOWriteBitResponse_descriptor, + new java.lang.String[] { "PortId", "PinId", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteRequestOuterClass.java new file mode 100644 index 000000000..ee9e8d42e --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteRequestOuterClass.java @@ -0,0 +1,588 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOWriteByteRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOWriteByteRequestOuterClass { + private StubGPIOWriteByteRequestOuterClass() {} + 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 StubGPIOWriteByteRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOWriteByteRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + + /** + * uint32 DataToWrite = 3; + */ + int getDataToWrite(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOWriteByteRequest} + */ + public static final class StubGPIOWriteByteRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOWriteByteRequest) + StubGPIOWriteByteRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOWriteByteRequest.newBuilder() to construct. + private StubGPIOWriteByteRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOWriteByteRequest() { + portId_ = 0; + dataToWrite_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOWriteByteRequest( + 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: { + + portId_ = input.readUInt32(); + break; + } + case 24: { + + dataToWrite_ = input.readUInt32(); + 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.stubs.StubGPIOWriteByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest.class, com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + public static final int DATATOWRITE_FIELD_NUMBER = 3; + private int dataToWrite_; + /** + * uint32 DataToWrite = 3; + */ + public int getDataToWrite() { + return dataToWrite_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + if (dataToWrite_ != 0) { + output.writeUInt32(3, dataToWrite_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + if (dataToWrite_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, dataToWrite_); + } + 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest other = (com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + result = result && (getDataToWrite() + == other.getDataToWrite()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (37 * hash) + DATATOWRITE_FIELD_NUMBER; + hash = (53 * hash) + getDataToWrite(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest 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.Stubs.StubGPIOWriteByteRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOWriteByteRequest) + com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest.class, com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest.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(); + portId_ = 0; + + dataToWrite_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest build() { + com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest result = new com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest(this); + result.portId_ = portId_; + result.dataToWrite_ = dataToWrite_; + 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + if (other.getDataToWrite() != 0) { + setDataToWrite(other.getDataToWrite()); + } + 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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + onChanged(); + return this; + } + + private int dataToWrite_ ; + /** + * uint32 DataToWrite = 3; + */ + public int getDataToWrite() { + return dataToWrite_; + } + /** + * uint32 DataToWrite = 3; + */ + public Builder setDataToWrite(int value) { + + dataToWrite_ = value; + onChanged(); + return this; + } + /** + * uint32 DataToWrite = 3; + */ + public Builder clearDataToWrite() { + + dataToWrite_ = 0; + 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.Stubs.StubGPIOWriteByteRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOWriteByteRequest) + private static final com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOWriteByteRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOWriteByteRequest(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.stubs.StubGPIOWriteByteRequestOuterClass.StubGPIOWriteByteRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_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\036StubGPIOWriteByteRequest.proto\022\017Tango." + + "PMR.Stubs\"?\n\030StubGPIOWriteByteRequest\022\016\n" + + "\006PortId\030\001 \001(\r\022\023\n\013DataToWrite\030\003 \001(\rB\033\n\031co" + + "m.twine.tango.pmr.stubsb\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_Stubs_StubGPIOWriteByteRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteRequest_descriptor, + new java.lang.String[] { "PortId", "DataToWrite", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteResponseOuterClass.java new file mode 100644 index 000000000..d1ce9ca45 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubGPIOWriteByteResponseOuterClass.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubGPIOWriteByteResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubGPIOWriteByteResponseOuterClass { + private StubGPIOWriteByteResponseOuterClass() {} + 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 StubGPIOWriteByteResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubGPIOWriteByteResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + int getPortId(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool status = 3; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubGPIOWriteByteResponse} + */ + public static final class StubGPIOWriteByteResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubGPIOWriteByteResponse) + StubGPIOWriteByteResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubGPIOWriteByteResponse.newBuilder() to construct. + private StubGPIOWriteByteResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubGPIOWriteByteResponse() { + portId_ = 0; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubGPIOWriteByteResponse( + 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: { + + portId_ = input.readUInt32(); + break; + } + case 24: { + + status_ = 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.stubs.StubGPIOWriteByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse.class, com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse.Builder.class); + } + + public static final int PORTID_FIELD_NUMBER = 1; + private int portId_; + /** + *
+     * 0..119
+     * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool status = 3; + */ + public boolean getStatus() { + return status_; + } + + 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 (portId_ != 0) { + output.writeUInt32(1, portId_); + } + if (status_ != false) { + output.writeBool(3, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, portId_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } + 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse other = (com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse) obj; + + boolean result = true; + result = result && (getPortId() + == other.getPortId()); + result = result && (getStatus() + == other.getStatus()); + 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) + PORTID_FIELD_NUMBER; + hash = (53 * hash) + getPortId(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse 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.Stubs.StubGPIOWriteByteResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubGPIOWriteByteResponse) + com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse.class, com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse.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(); + portId_ = 0; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse build() { + com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse buildPartial() { + com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse result = new com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse(this); + result.portId_ = portId_; + result.status_ = status_; + 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse other) { + if (other == com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse.getDefaultInstance()) return this; + if (other.getPortId() != 0) { + setPortId(other.getPortId()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int portId_ ; + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public int getPortId() { + return portId_; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder setPortId(int value) { + + portId_ = value; + onChanged(); + return this; + } + /** + *
+       * 0..119
+       * 
+ * + * uint32 PortId = 1; + */ + public Builder clearPortId() { + + portId_ = 0; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool status = 3; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool status = 3; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubGPIOWriteByteResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubGPIOWriteByteResponse) + private static final com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse(); + } + + public static com.twine.tango.pmr.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubGPIOWriteByteResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubGPIOWriteByteResponse(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.stubs.StubGPIOWriteByteResponseOuterClass.StubGPIOWriteByteResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_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\037StubGPIOWriteByteResponse.proto\022\017Tango" + + ".PMR.Stubs\";\n\031StubGPIOWriteByteResponse\022" + + "\016\n\006PortId\030\001 \001(\r\022\016\n\006status\030\003 \001(\010B\033\n\031com.t" + + "wine.tango.pmr.stubsb\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_Stubs_StubGPIOWriteByteResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubGPIOWriteByteResponse_descriptor, + new java.lang.String[] { "PortId", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterRequestOuterClass.java new file mode 100644 index 000000000..a443addbb --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterRequestOuterClass.java @@ -0,0 +1,673 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubHeaterRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubHeaterRequestOuterClass { + private StubHeaterRequestOuterClass() {} + 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 StubHeaterRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubHeaterRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..2
+     * 
+ * + * uint32 HeaterGroupId = 1; + */ + int getHeaterGroupId(); + + /** + *
+     * 1-On 0-Off
+     * 
+ * + * bool HeaterGroupOn = 2; + */ + boolean getHeaterGroupOn(); + + /** + * uint32 HeaterTemperatureReq = 3; + */ + int getHeaterTemperatureReq(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubHeaterRequest} + */ + public static final class StubHeaterRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubHeaterRequest) + StubHeaterRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubHeaterRequest.newBuilder() to construct. + private StubHeaterRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubHeaterRequest() { + heaterGroupId_ = 0; + heaterGroupOn_ = false; + heaterTemperatureReq_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubHeaterRequest( + 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: { + + heaterGroupId_ = input.readUInt32(); + break; + } + case 16: { + + heaterGroupOn_ = input.readBool(); + break; + } + case 24: { + + heaterTemperatureReq_ = input.readUInt32(); + 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.stubs.StubHeaterRequestOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest.class, com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest.Builder.class); + } + + public static final int HEATERGROUPID_FIELD_NUMBER = 1; + private int heaterGroupId_; + /** + *
+     *0..2
+     * 
+ * + * uint32 HeaterGroupId = 1; + */ + public int getHeaterGroupId() { + return heaterGroupId_; + } + + public static final int HEATERGROUPON_FIELD_NUMBER = 2; + private boolean heaterGroupOn_; + /** + *
+     * 1-On 0-Off
+     * 
+ * + * bool HeaterGroupOn = 2; + */ + public boolean getHeaterGroupOn() { + return heaterGroupOn_; + } + + public static final int HEATERTEMPERATUREREQ_FIELD_NUMBER = 3; + private int heaterTemperatureReq_; + /** + * uint32 HeaterTemperatureReq = 3; + */ + public int getHeaterTemperatureReq() { + return heaterTemperatureReq_; + } + + 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 (heaterGroupId_ != 0) { + output.writeUInt32(1, heaterGroupId_); + } + if (heaterGroupOn_ != false) { + output.writeBool(2, heaterGroupOn_); + } + if (heaterTemperatureReq_ != 0) { + output.writeUInt32(3, heaterTemperatureReq_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (heaterGroupId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, heaterGroupId_); + } + if (heaterGroupOn_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, heaterGroupOn_); + } + if (heaterTemperatureReq_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, heaterTemperatureReq_); + } + 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest other = (com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest) obj; + + boolean result = true; + result = result && (getHeaterGroupId() + == other.getHeaterGroupId()); + result = result && (getHeaterGroupOn() + == other.getHeaterGroupOn()); + result = result && (getHeaterTemperatureReq() + == other.getHeaterTemperatureReq()); + 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) + HEATERGROUPID_FIELD_NUMBER; + hash = (53 * hash) + getHeaterGroupId(); + hash = (37 * hash) + HEATERGROUPON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHeaterGroupOn()); + hash = (37 * hash) + HEATERTEMPERATUREREQ_FIELD_NUMBER; + hash = (53 * hash) + getHeaterTemperatureReq(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest 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.Stubs.StubHeaterRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubHeaterRequest) + com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest.class, com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest.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(); + heaterGroupId_ = 0; + + heaterGroupOn_ = false; + + heaterTemperatureReq_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest build() { + com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest buildPartial() { + com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest result = new com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest(this); + result.heaterGroupId_ = heaterGroupId_; + result.heaterGroupOn_ = heaterGroupOn_; + result.heaterTemperatureReq_ = heaterTemperatureReq_; + 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest other) { + if (other == com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest.getDefaultInstance()) return this; + if (other.getHeaterGroupId() != 0) { + setHeaterGroupId(other.getHeaterGroupId()); + } + if (other.getHeaterGroupOn() != false) { + setHeaterGroupOn(other.getHeaterGroupOn()); + } + if (other.getHeaterTemperatureReq() != 0) { + setHeaterTemperatureReq(other.getHeaterTemperatureReq()); + } + 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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int heaterGroupId_ ; + /** + *
+       *0..2
+       * 
+ * + * uint32 HeaterGroupId = 1; + */ + public int getHeaterGroupId() { + return heaterGroupId_; + } + /** + *
+       *0..2
+       * 
+ * + * uint32 HeaterGroupId = 1; + */ + public Builder setHeaterGroupId(int value) { + + heaterGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..2
+       * 
+ * + * uint32 HeaterGroupId = 1; + */ + public Builder clearHeaterGroupId() { + + heaterGroupId_ = 0; + onChanged(); + return this; + } + + private boolean heaterGroupOn_ ; + /** + *
+       * 1-On 0-Off
+       * 
+ * + * bool HeaterGroupOn = 2; + */ + public boolean getHeaterGroupOn() { + return heaterGroupOn_; + } + /** + *
+       * 1-On 0-Off
+       * 
+ * + * bool HeaterGroupOn = 2; + */ + public Builder setHeaterGroupOn(boolean value) { + + heaterGroupOn_ = value; + onChanged(); + return this; + } + /** + *
+       * 1-On 0-Off
+       * 
+ * + * bool HeaterGroupOn = 2; + */ + public Builder clearHeaterGroupOn() { + + heaterGroupOn_ = false; + onChanged(); + return this; + } + + private int heaterTemperatureReq_ ; + /** + * uint32 HeaterTemperatureReq = 3; + */ + public int getHeaterTemperatureReq() { + return heaterTemperatureReq_; + } + /** + * uint32 HeaterTemperatureReq = 3; + */ + public Builder setHeaterTemperatureReq(int value) { + + heaterTemperatureReq_ = value; + onChanged(); + return this; + } + /** + * uint32 HeaterTemperatureReq = 3; + */ + public Builder clearHeaterTemperatureReq() { + + heaterTemperatureReq_ = 0; + 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.Stubs.StubHeaterRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubHeaterRequest) + private static final com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest(); + } + + public static com.twine.tango.pmr.stubs.StubHeaterRequestOuterClass.StubHeaterRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubHeaterRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubHeaterRequest(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.stubs.StubHeaterRequestOuterClass.StubHeaterRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubHeaterRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubHeaterRequest_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\027StubHeaterRequest.proto\022\017Tango.PMR.Stu" + + "bs\"_\n\021StubHeaterRequest\022\025\n\rHeaterGroupId" + + "\030\001 \001(\r\022\025\n\rHeaterGroupOn\030\002 \001(\010\022\034\n\024HeaterT" + + "emperatureReq\030\003 \001(\rB\033\n\031com.twine.tango.p" + + "mr.stubsb\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_Stubs_StubHeaterRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubHeaterRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubHeaterRequest_descriptor, + new java.lang.String[] { "HeaterGroupId", "HeaterGroupOn", "HeaterTemperatureReq", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterResponseOuterClass.java new file mode 100644 index 000000000..875b1aeac --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubHeaterResponseOuterClass.java @@ -0,0 +1,673 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubHeaterResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubHeaterResponseOuterClass { + private StubHeaterResponseOuterClass() {} + 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 StubHeaterResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubHeaterResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..2
+     * 
+ * + * uint32 HeaterGroupId = 1; + */ + int getHeaterGroupId(); + + /** + * uint32 HeaterTemperatureSensor = 2; + */ + int getHeaterTemperatureSensor(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubHeaterResponse} + */ + public static final class StubHeaterResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubHeaterResponse) + StubHeaterResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubHeaterResponse.newBuilder() to construct. + private StubHeaterResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubHeaterResponse() { + heaterGroupId_ = 0; + heaterTemperatureSensor_ = 0; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubHeaterResponse( + 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: { + + heaterGroupId_ = input.readUInt32(); + break; + } + case 16: { + + heaterTemperatureSensor_ = input.readUInt32(); + break; + } + case 24: { + + status_ = 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.stubs.StubHeaterResponseOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse.class, com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse.Builder.class); + } + + public static final int HEATERGROUPID_FIELD_NUMBER = 1; + private int heaterGroupId_; + /** + *
+     *0..2
+     * 
+ * + * uint32 HeaterGroupId = 1; + */ + public int getHeaterGroupId() { + return heaterGroupId_; + } + + public static final int HEATERTEMPERATURESENSOR_FIELD_NUMBER = 2; + private int heaterTemperatureSensor_; + /** + * uint32 HeaterTemperatureSensor = 2; + */ + public int getHeaterTemperatureSensor() { + return heaterTemperatureSensor_; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + + 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 (heaterGroupId_ != 0) { + output.writeUInt32(1, heaterGroupId_); + } + if (heaterTemperatureSensor_ != 0) { + output.writeUInt32(2, heaterTemperatureSensor_); + } + if (status_ != false) { + output.writeBool(3, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (heaterGroupId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, heaterGroupId_); + } + if (heaterTemperatureSensor_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, heaterTemperatureSensor_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } + 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse other = (com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse) obj; + + boolean result = true; + result = result && (getHeaterGroupId() + == other.getHeaterGroupId()); + result = result && (getHeaterTemperatureSensor() + == other.getHeaterTemperatureSensor()); + result = result && (getStatus() + == other.getStatus()); + 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) + HEATERGROUPID_FIELD_NUMBER; + hash = (53 * hash) + getHeaterGroupId(); + hash = (37 * hash) + HEATERTEMPERATURESENSOR_FIELD_NUMBER; + hash = (53 * hash) + getHeaterTemperatureSensor(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse 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.Stubs.StubHeaterResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubHeaterResponse) + com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse.class, com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse.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(); + heaterGroupId_ = 0; + + heaterTemperatureSensor_ = 0; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.internal_static_Tango_PMR_Stubs_StubHeaterResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse build() { + com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse buildPartial() { + com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse result = new com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse(this); + result.heaterGroupId_ = heaterGroupId_; + result.heaterTemperatureSensor_ = heaterTemperatureSensor_; + result.status_ = status_; + 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse other) { + if (other == com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse.getDefaultInstance()) return this; + if (other.getHeaterGroupId() != 0) { + setHeaterGroupId(other.getHeaterGroupId()); + } + if (other.getHeaterTemperatureSensor() != 0) { + setHeaterTemperatureSensor(other.getHeaterTemperatureSensor()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int heaterGroupId_ ; + /** + *
+       *0..2
+       * 
+ * + * uint32 HeaterGroupId = 1; + */ + public int getHeaterGroupId() { + return heaterGroupId_; + } + /** + *
+       *0..2
+       * 
+ * + * uint32 HeaterGroupId = 1; + */ + public Builder setHeaterGroupId(int value) { + + heaterGroupId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..2
+       * 
+ * + * uint32 HeaterGroupId = 1; + */ + public Builder clearHeaterGroupId() { + + heaterGroupId_ = 0; + onChanged(); + return this; + } + + private int heaterTemperatureSensor_ ; + /** + * uint32 HeaterTemperatureSensor = 2; + */ + public int getHeaterTemperatureSensor() { + return heaterTemperatureSensor_; + } + /** + * uint32 HeaterTemperatureSensor = 2; + */ + public Builder setHeaterTemperatureSensor(int value) { + + heaterTemperatureSensor_ = value; + onChanged(); + return this; + } + /** + * uint32 HeaterTemperatureSensor = 2; + */ + public Builder clearHeaterTemperatureSensor() { + + heaterTemperatureSensor_ = 0; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubHeaterResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubHeaterResponse) + private static final com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse(); + } + + public static com.twine.tango.pmr.stubs.StubHeaterResponseOuterClass.StubHeaterResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubHeaterResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubHeaterResponse(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.stubs.StubHeaterResponseOuterClass.StubHeaterResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubHeaterResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubHeaterResponse_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\030StubHeaterResponse.proto\022\017Tango.PMR.St" + + "ubs\"\\\n\022StubHeaterResponse\022\025\n\rHeaterGroup" + + "Id\030\001 \001(\r\022\037\n\027HeaterTemperatureSensor\030\002 \001(" + + "\r\022\016\n\006Status\030\003 \001(\010B\033\n\031com.twine.tango.pmr" + + ".stubsb\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_Stubs_StubHeaterResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubHeaterResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubHeaterResponse_descriptor, + new java.lang.String[] { "HeaterGroupId", "HeaterTemperatureSensor", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderRequestOuterClass.java new file mode 100644 index 000000000..f55007864 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderRequestOuterClass.java @@ -0,0 +1,758 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubMotorEncoderRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubMotorEncoderRequestOuterClass { + private StubMotorEncoderRequestOuterClass() {} + 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 StubMotorEncoderRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubMotorEncoderRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..8
+     * 
+ * + * uint32 MotorId = 1; + */ + int getMotorId(); + + /** + * bool ReadEncSpeed = 2; + */ + boolean getReadEncSpeed(); + + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool ReadDirection = 3; + */ + boolean getReadDirection(); + + /** + *
+     * close loop using the encoder
+     * 
+ * + * bool Motion_Control = 4; + */ + boolean getMotionControl(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubMotorEncoderRequest} + */ + public static final class StubMotorEncoderRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubMotorEncoderRequest) + StubMotorEncoderRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubMotorEncoderRequest.newBuilder() to construct. + private StubMotorEncoderRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubMotorEncoderRequest() { + motorId_ = 0; + readEncSpeed_ = false; + readDirection_ = false; + motionControl_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubMotorEncoderRequest( + 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: { + + motorId_ = input.readUInt32(); + break; + } + case 16: { + + readEncSpeed_ = input.readBool(); + break; + } + case 24: { + + readDirection_ = input.readBool(); + break; + } + case 32: { + + motionControl_ = 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.stubs.StubMotorEncoderRequestOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest.class, com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest.Builder.class); + } + + public static final int MOTORID_FIELD_NUMBER = 1; + private int motorId_; + /** + *
+     *0..8
+     * 
+ * + * uint32 MotorId = 1; + */ + public int getMotorId() { + return motorId_; + } + + public static final int READENCSPEED_FIELD_NUMBER = 2; + private boolean readEncSpeed_; + /** + * bool ReadEncSpeed = 2; + */ + public boolean getReadEncSpeed() { + return readEncSpeed_; + } + + public static final int READDIRECTION_FIELD_NUMBER = 3; + private boolean readDirection_; + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool ReadDirection = 3; + */ + public boolean getReadDirection() { + return readDirection_; + } + + public static final int MOTION_CONTROL_FIELD_NUMBER = 4; + private boolean motionControl_; + /** + *
+     * close loop using the encoder
+     * 
+ * + * bool Motion_Control = 4; + */ + public boolean getMotionControl() { + return motionControl_; + } + + 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 (motorId_ != 0) { + output.writeUInt32(1, motorId_); + } + if (readEncSpeed_ != false) { + output.writeBool(2, readEncSpeed_); + } + if (readDirection_ != false) { + output.writeBool(3, readDirection_); + } + if (motionControl_ != false) { + output.writeBool(4, motionControl_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (motorId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, motorId_); + } + if (readEncSpeed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, readEncSpeed_); + } + if (readDirection_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, readDirection_); + } + if (motionControl_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, motionControl_); + } + 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest other = (com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest) obj; + + boolean result = true; + result = result && (getMotorId() + == other.getMotorId()); + result = result && (getReadEncSpeed() + == other.getReadEncSpeed()); + result = result && (getReadDirection() + == other.getReadDirection()); + result = result && (getMotionControl() + == other.getMotionControl()); + 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) + MOTORID_FIELD_NUMBER; + hash = (53 * hash) + getMotorId(); + hash = (37 * hash) + READENCSPEED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReadEncSpeed()); + hash = (37 * hash) + READDIRECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getReadDirection()); + hash = (37 * hash) + MOTION_CONTROL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMotionControl()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest 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.Stubs.StubMotorEncoderRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubMotorEncoderRequest) + com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest.class, com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest.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(); + motorId_ = 0; + + readEncSpeed_ = false; + + readDirection_ = false; + + motionControl_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest build() { + com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest buildPartial() { + com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest result = new com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest(this); + result.motorId_ = motorId_; + result.readEncSpeed_ = readEncSpeed_; + result.readDirection_ = readDirection_; + result.motionControl_ = motionControl_; + 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest other) { + if (other == com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest.getDefaultInstance()) return this; + if (other.getMotorId() != 0) { + setMotorId(other.getMotorId()); + } + if (other.getReadEncSpeed() != false) { + setReadEncSpeed(other.getReadEncSpeed()); + } + if (other.getReadDirection() != false) { + setReadDirection(other.getReadDirection()); + } + if (other.getMotionControl() != false) { + setMotionControl(other.getMotionControl()); + } + 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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int motorId_ ; + /** + *
+       *0..8
+       * 
+ * + * uint32 MotorId = 1; + */ + public int getMotorId() { + return motorId_; + } + /** + *
+       *0..8
+       * 
+ * + * uint32 MotorId = 1; + */ + public Builder setMotorId(int value) { + + motorId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..8
+       * 
+ * + * uint32 MotorId = 1; + */ + public Builder clearMotorId() { + + motorId_ = 0; + onChanged(); + return this; + } + + private boolean readEncSpeed_ ; + /** + * bool ReadEncSpeed = 2; + */ + public boolean getReadEncSpeed() { + return readEncSpeed_; + } + /** + * bool ReadEncSpeed = 2; + */ + public Builder setReadEncSpeed(boolean value) { + + readEncSpeed_ = value; + onChanged(); + return this; + } + /** + * bool ReadEncSpeed = 2; + */ + public Builder clearReadEncSpeed() { + + readEncSpeed_ = false; + onChanged(); + return this; + } + + private boolean readDirection_ ; + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool ReadDirection = 3; + */ + public boolean getReadDirection() { + return readDirection_; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool ReadDirection = 3; + */ + public Builder setReadDirection(boolean value) { + + readDirection_ = value; + onChanged(); + return this; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool ReadDirection = 3; + */ + public Builder clearReadDirection() { + + readDirection_ = false; + onChanged(); + return this; + } + + private boolean motionControl_ ; + /** + *
+       * close loop using the encoder
+       * 
+ * + * bool Motion_Control = 4; + */ + public boolean getMotionControl() { + return motionControl_; + } + /** + *
+       * close loop using the encoder
+       * 
+ * + * bool Motion_Control = 4; + */ + public Builder setMotionControl(boolean value) { + + motionControl_ = value; + onChanged(); + return this; + } + /** + *
+       * close loop using the encoder
+       * 
+ * + * bool Motion_Control = 4; + */ + public Builder clearMotionControl() { + + motionControl_ = 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.Stubs.StubMotorEncoderRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubMotorEncoderRequest) + private static final com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest(); + } + + public static com.twine.tango.pmr.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubMotorEncoderRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubMotorEncoderRequest(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.stubs.StubMotorEncoderRequestOuterClass.StubMotorEncoderRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_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\035StubMotorEncoderRequest.proto\022\017Tango.P" + + "MR.Stubs\"o\n\027StubMotorEncoderRequest\022\017\n\007M" + + "otorId\030\001 \001(\r\022\024\n\014ReadEncSpeed\030\002 \001(\010\022\025\n\rRe" + + "adDirection\030\003 \001(\010\022\026\n\016Motion_Control\030\004 \001(" + + "\010B\033\n\031com.twine.tango.pmr.stubsb\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_Stubs_StubMotorEncoderRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubMotorEncoderRequest_descriptor, + new java.lang.String[] { "MotorId", "ReadEncSpeed", "ReadDirection", "MotionControl", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderResponseOuterClass.java new file mode 100644 index 000000000..9fd3aa229 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubMotorEncoderResponseOuterClass.java @@ -0,0 +1,821 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubMotorEncoderResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubMotorEncoderResponseOuterClass { + private StubMotorEncoderResponseOuterClass() {} + 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 StubMotorEncoderResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubMotorEncoderResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..8
+     * 
+ * + * uint32 EncoderId = 1; + */ + int getEncoderId(); + + /** + * uint32 EncoderVersion = 2; + */ + int getEncoderVersion(); + + /** + * int32 MotorSpeed = 3; + */ + int getMotorSpeed(); + + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool MotorDirection = 4; + */ + boolean getMotorDirection(); + + /** + *
+     * 0-OK 1-Failed ( motion control error > ?)
+     * 
+ * + * bool Status = 5; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubMotorEncoderResponse} + */ + public static final class StubMotorEncoderResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubMotorEncoderResponse) + StubMotorEncoderResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubMotorEncoderResponse.newBuilder() to construct. + private StubMotorEncoderResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubMotorEncoderResponse() { + encoderId_ = 0; + encoderVersion_ = 0; + motorSpeed_ = 0; + motorDirection_ = false; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubMotorEncoderResponse( + 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: { + + encoderId_ = input.readUInt32(); + break; + } + case 16: { + + encoderVersion_ = input.readUInt32(); + break; + } + case 24: { + + motorSpeed_ = input.readInt32(); + break; + } + case 32: { + + motorDirection_ = input.readBool(); + break; + } + case 40: { + + status_ = 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.stubs.StubMotorEncoderResponseOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse.class, com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse.Builder.class); + } + + public static final int ENCODERID_FIELD_NUMBER = 1; + private int encoderId_; + /** + *
+     *0..8
+     * 
+ * + * uint32 EncoderId = 1; + */ + public int getEncoderId() { + return encoderId_; + } + + public static final int ENCODERVERSION_FIELD_NUMBER = 2; + private int encoderVersion_; + /** + * uint32 EncoderVersion = 2; + */ + public int getEncoderVersion() { + return encoderVersion_; + } + + public static final int MOTORSPEED_FIELD_NUMBER = 3; + private int motorSpeed_; + /** + * int32 MotorSpeed = 3; + */ + public int getMotorSpeed() { + return motorSpeed_; + } + + public static final int MOTORDIRECTION_FIELD_NUMBER = 4; + private boolean motorDirection_; + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool MotorDirection = 4; + */ + public boolean getMotorDirection() { + return motorDirection_; + } + + public static final int STATUS_FIELD_NUMBER = 5; + private boolean status_; + /** + *
+     * 0-OK 1-Failed ( motion control error > ?)
+     * 
+ * + * bool Status = 5; + */ + public boolean getStatus() { + return status_; + } + + 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 (encoderId_ != 0) { + output.writeUInt32(1, encoderId_); + } + if (encoderVersion_ != 0) { + output.writeUInt32(2, encoderVersion_); + } + if (motorSpeed_ != 0) { + output.writeInt32(3, motorSpeed_); + } + if (motorDirection_ != false) { + output.writeBool(4, motorDirection_); + } + if (status_ != false) { + output.writeBool(5, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (encoderId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, encoderId_); + } + if (encoderVersion_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, encoderVersion_); + } + if (motorSpeed_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, motorSpeed_); + } + if (motorDirection_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, motorDirection_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, status_); + } + 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse other = (com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse) obj; + + boolean result = true; + result = result && (getEncoderId() + == other.getEncoderId()); + result = result && (getEncoderVersion() + == other.getEncoderVersion()); + result = result && (getMotorSpeed() + == other.getMotorSpeed()); + result = result && (getMotorDirection() + == other.getMotorDirection()); + result = result && (getStatus() + == other.getStatus()); + 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) + ENCODERID_FIELD_NUMBER; + hash = (53 * hash) + getEncoderId(); + hash = (37 * hash) + ENCODERVERSION_FIELD_NUMBER; + hash = (53 * hash) + getEncoderVersion(); + hash = (37 * hash) + MOTORSPEED_FIELD_NUMBER; + hash = (53 * hash) + getMotorSpeed(); + hash = (37 * hash) + MOTORDIRECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getMotorDirection()); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse 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.Stubs.StubMotorEncoderResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubMotorEncoderResponse) + com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse.class, com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse.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(); + encoderId_ = 0; + + encoderVersion_ = 0; + + motorSpeed_ = 0; + + motorDirection_ = false; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse build() { + com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse buildPartial() { + com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse result = new com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse(this); + result.encoderId_ = encoderId_; + result.encoderVersion_ = encoderVersion_; + result.motorSpeed_ = motorSpeed_; + result.motorDirection_ = motorDirection_; + result.status_ = status_; + 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse other) { + if (other == com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse.getDefaultInstance()) return this; + if (other.getEncoderId() != 0) { + setEncoderId(other.getEncoderId()); + } + if (other.getEncoderVersion() != 0) { + setEncoderVersion(other.getEncoderVersion()); + } + if (other.getMotorSpeed() != 0) { + setMotorSpeed(other.getMotorSpeed()); + } + if (other.getMotorDirection() != false) { + setMotorDirection(other.getMotorDirection()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int encoderId_ ; + /** + *
+       *0..8
+       * 
+ * + * uint32 EncoderId = 1; + */ + public int getEncoderId() { + return encoderId_; + } + /** + *
+       *0..8
+       * 
+ * + * uint32 EncoderId = 1; + */ + public Builder setEncoderId(int value) { + + encoderId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..8
+       * 
+ * + * uint32 EncoderId = 1; + */ + public Builder clearEncoderId() { + + encoderId_ = 0; + onChanged(); + return this; + } + + private int encoderVersion_ ; + /** + * uint32 EncoderVersion = 2; + */ + public int getEncoderVersion() { + return encoderVersion_; + } + /** + * uint32 EncoderVersion = 2; + */ + public Builder setEncoderVersion(int value) { + + encoderVersion_ = value; + onChanged(); + return this; + } + /** + * uint32 EncoderVersion = 2; + */ + public Builder clearEncoderVersion() { + + encoderVersion_ = 0; + onChanged(); + return this; + } + + private int motorSpeed_ ; + /** + * int32 MotorSpeed = 3; + */ + public int getMotorSpeed() { + return motorSpeed_; + } + /** + * int32 MotorSpeed = 3; + */ + public Builder setMotorSpeed(int value) { + + motorSpeed_ = value; + onChanged(); + return this; + } + /** + * int32 MotorSpeed = 3; + */ + public Builder clearMotorSpeed() { + + motorSpeed_ = 0; + onChanged(); + return this; + } + + private boolean motorDirection_ ; + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool MotorDirection = 4; + */ + public boolean getMotorDirection() { + return motorDirection_; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool MotorDirection = 4; + */ + public Builder setMotorDirection(boolean value) { + + motorDirection_ = value; + onChanged(); + return this; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool MotorDirection = 4; + */ + public Builder clearMotorDirection() { + + motorDirection_ = false; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed ( motion control error > ?)
+       * 
+ * + * bool Status = 5; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed ( motion control error > ?)
+       * 
+ * + * bool Status = 5; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed ( motion control error > ?)
+       * 
+ * + * bool Status = 5; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubMotorEncoderResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubMotorEncoderResponse) + private static final com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse(); + } + + public static com.twine.tango.pmr.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubMotorEncoderResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubMotorEncoderResponse(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.stubs.StubMotorEncoderResponseOuterClass.StubMotorEncoderResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_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\036StubMotorEncoderResponse.proto\022\017Tango." + + "PMR.Stubs\"\201\001\n\030StubMotorEncoderResponse\022\021" + + "\n\tEncoderId\030\001 \001(\r\022\026\n\016EncoderVersion\030\002 \001(" + + "\r\022\022\n\nMotorSpeed\030\003 \001(\005\022\026\n\016MotorDirection\030" + + "\004 \001(\010\022\016\n\006Status\030\005 \001(\010B\033\n\031com.twine.tango" + + ".pmr.stubsb\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_Stubs_StubMotorEncoderResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubMotorEncoderResponse_descriptor, + new java.lang.String[] { "EncoderId", "EncoderVersion", "MotorSpeed", "MotorDirection", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchRequestOuterClass.java new file mode 100644 index 000000000..8331c4cc6 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchRequestOuterClass.java @@ -0,0 +1,610 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubOptLimitSwitchRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubOptLimitSwitchRequestOuterClass { + private StubOptLimitSwitchRequestOuterClass() {} + 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 StubOptLimitSwitchRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubOptLimitSwitchRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..16
+     * 
+ * + * uint32 LimitSwitchrId = 1; + */ + int getLimitSwitchrId(); + + /** + *
+     *  0 - Enable 1 - Disable
+     * 
+ * + * bool LimitSwitchrDisable = 2; + */ + boolean getLimitSwitchrDisable(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubOptLimitSwitchRequest} + */ + public static final class StubOptLimitSwitchRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubOptLimitSwitchRequest) + StubOptLimitSwitchRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubOptLimitSwitchRequest.newBuilder() to construct. + private StubOptLimitSwitchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubOptLimitSwitchRequest() { + limitSwitchrId_ = 0; + limitSwitchrDisable_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubOptLimitSwitchRequest( + 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: { + + limitSwitchrId_ = input.readUInt32(); + break; + } + case 16: { + + limitSwitchrDisable_ = 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.stubs.StubOptLimitSwitchRequestOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest.class, com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest.Builder.class); + } + + public static final int LIMITSWITCHRID_FIELD_NUMBER = 1; + private int limitSwitchrId_; + /** + *
+     *0..16
+     * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public int getLimitSwitchrId() { + return limitSwitchrId_; + } + + public static final int LIMITSWITCHRDISABLE_FIELD_NUMBER = 2; + private boolean limitSwitchrDisable_; + /** + *
+     *  0 - Enable 1 - Disable
+     * 
+ * + * bool LimitSwitchrDisable = 2; + */ + public boolean getLimitSwitchrDisable() { + return limitSwitchrDisable_; + } + + 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 (limitSwitchrId_ != 0) { + output.writeUInt32(1, limitSwitchrId_); + } + if (limitSwitchrDisable_ != false) { + output.writeBool(2, limitSwitchrDisable_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (limitSwitchrId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, limitSwitchrId_); + } + if (limitSwitchrDisable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, limitSwitchrDisable_); + } + 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest other = (com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest) obj; + + boolean result = true; + result = result && (getLimitSwitchrId() + == other.getLimitSwitchrId()); + result = result && (getLimitSwitchrDisable() + == other.getLimitSwitchrDisable()); + 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) + LIMITSWITCHRID_FIELD_NUMBER; + hash = (53 * hash) + getLimitSwitchrId(); + hash = (37 * hash) + LIMITSWITCHRDISABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getLimitSwitchrDisable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest 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.Stubs.StubOptLimitSwitchRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubOptLimitSwitchRequest) + com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest.class, com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest.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(); + limitSwitchrId_ = 0; + + limitSwitchrDisable_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest build() { + com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest buildPartial() { + com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest result = new com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest(this); + result.limitSwitchrId_ = limitSwitchrId_; + result.limitSwitchrDisable_ = limitSwitchrDisable_; + 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest other) { + if (other == com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest.getDefaultInstance()) return this; + if (other.getLimitSwitchrId() != 0) { + setLimitSwitchrId(other.getLimitSwitchrId()); + } + if (other.getLimitSwitchrDisable() != false) { + setLimitSwitchrDisable(other.getLimitSwitchrDisable()); + } + 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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int limitSwitchrId_ ; + /** + *
+       *0..16
+       * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public int getLimitSwitchrId() { + return limitSwitchrId_; + } + /** + *
+       *0..16
+       * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public Builder setLimitSwitchrId(int value) { + + limitSwitchrId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..16
+       * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public Builder clearLimitSwitchrId() { + + limitSwitchrId_ = 0; + onChanged(); + return this; + } + + private boolean limitSwitchrDisable_ ; + /** + *
+       *  0 - Enable 1 - Disable
+       * 
+ * + * bool LimitSwitchrDisable = 2; + */ + public boolean getLimitSwitchrDisable() { + return limitSwitchrDisable_; + } + /** + *
+       *  0 - Enable 1 - Disable
+       * 
+ * + * bool LimitSwitchrDisable = 2; + */ + public Builder setLimitSwitchrDisable(boolean value) { + + limitSwitchrDisable_ = value; + onChanged(); + return this; + } + /** + *
+       *  0 - Enable 1 - Disable
+       * 
+ * + * bool LimitSwitchrDisable = 2; + */ + public Builder clearLimitSwitchrDisable() { + + limitSwitchrDisable_ = 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.Stubs.StubOptLimitSwitchRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubOptLimitSwitchRequest) + private static final com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest(); + } + + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubOptLimitSwitchRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubOptLimitSwitchRequest(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.stubs.StubOptLimitSwitchRequestOuterClass.StubOptLimitSwitchRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_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\037StubOptLimitSwitchRequest.proto\022\017Tango" + + ".PMR.Stubs\"P\n\031StubOptLimitSwitchRequest\022" + + "\026\n\016LimitSwitchrId\030\001 \001(\r\022\033\n\023LimitSwitchrD" + + "isable\030\002 \001(\010B\033\n\031com.twine.tango.pmr.stub" + + "sb\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_Stubs_StubOptLimitSwitchRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchRequest_descriptor, + new java.lang.String[] { "LimitSwitchrId", "LimitSwitchrDisable", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchResponseOuterClass.java new file mode 100644 index 000000000..a0e0f6f86 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubOptLimitSwitchResponseOuterClass.java @@ -0,0 +1,689 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubOptLimitSwitchResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubOptLimitSwitchResponseOuterClass { + private StubOptLimitSwitchResponseOuterClass() {} + 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 StubOptLimitSwitchResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubOptLimitSwitchResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..19
+     * 
+ * + * uint32 LimitSwitchrId = 1; + */ + int getLimitSwitchrId(); + + /** + *
+     * 
+ * + * bool LimitSwitchDitection = 2; + */ + boolean getLimitSwitchDitection(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubOptLimitSwitchResponse} + */ + public static final class StubOptLimitSwitchResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubOptLimitSwitchResponse) + StubOptLimitSwitchResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubOptLimitSwitchResponse.newBuilder() to construct. + private StubOptLimitSwitchResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubOptLimitSwitchResponse() { + limitSwitchrId_ = 0; + limitSwitchDitection_ = false; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubOptLimitSwitchResponse( + 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: { + + limitSwitchrId_ = input.readUInt32(); + break; + } + case 16: { + + limitSwitchDitection_ = input.readBool(); + break; + } + case 24: { + + status_ = 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.stubs.StubOptLimitSwitchResponseOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse.class, com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse.Builder.class); + } + + public static final int LIMITSWITCHRID_FIELD_NUMBER = 1; + private int limitSwitchrId_; + /** + *
+     *0..19
+     * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public int getLimitSwitchrId() { + return limitSwitchrId_; + } + + public static final int LIMITSWITCHDITECTION_FIELD_NUMBER = 2; + private boolean limitSwitchDitection_; + /** + *
+     * 
+ * + * bool LimitSwitchDitection = 2; + */ + public boolean getLimitSwitchDitection() { + return limitSwitchDitection_; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + + 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 (limitSwitchrId_ != 0) { + output.writeUInt32(1, limitSwitchrId_); + } + if (limitSwitchDitection_ != false) { + output.writeBool(2, limitSwitchDitection_); + } + if (status_ != false) { + output.writeBool(3, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (limitSwitchrId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, limitSwitchrId_); + } + if (limitSwitchDitection_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, limitSwitchDitection_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } + 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse other = (com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse) obj; + + boolean result = true; + result = result && (getLimitSwitchrId() + == other.getLimitSwitchrId()); + result = result && (getLimitSwitchDitection() + == other.getLimitSwitchDitection()); + result = result && (getStatus() + == other.getStatus()); + 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) + LIMITSWITCHRID_FIELD_NUMBER; + hash = (53 * hash) + getLimitSwitchrId(); + hash = (37 * hash) + LIMITSWITCHDITECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getLimitSwitchDitection()); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse 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.Stubs.StubOptLimitSwitchResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubOptLimitSwitchResponse) + com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse.class, com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse.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(); + limitSwitchrId_ = 0; + + limitSwitchDitection_ = false; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse build() { + com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse buildPartial() { + com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse result = new com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse(this); + result.limitSwitchrId_ = limitSwitchrId_; + result.limitSwitchDitection_ = limitSwitchDitection_; + result.status_ = status_; + 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse other) { + if (other == com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse.getDefaultInstance()) return this; + if (other.getLimitSwitchrId() != 0) { + setLimitSwitchrId(other.getLimitSwitchrId()); + } + if (other.getLimitSwitchDitection() != false) { + setLimitSwitchDitection(other.getLimitSwitchDitection()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int limitSwitchrId_ ; + /** + *
+       *0..19
+       * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public int getLimitSwitchrId() { + return limitSwitchrId_; + } + /** + *
+       *0..19
+       * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public Builder setLimitSwitchrId(int value) { + + limitSwitchrId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..19
+       * 
+ * + * uint32 LimitSwitchrId = 1; + */ + public Builder clearLimitSwitchrId() { + + limitSwitchrId_ = 0; + onChanged(); + return this; + } + + private boolean limitSwitchDitection_ ; + /** + *
+       * 
+ * + * bool LimitSwitchDitection = 2; + */ + public boolean getLimitSwitchDitection() { + return limitSwitchDitection_; + } + /** + *
+       * 
+ * + * bool LimitSwitchDitection = 2; + */ + public Builder setLimitSwitchDitection(boolean value) { + + limitSwitchDitection_ = value; + onChanged(); + return this; + } + /** + *
+       * 
+ * + * bool LimitSwitchDitection = 2; + */ + public Builder clearLimitSwitchDitection() { + + limitSwitchDitection_ = false; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubOptLimitSwitchResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubOptLimitSwitchResponse) + private static final com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse(); + } + + public static com.twine.tango.pmr.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubOptLimitSwitchResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubOptLimitSwitchResponse(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.stubs.StubOptLimitSwitchResponseOuterClass.StubOptLimitSwitchResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_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 StubOptLimitSwitchResponse.proto\022\017Tang" + + "o.PMR.Stubs\"b\n\032StubOptLimitSwitchRespons" + + "e\022\026\n\016LimitSwitchrId\030\001 \001(\r\022\034\n\024LimitSwitch" + + "Ditection\030\002 \001(\010\022\016\n\006Status\030\003 \001(\010B\033\n\031com.t" + + "wine.tango.pmr.stubsb\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_Stubs_StubOptLimitSwitchResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubOptLimitSwitchResponse_descriptor, + new java.lang.String[] { "LimitSwitchrId", "LimitSwitchDitection", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorRequestOuterClass.java new file mode 100644 index 000000000..8d41f4c3f --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorRequestOuterClass.java @@ -0,0 +1,861 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubSteperMotorRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubSteperMotorRequestOuterClass { + private StubSteperMotorRequestOuterClass() {} + 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 StubSteperMotorRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubSteperMotorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..19
+     * 
+ * + * uint32 MotorId = 1; + */ + int getMotorId(); + + /** + *
+     * 1-start 0-stop
+     * 
+ * + * bool Start = 2; + */ + boolean getStart(); + + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool SetDirection = 3; + */ + boolean getSetDirection(); + + /** + *
+     * No. of steps for 360 deg.
+     * 
+ * + * int32 SetMicrostepDivision = 4; + */ + int getSetMicrostepDivision(); + + /** + *
+     * ?
+     * 
+ * + * int32 SetSpeed = 5; + */ + int getSetSpeed(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubSteperMotorRequest} + */ + public static final class StubSteperMotorRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubSteperMotorRequest) + StubSteperMotorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubSteperMotorRequest.newBuilder() to construct. + private StubSteperMotorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubSteperMotorRequest() { + motorId_ = 0; + start_ = false; + setDirection_ = false; + setMicrostepDivision_ = 0; + setSpeed_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubSteperMotorRequest( + 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: { + + motorId_ = input.readUInt32(); + break; + } + case 16: { + + start_ = input.readBool(); + break; + } + case 24: { + + setDirection_ = input.readBool(); + break; + } + case 32: { + + setMicrostepDivision_ = input.readInt32(); + break; + } + case 40: { + + setSpeed_ = input.readInt32(); + 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.stubs.StubSteperMotorRequestOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest.class, com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest.Builder.class); + } + + public static final int MOTORID_FIELD_NUMBER = 1; + private int motorId_; + /** + *
+     *0..19
+     * 
+ * + * uint32 MotorId = 1; + */ + public int getMotorId() { + return motorId_; + } + + public static final int START_FIELD_NUMBER = 2; + private boolean start_; + /** + *
+     * 1-start 0-stop
+     * 
+ * + * bool Start = 2; + */ + public boolean getStart() { + return start_; + } + + public static final int SETDIRECTION_FIELD_NUMBER = 3; + private boolean setDirection_; + /** + *
+     * 1-cw 0-ccw
+     * 
+ * + * bool SetDirection = 3; + */ + public boolean getSetDirection() { + return setDirection_; + } + + public static final int SETMICROSTEPDIVISION_FIELD_NUMBER = 4; + private int setMicrostepDivision_; + /** + *
+     * No. of steps for 360 deg.
+     * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public int getSetMicrostepDivision() { + return setMicrostepDivision_; + } + + public static final int SETSPEED_FIELD_NUMBER = 5; + private int setSpeed_; + /** + *
+     * ?
+     * 
+ * + * int32 SetSpeed = 5; + */ + public int getSetSpeed() { + return setSpeed_; + } + + 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 (motorId_ != 0) { + output.writeUInt32(1, motorId_); + } + if (start_ != false) { + output.writeBool(2, start_); + } + if (setDirection_ != false) { + output.writeBool(3, setDirection_); + } + if (setMicrostepDivision_ != 0) { + output.writeInt32(4, setMicrostepDivision_); + } + if (setSpeed_ != 0) { + output.writeInt32(5, setSpeed_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (motorId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, motorId_); + } + if (start_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, start_); + } + if (setDirection_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, setDirection_); + } + if (setMicrostepDivision_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, setMicrostepDivision_); + } + if (setSpeed_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, setSpeed_); + } + 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest other = (com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest) obj; + + boolean result = true; + result = result && (getMotorId() + == other.getMotorId()); + result = result && (getStart() + == other.getStart()); + result = result && (getSetDirection() + == other.getSetDirection()); + result = result && (getSetMicrostepDivision() + == other.getSetMicrostepDivision()); + result = result && (getSetSpeed() + == other.getSetSpeed()); + 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) + MOTORID_FIELD_NUMBER; + hash = (53 * hash) + getMotorId(); + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStart()); + hash = (37 * hash) + SETDIRECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSetDirection()); + hash = (37 * hash) + SETMICROSTEPDIVISION_FIELD_NUMBER; + hash = (53 * hash) + getSetMicrostepDivision(); + hash = (37 * hash) + SETSPEED_FIELD_NUMBER; + hash = (53 * hash) + getSetSpeed(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest 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.Stubs.StubSteperMotorRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubSteperMotorRequest) + com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest.class, com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest.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(); + motorId_ = 0; + + start_ = false; + + setDirection_ = false; + + setMicrostepDivision_ = 0; + + setSpeed_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest build() { + com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest buildPartial() { + com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest result = new com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest(this); + result.motorId_ = motorId_; + result.start_ = start_; + result.setDirection_ = setDirection_; + result.setMicrostepDivision_ = setMicrostepDivision_; + result.setSpeed_ = setSpeed_; + 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest other) { + if (other == com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest.getDefaultInstance()) return this; + if (other.getMotorId() != 0) { + setMotorId(other.getMotorId()); + } + if (other.getStart() != false) { + setStart(other.getStart()); + } + if (other.getSetDirection() != false) { + setSetDirection(other.getSetDirection()); + } + if (other.getSetMicrostepDivision() != 0) { + setSetMicrostepDivision(other.getSetMicrostepDivision()); + } + if (other.getSetSpeed() != 0) { + setSetSpeed(other.getSetSpeed()); + } + 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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int motorId_ ; + /** + *
+       *0..19
+       * 
+ * + * uint32 MotorId = 1; + */ + public int getMotorId() { + return motorId_; + } + /** + *
+       *0..19
+       * 
+ * + * uint32 MotorId = 1; + */ + public Builder setMotorId(int value) { + + motorId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..19
+       * 
+ * + * uint32 MotorId = 1; + */ + public Builder clearMotorId() { + + motorId_ = 0; + onChanged(); + return this; + } + + private boolean start_ ; + /** + *
+       * 1-start 0-stop
+       * 
+ * + * bool Start = 2; + */ + public boolean getStart() { + return start_; + } + /** + *
+       * 1-start 0-stop
+       * 
+ * + * bool Start = 2; + */ + public Builder setStart(boolean value) { + + start_ = value; + onChanged(); + return this; + } + /** + *
+       * 1-start 0-stop
+       * 
+ * + * bool Start = 2; + */ + public Builder clearStart() { + + start_ = false; + onChanged(); + return this; + } + + private boolean setDirection_ ; + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool SetDirection = 3; + */ + public boolean getSetDirection() { + return setDirection_; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool SetDirection = 3; + */ + public Builder setSetDirection(boolean value) { + + setDirection_ = value; + onChanged(); + return this; + } + /** + *
+       * 1-cw 0-ccw
+       * 
+ * + * bool SetDirection = 3; + */ + public Builder clearSetDirection() { + + setDirection_ = false; + onChanged(); + return this; + } + + private int setMicrostepDivision_ ; + /** + *
+       * No. of steps for 360 deg.
+       * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public int getSetMicrostepDivision() { + return setMicrostepDivision_; + } + /** + *
+       * No. of steps for 360 deg.
+       * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public Builder setSetMicrostepDivision(int value) { + + setMicrostepDivision_ = value; + onChanged(); + return this; + } + /** + *
+       * No. of steps for 360 deg.
+       * 
+ * + * int32 SetMicrostepDivision = 4; + */ + public Builder clearSetMicrostepDivision() { + + setMicrostepDivision_ = 0; + onChanged(); + return this; + } + + private int setSpeed_ ; + /** + *
+       * ?
+       * 
+ * + * int32 SetSpeed = 5; + */ + public int getSetSpeed() { + return setSpeed_; + } + /** + *
+       * ?
+       * 
+ * + * int32 SetSpeed = 5; + */ + public Builder setSetSpeed(int value) { + + setSpeed_ = value; + onChanged(); + return this; + } + /** + *
+       * ?
+       * 
+ * + * int32 SetSpeed = 5; + */ + public Builder clearSetSpeed() { + + setSpeed_ = 0; + 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.Stubs.StubSteperMotorRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubSteperMotorRequest) + private static final com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest(); + } + + public static com.twine.tango.pmr.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubSteperMotorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubSteperMotorRequest(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.stubs.StubSteperMotorRequestOuterClass.StubSteperMotorRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_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\034StubSteperMotorRequest.proto\022\017Tango.PM" + + "R.Stubs\"~\n\026StubSteperMotorRequest\022\017\n\007Mot" + + "orId\030\001 \001(\r\022\r\n\005Start\030\002 \001(\010\022\024\n\014SetDirectio" + + "n\030\003 \001(\010\022\034\n\024SetMicrostepDivision\030\004 \001(\005\022\020\n" + + "\010SetSpeed\030\005 \001(\005B\033\n\031com.twine.tango.pmr.s" + + "tubsb\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_Stubs_StubSteperMotorRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubSteperMotorRequest_descriptor, + new java.lang.String[] { "MotorId", "Start", "SetDirection", "SetMicrostepDivision", "SetSpeed", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorResponseOuterClass.java new file mode 100644 index 000000000..5c65563ec --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubSteperMotorResponseOuterClass.java @@ -0,0 +1,688 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubSteperMotorResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubSteperMotorResponseOuterClass { + private StubSteperMotorResponseOuterClass() {} + 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 StubSteperMotorResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubSteperMotorResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     *0..19
+     * 
+ * + * uint32 MotorId = 1; + */ + int getMotorId(); + + /** + *
+     * 
+ * + * uint32 MotorVersion = 2; + */ + int getMotorVersion(); + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubSteperMotorResponse} + */ + public static final class StubSteperMotorResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubSteperMotorResponse) + StubSteperMotorResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubSteperMotorResponse.newBuilder() to construct. + private StubSteperMotorResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubSteperMotorResponse() { + motorId_ = 0; + motorVersion_ = 0; + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubSteperMotorResponse( + 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: { + + motorId_ = input.readUInt32(); + break; + } + case 16: { + + motorVersion_ = input.readUInt32(); + break; + } + case 24: { + + status_ = 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.stubs.StubSteperMotorResponseOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse.class, com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse.Builder.class); + } + + public static final int MOTORID_FIELD_NUMBER = 1; + private int motorId_; + /** + *
+     *0..19
+     * 
+ * + * uint32 MotorId = 1; + */ + public int getMotorId() { + return motorId_; + } + + public static final int MOTORVERSION_FIELD_NUMBER = 2; + private int motorVersion_; + /** + *
+     * 
+ * + * uint32 MotorVersion = 2; + */ + public int getMotorVersion() { + return motorVersion_; + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + + 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 (motorId_ != 0) { + output.writeUInt32(1, motorId_); + } + if (motorVersion_ != 0) { + output.writeUInt32(2, motorVersion_); + } + if (status_ != false) { + output.writeBool(3, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (motorId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, motorId_); + } + if (motorVersion_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, motorVersion_); + } + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } + 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse other = (com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse) obj; + + boolean result = true; + result = result && (getMotorId() + == other.getMotorId()); + result = result && (getMotorVersion() + == other.getMotorVersion()); + result = result && (getStatus() + == other.getStatus()); + 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) + MOTORID_FIELD_NUMBER; + hash = (53 * hash) + getMotorId(); + hash = (37 * hash) + MOTORVERSION_FIELD_NUMBER; + hash = (53 * hash) + getMotorVersion(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse 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.Stubs.StubSteperMotorResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubSteperMotorResponse) + com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse.class, com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse.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(); + motorId_ = 0; + + motorVersion_ = 0; + + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse build() { + com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse buildPartial() { + com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse result = new com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse(this); + result.motorId_ = motorId_; + result.motorVersion_ = motorVersion_; + result.status_ = status_; + 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse other) { + if (other == com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse.getDefaultInstance()) return this; + if (other.getMotorId() != 0) { + setMotorId(other.getMotorId()); + } + if (other.getMotorVersion() != 0) { + setMotorVersion(other.getMotorVersion()); + } + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int motorId_ ; + /** + *
+       *0..19
+       * 
+ * + * uint32 MotorId = 1; + */ + public int getMotorId() { + return motorId_; + } + /** + *
+       *0..19
+       * 
+ * + * uint32 MotorId = 1; + */ + public Builder setMotorId(int value) { + + motorId_ = value; + onChanged(); + return this; + } + /** + *
+       *0..19
+       * 
+ * + * uint32 MotorId = 1; + */ + public Builder clearMotorId() { + + motorId_ = 0; + onChanged(); + return this; + } + + private int motorVersion_ ; + /** + *
+       * 
+ * + * uint32 MotorVersion = 2; + */ + public int getMotorVersion() { + return motorVersion_; + } + /** + *
+       * 
+ * + * uint32 MotorVersion = 2; + */ + public Builder setMotorVersion(int value) { + + motorVersion_ = value; + onChanged(); + return this; + } + /** + *
+       * 
+ * + * uint32 MotorVersion = 2; + */ + public Builder clearMotorVersion() { + + motorVersion_ = 0; + onChanged(); + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubSteperMotorResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubSteperMotorResponse) + private static final com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse(); + } + + public static com.twine.tango.pmr.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubSteperMotorResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubSteperMotorResponse(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.stubs.StubSteperMotorResponseOuterClass.StubSteperMotorResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_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\035StubSteperMotorResponse.proto\022\017Tango.P" + + "MR.Stubs\"P\n\027StubSteperMotorResponse\022\017\n\007M" + + "otorId\030\001 \001(\r\022\024\n\014MotorVersion\030\002 \001(\r\022\016\n\006St" + + "atus\030\003 \001(\010B\033\n\031com.twine.tango.pmr.stubsb" + + "\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_Stubs_StubSteperMotorResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubSteperMotorResponse_descriptor, + new java.lang.String[] { "MotorId", "MotorVersion", "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveRequestOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveRequestOuterClass.java new file mode 100644 index 000000000..70556b17a --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveRequestOuterClass.java @@ -0,0 +1,631 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubValveRequest.proto + +package com.twine.tango.pmr.stubs; + +public final class StubValveRequestOuterClass { + private StubValveRequestOuterClass() {} + 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 StubValveRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubValveRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 ValveId = 1; + */ + int getValveId(); + + /** + * int32 Inkflow = 2; + */ + int getInkflow(); + + /** + * int32 ValveOn = 3; + */ + int getValveOn(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubValveRequest} + */ + public static final class StubValveRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubValveRequest) + StubValveRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubValveRequest.newBuilder() to construct. + private StubValveRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubValveRequest() { + valveId_ = 0; + inkflow_ = 0; + valveOn_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubValveRequest( + 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: { + + valveId_ = input.readInt32(); + break; + } + case 16: { + + inkflow_ = input.readInt32(); + break; + } + case 24: { + + valveOn_ = input.readInt32(); + 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.stubs.StubValveRequestOuterClass.internal_static_Tango_PMR_Stubs_StubValveRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubValveRequestOuterClass.internal_static_Tango_PMR_Stubs_StubValveRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest.class, com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest.Builder.class); + } + + public static final int VALVEID_FIELD_NUMBER = 1; + private int valveId_; + /** + * int32 ValveId = 1; + */ + public int getValveId() { + return valveId_; + } + + public static final int INKFLOW_FIELD_NUMBER = 2; + private int inkflow_; + /** + * int32 Inkflow = 2; + */ + public int getInkflow() { + return inkflow_; + } + + public static final int VALVEON_FIELD_NUMBER = 3; + private int valveOn_; + /** + * int32 ValveOn = 3; + */ + public int getValveOn() { + return valveOn_; + } + + 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 (valveId_ != 0) { + output.writeInt32(1, valveId_); + } + if (inkflow_ != 0) { + output.writeInt32(2, inkflow_); + } + if (valveOn_ != 0) { + output.writeInt32(3, valveOn_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valveId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, valveId_); + } + if (inkflow_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, inkflow_); + } + if (valveOn_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, valveOn_); + } + 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.stubs.StubValveRequestOuterClass.StubValveRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest other = (com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest) obj; + + boolean result = true; + result = result && (getValveId() + == other.getValveId()); + result = result && (getInkflow() + == other.getInkflow()); + result = result && (getValveOn() + == other.getValveOn()); + 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) + VALVEID_FIELD_NUMBER; + hash = (53 * hash) + getValveId(); + hash = (37 * hash) + INKFLOW_FIELD_NUMBER; + hash = (53 * hash) + getInkflow(); + hash = (37 * hash) + VALVEON_FIELD_NUMBER; + hash = (53 * hash) + getValveOn(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest 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.stubs.StubValveRequestOuterClass.StubValveRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest 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.stubs.StubValveRequestOuterClass.StubValveRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest 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.stubs.StubValveRequestOuterClass.StubValveRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest 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.stubs.StubValveRequestOuterClass.StubValveRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest 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.stubs.StubValveRequestOuterClass.StubValveRequest 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.Stubs.StubValveRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubValveRequest) + com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubValveRequestOuterClass.internal_static_Tango_PMR_Stubs_StubValveRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubValveRequestOuterClass.internal_static_Tango_PMR_Stubs_StubValveRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest.class, com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest.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(); + valveId_ = 0; + + inkflow_ = 0; + + valveOn_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubValveRequestOuterClass.internal_static_Tango_PMR_Stubs_StubValveRequest_descriptor; + } + + public com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest build() { + com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest buildPartial() { + com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest result = new com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest(this); + result.valveId_ = valveId_; + result.inkflow_ = inkflow_; + result.valveOn_ = valveOn_; + 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.stubs.StubValveRequestOuterClass.StubValveRequest) { + return mergeFrom((com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest other) { + if (other == com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest.getDefaultInstance()) return this; + if (other.getValveId() != 0) { + setValveId(other.getValveId()); + } + if (other.getInkflow() != 0) { + setInkflow(other.getInkflow()); + } + if (other.getValveOn() != 0) { + setValveOn(other.getValveOn()); + } + 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.stubs.StubValveRequestOuterClass.StubValveRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valveId_ ; + /** + * int32 ValveId = 1; + */ + public int getValveId() { + return valveId_; + } + /** + * int32 ValveId = 1; + */ + public Builder setValveId(int value) { + + valveId_ = value; + onChanged(); + return this; + } + /** + * int32 ValveId = 1; + */ + public Builder clearValveId() { + + valveId_ = 0; + onChanged(); + return this; + } + + private int inkflow_ ; + /** + * int32 Inkflow = 2; + */ + public int getInkflow() { + return inkflow_; + } + /** + * int32 Inkflow = 2; + */ + public Builder setInkflow(int value) { + + inkflow_ = value; + onChanged(); + return this; + } + /** + * int32 Inkflow = 2; + */ + public Builder clearInkflow() { + + inkflow_ = 0; + onChanged(); + return this; + } + + private int valveOn_ ; + /** + * int32 ValveOn = 3; + */ + public int getValveOn() { + return valveOn_; + } + /** + * int32 ValveOn = 3; + */ + public Builder setValveOn(int value) { + + valveOn_ = value; + onChanged(); + return this; + } + /** + * int32 ValveOn = 3; + */ + public Builder clearValveOn() { + + valveOn_ = 0; + 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.Stubs.StubValveRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubValveRequest) + private static final com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest(); + } + + public static com.twine.tango.pmr.stubs.StubValveRequestOuterClass.StubValveRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubValveRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubValveRequest(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.stubs.StubValveRequestOuterClass.StubValveRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubValveRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubValveRequest_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\026StubValveRequest.proto\022\017Tango.PMR.Stub" + + "s\"E\n\020StubValveRequest\022\017\n\007ValveId\030\001 \001(\005\022\017" + + "\n\007Inkflow\030\002 \001(\005\022\017\n\007ValveOn\030\003 \001(\005B\033\n\031com." + + "twine.tango.pmr.stubsb\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_Stubs_StubValveRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubValveRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubValveRequest_descriptor, + new java.lang.String[] { "ValveId", "Inkflow", "ValveOn", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveResponseOuterClass.java b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveResponseOuterClass.java new file mode 100644 index 000000000..e963dff05 --- /dev/null +++ b/Software/Android_Studio/Tango.PMR/src/main/java/com/twine/tango/pmr/stubs/StubValveResponseOuterClass.java @@ -0,0 +1,525 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: StubValveResponse.proto + +package com.twine.tango.pmr.stubs; + +public final class StubValveResponseOuterClass { + private StubValveResponseOuterClass() {} + 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 StubValveResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Stubs.StubValveResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + boolean getStatus(); + } + /** + * Protobuf type {@code Tango.PMR.Stubs.StubValveResponse} + */ + public static final class StubValveResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Stubs.StubValveResponse) + StubValveResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use StubValveResponse.newBuilder() to construct. + private StubValveResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StubValveResponse() { + status_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StubValveResponse( + 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 24: { + + status_ = 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.stubs.StubValveResponseOuterClass.internal_static_Tango_PMR_Stubs_StubValveResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubValveResponseOuterClass.internal_static_Tango_PMR_Stubs_StubValveResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse.class, com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse.Builder.class); + } + + public static final int STATUS_FIELD_NUMBER = 3; + private boolean status_; + /** + *
+     * 0-OK 1-Failed
+     * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + + 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 (status_ != false) { + output.writeBool(3, status_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (status_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, status_); + } + 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.stubs.StubValveResponseOuterClass.StubValveResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse other = (com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse) obj; + + boolean result = true; + result = result && (getStatus() + == other.getStatus()); + 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) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getStatus()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse 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.stubs.StubValveResponseOuterClass.StubValveResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse 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.stubs.StubValveResponseOuterClass.StubValveResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse 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.stubs.StubValveResponseOuterClass.StubValveResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse 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.stubs.StubValveResponseOuterClass.StubValveResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse 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.stubs.StubValveResponseOuterClass.StubValveResponse 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.Stubs.StubValveResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Stubs.StubValveResponse) + com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.stubs.StubValveResponseOuterClass.internal_static_Tango_PMR_Stubs_StubValveResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.stubs.StubValveResponseOuterClass.internal_static_Tango_PMR_Stubs_StubValveResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse.class, com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse.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(); + status_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.stubs.StubValveResponseOuterClass.internal_static_Tango_PMR_Stubs_StubValveResponse_descriptor; + } + + public com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse build() { + com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse buildPartial() { + com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse result = new com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse(this); + result.status_ = status_; + 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.stubs.StubValveResponseOuterClass.StubValveResponse) { + return mergeFrom((com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse other) { + if (other == com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse.getDefaultInstance()) return this; + if (other.getStatus() != false) { + setStatus(other.getStatus()); + } + 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.stubs.StubValveResponseOuterClass.StubValveResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean status_ ; + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public boolean getStatus() { + return status_; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder setStatus(boolean value) { + + status_ = value; + onChanged(); + return this; + } + /** + *
+       * 0-OK 1-Failed
+       * 
+ * + * bool Status = 3; + */ + public Builder clearStatus() { + + status_ = 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.Stubs.StubValveResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Stubs.StubValveResponse) + private static final com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse(); + } + + public static com.twine.tango.pmr.stubs.StubValveResponseOuterClass.StubValveResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StubValveResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StubValveResponse(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.stubs.StubValveResponseOuterClass.StubValveResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Stubs_StubValveResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Stubs_StubValveResponse_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\027StubValveResponse.proto\022\017Tango.PMR.Stu" + + "bs\"#\n\021StubValveResponse\022\016\n\006Status\030\003 \001(\010B" + + "\033\n\031com.twine.tango.pmr.stubsb\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_Stubs_StubValveResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Stubs_StubValveResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Stubs_StubValveResponse_descriptor, + new java.lang.String[] { "Status", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/Tango.UnitTesting/src/androidTest/java/com/twine/tango/unittesting/Synchronization_TST.java b/Software/Android_Studio/Tango.UnitTesting/src/androidTest/java/com/twine/tango/unittesting/Synchronization_TST.java index 92e745a10..b162c2215 100644 --- a/Software/Android_Studio/Tango.UnitTesting/src/androidTest/java/com/twine/tango/unittesting/Synchronization_TST.java +++ b/Software/Android_Studio/Tango.UnitTesting/src/androidTest/java/com/twine/tango/unittesting/Synchronization_TST.java @@ -5,7 +5,8 @@ import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import com.elvishew.xlog.XLog; -import com.twine.tango.dal.dao.OrganizationsDAO; +import com.twine.tango.dal.TangoDB; +import com.twine.tango.dal.dao.TangoDAO; import com.twine.tango.dal.entities.Organization; import com.twine.tango.integration.MachineIdentityProvider; import com.twine.tango.synchronization.ITangoSynchronizer; @@ -32,7 +33,7 @@ public class Synchronization_TST // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); - for (Organization org : OrganizationsDAO.getAllOrganizations()) + for (Organization org : TangoDAO.getAllOrganizations()) { XLog.i(org.getName()); } @@ -41,7 +42,7 @@ public class Synchronization_TST synchronizer.synchronizeDB().subscribe(() -> { - for (Organization org : OrganizationsDAO.getAllOrganizations()) + for (Organization org : TangoDAO.getAllOrganizations()) { XLog.i(org.getName()); } diff --git a/Software/DB/Tango.db-journal b/Software/DB/Tango.db-journal new file mode 100644 index 000000000..1b843ca54 Binary files /dev/null and b/Software/DB/Tango.db-journal differ diff --git a/Software/Graphics/account.png b/Software/Graphics/account.png new file mode 100644 index 000000000..46f0d38fc Binary files /dev/null and b/Software/Graphics/account.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs index b1a268a9b..0928d2a1f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/DBModule.cs @@ -25,7 +25,7 @@ namespace Tango.MachineStudio.DB public bool IsInitialized => _isInitialized; - public PermissionsEnum Permission => PermissionsEnum.RunDataBaseModule; + public Permissions Permission => Permissions.RunDataBaseModule; public void Dispose() { diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs index 2da59724c..8d95bb38e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ExtensionMethods/INotificationProviderExtensions.cs @@ -9,6 +9,7 @@ using Tango.DAL.Observables; using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.DB.ViewModels; using Tango.MachineStudio.DB.Views.DBViews; +using Tango.MachineStudio.DB.Windows; namespace Tango.MachineStudio.DB.ExtensionMethods { @@ -17,11 +18,13 @@ namespace Tango.MachineStudio.DB.ExtensionMethods public static bool ShowDialog(this INotificationProvider provider, DialogOpenMode mode, DbTableViewModel context) where T : class, IObservableEntity { Type viewType = typeof(INotificationProviderExtensions).Assembly.GetType(typeof(OrganizationView).Namespace + "." + typeof(T).Name + "View"); - return provider.ShowDialog( - (mode == DialogOpenMode.Editing ? PackIconKind.TableEdit : PackIconKind.Plus), - (mode == DialogOpenMode.Editing ? "Edit " : "Add New ") + typeof(T).Name, - Activator.CreateInstance(viewType) as FrameworkElement, - context); + + DBDialogWindow window = new DBDialogWindow(Activator.CreateInstance(viewType) as FrameworkElement); + window.IconKind = (mode == DialogOpenMode.Editing ? PackIconKind.TableEdit : PackIconKind.Plus); + window.InnerTitle = (mode == DialogOpenMode.Editing ? "Edit " : "Add New ") + typeof(T).Name; + window.DataContext = context; + + return provider.ShowModalWindow(window).Value; } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs index ba68fa358..2bb5969bc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Managers/ViewsManager.cs @@ -22,9 +22,9 @@ namespace Tango.MachineStudio.DB.Managers DisplayedViews = new ObservableCollection(); DbViews = new ObservableCollection(); - foreach (var type in typeof(ViewsManager).Assembly.GetTypes().Where(x => x.CustomAttributes.Count() > 0 && x.CustomAttributes.First().AttributeType == typeof(DBViewAttribute))) + foreach (var type in typeof(ViewsManager).Assembly.GetTypes().Where(x => x.CustomAttributes.Count() > 0 && x.CustomAttributes.First().AttributeType == typeof(DBViewAttribute)).OrderBy(x => x.Name)) { - DbViews.Add(new RegisteredView(type.Name.Replace("View", ""), Activator.CreateInstance(type) as FrameworkElement)); + DbViews.Add(new RegisteredView(type.Name.Replace("View", "").ToTitle(), Activator.CreateInstance(type) as FrameworkElement)); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs new file mode 100644 index 000000000..97e5cf21c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/CloseEntityEditViewMessage.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.MachineStudio.Common.Messages; + +namespace Tango.MachineStudio.DB.Messages +{ + public class CloseEntityEditViewMessage : IStudioMessage + { + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs new file mode 100644 index 000000000..b3bf53f93 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Messages/OpenEntityEditViewMessage.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Messages; +using Tango.MachineStudio.DB.ViewModels; +using Tango.SharedUI; + +namespace Tango.MachineStudio.DB.Messages +{ + public class OpenEntityEditViewMessage : IStudioMessage + { + public DialogOpenMode DialogOpenMode { get; set; } + + public ViewModel Context { get; set; } + + public Type EntityType { get; set; } + + public OpenEntityEditViewMessage(DialogOpenMode mode, ViewModel context, Type entityType) + { + DialogOpenMode = mode; + Context = context; + EntityType = entityType; + } + } +} 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 712a99953..bb52ecb86 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 @@ -61,6 +61,9 @@ ..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + + ..\..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll + @@ -79,15 +82,35 @@ + + ..\..\..\packages\WriteableBitmapEx.1.5.0.0\lib\net40\WriteableBitmapEx.Wpf.dll + + + + + + + + + + + + + + + + + + @@ -96,6 +119,96 @@ + + IdsPacksView.xaml + + + CartridgeTypesView.xaml + + + CartridgesView.xaml + + + DispensersView.xaml + + + DispenserTypesView.xaml + + + CartridgeTypeView.xaml + + + CartridgeView.xaml + + + DispenserView.xaml + + + DispenserTypeView.xaml + + + IdsPackView.xaml + + + LiquidView.xaml + + + LiquidsView.xaml + + + HardwareVersionView.xaml + + + EmbeddedSoftwareVersionView.xaml + + + EmbeddedFirmwareVersionView.xaml + + + ApplicationVersionView.xaml + + + ApplicationOsVersionView.xaml + + + ApplicationFirmwareVersionView.xaml + + + HardwareVersionsView.xaml + + + EmbeddedSoftwareVersionsView.xaml + + + EmbeddedFirmwareVersionsView.xaml + + + ApplicationVersionsView.xaml + + + ApplicationOsVersionsView.xaml + + + ApplicationFirmwareVersionsView.xaml + + + ConfigurationsView.xaml + + + ApplicationDisplayPanelVersionsView.xaml + + + MachineVersionsView.xaml + + + ApplicationDisplayPanelVersionView.xaml + + + MachineVersionView.xaml + + + ConfigurationView.xaml + PermissionView.xaml @@ -135,6 +248,9 @@ MainDBView.xaml + + DBDialogWindow.xaml + MSBuild:Compile Designer @@ -150,6 +266,126 @@ + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -202,6 +438,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + @@ -229,6 +469,10 @@ + + {a2f5af44-29ff-45d6-9d25-ecda5cce88b5} + Tango.ColorPicker + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} Tango.Core @@ -259,5 +503,6 @@ + \ No newline at end of file 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 c5f3f452e..48175ed17 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -24,6 +24,23 @@ namespace Tango.MachineStudio.DB SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); + SimpleIoc.Default.Register(); } public static MainViewVM MainViewVM @@ -81,5 +98,125 @@ namespace Tango.MachineStudio.DB return ServiceLocator.Current.GetInstance(); } } + + public static MachineVersionsViewVM MachineVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static ConfigurationsViewVM ConfigurationsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static ApplicationDisplayPanelVersionsViewVM ApplicationDisplayPanelVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static ApplicationFirmwareVersionsViewVM ApplicationFirmwareVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static ApplicationOsVersionsViewVM ApplicationOsVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static ApplicationVersionsViewVM ApplicationVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static EmbeddedFirmwareVersionsViewVM EmbeddedFirmwareVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static EmbeddedSoftwareVersionsViewVM EmbeddedSoftwareVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static HardwareVersionsViewVM HardwareVersionsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static IdsPacksViewVM IdsPacksViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static DispensersViewVM DispensersViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static DispenserTypesViewVM DispenserTypesViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static LiquidsViewVM LiquidsViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static CartridgesViewVM CartridgesViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + + public static CartridgeTypesViewVM CartridgeTypesViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs new file mode 100644 index 000000000..be458136a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationDisplayPanelVersionsViewVM.cs @@ -0,0 +1,17 @@ +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 ApplicationDisplayPanelVersionsViewVM : DbTableViewModel + { + public ApplicationDisplayPanelVersionsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs new file mode 100644 index 000000000..0814988ba --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationFirmwareVersionsViewVM.cs @@ -0,0 +1,17 @@ +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 ApplicationFirmwareVersionsViewVM : DbTableViewModel + { + public ApplicationFirmwareVersionsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs new file mode 100644 index 000000000..3cdd8acb7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationOsVersionsViewVM.cs @@ -0,0 +1,17 @@ +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 ApplicationOsVersionsViewVM : DbTableViewModel + { + public ApplicationOsVersionsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs new file mode 100644 index 000000000..6e25fe321 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ApplicationVersionsViewVM.cs @@ -0,0 +1,17 @@ +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 ApplicationVersionsViewVM : DbTableViewModel + { + public ApplicationVersionsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs new file mode 100644 index 000000000..c8c6ba00b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgeTypesViewVM.cs @@ -0,0 +1,17 @@ +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 CartridgeTypesViewVM : DbTableViewModel + { + public CartridgeTypesViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs new file mode 100644 index 000000000..8db217013 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CartridgesViewVM.cs @@ -0,0 +1,18 @@ +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 CartridgesViewVM : DbTableViewModel + { + public CartridgesViewVM(INotificationProvider notification) : base(notification) + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs new file mode 100644 index 000000000..617faab31 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ConfigurationsViewVM.cs @@ -0,0 +1,24 @@ +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 ConfigurationsViewVM : DbTableViewModel + { + public ConfigurationsViewVM(INotificationProvider notification) : base(notification) + { + + } + + protected override void InitializeEntity(Configuration entity) + { + base.InitializeEntity(entity); + entity.CreationDate = DateTime.Now; + } + } +} 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 7f6dd8d5f..b6d77748e 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 @@ -9,10 +9,17 @@ using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.DB.Managers; using Tango.SharedUI; using Tango.MachineStudio.DB.ExtensionMethods; +using System.Data.Entity.Infrastructure; +using GalaSoft.MvvmLight.Messaging; +using Tango.MachineStudio.DB.Messages; +using System.Collections.ObjectModel; +using System.Reflection; +using Tango.MachineStudio.Common.StudioApplication; +using System.ComponentModel; namespace Tango.MachineStudio.DB.ViewModels { - public abstract class DbTableViewModel : ViewModel where T : class, IObservableEntity + public abstract class DbTableViewModel : ViewModel, IShutdownRequestBlocker where T : class, IObservableEntity { private INotificationProvider _notification; @@ -23,9 +30,10 @@ namespace Tango.MachineStudio.DB.ViewModels { _notification = notification; Adapter = ObservablesEntitiesAdapter.Instance; + ValidationErrors = new ObservableCollection(); AddCommand = new RelayCommand(OnAdd); - EditCommand = new RelayCommand(OnEdit,(x) => SelectedEntity != null); + EditCommand = new RelayCommand(OnEdit, (x) => SelectedEntity != null); DeleteCommand = new RelayCommand(OnDelete, (x) => SelectedEntity != null); DialogOKCommand = new RelayCommand(() => OnDialogOKPressed(DialogOpenMode, EditEntity)); DialogCancelCommand = new RelayCommand(() => OnDialogCancelPressed(DialogOpenMode, EditEntity)); @@ -93,6 +101,16 @@ namespace Tango.MachineStudio.DB.ViewModels set { _filter = value; RaisePropertyChangedAuto(); OnFilterChanged(value); } } + private ObservableCollection _validationErrors; + /// + /// Gets or sets the validation errors. + /// + public ObservableCollection ValidationErrors + { + get { return _validationErrors; } + set { _validationErrors = value; RaisePropertyChangedAuto(); } + } + /// /// Gets or sets the dialog OK command. /// @@ -118,13 +136,49 @@ namespace Tango.MachineStudio.DB.ViewModels /// public RelayCommand DeleteCommand { get; set; } + protected override void OnValidating() + { + base.OnValidating(); + ValidationErrors.Clear(); + + foreach (var prop in typeof(T).GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => !x.PropertyType.IsGenericType && x.PropertyType.IsClass && !x.Name.Contains("Guid"))) + { + if (prop.GetValue(EditEntity) == null) + { + ValidationErrors.Add(prop.Name + " is required"); + } + } + } + /// /// Called when delete command invoked. /// - protected virtual void OnDelete() + protected virtual async void OnDelete() { - SelectedEntity.Deleted = true; - SelectedEntity.Save(); + using (_notification.PushTaskItem("Saving changes to database...")) + { + 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; + } + + try + { + SelectedEntity.Deleted = true; + await SelectedEntity.SaveAsync(); + } + catch (Exception ex) + { + SelectedEntity.Deleted = false; + Adapter.Invalidate(); + _notification.ShowError("Could not delete entity."); + } + + SelectedEntity = null; + } } /// @@ -132,9 +186,11 @@ namespace Tango.MachineStudio.DB.ViewModels /// protected virtual void OnEdit() { + ValidationErrors.Clear(); DialogOpenMode = DialogOpenMode.Editing; EditEntity = GetEditableEntity(DialogOpenMode); - _notification.ShowDialog(DialogOpenMode, this); + //_notification.ShowDialog(DialogOpenMode, this); + Messenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T))); IsDialogOpen = true; } @@ -143,9 +199,11 @@ namespace Tango.MachineStudio.DB.ViewModels /// protected virtual void OnAdd() { + ValidationErrors.Clear(); DialogOpenMode = DialogOpenMode.Adding; EditEntity = GetEditableEntity(DialogOpenMode); - _notification.ShowDialog(DialogOpenMode, this); + //_notification.ShowDialog(DialogOpenMode, this); + Messenger.Default.Send(new OpenEntityEditViewMessage(DialogOpenMode, this, typeof(T))); IsDialogOpen = true; } @@ -153,8 +211,14 @@ namespace Tango.MachineStudio.DB.ViewModels /// Called when dialog closes with OK button. /// /// The mode. - protected virtual void OnDialogOKPressed(DialogOpenMode mode, T entity) + protected virtual async void OnDialogOKPressed(DialogOpenMode mode, T entity) { + if (!Validate()) return; + + if (ValidationErrors.Count > 0) return; + + Messenger.Default.Send(new CloseEntityEditViewMessage()); + if (mode == DialogOpenMode.Editing) { entity.ShallowCopyTo(SelectedEntity); @@ -163,10 +227,26 @@ namespace Tango.MachineStudio.DB.ViewModels OnBeforeEntitySave(mode, entity); - entity.Save(); - IsDialogOpen = false; - SelectedEntity = EditEntity; - SelectedEntity = null; + using (_notification.PushTaskItem("Saving changes to database...")) + { + try + { + await entity.SaveAsync(); + } + catch (DbUpdateException ex) + { + Adapter.Invalidate(); + _notification.ShowError("Could not save entity." + Environment.NewLine + ex.InnerException.InnerException != null ? ex.InnerException.InnerException.Message : ex.InnerException.Message); + } + catch (Exception ex) + { + Adapter.Invalidate(); + _notification.ShowError("Could not save entity." + Environment.NewLine + "Please make sure all fields are properly populated."); + } + IsDialogOpen = false; + SelectedEntity = EditEntity; + SelectedEntity = null; + } } /// @@ -174,7 +254,7 @@ namespace Tango.MachineStudio.DB.ViewModels /// /// The mode. /// The entity. - protected virtual void OnBeforeEntitySave(DialogOpenMode mode,T entity) + protected virtual void OnBeforeEntitySave(DialogOpenMode mode, T entity) { } @@ -185,6 +265,7 @@ namespace Tango.MachineStudio.DB.ViewModels /// The mode. protected virtual void OnDialogCancelPressed(DialogOpenMode mode, T entity) { + Messenger.Default.Send(new CloseEntityEditViewMessage()); IsDialogOpen = false; } @@ -209,12 +290,31 @@ namespace Tango.MachineStudio.DB.ViewModels protected virtual void OnFilterChanged(String filter) { + String viewSourceName = this.GetType().Name.Replace("ViewVM", "ViewSource"); + ICollectionView collectionView = Adapter.GetType().GetProperty(viewSourceName).GetValue(Adapter) as ICollectionView; + collectionView.Filter = (entity) => + { + return + entity. + GetType(). + GetProperties(BindingFlags.Public | BindingFlags.Instance). + Where(x => x.Name != "Deleted" && x.Name != "ID" && x.Name != "LastUpdated"). + Where(x => !x.PropertyType.IsGenericType && (x.PropertyType.IsClass || x.PropertyType == typeof(String))). + Select(prop => prop.GetValue(entity).ToString()). + ToList(). + Any(x => x.ToLower().Contains(filter.ToLower())); + }; } protected virtual void InitializeEntity(T entity) { } + + public Task OnShutdownRequest() + { + return Task.FromResult(true); + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs new file mode 100644 index 000000000..5ffe0d58c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispenserTypesViewVM.cs @@ -0,0 +1,17 @@ +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 DispenserTypesViewVM : DbTableViewModel + { + public DispenserTypesViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs new file mode 100644 index 000000000..0242c1dc7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/DispensersViewVM.cs @@ -0,0 +1,18 @@ +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 DispensersViewVM : DbTableViewModel + { + public DispensersViewVM(INotificationProvider notification) : base(notification) + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs new file mode 100644 index 000000000..a248d919a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedFirmwareVersionsViewVM.cs @@ -0,0 +1,17 @@ +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 EmbeddedFirmwareVersionsViewVM : DbTableViewModel + { + public EmbeddedFirmwareVersionsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs new file mode 100644 index 000000000..b6436203d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/EmbeddedSoftwareVersionsViewVM.cs @@ -0,0 +1,17 @@ +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 EmbeddedSoftwareVersionsViewVM : DbTableViewModel + { + public EmbeddedSoftwareVersionsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs new file mode 100644 index 000000000..02c90c442 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/HardwareVersionsViewVM.cs @@ -0,0 +1,17 @@ +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 HardwareVersionsViewVM : DbTableViewModel + { + public HardwareVersionsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs new file mode 100644 index 000000000..202dd959f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/IdsPacksViewVM.cs @@ -0,0 +1,18 @@ +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 IdsPacksViewVM : DbTableViewModel + { + public IdsPacksViewVM(INotificationProvider notification) : base(notification) + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs new file mode 100644 index 000000000..e57f6606e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/LiquidsViewVM.cs @@ -0,0 +1,17 @@ +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 LiquidsViewVM : DbTableViewModel + { + public LiquidsViewVM(INotificationProvider notification) : base(notification) + { + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs new file mode 100644 index 000000000..6a24f7d4c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MachineVersionsViewVM.cs @@ -0,0 +1,18 @@ +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 MachineVersionsViewVM : DbTableViewModel + { + public MachineVersionsViewVM(INotificationProvider notification) : base(notification) + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs index 11c0adc0e..a0ce93a5a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MainViewVM.cs @@ -3,17 +3,16 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows; using Tango.SharedUI; namespace Tango.MachineStudio.DB.ViewModels { public class MainViewVM : ViewModel { - public String Text { get; set; } - public MainViewVM() : base() { - Text = "Hi ROy"; + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs index a394f9faa..0327557f1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/OrganizationsViewVM.cs @@ -13,14 +13,5 @@ namespace Tango.MachineStudio.DB.ViewModels public OrganizationsViewVM(INotificationProvider notification) : base(notification) { } - - protected override void OnFilterChanged(string filter) - { - Adapter.OrganizationsViewSource.Filter = (x) => - { - var org = x as Organization; - return org.Name.Contains(filter); - }; - } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs index 0b65d48ab..6af1184aa 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/UsersViewVM.cs @@ -6,6 +6,7 @@ using System.Text; using System.Threading.Tasks; using Tango.DAL.Observables; using Tango.MachineStudio.Common.Notifications; +using SimpleValidator.Extensions; namespace Tango.MachineStudio.DB.ViewModels { @@ -72,5 +73,23 @@ namespace Tango.MachineStudio.DB.ViewModels } } } + + protected override void OnValidating() + { + base.OnValidating(); + + if (EditEntity.Email != null) + { + if (Adapter.Users.ToList().Exists(x => x.Email.ToLower() == EditEntity.Email.ToLower())) + { + ValidationErrors.Add("Email already exist"); + } + } + + if (!EditEntity.Password.IsMinLength(4)) + { + ValidationErrors.Add("Password must have at least 4 characters"); + } + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml index ee46a9c11..e338f3c0f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/AddressesView.xaml @@ -10,7 +10,7 @@ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.AddressesViewVM}"> - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml new file mode 100644 index 000000000..a1c8d6d7e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.xaml.cs new file mode 100644 index 000000000..6d372eaf7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionView.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 MachineView.xaml + /// + public partial class ApplicationDisplayPanelVersionView : UserControl + { + public ApplicationDisplayPanelVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml new file mode 100644 index 000000000..704f5f5e2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs new file mode 100644 index 000000000..e514117dd --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationDisplayPanelVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class ApplicationDisplayPanelVersionsView : UserControl + { + public ApplicationDisplayPanelVersionsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml new file mode 100644 index 000000000..70fde065d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.xaml.cs new file mode 100644 index 000000000..b63b05ccf --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionView.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 MachineView.xaml + /// + public partial class ApplicationFirmwareVersionView : UserControl + { + public ApplicationFirmwareVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml new file mode 100644 index 000000000..a216f4a1f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs new file mode 100644 index 000000000..855e51523 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationFirmwareVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class ApplicationFirmwareVersionsView : UserControl + { + public ApplicationFirmwareVersionsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml new file mode 100644 index 000000000..48f96597b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.xaml.cs new file mode 100644 index 000000000..019fd207e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionView.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 MachineView.xaml + /// + public partial class ApplicationOsVersionView : UserControl + { + public ApplicationOsVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml new file mode 100644 index 000000000..f53c182c3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs new file mode 100644 index 000000000..ca244d95b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationOsVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class ApplicationOsVersionsView : UserControl + { + public ApplicationOsVersionsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml new file mode 100644 index 000000000..c5e33f3fa --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.xaml.cs new file mode 100644 index 000000000..bde27ee0d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionView.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 MachineView.xaml + /// + public partial class ApplicationVersionView : UserControl + { + public ApplicationVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml new file mode 100644 index 000000000..09df0fee4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs new file mode 100644 index 000000000..23cab4296 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ApplicationVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class ApplicationVersionsView : UserControl + { + public ApplicationVersionsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml new file mode 100644 index 000000000..a81f05646 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.xaml.cs new file mode 100644 index 000000000..fc23e504e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypeView.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 MachineView.xaml + /// + public partial class CartridgeTypeView : UserControl + { + public CartridgeTypeView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml new file mode 100644 index 000000000..d17f79c8d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs new file mode 100644 index 000000000..428ebb296 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeTypesView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class CartridgeTypesView : UserControl + { + public CartridgeTypesView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml new file mode 100644 index 000000000..98adef136 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.xaml.cs new file mode 100644 index 000000000..d2402426c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgeView.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 MachineView.xaml + /// + public partial class CartridgeView : UserControl + { + public CartridgeView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml new file mode 100644 index 000000000..3fa7d0200 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs new file mode 100644 index 000000000..27adfa44e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/CartridgesView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class CartridgesView : UserControl + { + public CartridgesView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml new file mode 100644 index 000000000..afbaf660a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml @@ -0,0 +1,53 @@ + + + + + , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.xaml.cs new file mode 100644 index 000000000..8772bbae9 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationView.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 MachineView.xaml + /// + public partial class ConfigurationView : UserControl + { + public ConfigurationView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml new file mode 100644 index 000000000..235e49cc3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs new file mode 100644 index 000000000..de3fc9010 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ConfigurationsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class ConfigurationsView : UserControl + { + public ConfigurationsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml new file mode 100644 index 000000000..b6e3336b3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.xaml.cs new file mode 100644 index 000000000..f13875714 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypeView.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 MachineView.xaml + /// + public partial class DispenserTypeView : UserControl + { + public DispenserTypeView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml new file mode 100644 index 000000000..874629128 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs new file mode 100644 index 000000000..89e0b05c1 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserTypesView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class DispenserTypesView : UserControl + { + public DispenserTypesView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml new file mode 100644 index 000000000..7dc4ec1ff --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.xaml.cs new file mode 100644 index 000000000..4ad5d74fe --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispenserView.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 MachineView.xaml + /// + public partial class DispenserView : UserControl + { + public DispenserView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml new file mode 100644 index 000000000..7fdb70bbe --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs new file mode 100644 index 000000000..d86bd2e31 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/DispensersView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class DispensersView : UserControl + { + public DispensersView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml new file mode 100644 index 000000000..56dccb7dc --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.xaml.cs new file mode 100644 index 000000000..82aa4f7b4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionView.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 MachineView.xaml + /// + public partial class EmbeddedFirmwareVersionView : UserControl + { + public EmbeddedFirmwareVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml new file mode 100644 index 000000000..219230d32 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs new file mode 100644 index 000000000..39c50aa39 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedFirmwareVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class EmbeddedFirmwareVersionsView : UserControl + { + public EmbeddedFirmwareVersionsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml new file mode 100644 index 000000000..279c15c84 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.xaml.cs new file mode 100644 index 000000000..e2e626fb5 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionView.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 MachineView.xaml + /// + public partial class EmbeddedSoftwareVersionView : UserControl + { + public EmbeddedSoftwareVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml new file mode 100644 index 000000000..64814a416 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs new file mode 100644 index 000000000..55f7a03a6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/EmbeddedSoftwareVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class EmbeddedSoftwareVersionsView : UserControl + { + public EmbeddedSoftwareVersionsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml new file mode 100644 index 000000000..45d36fb14 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.xaml.cs new file mode 100644 index 000000000..1419434bf --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionView.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 MachineView.xaml + /// + public partial class HardwareVersionView : UserControl + { + public HardwareVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml new file mode 100644 index 000000000..4a60ffcaa --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs new file mode 100644 index 000000000..0e552cdb7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/HardwareVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class HardwareVersionsView : UserControl + { + public HardwareVersionsView() : base() + { + InitializeComponent(); + } + } +} 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 new file mode 100644 index 000000000..308a549fa --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.xaml.cs new file mode 100644 index 000000000..766b3087e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPackView.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 MachineView.xaml + /// + public partial class IdsPackView : UserControl + { + public IdsPackView() + { + InitializeComponent(); + } + } +} 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 new file mode 100644 index 000000000..df1557ec3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs new file mode 100644 index 000000000..3f1a0189b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/IdsPacksView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class IdsPacksView : UserControl + { + public IdsPacksView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml new file mode 100644 index 000000000..19bcc2674 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.xaml.cs new file mode 100644 index 000000000..653def003 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidView.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 MachineView.xaml + /// + public partial class LiquidView : UserControl + { + public LiquidView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml new file mode 100644 index 000000000..749b0ccd7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs new file mode 100644 index 000000000..2d68d5ef5 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/LiquidsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class LiquidsView : UserControl + { + public LiquidsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml new file mode 100644 index 000000000..50a1c790b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.xaml.cs new file mode 100644 index 000000000..5e284cd47 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionView.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 MachineView.xaml + /// + public partial class MachineVersionView : UserControl + { + public MachineVersionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml new file mode 100644 index 000000000..08cac568f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs new file mode 100644 index 000000000..275445917 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachineVersionsView.xaml.cs @@ -0,0 +1,32 @@ +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; +using Tango.MachineStudio.DB.Managers; +using Tango.SharedUI.Controls; + +namespace Tango.MachineStudio.DB.Views.DBViews +{ + /// + /// Interaction logic for MachinesView.xaml + /// + [DBView] + public partial class MachineVersionsView : UserControl + { + public MachineVersionsView() : base() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml index f5913bd2c..ebd3b2c7e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MachinesView.xaml @@ -10,7 +10,7 @@ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.MachinesViewVM}"> - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml index d773dc58a..9455fd519 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/PermissionsView.xaml @@ -10,7 +10,7 @@ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.PermissionsViewVM}"> - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml index dcb61eacb..858cfd37b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RolesView.xaml @@ -15,7 +15,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml index e63c1c131..6bfb2fbb8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UserView.xaml @@ -23,7 +23,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml index 5b6c2e842..ad3814185 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/UsersView.xaml @@ -16,7 +16,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml index c7c636d53..6c7cb2b95 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml @@ -12,12 +12,16 @@ xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common" xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1270" Background="White" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="720" d:DesignWidth="1270" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}"> + + + + - - + + @@ -34,7 +38,7 @@ - + @@ -42,12 +46,112 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs index 9e327b575..1ffdf7eb0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/MainDBView.xaml.cs @@ -1,4 +1,6 @@ -using System; +using GalaSoft.MvvmLight.Messaging; +using MaterialDesignThemes.Wpf; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -12,6 +14,9 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.MachineStudio.DB.Messages; +using Tango.MachineStudio.DB.ViewModels; +using Tango.MachineStudio.DB.Views.DBViews; using Tango.SharedUI; using Tango.SharedUI.Controls; @@ -25,6 +30,50 @@ namespace Tango.MachineStudio.DB.Views public MainDBView() : base() { InitializeComponent(); + + Messenger.Default.Register(this, HandleOpenEntityViewMessage); + Messenger.Default.Register(this, HandleCloseEntityViewMessage); + } + + public bool IsEditViewOpen + { + get { return (bool)GetValue(IsEditViewOpenProperty); } + set { SetValue(IsEditViewOpenProperty, value); } + } + public static readonly DependencyProperty IsEditViewOpenProperty = + DependencyProperty.Register("IsEditViewOpen", typeof(bool), typeof(MainDBView), new PropertyMetadata(false)); + + private void HandleCloseEntityViewMessage(CloseEntityEditViewMessage message) + { + IsEditViewOpen = false; + } + + private void HandleOpenEntityViewMessage(OpenEntityEditViewMessage message) + { + Type viewType = typeof(MainDBView).Assembly.GetType(typeof(OrganizationView).Namespace + "." + message.EntityType.Name + "View"); + + presenter.DataContext = message.Context; + var view = Activator.CreateInstance(viewType) as FrameworkElement; + view.DataContext = message.Context; + grid.DataContext = message.Context; + presenter.Content = view; + icon.Kind = (message.DialogOpenMode == DialogOpenMode.Editing ? PackIconKind.TableEdit : PackIconKind.Plus); + txtTitle.Text = (message.DialogOpenMode == DialogOpenMode.Editing ? "Edit " : "Add New ") + message.EntityType.Name.ToTitle(); + + IsEditViewOpen = true; + } + + private void Thumb_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e) + { + if (double.IsNaN(grid.Width)) + { + grid.Width = grid.ActualWidth; + } + + if (grid.Width + -e.HorizontalChange > 100) + { + grid.Width += -e.HorizontalChange; + } } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml new file mode 100644 index 000000000..83cd48926 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs new file mode 100644 index 000000000..d9629c642 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Windows/DBDialogWindow.xaml.cs @@ -0,0 +1,68 @@ +using MahApps.Metro.Controls; +using MaterialDesignThemes.Wpf; +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.Shapes; +namespace Tango.MachineStudio.DB.Windows +{ + /// + /// Interaction logic for DBDialogWindow.xaml + /// + public partial class DBDialogWindow : MetroWindow + { + public DBDialogWindow() + { + InitializeComponent(); + } + + public String InnerTitle + { + get { return (String)GetValue(InnerTitleProperty); } + set { SetValue(InnerTitleProperty, value); } + } + public static readonly DependencyProperty InnerTitleProperty = + DependencyProperty.Register("InnerTitle", typeof(String), typeof(DBDialogWindow), new PropertyMetadata(null)); + + + + public PackIconKind IconKind + { + get { return (PackIconKind)GetValue(IconKindProperty); } + set { SetValue(IconKindProperty, value); } + } + + // Using a DependencyProperty as the backing store for IconKind. This enables animation, styling, binding, etc... + public static readonly DependencyProperty IconKindProperty = + DependencyProperty.Register("IconKind", typeof(PackIconKind), typeof(DBDialogWindow), new PropertyMetadata(PackIconKind.TableEdit)); + + + + + public DBDialogWindow(FrameworkElement content) : this() + { + presenter.Content = content; + } + + private void OnOKClicked(object sender, RoutedEventArgs e) + { + DialogResult = true; + Close(); + } + + private void OnCancelClicked(object sender, RoutedEventArgs e) + { + DialogResult = false; + Close(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config index ab8c25d56..138a48ec7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/packages.config @@ -8,4 +8,6 @@ + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml index 3896347fe..b248a4aec 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml @@ -7,7 +7,7 @@ xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls" xmlns:converters="clr-namespace:Tango.MachineStudio.Common.Converters" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" Background="White"> + d:DesignHeight="300" d:DesignWidth="300"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs new file mode 100644 index 000000000..83183f328 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/IStudioMessageExtensions.cs @@ -0,0 +1,15 @@ +using GalaSoft.MvvmLight.Messaging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.MachineStudio.Common.Messages; + +public static class IStudioMessageExtensions +{ + public static void Send(this IStudioMessage message) + { + Messenger.Default.Send(message); + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/UserExtensions.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/UserExtensions.cs index a11ee7e8a..a6c98319e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/UserExtensions.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ExtensionMethods/UserExtensions.cs @@ -7,7 +7,7 @@ using Tango.DAL.Observables; public static class UserExtensions { - public static bool HasPermission(this User user, PermissionsEnum permission) + public static bool HasPermission(this User user, Permissions permission) { return user.UsersRoles.Select(x => x.Role).ToList().SelectMany(x => x.RolesPermissions).ToList().Exists(x => x.Permission.Code == permission.ToInt32()); } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs index 36c885340..902a45a2f 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioModule.cs @@ -19,7 +19,7 @@ namespace Tango.MachineStudio.Common FrameworkElement MainView { get; } - PermissionsEnum Permission { get; } + Permissions Permission { get; } bool IsInitialized { get; } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/IStudioMessage.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/IStudioMessage.cs new file mode 100644 index 000000000..7d1232c7b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Messages/IStudioMessage.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Common.Messages +{ + public interface IStudioMessage + { + + } +} 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 e14df21ba..a45f9a847 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/INotificationProvider.cs @@ -1,17 +1,43 @@ using MaterialDesignThemes.Wpf; using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; +using System.Windows.Media; namespace Tango.MachineStudio.Common.Notifications { public interface INotificationProvider { - bool ShowDialog(PackIconKind icon, String title, object context) where T : FrameworkElement; + ObservableCollection TaskItems { get; } - bool ShowDialog(PackIconKind icon, String title, FrameworkElement content, object context); + TaskItem CurrentTaskItem { get; } + + bool HasTaskItems { get; } + + void PushTaskItem(TaskItem taskItem); + + TaskItem PushTaskItem(String message); + + void PopTaskItem(TaskItem taskItem); + + bool? ShowModalWindow(Window window); + + bool ShowModalWindow(PackIconKind icon, String title, object context) where T : FrameworkElement; + + bool ShowModalWindow(PackIconKind icon, String title, FrameworkElement content, object context); + + bool? ShowDialog(PackIconKind icon, Brush iconColor, String message, bool hasCancel); + + void ShowInfo(String message); + + void ShowWarnning(String message); + + void ShowError(String message); + + bool ShowQuestion(String message); } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/TaskItem.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/TaskItem.cs new file mode 100644 index 000000000..0cf5e2c8e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/TaskItem.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +namespace Tango.MachineStudio.Common.Notifications +{ + public class TaskItem : ExtendedObject, IDisposable + { + private INotificationProvider _notificationProvider; + + public TaskItem(INotificationProvider notificationProvider) + { + _notificationProvider = notificationProvider; + } + + private String _message; + public String Message + { + get { return _message; } + set { _message = value; RaisePropertyChangedAuto(); } + } + + public void Pop() + { + _notificationProvider.PopTaskItem(this); + } + + public void Push() + { + _notificationProvider.PushTaskItem(this); + } + + public void Dispose() + { + Pop(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs new file mode 100644 index 000000000..a157bd598 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IShutdownRequestBlocker.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Common.StudioApplication +{ + public interface IShutdownRequestBlocker + { + Task OnShutdownRequest(); + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs new file mode 100644 index 000000000..0ee27fbf6 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.Common.StudioApplication +{ + public interface IStudioApplicationManager + { + void ShutDown(); + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs new file mode 100644 index 000000000..6b7984faf --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.MachineStudio.Common +{ + public abstract class StudioViewModel : ViewModel + { + public abstract Task RequestShutdown(); + } + + public abstract class StudioViewModel : ViewModel where T : IView + { + public abstract Task OnShutdownRequest(); + + public StudioViewModel(T view) : base(view) + { + + } + } +} + 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 c94e6fbdc..1aa5216b4 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 @@ -31,14 +31,30 @@ 4 + + ..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll + + + ..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll + + + ..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll + ..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll ..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll + + ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + + + ..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll + True + @@ -53,6 +69,12 @@ + + + + + + Designer MSBuild:Compile diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ValidationRules/Required.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ValidationRules/Required.cs new file mode 100644 index 000000000..84f274965 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/ValidationRules/Required.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Controls; + +namespace Tango.MachineStudio.Common.ValidationRules +{ + public class Required : ValidationRule + { + public override ValidationResult Validate(object value, CultureInfo cultureInfo) + { + return new ValidationResult(!String.IsNullOrWhiteSpace(value.ToStringSafe()), "Required"); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config index 0c779127b..f67c854e3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/packages.config @@ -1,5 +1,7 @@  + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs index b3b92b6ab..ca553de1e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs @@ -14,13 +14,9 @@ namespace Tango.MachineStudio.UI /// public partial class App : Application { - public static ObservablesEntitiesAdapter DbAdapter { get; set; } - protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); - - DbAdapter = ObservablesEntitiesAdapter.Instance; } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/account.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/account.png new file mode 100644 index 000000000..46f0d38fc Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/account.png differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs index 3f7d4cad8..9193cfd3e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs @@ -1,4 +1,5 @@ using MahApps.Metro.Controls; +using Microsoft.Practices.ServiceLocation; using System; using System.Collections.Generic; using System.Linq; @@ -13,6 +14,7 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.MachineStudio.Common.StudioApplication; namespace Tango.MachineStudio.UI { @@ -26,8 +28,15 @@ namespace Tango.MachineStudio.UI public MainWindow() { InitializeComponent(); - Instance = this; + + this.Closing += MainWindow_Closing; + } + + private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) + { + e.Cancel = true; + ServiceLocator.Current.GetInstance().ShutDown(); } } } 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 8e0fd2220..b1ba03109 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DefaultNotificationProvider.cs @@ -7,17 +7,49 @@ using System.Windows; using MaterialDesignThemes.Wpf; using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.UI.Windows; +using System.Windows.Media; +using Tango.Core; +using System.Collections.ObjectModel; namespace Tango.MachineStudio.UI.Notifications { - public class DefaultNotificationProvider : INotificationProvider + public class DefaultNotificationProvider : ExtendedObject, INotificationProvider { - public bool ShowDialog(PackIconKind icon, string title, object context) where T : FrameworkElement + public ObservableCollection TaskItems { get; private set; } + + public bool HasTaskItems { - return ShowDialog(icon, title, Activator.CreateInstance(), context); + get { return TaskItems.Count > 0; } } - public bool ShowDialog(PackIconKind icon, string title, FrameworkElement content, object context) + private TaskItem _currentTaskItem; + + public TaskItem CurrentTaskItem + { + get { return _currentTaskItem; } + set { _currentTaskItem = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(HasTaskItems)); } + } + + public DefaultNotificationProvider() + { + TaskItems = new ObservableCollection(); + } + + public bool ShowModalWindow(PackIconKind icon, string title, object context) where T : FrameworkElement + { + return ShowModalWindow(icon, title, Activator.CreateInstance(), context); + } + + public bool? ShowModalWindow(Window window) + { + window.Owner = Application.Current.MainWindow; + MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible; + bool result = window.ShowDialog().Value; + MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden; + return result; + } + + public bool ShowModalWindow(PackIconKind icon, string title, FrameworkElement content, object context) { DialogWindow dialog = new DialogWindow(content); dialog.DataContext = context; @@ -28,5 +60,69 @@ namespace Tango.MachineStudio.UI.Notifications MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden; return result; } + + public bool? ShowDialog(PackIconKind icon, Brush iconColor, string message, bool hasCancel) + { + MainWindow.Instance.shadowGrid.Visibility = Visibility.Visible; + + var result = new MessageBoxWindow() + { + Owner = Application.Current.MainWindow, + Message = message, + IconKind = icon, + IconColor = iconColor, + HasCancel = hasCancel + + }.ShowDialog(); + + MainWindow.Instance.shadowGrid.Visibility = Visibility.Hidden; + return result; + } + + public void ShowError(string message) + { + ShowDialog(PackIconKind.Exclamation, Brushes.Red, message, false); + } + + public void ShowInfo(string message) + { + ShowDialog(PackIconKind.Information, Brushes.Black, message, false); + } + + public bool ShowQuestion(string message) + { + return ShowDialog(PackIconKind.CommentQuestionOutline, Brushes.Black, message, true).Value; + } + + public void ShowWarnning(string message) + { + ShowDialog(PackIconKind.Exclamation, Brushes.DarkOrange, message, false); + } + + public void PushTaskItem(TaskItem taskItem) + { + TaskItems.Add(taskItem); + CurrentTaskItem = taskItem; + } + + public TaskItem PushTaskItem(string message) + { + TaskItem item = new TaskItem(this); + item.Message = message; + PushTaskItem(item); + return item; + } + + public void PopTaskItem(TaskItem taskItem) + { + TaskItems.Remove(taskItem); + + if (TaskItems.Count > 0) + { + CurrentTaskItem = TaskItems.Last(); + } + + RaisePropertyChanged(nameof(HasTaskItems)); + } } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml index f23776ec2..2a8dd9f28 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/DialogWindow.xaml @@ -12,17 +12,9 @@ - + - - - - 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 c946d2b88..31dd3d644 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 @@ -1,4 +1,5 @@ using MahApps.Metro.Controls; +using MaterialDesignThemes.Wpf; using System; using System.Collections.Generic; using System.Linq; @@ -38,6 +39,17 @@ namespace Tango.MachineStudio.UI.Windows + public PackIconKind IconKind + { + get { return (PackIconKind)GetValue(IconKindProperty); } + set { SetValue(IconKindProperty, value); } + } + public static readonly DependencyProperty IconKindProperty = + DependencyProperty.Register("IconKind", typeof(PackIconKind), typeof(DialogWindow), new PropertyMetadata(PackIconKind.Information)); + + + + public DialogWindow(FrameworkElement content) : this() { presenter.Content = content; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml new file mode 100644 index 000000000..4f3b826fe --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml.cs new file mode 100644 index 000000000..7ce4965ef --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Notifications/MessageBoxWindow.xaml.cs @@ -0,0 +1,83 @@ +using MahApps.Metro.Controls; +using MaterialDesignThemes.Wpf; +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.Animation; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.UI.Notifications +{ + /// + /// Interaction logic for MessageBoxWindow.xaml + /// + public partial class MessageBoxWindow : Window + { + public MessageBoxWindow() + { + InitializeComponent(); + this.Loaded += MessageBoxWindow_Loaded; + } + + private void MessageBoxWindow_Loaded(object sender, RoutedEventArgs e) + { + DoubleAnimation ani = new DoubleAnimation(); + ani.To = 1; + ani.Duration = TimeSpan.FromSeconds(0.5); + this.BeginAnimation(Window.OpacityProperty, ani); + } + + public String Message + { + get { return (String)GetValue(MessageProperty); } + set { SetValue(MessageProperty, value); } + } + public static readonly DependencyProperty MessageProperty = + DependencyProperty.Register("Message", typeof(String), typeof(MessageBoxWindow), new PropertyMetadata(null)); + + public Brush IconColor + { + get { return (Brush)GetValue(IconColorProperty); } + set { SetValue(IconColorProperty, value); } + } + public static readonly DependencyProperty IconColorProperty = + DependencyProperty.Register("IconColor", typeof(Brush), typeof(MessageBoxWindow), new PropertyMetadata(Brushes.Black)); + + public PackIconKind IconKind + { + get { return (PackIconKind)GetValue(IconKindProperty); } + set { SetValue(IconKindProperty, value); } + } + public static readonly DependencyProperty IconKindProperty = + DependencyProperty.Register("IconKind", typeof(PackIconKind), typeof(MessageBoxWindow), new PropertyMetadata(PackIconKind.Information)); + + public bool HasCancel + { + get { return (bool)GetValue(HasCancelProperty); } + set { SetValue(HasCancelProperty, value); } + } + public static readonly DependencyProperty HasCancelProperty = + DependencyProperty.Register("HasCancel", typeof(bool), typeof(MessageBoxWindow), new PropertyMetadata(false)); + + private void OnOKClicked(object sender, RoutedEventArgs e) + { + DialogResult = true; + Close(); + } + + private void OnCancelClicked(object sender, RoutedEventArgs e) + { + DialogResult = false; + Close(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs new file mode 100644 index 000000000..b95a74a3e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -0,0 +1,53 @@ +using Microsoft.Practices.ServiceLocation; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Tango.Core.Helpers; +using Tango.MachineStudio.Common.StudioApplication; +using Tango.MachineStudio.Common.Navigation; +using GalaSoft.MvvmLight.Ioc; +using System.Reflection; +using System.Collections; + +namespace Tango.MachineStudio.UI.StudioApplication +{ + public class DefaultStudioApplicationManager : IStudioApplicationManager + { + private INavigationManager _navigationManager; + + public DefaultStudioApplicationManager(INavigationManager navigationManager) + { + _navigationManager = navigationManager; + } + + public async void ShutDown() + { + _navigationManager.NavigateTo(NavigationView.ShutdownView); + + await Task.Factory.StartNew(async () => + { + + //Do Shutdown Procedures... + foreach (var vm in ServiceLocator.Current.GetAllInstancesByBase()) + { + var result = await vm.OnShutdownRequest(); + if (!result) + { + ThreadsHelper.InvokeUI(() => + { + _navigationManager.NavigateTo(NavigationView.MainView); + }); + return; + } + } + + Thread.Sleep(3000); + Environment.Exit(0); + + }); + } + } +} 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 9d2860241..be0c1a829 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 @@ -70,6 +70,9 @@ ..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + + ..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll + @@ -96,10 +99,14 @@ MSBuild:Compile Designer + + + MessageBoxWindow.xaml + @@ -136,6 +143,10 @@ MainWindow.xaml Code + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -232,7 +243,12 @@ - + + + + + + $(TargetDir)linkgen.exe -s "$(TargetPath)" -d "$(TargetDir)Utilities\Machine Studio.lnk" diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs index 5095dfc93..f4a7a7502 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs @@ -7,10 +7,12 @@ using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Modules; using Tango.MachineStudio.Common.Navigation; using Tango.MachineStudio.Common.Notifications; +using Tango.MachineStudio.Common.StudioApplication; using Tango.MachineStudio.UI.Authentication; using Tango.MachineStudio.UI.Modules; using Tango.MachineStudio.UI.Navigation; using Tango.MachineStudio.UI.Notifications; +using Tango.MachineStudio.UI.StudioApplication; using Tango.MachineStudio.UI.SupervisingController; using Tango.MachineStudio.UI.ViewModels; using Tango.MachineStudio.UI.Views; @@ -45,11 +47,13 @@ namespace Tango.MachineStudio.UI SimpleIoc.Default.Unregister(); SimpleIoc.Default.Unregister(); SimpleIoc.Default.Unregister(); + SimpleIoc.Default.Unregister(); SimpleIoc.Default.Register(); 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/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs index 72ab5aca9..f50b734f4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs @@ -4,26 +4,58 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; +using Tango.Core.Threading; +using Tango.DAL.Observables; using Tango.MachineStudio.Common.Modules; using Tango.MachineStudio.Common.Navigation; +using Tango.MachineStudio.Common.Notifications; using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels { public class LoadingViewVM : ViewModel { - public LoadingViewVM(INavigationManager navigationManager, IStudioModuleLoader studioModuleLoader) + private INotificationProvider _notificationProvider; + private INavigationManager _navigationManager; + private IStudioModuleLoader _studioModuleLoader; + + public LoadingViewVM(INavigationManager navigationManager, IStudioModuleLoader studioModuleLoader, INotificationProvider notificationProvider) + { + _navigationManager = navigationManager; + _studioModuleLoader = studioModuleLoader; + _notificationProvider = notificationProvider; + Load(); + } + + private void Load() { - Task.Factory.StartNew(() => + StaThreadHelper.StartStaThread(() => { Thread.Sleep(3000); - }).ContinueWith((x) => - { - - studioModuleLoader.LoadModules(); - navigationManager.NavigateTo(NavigationView.LoginView); - - }, TaskScheduler.FromCurrentSynchronizationContext()); + try + { + ObservablesEntitiesAdapter.Instance.Initialize(); + InvokeUI(() => + { + _studioModuleLoader.LoadModules(); + _navigationManager.NavigateTo(NavigationView.LoginView); + }); + } + catch (Exception ex) + { + InvokeUINow(() => + { + if (_notificationProvider.ShowQuestion("An error occurred while trying to connect to Twine database." + Environment.NewLine + "Would you like to try again?")) + { + Load(); + } + else + { + Environment.Exit(0); + } + }); + } + }); } } } 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 67c116790..6fe90fa99 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs @@ -1,13 +1,17 @@ using System; +using System.Collections; using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; using Tango.Core.Commands; +using Tango.Core.Cryptography; using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Navigation; +using Tango.MachineStudio.Common.Notifications; +using Tango.Settings; using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels @@ -16,34 +20,59 @@ namespace Tango.MachineStudio.UI.ViewModels { private IAuthenticationProvider _authenticationProvider; private INavigationManager _navigationManager; + private INotificationProvider _notificationProvider; + private Rfc2898Cryptographer cryptographer; private String _email; + [Required(ErrorMessage = "Email is required")] + [EmailAddress(ErrorMessage = "Please enter a valid email")] public String Email { get { return _email; } set { _email = value; RaisePropertyChangedAuto(); } } - public RelayCommand LoginCommand { get; set; } + private bool _rememberMe; - public LoginViewVM(IAuthenticationProvider authenticationProvider, INavigationManager navigationManager) + public bool RememberMe { + get { return _rememberMe; } + set { _rememberMe = value; RaisePropertyChangedAuto(); } + } + + + public RelayCommand LoginCommand { get; set; } + + public LoginViewVM(IAuthenticationProvider authenticationProvider, INavigationManager navigationManager, INotificationProvider notificationProvider) + { + _notificationProvider = notificationProvider; _navigationManager = navigationManager; _authenticationProvider = authenticationProvider; - LoginCommand = new RelayCommand(Login); + LoginCommand = new RelayCommand(Login); + + cryptographer = new Rfc2898Cryptographer(); + Email = SettingsManager.Default.MachineStudio.LastLoginEmail; + RememberMe = SettingsManager.Default.MachineStudio.RememberMe; } - private void Login(PasswordBox passwordBox) + private void Login(String password) { - String password = passwordBox.Password; - try - { - _authenticationProvider.Login(Email, password); - _navigationManager.NavigateTo(NavigationView.MainView); - } - catch (Exception ex) + if (Validate()) { - MessageBox.Show("Failed"); + try + { + _authenticationProvider.Login(Email, password); + _navigationManager.NavigateTo(NavigationView.MainView); + SettingsManager.Default.MachineStudio.LastLoginEmail = Email; + SettingsManager.Default.MachineStudio.RememberMe = RememberMe; + + SettingsManager.Default.MachineStudio.LastLoginPassword = RememberMe ? cryptographer.Encrypt(password) : null; + SettingsManager.SaveDefaultSettings(); + } + catch + { + _notificationProvider.ShowError("Invalid credentials. Please try again."); + } } } } 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 213d1a83d..7ef47fabd 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -10,6 +10,7 @@ using Tango.Core.Commands; using Tango.MachineStudio.Common; using Tango.MachineStudio.Common.Authentication; using Tango.MachineStudio.Common.Modules; +using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.UI.SupervisingController; using Tango.SharedUI; @@ -52,10 +53,24 @@ namespace Tango.MachineStudio.UI.ViewModels set { _studioModuleLoader = value; RaisePropertyChangedAuto(); } } - public MainViewVM(IMainView view, IAuthenticationProvider authenticationProvider, IStudioModuleLoader studioModuleLoader) : base(view) + private INotificationProvider _notificationProvider; + + public INotificationProvider NotificationProvider + { + get { return _notificationProvider; } + set { _notificationProvider = value; RaisePropertyChangedAuto(); } + } + + + public MainViewVM( + IMainView view, + IAuthenticationProvider authenticationProvider, + IStudioModuleLoader studioModuleLoader, + INotificationProvider notificationProvider) : base(view) { AuthenticationProvider = authenticationProvider; StudioModuleLoader = studioModuleLoader; + NotificationProvider = notificationProvider; StartModuleCommand = new RelayCommand(StartModule); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml index ab0875023..459c8fde8 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml @@ -6,7 +6,7 @@ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1280" DataContext="{Binding LoadingViewVM, Source={StaticResource Locator}}" Background="White"> + d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" DataContext="{Binding LoadingViewVM, Source={StaticResource Locator}}" Background="White"> @@ -15,7 +15,7 @@ Machine Studio Twine Solutions - + Loading, please wait... diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml index 60590a16b..1531370af 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml @@ -2,17 +2,41 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:rules="clr-namespace:Tango.MachineStudio.Common.ValidationRules;assembly=Tango.MachineStudio.Common" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" d:DesignHeight="720" d:DesignWidth="1280" DataContext="{Binding LoginViewVM, Source={StaticResource Locator}}" Background="White"> + + + + + + + + + - + - - - + Machine Studio + + + Login to your account + + + + + + + + + + Remember me + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs index 0b3a9ae4f..027e37682 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml.cs @@ -12,17 +12,50 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using static Tango.SharedUI.Controls.MultiTransitionControl; +using SimpleValidator.Extensions; +using Tango.Settings; +using Tango.Core.Cryptography; namespace Tango.MachineStudio.UI.Views { /// /// Interaction logic for LoginView.xaml /// - public partial class LoginView : UserControl + public partial class LoginView : UserControl, ITransitionView { + private Rfc2898Cryptographer cryptographer; + public LoginView() { InitializeComponent(); + + cryptographer = new Rfc2898Cryptographer(); + } + + public String Password + { + get { return (String)GetValue(PasswordProperty); } + set { SetValue(PasswordProperty, value); } + } + public static readonly DependencyProperty PasswordProperty = + DependencyProperty.Register("Password", typeof(String), typeof(LoginView), new PropertyMetadata(null)); + + public void OnTransitionCompleted() + { + txtEmail.Focus(); + + if (txtEmail.Text.IsNotNullOrWhiteSpace()) + { + txtPass.Focus(); + } + + txtPass.Password = cryptographer.Decrypt(SettingsManager.Default.MachineStudio.LastLoginPassword); + } + + private void txtPass_PasswordChanged(object sender, RoutedEventArgs e) + { + Password = txtPass.Password; } } } 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 98b6ecb73..cb7378666 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml @@ -3,36 +3,78 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:dockablz="clr-namespace:Dragablz.Dockablz;assembly=Dragablz" xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views;assembly=Tango.MachineStudio.DB" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" d:DesignHeight="720" d:DesignWidth="1270" Background="White" DataContext="{Binding MainViewVM, Source={StaticResource Locator}}"> + + + + - - + + - - User Name + + - - - Item 2 - Item 3 - Item 4 - Item 5 + + + + + + + + + + Home + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml index 20329ef25..487dfe1f8 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ShutdownView.xaml @@ -3,10 +3,21 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" DataContext="{Binding ShutdownViewVM, Source={StaticResource Locator}}"> + d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" Background="White" DataContext="{Binding ShutdownViewVM, Source={StaticResource Locator}}"> - + + + + + Machine Studio + + Twine Solutions + + Shutting Down, please wait... + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config index 2da000205..3a7265a72 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/packages.config @@ -9,4 +9,5 @@ + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Class.cs b/Software/Visual_Studio/Tango.CodeGeneration/Class.cs index 087f07916..45a32ae3e 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Class.cs +++ b/Software/Visual_Studio/Tango.CodeGeneration/Class.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace Tango.CodeGeneration { - public class Class : CodeObject + public class Class : CodeObject { /// /// Gets or sets the class name. diff --git a/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFileJava.cs b/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFileJava.cs new file mode 100644 index 000000000..d2bfd80fc --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/EntityCodeFileJava.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.CodeGeneration +{ + public class EntityCodeFileJava : Class + { + public String EntityName { get; set; } + + public String TableName { get; set; } + + public List Fields { get; set; } + + public EntityCodeFileJava(String name) : base(name) + { + Fields = new List(); + } + } +} diff --git a/Software/Visual_Studio/Tango.CodeGeneration/EnumerationFileJava.cs b/Software/Visual_Studio/Tango.CodeGeneration/EnumerationFileJava.cs new file mode 100644 index 000000000..6a42326f7 --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/EnumerationFileJava.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.CodeGeneration +{ + public class EnumerationFileJava : CodeFile + { + public String Name { get; set; } + + public List Fields { get; set; } + + public EnumerationFileJava() + { + Fields = new List(); + } + } +} diff --git a/Software/Visual_Studio/Tango.CodeGeneration/ObservablesAdapterFile.cs b/Software/Visual_Studio/Tango.CodeGeneration/ObservablesAdapterFile.cs new file mode 100644 index 000000000..7b1e3d8fe --- /dev/null +++ b/Software/Visual_Studio/Tango.CodeGeneration/ObservablesAdapterFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.CodeGeneration +{ + public class ObservablesAdapterFile : Class + { + + } +} diff --git a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj index e2cc941e7..1c491813a 100644 --- a/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj +++ b/Software/Visual_Studio/Tango.CodeGeneration/Tango.CodeGeneration.csproj @@ -64,8 +64,11 @@ + + + @@ -73,6 +76,7 @@ + @@ -96,6 +100,10 @@ + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorBlendConverter.cs b/Software/Visual_Studio/Tango.ColorPicker/ColorBlendConverter.cs new file mode 100644 index 000000000..3e61fea36 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorBlendConverter.cs @@ -0,0 +1,82 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System; +using System.Windows.Data; +using System.Windows.Media; + +namespace Tango.ColorPicker.Core.Converters +{ + /// + /// This converter allow to blend two colors into one based on a specified ratio + /// + internal class ColorBlendConverter : IValueConverter + { + private double _blendedColorRatio = 0; + + /// + /// The ratio of the blended color. Must be between 0 and 1. + /// + public double BlendedColorRatio + { + get { return _blendedColorRatio; } + + set + { + if (value < 0d || value > 1d) + throw new ArgumentException("BlendedColorRatio must greater than or equal to 0 and lower than or equal to 1 "); + + _blendedColorRatio = value; + } + } + + /// + /// The color to blend with the source color + /// + public Color BlendedColor { get; set; } + + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if (value == null || value.GetType() != typeof(Color)) + return null; + + Color color = (Color)value; + return new Color() + { + A = this.BlendValue(color.A, this.BlendedColor.A), + R = this.BlendValue(color.R, this.BlendedColor.R), + G = this.BlendValue(color.G, this.BlendedColor.G), + B = this.BlendValue(color.B, this.BlendedColor.B) + }; + } + + private byte BlendValue(byte original, byte blend) + { + double blendRatio = this.BlendedColorRatio; + double sourceRatio = 1 - blendRatio; + + double result = (((double)original) * sourceRatio) + (((double)blend) * blendRatio); + result = Math.Round(result); + result = Math.Min(255d, Math.Max(0d, result)); + return System.Convert.ToByte(result); + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorCanvas.cs b/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorCanvas.cs new file mode 100644 index 000000000..da7176f61 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorCanvas.cs @@ -0,0 +1,602 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Input; +using System.Windows.Media; +using Tango.ColorPicker.Core.Utilities; +using Tango.ColorPicker.Primitives; +using System.IO; +using System; + +namespace Tango +{ + [TemplatePart( Name = PART_ColorShadingCanvas, Type = typeof( Canvas ) )] + [TemplatePart( Name = PART_ColorShadeSelector, Type = typeof( Canvas ) )] + [TemplatePart( Name = PART_SpectrumSlider, Type = typeof( ColorSpectrumSlider ) )] + [TemplatePart( Name = PART_HexadecimalTextBox, Type = typeof( TextBox ) )] + internal class ColorCanvas : Control + { + private const string PART_ColorShadingCanvas = "PART_ColorShadingCanvas"; + private const string PART_ColorShadeSelector = "PART_ColorShadeSelector"; + private const string PART_SpectrumSlider = "PART_SpectrumSlider"; + private const string PART_HexadecimalTextBox = "PART_HexadecimalTextBox"; + + #region Private Members + + private TranslateTransform _colorShadeSelectorTransform = new TranslateTransform(); + private Canvas _colorShadingCanvas; + private Canvas _colorShadeSelector; + private ColorSpectrumSlider _spectrumSlider; + private TextBox _hexadecimalTextBox; + private Point? _currentColorPosition; + private bool _surpressPropertyChanged; + private bool _updateSpectrumSliderValue = true; + + #endregion //Private Members + + #region Properties + + #region SelectedColor + + public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register( "SelectedColor", typeof( Color? ), typeof( ColorCanvas ), new FrameworkPropertyMetadata( null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, OnSelectedColorChanged ) ); + public Color? SelectedColor + { + get + { + return ( Color? )GetValue( SelectedColorProperty ); + } + set + { + SetValue( SelectedColorProperty, value ); + } + } + + private static void OnSelectedColorChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + ColorCanvas colorCanvas = o as ColorCanvas; + if( colorCanvas != null ) + colorCanvas.OnSelectedColorChanged( ( Color? )e.OldValue, ( Color? )e.NewValue ); + } + + protected virtual void OnSelectedColorChanged( Color? oldValue, Color? newValue ) + { + SetHexadecimalStringProperty( GetFormatedColorString( newValue ), false ); + UpdateRGBValues( newValue ); + UpdateColorShadeSelectorPosition( newValue ); + + RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs( oldValue, newValue ); + args.RoutedEvent = SelectedColorChangedEvent; + RaiseEvent( args ); + } + + #endregion //SelectedColor + + #region RGB + + #region A + + public static readonly DependencyProperty AProperty = DependencyProperty.Register( "A", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )255, OnAChanged ) ); + public byte A + { + get + { + return ( byte )GetValue( AProperty ); + } + set + { + SetValue( AProperty, value ); + } + } + + private static void OnAChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + ColorCanvas colorCanvas = o as ColorCanvas; + if( colorCanvas != null ) + colorCanvas.OnAChanged( ( byte )e.OldValue, ( byte )e.NewValue ); + } + + protected virtual void OnAChanged( byte oldValue, byte newValue ) + { + if( !_surpressPropertyChanged ) + UpdateSelectedColor(); + } + + #endregion //A + + #region R + + public static readonly DependencyProperty RProperty = DependencyProperty.Register( "R", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )0, OnRChanged ) ); + public byte R + { + get + { + return ( byte )GetValue( RProperty ); + } + set + { + SetValue( RProperty, value ); + } + } + + private static void OnRChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + ColorCanvas colorCanvas = o as ColorCanvas; + if( colorCanvas != null ) + colorCanvas.OnRChanged( ( byte )e.OldValue, ( byte )e.NewValue ); + } + + protected virtual void OnRChanged( byte oldValue, byte newValue ) + { + if( !_surpressPropertyChanged ) + UpdateSelectedColor(); + } + + #endregion //R + + #region G + + public static readonly DependencyProperty GProperty = DependencyProperty.Register( "G", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )0, OnGChanged ) ); + public byte G + { + get + { + return ( byte )GetValue( GProperty ); + } + set + { + SetValue( GProperty, value ); + } + } + + private static void OnGChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + ColorCanvas colorCanvas = o as ColorCanvas; + if( colorCanvas != null ) + colorCanvas.OnGChanged( ( byte )e.OldValue, ( byte )e.NewValue ); + } + + protected virtual void OnGChanged( byte oldValue, byte newValue ) + { + if( !_surpressPropertyChanged ) + UpdateSelectedColor(); + } + + #endregion //G + + #region B + + public static readonly DependencyProperty BProperty = DependencyProperty.Register( "B", typeof( byte ), typeof( ColorCanvas ), new UIPropertyMetadata( ( byte )0, OnBChanged ) ); + public byte B + { + get + { + return ( byte )GetValue( BProperty ); + } + set + { + SetValue( BProperty, value ); + } + } + + private static void OnBChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + ColorCanvas colorCanvas = o as ColorCanvas; + if( colorCanvas != null ) + colorCanvas.OnBChanged( ( byte )e.OldValue, ( byte )e.NewValue ); + } + + protected virtual void OnBChanged( byte oldValue, byte newValue ) + { + if( !_surpressPropertyChanged ) + UpdateSelectedColor(); + } + + #endregion //B + + #endregion //RGB + + #region HexadecimalString + + public static readonly DependencyProperty HexadecimalStringProperty = DependencyProperty.Register( "HexadecimalString", typeof( string ), typeof( ColorCanvas ), new UIPropertyMetadata( "", OnHexadecimalStringChanged, OnCoerceHexadecimalString ) ); + public string HexadecimalString + { + get + { + return ( string )GetValue( HexadecimalStringProperty ); + } + set + { + SetValue( HexadecimalStringProperty, value ); + } + } + + private static void OnHexadecimalStringChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + ColorCanvas colorCanvas = o as ColorCanvas; + if( colorCanvas != null ) + colorCanvas.OnHexadecimalStringChanged( ( string )e.OldValue, ( string )e.NewValue ); + } + + protected virtual void OnHexadecimalStringChanged( string oldValue, string newValue ) + { + string newColorString = GetFormatedColorString( newValue ); + string currentColorString = GetFormatedColorString( SelectedColor ); + if( !currentColorString.Equals( newColorString ) ) + { + Color? col = null; + if( !string.IsNullOrEmpty( newColorString ) ) + { + col = ( Color )ColorConverter.ConvertFromString( newColorString ); + } + UpdateSelectedColor( col ); + } + + SetHexadecimalTextBoxTextProperty( newValue ); + } + + private static object OnCoerceHexadecimalString( DependencyObject d, object basevalue ) + { + var colorCanvas = ( ColorCanvas )d; + if( colorCanvas == null ) + return basevalue; + + return colorCanvas.OnCoerceHexadecimalString( basevalue ); + } + + private object OnCoerceHexadecimalString( object newValue ) + { + var value = newValue as string; + string retValue = value; + + try + { + if( !string.IsNullOrEmpty( retValue ) ) + { + ColorConverter.ConvertFromString( value ); + } + } + catch + { + //When HexadecimalString is changed via Code-Behind and hexadecimal format is bad, throw. + throw new InvalidDataException( "Color provided is not in the correct format." ); + } + + return retValue; + } + + #endregion //HexadecimalString + + #region UsingAlphaChannel + + public static readonly DependencyProperty UsingAlphaChannelProperty = DependencyProperty.Register( "UsingAlphaChannel", typeof( bool ), typeof( ColorCanvas ), new FrameworkPropertyMetadata( true, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback( OnUsingAlphaChannelPropertyChanged ) ) ); + public bool UsingAlphaChannel + { + get + { + return ( bool )GetValue( UsingAlphaChannelProperty ); + } + set + { + SetValue( UsingAlphaChannelProperty, value ); + } + } + + private static void OnUsingAlphaChannelPropertyChanged( DependencyObject o, DependencyPropertyChangedEventArgs e ) + { + ColorCanvas colorCanvas = o as ColorCanvas; + if( colorCanvas != null ) + colorCanvas.OnUsingAlphaChannelChanged(); + } + + protected virtual void OnUsingAlphaChannelChanged() + { + SetHexadecimalStringProperty( GetFormatedColorString( SelectedColor ), false ); + } + + #endregion //UsingAlphaChannel + + #endregion //Properties + + #region Constructors + + static ColorCanvas() + { + DefaultStyleKeyProperty.OverrideMetadata( typeof( ColorCanvas ), new FrameworkPropertyMetadata( typeof( ColorCanvas ) ) ); + } + + #endregion //Constructors + + #region Base Class Overrides + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + if( _colorShadingCanvas != null ) + { + _colorShadingCanvas.MouseLeftButtonDown -= ColorShadingCanvas_MouseLeftButtonDown; + _colorShadingCanvas.MouseLeftButtonUp -= ColorShadingCanvas_MouseLeftButtonUp; + _colorShadingCanvas.MouseMove -= ColorShadingCanvas_MouseMove; + _colorShadingCanvas.SizeChanged -= ColorShadingCanvas_SizeChanged; + } + + _colorShadingCanvas = GetTemplateChild( PART_ColorShadingCanvas ) as Canvas; + + if( _colorShadingCanvas != null ) + { + _colorShadingCanvas.MouseLeftButtonDown += ColorShadingCanvas_MouseLeftButtonDown; + _colorShadingCanvas.MouseLeftButtonUp += ColorShadingCanvas_MouseLeftButtonUp; + _colorShadingCanvas.MouseMove += ColorShadingCanvas_MouseMove; + _colorShadingCanvas.SizeChanged += ColorShadingCanvas_SizeChanged; + } + + _colorShadeSelector = GetTemplateChild( PART_ColorShadeSelector ) as Canvas; + + if( _colorShadeSelector != null ) + _colorShadeSelector.RenderTransform = _colorShadeSelectorTransform; + + if( _spectrumSlider != null ) + _spectrumSlider.ValueChanged -= SpectrumSlider_ValueChanged; + + _spectrumSlider = GetTemplateChild( PART_SpectrumSlider ) as ColorSpectrumSlider; + + if( _spectrumSlider != null ) + _spectrumSlider.ValueChanged += SpectrumSlider_ValueChanged; + + if( _hexadecimalTextBox != null ) + _hexadecimalTextBox.LostFocus -= new RoutedEventHandler( HexadecimalTextBox_LostFocus ); + + _hexadecimalTextBox = GetTemplateChild( PART_HexadecimalTextBox ) as TextBox; + + if( _hexadecimalTextBox != null ) + _hexadecimalTextBox.LostFocus += new RoutedEventHandler( HexadecimalTextBox_LostFocus ); + + UpdateRGBValues( SelectedColor ); + UpdateColorShadeSelectorPosition( SelectedColor ); + + // When changing theme, HexadecimalString needs to be set since it is not binded. + SetHexadecimalTextBoxTextProperty( GetFormatedColorString( SelectedColor ) ); + } + + protected override void OnKeyDown( KeyEventArgs e ) + { + base.OnKeyDown( e ); + + //hitting enter on textbox will update Hexadecimal string + if( e.Key == Key.Enter && e.OriginalSource is TextBox ) + { + TextBox textBox = ( TextBox )e.OriginalSource; + if( textBox.Name == PART_HexadecimalTextBox ) + SetHexadecimalStringProperty( textBox.Text, true ); + } + } + + #endregion //Base Class Overrides + + #region Event Handlers + + void ColorShadingCanvas_MouseLeftButtonDown( object sender, MouseButtonEventArgs e ) + { + Point p = e.GetPosition( _colorShadingCanvas ); + UpdateColorShadeSelectorPositionAndCalculateColor( p, true ); + _colorShadingCanvas.CaptureMouse(); + //Prevent from closing ColorCanvas after mouseDown in ListView + e.Handled = true; + } + + void ColorShadingCanvas_MouseLeftButtonUp( object sender, MouseButtonEventArgs e ) + { + _colorShadingCanvas.ReleaseMouseCapture(); + } + + void ColorShadingCanvas_MouseMove( object sender, MouseEventArgs e ) + { + if( e.LeftButton == MouseButtonState.Pressed ) + { + Point p = e.GetPosition( _colorShadingCanvas ); + UpdateColorShadeSelectorPositionAndCalculateColor( p, true ); + Mouse.Synchronize(); + } + } + + void ColorShadingCanvas_SizeChanged( object sender, SizeChangedEventArgs e ) + { + if( _currentColorPosition != null ) + { + Point _newPoint = new Point + { + X = ( ( Point )_currentColorPosition ).X * e.NewSize.Width, + Y = ( ( Point )_currentColorPosition ).Y * e.NewSize.Height + }; + + UpdateColorShadeSelectorPositionAndCalculateColor( _newPoint, false ); + } + } + + void SpectrumSlider_ValueChanged( object sender, RoutedPropertyChangedEventArgs e ) + { + if( (_currentColorPosition != null) && (this.SelectedColor != null) ) + { + CalculateColor( ( Point )_currentColorPosition ); + } + } + + void HexadecimalTextBox_LostFocus( object sender, RoutedEventArgs e ) + { + TextBox textbox = sender as TextBox; + SetHexadecimalStringProperty( textbox.Text, true ); + } + + #endregion //Event Handlers + + #region Events + + public static readonly RoutedEvent SelectedColorChangedEvent = EventManager.RegisterRoutedEvent( "SelectedColorChanged", RoutingStrategy.Bubble, typeof( RoutedPropertyChangedEventHandler ), typeof( ColorCanvas ) ); + public event RoutedPropertyChangedEventHandler SelectedColorChanged + { + add + { + AddHandler( SelectedColorChangedEvent, value ); + } + remove + { + RemoveHandler( SelectedColorChangedEvent, value ); + } + } + + #endregion //Events + + #region Methods + + private void UpdateSelectedColor() + { + SelectedColor = Color.FromArgb( A, R, G, B ); + } + + private void UpdateSelectedColor( Color? color ) + { + SelectedColor = ( ( color != null ) && color.HasValue ) + ? (Color?)Color.FromArgb( color.Value.A, color.Value.R, color.Value.G, color.Value.B ) + : null; + } + + private void UpdateRGBValues( Color? color ) + { + if( ( color == null ) || !color.HasValue ) + return; + + _surpressPropertyChanged = true; + + A = color.Value.A; + R = color.Value.R; + G = color.Value.G; + B = color.Value.B; + + _surpressPropertyChanged = false; + } + + private void UpdateColorShadeSelectorPositionAndCalculateColor( Point p, bool calculateColor ) + { + if( p.Y < 0 ) + p.Y = 0; + + if( p.X < 0 ) + p.X = 0; + + if( p.X > _colorShadingCanvas.ActualWidth ) + p.X = _colorShadingCanvas.ActualWidth; + + if( p.Y > _colorShadingCanvas.ActualHeight ) + p.Y = _colorShadingCanvas.ActualHeight; + + _colorShadeSelectorTransform.X = p.X - ( _colorShadeSelector.Width / 2 ); + _colorShadeSelectorTransform.Y = p.Y - ( _colorShadeSelector.Height / 2 ); + + p.X = p.X / _colorShadingCanvas.ActualWidth; + p.Y = p.Y / _colorShadingCanvas.ActualHeight; + + _currentColorPosition = p; + + if( calculateColor ) + CalculateColor( p ); + } + + private void UpdateColorShadeSelectorPosition( Color? color ) + { + if( (_spectrumSlider == null) || (_colorShadingCanvas == null) || (color == null) || !color.HasValue) + return; + + _currentColorPosition = null; + + HsvColor hsv = ColorUtilities.ConvertRgbToHsv( color.Value.R, color.Value.G, color.Value.B ); + + if( _updateSpectrumSliderValue ) + { + _spectrumSlider.Value = hsv.H; + } + + Point p = new Point( hsv.S, 1 - hsv.V ); + + _currentColorPosition = p; + + _colorShadeSelectorTransform.X = ( p.X * _colorShadingCanvas.Width ) - 5; + _colorShadeSelectorTransform.Y = ( p.Y * _colorShadingCanvas.Height ) - 5; + } + + private void CalculateColor( Point p ) + { + HsvColor hsv = new HsvColor( 360 - _spectrumSlider.Value, 1, 1 ) + { + S = p.X, + V = 1 - p.Y + }; + var currentColor = ColorUtilities.ConvertHsvToRgb( hsv.H, hsv.S, hsv.V ); + currentColor.A = A; + _updateSpectrumSliderValue = false; + SelectedColor = currentColor; + _updateSpectrumSliderValue = true; + SetHexadecimalStringProperty( GetFormatedColorString( SelectedColor ), false ); + } + + private string GetFormatedColorString( Color? colorToFormat ) + { + if( ( colorToFormat == null ) || !colorToFormat.HasValue ) + return string.Empty; + return ColorUtilities.FormatColorString( colorToFormat.ToString(), UsingAlphaChannel ); + } + + private string GetFormatedColorString( string stringToFormat ) + { + return ColorUtilities.FormatColorString( stringToFormat, UsingAlphaChannel ); + } + + private void SetHexadecimalStringProperty( string newValue, bool modifyFromUI ) + { + if( modifyFromUI ) + { + try + { + if( !string.IsNullOrEmpty( newValue ) ) + { + ColorConverter.ConvertFromString( newValue ); + } + HexadecimalString = newValue; + } + catch + { + //When HexadecimalString is changed via UI and hexadecimal format is bad, keep the previous HexadecimalString. + SetHexadecimalTextBoxTextProperty( HexadecimalString ); + } + } + else + { + //When HexadecimalString is changed via Code-Behind, hexadecimal format will be evaluated in OnCoerceHexadecimalString() + HexadecimalString = newValue; + } + } + + private void SetHexadecimalTextBoxTextProperty( string newValue ) + { + if( _hexadecimalTextBox != null ) + _hexadecimalTextBox.Text = newValue; + } + + #endregion //Methods + } +} diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorSpectrumSlider.cs b/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorSpectrumSlider.cs new file mode 100644 index 000000000..06233ba35 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Implementation/ColorSpectrumSlider.cs @@ -0,0 +1,111 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Shapes; +using Tango.ColorPicker.Core.Utilities; + +namespace Tango +{ + [TemplatePart( Name = PART_SpectrumDisplay, Type = typeof( Rectangle ) )] + internal class ColorSpectrumSlider : Slider + { + private const string PART_SpectrumDisplay = "PART_SpectrumDisplay"; + + #region Private Members + + private Rectangle _spectrumDisplay; + private LinearGradientBrush _pickerBrush; + + #endregion //Private Members + + #region Constructors + + static ColorSpectrumSlider() + { + DefaultStyleKeyProperty.OverrideMetadata( typeof( ColorSpectrumSlider ), new FrameworkPropertyMetadata( typeof( ColorSpectrumSlider ) ) ); + } + + #endregion //Constructors + + #region Dependency Properties + + public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register( "SelectedColor", typeof( Color ), typeof( ColorSpectrumSlider ), new PropertyMetadata( System.Windows.Media.Colors.Transparent ) ); + public Color SelectedColor + { + get + { + return ( Color )GetValue( SelectedColorProperty ); + } + set + { + SetValue( SelectedColorProperty, value ); + } + } + + #endregion //Dependency Properties + + #region Base Class Overrides + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + _spectrumDisplay = ( Rectangle )GetTemplateChild( PART_SpectrumDisplay ); + CreateSpectrum(); + OnValueChanged( Double.NaN, Value ); + } + + protected override void OnValueChanged( double oldValue, double newValue ) + { + base.OnValueChanged( oldValue, newValue ); + + Color color = ColorUtilities.ConvertHsvToRgb( 360 - newValue, 1, 1 ); + SelectedColor = color; + } + + #endregion //Base Class Overrides + + #region Methods + + private void CreateSpectrum() + { + _pickerBrush = new LinearGradientBrush(); + _pickerBrush.StartPoint = new Point( 0.5, 0 ); + _pickerBrush.EndPoint = new Point( 0.5, 1 ); + _pickerBrush.ColorInterpolationMode = ColorInterpolationMode.SRgbLinearInterpolation; + + List colorsList = ColorUtilities.GenerateHsvSpectrum(); + + double stopIncrement = ( double )1 / colorsList.Count; + + int i; + for( i = 0; i < colorsList.Count; i++ ) + { + _pickerBrush.GradientStops.Add( new GradientStop( colorsList[ i ], i * stopIncrement ) ); + } + + _pickerBrush.GradientStops[ i - 1 ].Offset = 1.0; + _spectrumDisplay.Fill = _pickerBrush; + } + + #endregion //Methods + } +} diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Themes/Generic.xaml b/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Themes/Generic.xaml new file mode 100644 index 000000000..a54e2f6a5 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorCanvas/Themes/Generic.xaml @@ -0,0 +1,602 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorItem.cs b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorItem.cs new file mode 100644 index 000000000..dbf1860f7 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorItem.cs @@ -0,0 +1,53 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System.Windows.Media; + +namespace Tango +{ + internal class ColorItem + { + public Color? Color + { + get; + set; + } + public string Name + { + get; + set; + } + + public ColorItem(Color? color, string name) + { + Color = color; + Name = name; + } + + public override bool Equals(object obj) + { + var ci = obj as ColorItem; + if (ci == null) + return false; + return (ci.Color.Equals(Color) && ci.Name.Equals(Name)); + } + + public override int GetHashCode() + { + return this.Color.GetHashCode() ^ this.Name.GetHashCode(); + } + } +} diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorPicker.cs b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorPicker.cs new file mode 100644 index 000000000..aff0ae661 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorPicker.cs @@ -0,0 +1,770 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System; +using System.Collections.ObjectModel; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Input; +using System.Windows.Media; +using Tango.ColorPicker.Core.Utilities; +using System.Windows.Controls.Primitives; +using System.Linq; +using System.Collections.Generic; +using System.Windows.Data; +using Tango.ColorPicker; + +namespace Tango +{ + internal enum ColorMode + { + ColorPalette, + ColorCanvas + } + + internal enum ColorSortingMode + { + Alphabetical, + HueSaturationBrightness + } + + [TemplatePart(Name = PART_AvailableColors, Type = typeof(ListBox))] + [TemplatePart(Name = PART_StandardColors, Type = typeof(ListBox))] + [TemplatePart(Name = PART_RecentColors, Type = typeof(ListBox))] + [TemplatePart(Name = PART_ColorPickerToggleButton, Type = typeof(ToggleButton))] + [TemplatePart(Name = PART_ColorPickerPalettePopup, Type = typeof(Popup))] + [TemplatePart(Name = PART_ColorModeButton, Type = typeof(Button))] + public class ColorPickerCombo : Control + { + private const string PART_AvailableColors = "PART_AvailableColors"; + private const string PART_StandardColors = "PART_StandardColors"; + private const string PART_RecentColors = "PART_RecentColors"; + private const string PART_ColorPickerToggleButton = "PART_ColorPickerToggleButton"; + private const string PART_ColorPickerPalettePopup = "PART_ColorPickerPalettePopup"; + private const string PART_ColorModeButton = "PART_ColorModeButton"; + + #region Members + + private ListBox _availableColors; + private ListBox _standardColors; + private ListBox _recentColors; + private ToggleButton _toggleButton; + private Popup _popup; + private Button _colorModeButton; + private Color? _initialColor; + private bool _selectionChanged; + + #endregion //Members + + #region Properties + + #region AdvancedButtonHeader + + public static readonly DependencyProperty AdvancedButtonHeaderProperty = DependencyProperty.Register("AdvancedButtonHeader", typeof(string), typeof(ColorPickerCombo), new UIPropertyMetadata("Advanced")); + public string AdvancedButtonHeader + { + get + { + return (string)GetValue(AdvancedButtonHeaderProperty); + } + set + { + SetValue(AdvancedButtonHeaderProperty, value); + } + } + + #endregion //AdvancedButtonHeader + + #region AvailableColors + + internal static readonly DependencyProperty AvailableColorsProperty = DependencyProperty.Register("AvailableColors", typeof(ObservableCollection), typeof(ColorPickerCombo), new UIPropertyMetadata(CreateAvailableColors())); + internal ObservableCollection AvailableColors + { + get + { + return (ObservableCollection)GetValue(AvailableColorsProperty); + } + set + { + SetValue(AvailableColorsProperty, value); + } + } + + #endregion //AvailableColors + + #region AvailableColorsSortingMode + + internal static readonly DependencyProperty AvailableColorsSortingModeProperty = DependencyProperty.Register("AvailableColorsSortingMode", typeof(ColorSortingMode), typeof(ColorPickerCombo), new UIPropertyMetadata(ColorSortingMode.Alphabetical, OnAvailableColorsSortingModeChanged)); + internal ColorSortingMode AvailableColorsSortingMode + { + get + { + return (ColorSortingMode)GetValue(AvailableColorsSortingModeProperty); + } + set + { + SetValue(AvailableColorsSortingModeProperty, value); + } + } + + private static void OnAvailableColorsSortingModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ColorPickerCombo colorPicker = (ColorPickerCombo)d; + if (colorPicker != null) + colorPicker.OnAvailableColorsSortingModeChanged((ColorSortingMode)e.OldValue, (ColorSortingMode)e.NewValue); + } + + private void OnAvailableColorsSortingModeChanged(ColorSortingMode oldValue, ColorSortingMode newValue) + { + ListCollectionView lcv = (ListCollectionView)(CollectionViewSource.GetDefaultView(this.AvailableColors)); + if (lcv != null) + { + lcv.CustomSort = (AvailableColorsSortingMode == ColorSortingMode.HueSaturationBrightness) + ? new ColorSorter() + : null; + } + } + + #endregion //AvailableColorsSortingMode + + #region AvailableColorsHeader + + public static readonly DependencyProperty AvailableColorsHeaderProperty = DependencyProperty.Register("AvailableColorsHeader", typeof(string), typeof(ColorPickerCombo), new UIPropertyMetadata("Available Colors")); + public string AvailableColorsHeader + { + get + { + return (string)GetValue(AvailableColorsHeaderProperty); + } + set + { + SetValue(AvailableColorsHeaderProperty, value); + } + } + + #endregion //AvailableColorsHeader + + #region ButtonStyle + + public static readonly DependencyProperty ButtonStyleProperty = DependencyProperty.Register("ButtonStyle", typeof(Style), typeof(ColorPickerCombo)); + public Style ButtonStyle + { + get + { + return (Style)GetValue(ButtonStyleProperty); + } + set + { + SetValue(ButtonStyleProperty, value); + } + } + + #endregion //ButtonStyle + + #region DisplayColorAndName + + public static readonly DependencyProperty DisplayColorAndNameProperty = DependencyProperty.Register("DisplayColorAndName", typeof(bool), typeof(ColorPickerCombo), new UIPropertyMetadata(false)); + public bool DisplayColorAndName + { + get + { + return (bool)GetValue(DisplayColorAndNameProperty); + } + set + { + SetValue(DisplayColorAndNameProperty, value); + } + } + + #endregion //DisplayColorAndName + + #region ColorMode + + internal static readonly DependencyProperty ColorModeProperty = DependencyProperty.Register("ColorMode", typeof(ColorMode), typeof(ColorPickerCombo), new UIPropertyMetadata(ColorMode.ColorPalette)); + internal ColorMode ColorMode + { + get + { + return (ColorMode)GetValue(ColorModeProperty); + } + set + { + SetValue(ColorModeProperty, value); + } + } + + #endregion //ColorMode + + #region IsOpen + + public static readonly DependencyProperty IsOpenProperty = DependencyProperty.Register("IsOpen", typeof(bool), typeof(ColorPickerCombo), new UIPropertyMetadata(false, OnIsOpenChanged)); + public bool IsOpen + { + get + { + return (bool)GetValue(IsOpenProperty); + } + set + { + SetValue(IsOpenProperty, value); + } + } + + private static void OnIsOpenChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ColorPickerCombo colorPicker = (ColorPickerCombo)d; + if (colorPicker != null) + colorPicker.OnIsOpenChanged((bool)e.OldValue, (bool)e.NewValue); + } + + private void OnIsOpenChanged(bool oldValue, bool newValue) + { + if (newValue) + { + _initialColor = this.SelectedColor; + } + RoutedEventArgs args = new RoutedEventArgs(newValue ? OpenedEvent : ClosedEvent, this); + this.RaiseEvent(args); + } + + #endregion //IsOpen + + #region RecentColors + + internal static readonly DependencyProperty RecentColorsProperty = DependencyProperty.Register("RecentColors", typeof(ObservableCollection), typeof(ColorPickerCombo), new UIPropertyMetadata(null)); + internal ObservableCollection RecentColors + { + get + { + return (ObservableCollection)GetValue(RecentColorsProperty); + } + set + { + SetValue(RecentColorsProperty, value); + } + } + + #endregion //RecentColors + + #region RecentColorsHeader + + public static readonly DependencyProperty RecentColorsHeaderProperty = DependencyProperty.Register("RecentColorsHeader", typeof(string), typeof(ColorPickerCombo), new UIPropertyMetadata("Recent Colors")); + public string RecentColorsHeader + { + get + { + return (string)GetValue(RecentColorsHeaderProperty); + } + set + { + SetValue(RecentColorsHeaderProperty, value); + } + } + + #endregion //RecentColorsHeader + + #region SelectedColor + + public static readonly DependencyProperty SelectedColorProperty = DependencyProperty.Register("SelectedColor", typeof(Color?), typeof(ColorPickerCombo), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(OnSelectedColorPropertyChanged))); + public Color? SelectedColor + { + get + { + return (Color?)GetValue(SelectedColorProperty); + } + set + { + SetValue(SelectedColorProperty, value); + } + } + + private static void OnSelectedColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ColorPickerCombo colorPicker = (ColorPickerCombo)d; + if (colorPicker != null) + colorPicker.OnSelectedColorChanged((Color?)e.OldValue, (Color?)e.NewValue); + } + + private void OnSelectedColorChanged(Color? oldValue, Color? newValue) + { + SelectedColorText = GetFormatedColorString(newValue); + + RoutedPropertyChangedEventArgs args = new RoutedPropertyChangedEventArgs(oldValue, newValue); + args.RoutedEvent = ColorPickerCombo.SelectedColorChangedEvent; + RaiseEvent(args); + } + + #endregion //SelectedColor + + #region SelectedColorText + + public static readonly DependencyProperty SelectedColorTextProperty = DependencyProperty.Register("SelectedColorText", typeof(string), typeof(ColorPickerCombo), new UIPropertyMetadata("")); + public string SelectedColorText + { + get + { + return (string)GetValue(SelectedColorTextProperty); + } + protected set + { + SetValue(SelectedColorTextProperty, value); + } + } + + #endregion //SelectedColorText + + #region ShowAdvancedButton + + public static readonly DependencyProperty ShowAdvancedButtonProperty = DependencyProperty.Register("ShowAdvancedButton", typeof(bool), typeof(ColorPickerCombo), new UIPropertyMetadata(true)); + public bool ShowAdvancedButton + { + get + { + return (bool)GetValue(ShowAdvancedButtonProperty); + } + set + { + SetValue(ShowAdvancedButtonProperty, value); + } + } + + #endregion //ShowAdvancedButton + + #region ShowAvailableColors + + public static readonly DependencyProperty ShowAvailableColorsProperty = DependencyProperty.Register("ShowAvailableColors", typeof(bool), typeof(ColorPickerCombo), new UIPropertyMetadata(true)); + public bool ShowAvailableColors + { + get + { + return (bool)GetValue(ShowAvailableColorsProperty); + } + set + { + SetValue(ShowAvailableColorsProperty, value); + } + } + + #endregion //ShowAvailableColors + + #region ShowRecentColors + + public static readonly DependencyProperty ShowRecentColorsProperty = DependencyProperty.Register("ShowRecentColors", typeof(bool), typeof(ColorPickerCombo), new UIPropertyMetadata(false)); + public bool ShowRecentColors + { + get + { + return (bool)GetValue(ShowRecentColorsProperty); + } + set + { + SetValue(ShowRecentColorsProperty, value); + } + } + + #endregion //DisplayRecentColors + + #region ShowStandardColors + + public static readonly DependencyProperty ShowStandardColorsProperty = DependencyProperty.Register("ShowStandardColors", typeof(bool), typeof(ColorPickerCombo), new UIPropertyMetadata(true)); + public bool ShowStandardColors + { + get + { + return (bool)GetValue(ShowStandardColorsProperty); + } + set + { + SetValue(ShowStandardColorsProperty, value); + } + } + + #endregion //DisplayStandardColors + + #region ShowDropDownButton + + public static readonly DependencyProperty ShowDropDownButtonProperty = DependencyProperty.Register("ShowDropDownButton", typeof(bool), typeof(ColorPickerCombo), new UIPropertyMetadata(true)); + public bool ShowDropDownButton + { + get + { + return (bool)GetValue(ShowDropDownButtonProperty); + } + set + { + SetValue(ShowDropDownButtonProperty, value); + } + } + + #endregion //ShowDropDownButton + + #region StandardButtonHeader + + public static readonly DependencyProperty StandardButtonHeaderProperty = DependencyProperty.Register("StandardButtonHeader", typeof(string), typeof(ColorPickerCombo), new UIPropertyMetadata("Standard")); + public string StandardButtonHeader + { + get + { + return (string)GetValue(StandardButtonHeaderProperty); + } + set + { + SetValue(StandardButtonHeaderProperty, value); + } + } + + #endregion //StandardButtonHeader + + #region StandardColors + + internal static readonly DependencyProperty StandardColorsProperty = DependencyProperty.Register("StandardColors", typeof(ObservableCollection), typeof(ColorPickerCombo), new UIPropertyMetadata(CreateStandardColors())); + internal ObservableCollection StandardColors + { + get + { + return (ObservableCollection)GetValue(StandardColorsProperty); + } + set + { + SetValue(StandardColorsProperty, value); + } + } + + #endregion //StandardColors + + #region StandardColorsHeader + + public static readonly DependencyProperty StandardColorsHeaderProperty = DependencyProperty.Register("StandardColorsHeader", typeof(string), typeof(ColorPickerCombo), new UIPropertyMetadata("Standard Colors")); + public string StandardColorsHeader + { + get + { + return (string)GetValue(StandardColorsHeaderProperty); + } + set + { + SetValue(StandardColorsHeaderProperty, value); + } + } + + #endregion //StandardColorsHeader + + #region UsingAlphaChannel + + public static readonly DependencyProperty UsingAlphaChannelProperty = DependencyProperty.Register("UsingAlphaChannel", typeof(bool), typeof(ColorPickerCombo), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, new PropertyChangedCallback(OnUsingAlphaChannelPropertyChanged))); + public bool UsingAlphaChannel + { + get + { + return (bool)GetValue(UsingAlphaChannelProperty); + } + set + { + SetValue(UsingAlphaChannelProperty, value); + } + } + + private static void OnUsingAlphaChannelPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ColorPickerCombo colorPicker = (ColorPickerCombo)d; + if (colorPicker != null) + colorPicker.OnUsingAlphaChannelChanged(); + } + + private void OnUsingAlphaChannelChanged() + { + SelectedColorText = GetFormatedColorString(SelectedColor); + } + + #endregion //UsingAlphaChannel + + #endregion //Properties + + #region Constructors + + static ColorPickerCombo() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorPickerCombo), new FrameworkPropertyMetadata(typeof(ColorPickerCombo))); + } + + public ColorPickerCombo() + { +#if VS2008 + this.RecentColors = new ObservableCollection(); +#else + this.SetCurrentValue(ColorPickerCombo.RecentColorsProperty, new ObservableCollection()); +#endif + + Keyboard.AddKeyDownHandler(this, OnKeyDown); + Mouse.AddPreviewMouseDownOutsideCapturedElementHandler(this, OnMouseDownOutsideCapturedElement); + } + + #endregion //Constructors + + #region Base Class Overrides + + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + if (_availableColors != null) + _availableColors.SelectionChanged -= Color_SelectionChanged; + + _availableColors = GetTemplateChild(PART_AvailableColors) as ListBox; + if (_availableColors != null) + _availableColors.SelectionChanged += Color_SelectionChanged; + + if (_standardColors != null) + _standardColors.SelectionChanged -= Color_SelectionChanged; + + _standardColors = GetTemplateChild(PART_StandardColors) as ListBox; + if (_standardColors != null) + _standardColors.SelectionChanged += Color_SelectionChanged; + + if (_recentColors != null) + _recentColors.SelectionChanged -= Color_SelectionChanged; + + _recentColors = GetTemplateChild(PART_RecentColors) as ListBox; + if (_recentColors != null) + _recentColors.SelectionChanged += Color_SelectionChanged; + + if (_popup != null) + _popup.Opened -= Popup_Opened; + + _popup = GetTemplateChild(PART_ColorPickerPalettePopup) as Popup; + if (_popup != null) + _popup.Opened += Popup_Opened; + + _toggleButton = this.Template.FindName(PART_ColorPickerToggleButton, this) as ToggleButton; + + if (_colorModeButton != null) + _colorModeButton.Click -= new RoutedEventHandler(this.ColorModeButton_Clicked); + + _colorModeButton = this.Template.FindName(PART_ColorModeButton, this) as Button; + + if (_colorModeButton != null) + _colorModeButton.Click += new RoutedEventHandler(this.ColorModeButton_Clicked); + } + + protected override void OnMouseUp(MouseButtonEventArgs e) + { + base.OnMouseUp(e); + + // Close ColorPicker on MouseUp to prevent action of mouseUp on controls behind the ColorPicker. + if (_selectionChanged) + { + CloseColorPicker(true); + _selectionChanged = false; + } + } + + #endregion //Base Class Overrides + + #region Event Handlers + + private void OnKeyDown(object sender, KeyEventArgs e) + { + if (!IsOpen) + { + if (KeyboardUtilities.IsKeyModifyingPopupState(e)) + { + IsOpen = true; + // Focus will be on ListBoxItem in Popup_Opened(). + e.Handled = true; + } + } + else + { + if (KeyboardUtilities.IsKeyModifyingPopupState(e)) + { + CloseColorPicker(true); + e.Handled = true; + } + else if (e.Key == Key.Escape) + { + this.SelectedColor = _initialColor; + CloseColorPicker(true); + e.Handled = true; + } + } + } + + private void OnMouseDownOutsideCapturedElement(object sender, MouseButtonEventArgs e) + { + CloseColorPicker(true); + } + + private void Color_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + ListBox lb = (ListBox)sender; + + if (e.AddedItems.Count > 0) + { + var colorItem = (ColorItem)e.AddedItems[0]; + SelectedColor = colorItem.Color; + UpdateRecentColors(colorItem); + _selectionChanged = true; + lb.SelectedIndex = -1; //for now I don't care about keeping track of the selected color + } + } + + private void Popup_Opened(object sender, EventArgs e) + { + if ((_availableColors != null) && ShowAvailableColors) + FocusOnListBoxItem(_availableColors); + else if ((_standardColors != null) && ShowStandardColors) + FocusOnListBoxItem(_standardColors); + else if ((_recentColors != null) && ShowRecentColors) + FocusOnListBoxItem(_recentColors); + } + + private void FocusOnListBoxItem(ListBox listBox) + { + ListBoxItem listBoxItem = (ListBoxItem)listBox.ItemContainerGenerator.ContainerFromItem(listBox.SelectedItem); + if ((listBoxItem == null) && (listBox.Items.Count > 0)) + listBoxItem = (ListBoxItem)listBox.ItemContainerGenerator.ContainerFromItem(listBox.Items[0]); + if (listBoxItem != null) + listBoxItem.Focus(); + } + + private void ColorModeButton_Clicked(object sender, RoutedEventArgs e) + { + this.ColorMode = (this.ColorMode == ColorMode.ColorPalette) ? ColorMode.ColorCanvas : ColorMode.ColorPalette; + } + + #endregion //Event Handlers + + #region Events + + #region SelectedColorChangedEvent + + public static readonly RoutedEvent SelectedColorChangedEvent = EventManager.RegisterRoutedEvent("SelectedColorChanged", RoutingStrategy.Bubble, typeof(RoutedPropertyChangedEventHandler), typeof(ColorPickerCombo)); + public event RoutedPropertyChangedEventHandler SelectedColorChanged + { + add + { + AddHandler(SelectedColorChangedEvent, value); + } + remove + { + RemoveHandler(SelectedColorChangedEvent, value); + } + } + + #endregion + + #region OpenedEvent + + public static readonly RoutedEvent OpenedEvent = EventManager.RegisterRoutedEvent("OpenedEvent", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(ColorPickerCombo)); + public event RoutedEventHandler Opened + { + add + { + AddHandler(OpenedEvent, value); + } + remove + { + RemoveHandler(OpenedEvent, value); + } + } + + #endregion //OpenedEvent + + #region ClosedEvent + + public static readonly RoutedEvent ClosedEvent = EventManager.RegisterRoutedEvent("ClosedEvent", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(ColorPickerCombo)); + public event RoutedEventHandler Closed + { + add + { + AddHandler(ClosedEvent, value); + } + remove + { + RemoveHandler(ClosedEvent, value); + } + } + + #endregion //ClosedEvent + + #endregion //Events + + #region Methods + + private void CloseColorPicker(bool isFocusOnColorPicker) + { + if (IsOpen) + IsOpen = false; + ReleaseMouseCapture(); + + if (isFocusOnColorPicker && (_toggleButton != null)) + _toggleButton.Focus(); + this.UpdateRecentColors(new ColorItem(SelectedColor, SelectedColorText)); + } + + private void UpdateRecentColors(ColorItem colorItem) + { + if (!RecentColors.Contains(colorItem)) + RecentColors.Add(colorItem); + + if (RecentColors.Count > 10) //don't allow more than ten, maybe make a property that can be set by the user. + RecentColors.RemoveAt(0); + } + + private string GetFormatedColorString(Color? colorToFormat) + { + if ((colorToFormat == null) || !colorToFormat.HasValue) + return string.Empty; + + return ColorUtilities.FormatColorString(colorToFormat.Value.GetColorName(), UsingAlphaChannel); + } + + private static ObservableCollection CreateStandardColors() + { + ObservableCollection _standardColors = new ObservableCollection(); + _standardColors.Add(new ColorItem(Colors.Transparent, "Transparent")); + _standardColors.Add(new ColorItem(Colors.White, "White")); + _standardColors.Add(new ColorItem(Colors.Gray, "Gray")); + _standardColors.Add(new ColorItem(Colors.Black, "Black")); + _standardColors.Add(new ColorItem(Colors.Red, "Red")); + _standardColors.Add(new ColorItem(Colors.Green, "Green")); + _standardColors.Add(new ColorItem(Colors.Blue, "Blue")); + _standardColors.Add(new ColorItem(Colors.Yellow, "Yellow")); + _standardColors.Add(new ColorItem(Colors.Orange, "Orange")); + _standardColors.Add(new ColorItem(Colors.Purple, "Purple")); + return _standardColors; + } + + private static ObservableCollection CreateAvailableColors() + { + ObservableCollection _standardColors = new ObservableCollection(); + + foreach (var item in ColorUtilities.KnownColors) + { + if (!String.Equals(item.Key, "Transparent")) + { + var colorItem = new ColorItem(item.Value, item.Key); + if (!_standardColors.Contains(colorItem)) + _standardColors.Add(colorItem); + } + } + + return _standardColors; + } + + #endregion //Methods + } +} diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorSorter.cs b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorSorter.cs new file mode 100644 index 000000000..fa33faa55 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Implementation/ColorSorter.cs @@ -0,0 +1,77 @@ +/************************************************************************************* + + Extended WPF Toolkit + + Copyright (C) 2007-2013 Xceed Software Inc. + + This program is provided to you under the terms of the Microsoft Public + License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license + + For more features, controls, and fast professional support, + pick up the Plus Edition at http://xceed.com/wpf_toolkit + + Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids + + ***********************************************************************************/ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Media; + +namespace Tango.ColorPicker +{ + internal class ColorSorter : IComparer + { + public int Compare( object firstItem, object secondItem ) + { + if( firstItem == null || secondItem == null ) + return -1; + + ColorItem colorItem1 = ( ColorItem )firstItem; + ColorItem colorItem2 = ( ColorItem )secondItem; + + if( (colorItem1.Color == null) || !colorItem1.Color.HasValue || + (colorItem2.Color == null) || !colorItem2.Color.HasValue ) + return -1; + + System.Drawing.Color drawingColor1 = System.Drawing.Color.FromArgb( colorItem1.Color.Value.A, colorItem1.Color.Value.R, colorItem1.Color.Value.G, colorItem1.Color.Value.B ); + System.Drawing.Color drawingColor2 = System.Drawing.Color.FromArgb( colorItem2.Color.Value.A, colorItem2.Color.Value.R, colorItem2.Color.Value.G, colorItem2.Color.Value.B ); + + // Compare Hue + double hueColor1 = Math.Round( ( double )drawingColor1.GetHue(), 3 ); + double hueColor2 = Math.Round( ( double )drawingColor2.GetHue(), 3 ); + + if( hueColor1 > hueColor2 ) + return 1; + else if( hueColor1 < hueColor2 ) + return -1; + else + { + // Hue is equal, compare Saturation + double satColor1 = Math.Round( ( double )drawingColor1.GetSaturation(), 3 ); + double satColor2 = Math.Round( ( double )drawingColor2.GetSaturation(), 3 ); + + if( satColor1 > satColor2 ) + return 1; + else if( satColor1 < satColor2 ) + return -1; + else + { + // Saturation is equal, compare Brightness + double brightColor1 = Math.Round( ( double )drawingColor1.GetBrightness(), 3 ); + double brightColor2 = Math.Round( ( double )drawingColor2.GetBrightness(), 3 ); + + if( brightColor1 > brightColor2 ) + return 1; + else if( brightColor1 < brightColor2 ) + return -1; + } + } + + return 0; + } + } +} diff --git a/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Themes/Generic.xaml b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Themes/Generic.xaml new file mode 100644 index 000000000..996da3308 --- /dev/null +++ b/Software/Visual_Studio/Tango.ColorPicker/ColorPicker/Themes/Generic.xaml @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +