aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs
blob: 2e2b1a0147dc077c191ffdcc8762993f6c35415e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Tango.Core.Helpers;
using Tango.BL.Entities;
using Tango.Logging;
using Tango.MachineStudio.UI.Windows;
using Tango.Settings;
using Tango.MachineStudio.Common.EventLogging;
using Tango.BL.Enumerations;
using Tango.Core.DI;
using Tango.MachineStudio.UI.TFS;
using Tango.TFS;
using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.UI.ViewModels;
using Tango.MachineStudio.UI.Views;
using Tango.MachineStudio.Common;
using Tango.Core;
using Tango.BL;

namespace Tango.MachineStudio.UI
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private WpfGlobalExceptionTrapper exceptionTrapper;
        private LogManager LogManager = LogManager.Default;

        protected override void OnStartup(StartupEventArgs e)
        {


#if DEBUG
            CoreSettings.DefaultDataSource = new DataSource()
            {
                Address = "localhost\\SQLEXPRESS",
                Catalog = "Tango",
                IntegratedSecurity = true,
            };
#else

            CoreSettings.DefaultDataSource = new DataSource()
            {
                Address = "twine01\\SQLTWINE",
                Catalog = "Tango",
                IntegratedSecurity = true,
            };
#endif


#if DEBUG
            LogManager.RegisterLogger(new VSOutputLogger());
#endif
            LogManager.RegisterLogger(new FileLogger());

            LogManager.Log("Application Started...");

            LogManager.LogReferencedAssemblies();

            base.OnStartup(e);

            LogManager.Categories.Clear();

            var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();

            if (settings.LoggingCategories.Count == 0)
            {
                settings.LoggingCategories.Add(LogCategory.Critical);
                settings.LoggingCategories.Add(LogCategory.Error);
                settings.LoggingCategories.Add(LogCategory.Info);
                settings.LoggingCategories.Add(LogCategory.Warning);
            }

            LogManager.Categories.AddRange(settings.LoggingCategories);

            exceptionTrapper = new WpfGlobalExceptionTrapper();
            exceptionTrapper.Initialize(this);
            exceptionTrapper.ApplicationCrashed += ExceptionTrapper_ApplicationCrashed;

            //Apply Caching
            if (settings.CachingMode != ObservablesContextInMemoryCachingMode.None)
            {
                LogManager.Log("EF Caching is enabled.");
                LogManager.Log($"EF Caching mode is: {settings.CachingMode}.");
                LogManager.Log($"EF Caching timeout: {settings.MaximumCacheTime.ToString()}");
                try
                {
                    ObservablesContext.EnableInMemoryCache(settings.MaximumCacheTime, settings.CachingMode);
                }
                catch (Exception ex)
                {
                    LogManager.Log(ex, "Error while trying to activate EF caching.");
                }
            }
            else
            {
                LogManager.Log("EF Caching is disabled");
            }
        }

        #region Global Exception Trapping

        /// <summary>
        /// Handles the ApplicationCrashed event of the ExceptionTrapper.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="ApplicationCrashedEventArgs"/> instance containing the event data.</param>
        private void ExceptionTrapper_ApplicationCrashed(object sender, ApplicationCrashedEventArgs e)
        {
            try
            {
                try
                {
                    if (Application.Current == null)
                    {
                        new Application { ShutdownMode = ShutdownMode.OnExplicitShutdown };
                    }
                }
                catch { }

                try
                {
                    var eventLogger = TangoIOC.Default.GetInstance<IEventLogger>();
                    if (eventLogger != null)
                    {
                        eventLogger.Log(e.Exception, "Application Crashed!");
                    }
                }
                catch { }

                Application.Current.Dispatcher.Invoke(() =>
                {
                    WorkItem bug = null;
                    TeamFoundationServiceExtendedClient tfsClient = null;
                    INotificationProvider notification = null;

                    try
                    {
                        tfsClient = TangoIOC.Default.GetInstance<TeamFoundationServiceExtendedClient>();
                        notification = TangoIOC.Default.GetInstance<INotificationProvider>();

                        if (tfsClient != null && tfsClient.IsInitialized)
                        {
                            bug = tfsClient.CreateBug();
                        }
                    }
                    catch (Exception ex)
                    {
                        Debug.WriteLine(ex.ToString());
                    }

                    ExceptionWindow exWin = new ExceptionWindow(e.Exception, bug != null);
                    exWin.ShowDialog();

                    switch (exWin.Resolution)
                    {
                        case ExceptionResolutions.Ignore:
                            e.TryRecover = true;
                            break;
                        case ExceptionResolutions.Restart:
                            e.TryRecover = false;
                            LogManager.Log("User selection was to restart the application. Restarting...");
                            Process.Start(Application.ResourceAssembly.Location);
                            Environment.Exit(0);
                            break;
                        case ExceptionResolutions.Shutdown:
                            e.TryRecover = false;
                            LogManager.Log("User selection was to shutdown the application. Restarting...");
                            Environment.Exit(0);
                            break;
                        case ExceptionResolutions.Report:
                            e.TryRecover = true;
                            LogManager.Log("User selection was to report the issue.");

                            if (bug != null)
                            {
                                notification.ShowModalDialog<ReportIssueViewVM, ReportIssueView>(new ReportIssueViewVM(tfsClient.Project, bug), async (vm) =>
                                {
                                    using (notification.PushTaskItem("Uploading bug report..."))
                                    {
                                        try
                                        {
                                            tfsClient.FinalizeBug(vm.WorkItem);
                                            await tfsClient.UploadWorkItem(vm.WorkItem);
                                        }
                                        catch (Exception ex)
                                        {
                                            notification.ShowError("An error occurred while trying to create the issue." + Environment.NewLine + ex.Message);
                                        }
                                    }

                                }, null);
                            }

                            break;
                    }
                });
            }
            catch (Exception ex)
            {
                LogManager.Log(ex, "Error in global exception trapper!");
                MessageBox.Show(ex.ToStringSafe());
            }
        }

        #endregion
    }
}
protobuf::Message& from) PROTOBUF_FINAL; void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const HardwareMotor& from); void MergeFrom(const HardwareMotor& from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const PROTOBUF_FINAL; void InternalSwap(HardwareMotor* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // .Tango.PMR.Hardware.HardwareMotorType HardwareMotorType = 1; void clear_hardwaremotortype(); static const int kHardwareMotorTypeFieldNumber = 1; ::Tango::PMR::Hardware::HardwareMotorType hardwaremotortype() const; void set_hardwaremotortype(::Tango::PMR::Hardware::HardwareMotorType value); // int32 MinFrequency = 2; void clear_minfrequency(); static const int kMinFrequencyFieldNumber = 2; ::google::protobuf::int32 minfrequency() const; void set_minfrequency(::google::protobuf::int32 value); // int32 MaxFrequency = 3; void clear_maxfrequency(); static const int kMaxFrequencyFieldNumber = 3; ::google::protobuf::int32 maxfrequency() const; void set_maxfrequency(::google::protobuf::int32 value); // int32 SetMicroStep = 4; void clear_setmicrostep(); static const int kSetMicroStepFieldNumber = 4; ::google::protobuf::int32 setmicrostep() const; void set_setmicrostep(::google::protobuf::int32 value); // double MaxChangeSlope = 6; void clear_maxchangeslope(); static const int kMaxChangeSlopeFieldNumber = 6; double maxchangeslope() const; void set_maxchangeslope(double value); // double HighLengthMicroSecond = 7; void clear_highlengthmicrosecond(); static const int kHighLengthMicroSecondFieldNumber = 7; double highlengthmicrosecond() const; void set_highlengthmicrosecond(double value); // int32 MicroStep = 5; void clear_microstep(); static const int kMicroStepFieldNumber = 5; ::google::protobuf::int32 microstep() const; void set_microstep(::google::protobuf::int32 value); // int32 PulsePerRound = 9; void clear_pulseperround(); static const int kPulsePerRoundFieldNumber = 9; ::google::protobuf::int32 pulseperround() const; void set_pulseperround(::google::protobuf::int32 value); // double PulleyRadius = 10; void clear_pulleyradius(); static const int kPulleyRadiusFieldNumber = 10; double pulleyradius() const; void set_pulleyradius(double value); // int32 ConfigWord = 11; void clear_configword(); static const int kConfigWordFieldNumber = 11; ::google::protobuf::int32 configword() const; void set_configword(::google::protobuf::int32 value); // int32 KvalHold = 13; void clear_kvalhold(); static const int kKvalHoldFieldNumber = 13; ::google::protobuf::int32 kvalhold() const; void set_kvalhold(::google::protobuf::int32 value); // bool SpeedMaster = 8; void clear_speedmaster(); static const int kSpeedMasterFieldNumber = 8; bool speedmaster() const; void set_speedmaster(bool value); // bool DirectionThreadWize = 12; void clear_directionthreadwize(); static const int kDirectionThreadWizeFieldNumber = 12; bool directionthreadwize() const; void set_directionthreadwize(bool value); // bool LowSpeedOptimization = 20; void clear_lowspeedoptimization(); static const int kLowSpeedOptimizationFieldNumber = 20; bool lowspeedoptimization() const; void set_lowspeedoptimization(bool value); // int32 KvalRun = 14; void clear_kvalrun(); static const int kKvalRunFieldNumber = 14; ::google::protobuf::int32 kvalrun() const; void set_kvalrun(::google::protobuf::int32 value); // int32 KvalAcc = 15; void clear_kvalacc(); static const int kKvalAccFieldNumber = 15; ::google::protobuf::int32 kvalacc() const; void set_kvalacc(::google::protobuf::int32 value); // int32 KvalDec = 16; void clear_kvaldec(); static const int kKvalDecFieldNumber = 16; ::google::protobuf::int32 kvaldec() const; void set_kvaldec(::google::protobuf::int32 value); // int32 OverCurrentThreshold = 17; void clear_overcurrentthreshold(); static const int kOverCurrentThresholdFieldNumber = 17; ::google::protobuf::int32 overcurrentthreshold() const; void set_overcurrentthreshold(::google::protobuf::int32 value); // int32 StallThreshold = 18; void clear_stallthreshold(); static const int kStallThresholdFieldNumber = 18; ::google::protobuf::int32 stallthreshold() const; void set_stallthreshold(::google::protobuf::int32 value); // int32 ThermalCompensationFactor = 19; void clear_thermalcompensationfactor(); static const int kThermalCompensationFactorFieldNumber = 19; ::google::protobuf::int32 thermalcompensationfactor() const; void set_thermalcompensationfactor(::google::protobuf::int32 value); // int32 StSlp = 21; void clear_stslp(); static const int kStSlpFieldNumber = 21; ::google::protobuf::int32 stslp() const; void set_stslp(::google::protobuf::int32 value); // int32 IntSpd = 22; void clear_intspd(); static const int kIntSpdFieldNumber = 22; ::google::protobuf::int32 intspd() const; void set_intspd(::google::protobuf::int32 value); // int32 FnSlpAcc = 23; void clear_fnslpacc(); static const int kFnSlpAccFieldNumber = 23; ::google::protobuf::int32 fnslpacc() const; void set_fnslpacc(::google::protobuf::int32 value); // int32 FnSlpDec = 24; void clear_fnslpdec(); static const int kFnSlpDecFieldNumber = 24; ::google::protobuf::int32 fnslpdec() const; void set_fnslpdec(::google::protobuf::int32 value); // @@protoc_insertion_point(class_scope:Tango.PMR.Hardware.HardwareMotor) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; int hardwaremotortype_; ::google::protobuf::int32 minfrequency_; ::google::protobuf::int32 maxfrequency_; ::google::protobuf::int32 setmicrostep_; double maxchangeslope_; double highlengthmicrosecond_; ::google::protobuf::int32 microstep_; ::google::protobuf::int32 pulseperround_; double pulleyradius_; ::google::protobuf::int32 configword_; ::google::protobuf::int32 kvalhold_; bool speedmaster_; bool directionthreadwize_; bool lowspeedoptimization_; ::google::protobuf::int32 kvalrun_; ::google::protobuf::int32 kvalacc_; ::google::protobuf::int32 kvaldec_; ::google::protobuf::int32 overcurrentthreshold_; ::google::protobuf::int32 stallthreshold_; ::google::protobuf::int32 thermalcompensationfactor_; ::google::protobuf::int32 stslp_; ::google::protobuf::int32 intspd_; ::google::protobuf::int32 fnslpacc_; ::google::protobuf::int32 fnslpdec_; mutable int _cached_size_; friend struct protobuf_HardwareMotor_2eproto::TableStruct; }; // =================================================================== // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ // HardwareMotor // .Tango.PMR.Hardware.HardwareMotorType HardwareMotorType = 1; inline void HardwareMotor::clear_hardwaremotortype() { hardwaremotortype_ = 0; } inline ::Tango::PMR::Hardware::HardwareMotorType HardwareMotor::hardwaremotortype() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.HardwareMotorType) return static_cast< ::Tango::PMR::Hardware::HardwareMotorType >(hardwaremotortype_); } inline void HardwareMotor::set_hardwaremotortype(::Tango::PMR::Hardware::HardwareMotorType value) { hardwaremotortype_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.HardwareMotorType) } // int32 MinFrequency = 2; inline void HardwareMotor::clear_minfrequency() { minfrequency_ = 0; } inline ::google::protobuf::int32 HardwareMotor::minfrequency() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.MinFrequency) return minfrequency_; } inline void HardwareMotor::set_minfrequency(::google::protobuf::int32 value) { minfrequency_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.MinFrequency) } // int32 MaxFrequency = 3; inline void HardwareMotor::clear_maxfrequency() { maxfrequency_ = 0; } inline ::google::protobuf::int32 HardwareMotor::maxfrequency() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.MaxFrequency) return maxfrequency_; } inline void HardwareMotor::set_maxfrequency(::google::protobuf::int32 value) { maxfrequency_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.MaxFrequency) } // int32 SetMicroStep = 4; inline void HardwareMotor::clear_setmicrostep() { setmicrostep_ = 0; } inline ::google::protobuf::int32 HardwareMotor::setmicrostep() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.SetMicroStep) return setmicrostep_; } inline void HardwareMotor::set_setmicrostep(::google::protobuf::int32 value) { setmicrostep_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.SetMicroStep) } // int32 MicroStep = 5; inline void HardwareMotor::clear_microstep() { microstep_ = 0; } inline ::google::protobuf::int32 HardwareMotor::microstep() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.MicroStep) return microstep_; } inline void HardwareMotor::set_microstep(::google::protobuf::int32 value) { microstep_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.MicroStep) } // double MaxChangeSlope = 6; inline void HardwareMotor::clear_maxchangeslope() { maxchangeslope_ = 0; } inline double HardwareMotor::maxchangeslope() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.MaxChangeSlope) return maxchangeslope_; } inline void HardwareMotor::set_maxchangeslope(double value) { maxchangeslope_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.MaxChangeSlope) } // double HighLengthMicroSecond = 7; inline void HardwareMotor::clear_highlengthmicrosecond() { highlengthmicrosecond_ = 0; } inline double HardwareMotor::highlengthmicrosecond() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.HighLengthMicroSecond) return highlengthmicrosecond_; } inline void HardwareMotor::set_highlengthmicrosecond(double value) { highlengthmicrosecond_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.HighLengthMicroSecond) } // bool SpeedMaster = 8; inline void HardwareMotor::clear_speedmaster() { speedmaster_ = false; } inline bool HardwareMotor::speedmaster() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.SpeedMaster) return speedmaster_; } inline void HardwareMotor::set_speedmaster(bool value) { speedmaster_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.SpeedMaster) } // int32 PulsePerRound = 9; inline void HardwareMotor::clear_pulseperround() { pulseperround_ = 0; } inline ::google::protobuf::int32 HardwareMotor::pulseperround() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.PulsePerRound) return pulseperround_; } inline void HardwareMotor::set_pulseperround(::google::protobuf::int32 value) { pulseperround_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.PulsePerRound) } // double PulleyRadius = 10; inline void HardwareMotor::clear_pulleyradius() { pulleyradius_ = 0; } inline double HardwareMotor::pulleyradius() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.PulleyRadius) return pulleyradius_; } inline void HardwareMotor::set_pulleyradius(double value) { pulleyradius_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.PulleyRadius) } // int32 ConfigWord = 11; inline void HardwareMotor::clear_configword() { configword_ = 0; } inline ::google::protobuf::int32 HardwareMotor::configword() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.ConfigWord) return configword_; } inline void HardwareMotor::set_configword(::google::protobuf::int32 value) { configword_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.ConfigWord) } // bool DirectionThreadWize = 12; inline void HardwareMotor::clear_directionthreadwize() { directionthreadwize_ = false; } inline bool HardwareMotor::directionthreadwize() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.DirectionThreadWize) return directionthreadwize_; } inline void HardwareMotor::set_directionthreadwize(bool value) { directionthreadwize_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.DirectionThreadWize) } // int32 KvalHold = 13; inline void HardwareMotor::clear_kvalhold() { kvalhold_ = 0; } inline ::google::protobuf::int32 HardwareMotor::kvalhold() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.KvalHold) return kvalhold_; } inline void HardwareMotor::set_kvalhold(::google::protobuf::int32 value) { kvalhold_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.KvalHold) } // int32 KvalRun = 14; inline void HardwareMotor::clear_kvalrun() { kvalrun_ = 0; } inline ::google::protobuf::int32 HardwareMotor::kvalrun() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.KvalRun) return kvalrun_; } inline void HardwareMotor::set_kvalrun(::google::protobuf::int32 value) { kvalrun_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.KvalRun) } // int32 KvalAcc = 15; inline void HardwareMotor::clear_kvalacc() { kvalacc_ = 0; } inline ::google::protobuf::int32 HardwareMotor::kvalacc() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.KvalAcc) return kvalacc_; } inline void HardwareMotor::set_kvalacc(::google::protobuf::int32 value) { kvalacc_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.KvalAcc) } // int32 KvalDec = 16; inline void HardwareMotor::clear_kvaldec() { kvaldec_ = 0; } inline ::google::protobuf::int32 HardwareMotor::kvaldec() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.KvalDec) return kvaldec_; } inline void HardwareMotor::set_kvaldec(::google::protobuf::int32 value) { kvaldec_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.KvalDec) } // int32 OverCurrentThreshold = 17; inline void HardwareMotor::clear_overcurrentthreshold() { overcurrentthreshold_ = 0; } inline ::google::protobuf::int32 HardwareMotor::overcurrentthreshold() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.OverCurrentThreshold) return overcurrentthreshold_; } inline void HardwareMotor::set_overcurrentthreshold(::google::protobuf::int32 value) { overcurrentthreshold_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.OverCurrentThreshold) } // int32 StallThreshold = 18; inline void HardwareMotor::clear_stallthreshold() { stallthreshold_ = 0; } inline ::google::protobuf::int32 HardwareMotor::stallthreshold() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.StallThreshold) return stallthreshold_; } inline void HardwareMotor::set_stallthreshold(::google::protobuf::int32 value) { stallthreshold_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.StallThreshold) } // int32 ThermalCompensationFactor = 19; inline void HardwareMotor::clear_thermalcompensationfactor() { thermalcompensationfactor_ = 0; } inline ::google::protobuf::int32 HardwareMotor::thermalcompensationfactor() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.ThermalCompensationFactor) return thermalcompensationfactor_; } inline void HardwareMotor::set_thermalcompensationfactor(::google::protobuf::int32 value) { thermalcompensationfactor_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.ThermalCompensationFactor) } // bool LowSpeedOptimization = 20; inline void HardwareMotor::clear_lowspeedoptimization() { lowspeedoptimization_ = false; } inline bool HardwareMotor::lowspeedoptimization() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.LowSpeedOptimization) return lowspeedoptimization_; } inline void HardwareMotor::set_lowspeedoptimization(bool value) { lowspeedoptimization_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.LowSpeedOptimization) } // int32 StSlp = 21; inline void HardwareMotor::clear_stslp() { stslp_ = 0; } inline ::google::protobuf::int32 HardwareMotor::stslp() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.StSlp) return stslp_; } inline void HardwareMotor::set_stslp(::google::protobuf::int32 value) { stslp_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.StSlp) } // int32 IntSpd = 22; inline void HardwareMotor::clear_intspd() { intspd_ = 0; } inline ::google::protobuf::int32 HardwareMotor::intspd() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.IntSpd) return intspd_; } inline void HardwareMotor::set_intspd(::google::protobuf::int32 value) { intspd_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.IntSpd) } // int32 FnSlpAcc = 23; inline void HardwareMotor::clear_fnslpacc() { fnslpacc_ = 0; } inline ::google::protobuf::int32 HardwareMotor::fnslpacc() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.FnSlpAcc) return fnslpacc_; } inline void HardwareMotor::set_fnslpacc(::google::protobuf::int32 value) { fnslpacc_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.FnSlpAcc) } // int32 FnSlpDec = 24; inline void HardwareMotor::clear_fnslpdec() { fnslpdec_ = 0; } inline ::google::protobuf::int32 HardwareMotor::fnslpdec() const { // @@protoc_insertion_point(field_get:Tango.PMR.Hardware.HardwareMotor.FnSlpDec) return fnslpdec_; } inline void HardwareMotor::set_fnslpdec(::google::protobuf::int32 value) { fnslpdec_ = value; // @@protoc_insertion_point(field_set:Tango.PMR.Hardware.HardwareMotor.FnSlpDec) } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) } // namespace Hardware } // namespace PMR } // namespace Tango // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_HardwareMotor_2eproto__INCLUDED