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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: HardwareMotor.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Tango.PMR.Hardware {
/// <summary>Holder for reflection information generated from HardwareMotor.proto</summary>
public static partial class HardwareMotorReflection {
#region Descriptor
/// <summary>File descriptor for HardwareMotor.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static HardwareMotorReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChNIYXJkd2FyZU1vdG9yLnByb3RvEhJUYW5nby5QTVIuSGFyZHdhcmUaF0hh",
"cmR3YXJlTW90b3JUeXBlLnByb3RvIs8ECg1IYXJkd2FyZU1vdG9yEkAKEUhh",
"cmR3YXJlTW90b3JUeXBlGAEgASgOMiUuVGFuZ28uUE1SLkhhcmR3YXJlLkhh",
"cmR3YXJlTW90b3JUeXBlEhQKDE1pbkZyZXF1ZW5jeRgCIAEoBRIUCgxNYXhG",
"cmVxdWVuY3kYAyABKAUSFAoMU2V0TWljcm9TdGVwGAQgASgFEhEKCU1pY3Jv",
"U3RlcBgFIAEoBRIWCg5NYXhDaGFuZ2VTbG9wZRgGIAEoARIdChVIaWdoTGVu",
"Z3RoTWljcm9TZWNvbmQYByABKAESEwoLU3BlZWRNYXN0ZXIYCCABKAgSFQoN",
"UHVsc2VQZXJSb3VuZBgJIAEoBRIUCgxQdWxsZXlSYWRpdXMYCiABKAESEgoK",
"Q29uZmlnV29yZBgLIAEoBRIbChNEaXJlY3Rpb25UaHJlYWRXaXplGAwgASgI",
"EhAKCEt2YWxIb2xkGA0gASgFEg8KB0t2YWxSdW4YDiABKAUSDwoHS3ZhbEFj",
"YxgPIAEoBRIPCgdLdmFsRGVjGBAgASgFEhwKFE92ZXJDdXJyZW50VGhyZXNo",
"b2xkGBEgASgFEhYKDlN0YWxsVGhyZXNob2xkGBIgASgFEiEKGVRoZXJtYWxD",
"b21wZW5zYXRpb25GYWN0b3IYEyABKAUSHAoUTG93U3BlZWRPcHRpbWl6YXRp",
"b24YFCABKAgSDQoFU3RTbHAYFSABKAUSDgoGSW50U3BkGBYgASgFEhAKCEZu",
"U2xwQWNjGBcgASgFEhAKCEZuU2xwRGVjGBggASgFQh4KHGNvbS50d2luZS50",
"YW5nby5wbXIuaGFyZHdhcmViBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareMotor), global::Tango.PMR.Hardware.HardwareMotor.Parser, new[]{ "HardwareMotorType", "MinFrequency", "MaxFrequency", "SetMicroStep", "MicroStep", "MaxChangeSlope", "HighLengthMicroSecond", "SpeedMaster", "PulsePerRound", "PulleyRadius", "ConfigWord", "DirectionThreadWize", "KvalHold", "KvalRun", "KvalAcc", "KvalDec", "OverCurrentThreshold", "StallThreshold", "ThermalCompensationFactor", "LowSpeedOptimization", "StSlp", "IntSpd", "FnSlpAcc", "FnSlpDec" }, null, null, null)
}));
}
#endregion
}
#region Messages
public sealed partial class HardwareMotor : pb::IMessage<HardwareMotor> {
private static readonly pb::MessageParser<HardwareMotor> _parser = new pb::MessageParser<HardwareMotor>(() => new HardwareMotor());
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<HardwareMotor> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Tango.PMR.Hardware.HardwareMotorReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public HardwareMotor() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public HardwareMotor(HardwareMotor other) : this() {
hardwareMotorType_ = other.hardwareMotorType_;
minFrequency_ = other.minFrequency_;
maxFrequency_ = other.maxFrequency_;
setMicroStep_ = other.setMicroStep_;
microStep_ = other.microStep_;
maxChangeSlope_ = other.maxChangeSlope_;
highLengthMicroSecond_ = other.highLengthMicroSecond_;
speedMaster_ = other.speedMaster_;
pulsePerRound_ = other.pulsePerRound_;
pulleyRadius_ = other.pulleyRadius_;
configWord_ = other.configWord_;
directionThreadWize_ = other.directionThreadWize_;
kvalHold_ = other.kvalHold_;
kvalRun_ = other.kvalRun_;
kvalAcc_ = other.kvalAcc_;
kvalDec_ = other.kvalDec_;
overCurrentThreshold_ = other.overCurrentThreshold_;
stallThreshold_ = other.stallThreshold_;
thermalCompensationFactor_ = other.thermalCompensationFactor_;
lowSpeedOptimization_ = other.lowSpeedOptimization_;
stSlp_ = other.stSlp_;
intSpd_ = other.intSpd_;
fnSlpAcc_ = other.fnSlpAcc_;
fnSlpDec_ = other.fnSlpDec_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public HardwareMotor Clone() {
return new HardwareMotor(this);
}
/// <summary>Field number for the "HardwareMotorType" field.</summary>
public const int HardwareMotorTypeFieldNumber = 1;
private global::Tango.PMR.Hardware.HardwareMotorType hardwareMotorType_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tango.PMR.Hardware.HardwareMotorType HardwareMotorType {
get { return hardwareMotorType_; }
set {
hardwareMotorType_ = value;
}
}
/// <summary>Field number for the "MinFrequency" field.</summary>
public const int MinFrequencyFieldNumber = 2;
private int minFrequency_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int MinFrequency {
get { return minFrequency_; }
set {
minFrequency_ = value;
}
}
/// <summary>Field number for the "MaxFrequency" field.</summary>
public const int MaxFrequencyFieldNumber = 3;
private int maxFrequency_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int MaxFrequency {
get { return maxFrequency_; }
set {
maxFrequency_ = value;
}
}
/// <summary>Field number for the "SetMicroStep" field.</summary>
public const int SetMicroStepFieldNumber = 4;
private int setMicroStep_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int SetMicroStep {
get { return setMicroStep_; }
set {
setMicroStep_ = value;
}
}
/// <summary>Field number for the "MicroStep" field.</summary>
public const int MicroStepFieldNumber = 5;
private int microStep_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int MicroStep {
get { return microStep_; }
set {
microStep_ = value;
}
}
/// <summary>Field number for the "MaxChangeSlope" field.</summary>
public const int MaxChangeSlopeFieldNumber = 6;
private double maxChangeSlope_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double MaxChangeSlope {
get { return maxChangeSlope_; }
set {
maxChangeSlope_ = value;
}
}
/// <summary>Field number for the "HighLengthMicroSecond" field.</summary>
public const int HighLengthMicroSecondFieldNumber = 7;
private double highLengthMicroSecond_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double HighLengthMicroSecond {
get { return highLengthMicroSecond_; }
set {
highLengthMicroSecond_ = value;
}
}
/// <summary>Field number for the "SpeedMaster" field.</summary>
public const int SpeedMasterFieldNumber = 8;
private bool speedMaster_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool SpeedMaster {
get { return speedMaster_; }
set {
speedMaster_ = value;
}
}
/// <summary>Field number for the "PulsePerRound" field.</summary>
public const int PulsePerRoundFieldNumber = 9;
private int pulsePerRound_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int PulsePerRound {
get { return pulsePerRound_; }
set {
pulsePerRound_ = value;
}
}
/// <summary>Field number for the "PulleyRadius" field.</summary>
public const int PulleyRadiusFieldNumber = 10;
private double pulleyRadius_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public double PulleyRadius {
get { return pulleyRadius_; }
set {
pulleyRadius_ = value;
}
}
/// <summary>Field number for the "ConfigWord" field.</summary>
public const int ConfigWordFieldNumber = 11;
private int configWord_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int ConfigWord {
get { return configWord_; }
set {
configWord_ = value;
}
}
/// <summary>Field number for the "DirectionThreadWize" field.</summary>
public const int DirectionThreadWizeFieldNumber = 12;
private bool directionThreadWize_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool DirectionThreadWize {
get { return directionThreadWize_; }
set {
directionThreadWize_ = value;
}
}
/// <summary>Field number for the "KvalHold" field.</summary>
public const int KvalHoldFieldNumber = 13;
private int kvalHold_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int KvalHold {
get { return kvalHold_; }
set {
kvalHold_ = value;
}
}
/// <summary>Field number for the "KvalRun" field.</summary>
public const int KvalRunFieldNumber = 14;
private int kvalRun_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int KvalRun {
get { return kvalRun_; }
set {
kvalRun_ = value;
}
}
/// <summary>Field number for the "KvalAcc" field.</summary>
public const int KvalAccFieldNumber = 15;
private int kvalAcc_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int KvalAcc {
get { return kvalAcc_; }
set {
kvalAcc_ = value;
}
}
/// <summary>Field number for the "KvalDec" field.</summary>
public const int KvalDecFieldNumber = 16;
private int kvalDec_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int KvalDec {
get { return kvalDec_; }
set {
kvalDec_ = value;
}
}
/// <summary>Field number for the "OverCurrentThreshold" field.</summary>
public const int OverCurrentThresholdFieldNumber = 17;
private int overCurrentThreshold_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int OverCurrentThreshold {
get { return overCurrentThreshold_; }
set {
overCurrentThreshold_ = value;
}
}
/// <summary>Field number for the "StallThreshold" field.</summary>
public const int StallThresholdFieldNumber = 18;
private int stallThreshold_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int StallThreshold {
get { return stallThreshold_; }
set {
stallThreshold_ = value;
}
}
/// <summary>Field number for the "ThermalCompensationFactor" field.</summary>
public const int ThermalCompensationFactorFieldNumber = 19;
private int thermalCompensationFactor_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int ThermalCompensationFactor {
get { return thermalCompensationFactor_; }
set {
thermalCompensationFactor_ = value;
}
}
/// <summary>Field number for the "LowSpeedOptimization" field.</summary>
public const int LowSpeedOptimizationFieldNumber = 20;
private bool lowSpeedOptimization_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool LowSpeedOptimization {
get { return lowSpeedOptimization_; }
set {
lowSpeedOptimization_ = value;
}
}
/// <summary>Field number for the "StSlp" field.</summary>
public const int StSlpFieldNumber = 21;
private int stSlp_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int StSlp {
get { return stSlp_; }
set {
stSlp_ = value;
}
}
/// <summary>Field number for the "IntSpd" field.</summary>
public const int IntSpdFieldNumber = 22;
private int intSpd_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int IntSpd {
get { return intSpd_; }
set {
intSpd_ = value;
}
}
/// <summary>Field number for the "FnSlpAcc" field.</summary>
public const int FnSlpAccFieldNumber = 23;
private int fnSlpAcc_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int FnSlpAcc {
get { return fnSlpAcc_; }
set {
fnSlpAcc_ = value;
}
}
/// <summary>Field number for the "FnSlpDec" field.</summary>
public const int FnSlpDecFieldNumber = 24;
private int fnSlpDec_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int FnSlpDec {
get { return fnSlpDec_; }
set {
fnSlpDec_ = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as HardwareMotor);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(HardwareMotor other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (HardwareMotorType != other.HardwareMotorType) return false;
if (MinFrequency != other.MinFrequency) return false;
if (MaxFrequency != other.MaxFrequency) return false;
if (SetMicroStep != other.SetMicroStep) return false;
if (MicroStep != other.MicroStep) return false;
if (MaxChangeSlope != other.MaxChangeSlope) return false;
if (HighLengthMicroSecond != other.HighLengthMicroSecond) return false;
if (SpeedMaster != other.SpeedMaster) return false;
if (PulsePerRound != other.PulsePerRound) return false;
if (PulleyRadius != other.PulleyRadius) return false;
if (ConfigWord != other.ConfigWord) return false;
if (DirectionThreadWize != other.DirectionThreadWize) return false;
if (KvalHold != other.KvalHold) return false;
if (KvalRun != other.KvalRun) return false;
if (KvalAcc != other.KvalAcc) return false;
if (KvalDec != other.KvalDec) return false;
if (OverCurrentThreshold != other.OverCurrentThreshold) return false;
if (StallThreshold != other.StallThreshold) return false;
if (ThermalCompensationFactor != other.ThermalCompensationFactor) return false;
if (LowSpeedOptimization != other.LowSpeedOptimization) return false;
if (StSlp != other.StSlp) return false;
if (IntSpd != other.IntSpd) return false;
if (FnSlpAcc != other.FnSlpAcc) return false;
if (FnSlpDec != other.FnSlpDec) return false;
return true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (HardwareMotorType != 0) hash ^= HardwareMotorType.GetHashCode();
if (MinFrequency != 0) hash ^= MinFrequency.GetHashCode();
if (MaxFrequency != 0) hash ^= MaxFrequency.GetHashCode();
if (SetMicroStep != 0) hash ^= SetMicroStep.GetHashCode();
if (MicroStep != 0) hash ^= MicroStep.GetHashCode();
if (MaxChangeSlope != 0D) hash ^= MaxChangeSlope.GetHashCode();
if (HighLengthMicroSecond != 0D) hash ^= HighLengthMicroSecond.GetHashCode();
if (SpeedMaster != false) hash ^= SpeedMaster.GetHashCode();
if (PulsePerRound != 0) hash ^= PulsePerRound.GetHashCode();
if (PulleyRadius != 0D) hash ^= PulleyRadius.GetHashCode();
if (ConfigWord != 0) hash ^= ConfigWord.GetHashCode();
if (DirectionThreadWize != false) hash ^= DirectionThreadWize.GetHashCode();
if (KvalHold != 0) hash ^= KvalHold.GetHashCode();
if (KvalRun != 0) hash ^= KvalRun.GetHashCode();
if (KvalAcc != 0) hash ^= KvalAcc.GetHashCode();
if (KvalDec != 0) hash ^= KvalDec.GetHashCode();
if (OverCurrentThreshold != 0) hash ^= OverCurrentThreshold.GetHashCode();
if (StallThreshold != 0) hash ^= StallThreshold.GetHashCode();
if (ThermalCompensationFactor != 0) hash ^= ThermalCompensationFactor.GetHashCode();
if (LowSpeedOptimization != false) hash ^= LowSpeedOptimization.GetHashCode();
if (StSlp != 0) hash ^= StSlp.GetHashCode();
if (IntSpd != 0) hash ^= IntSpd.GetHashCode();
if (FnSlpAcc != 0) hash ^= FnSlpAcc.GetHashCode();
if (FnSlpDec != 0) hash ^= FnSlpDec.GetHashCode();
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (HardwareMotorType != 0) {
output.WriteRawTag(8);
output.WriteEnum((int) HardwareMotorType);
}
if (MinFrequency != 0) {
output.WriteRawTag(16);
output.WriteInt32(MinFrequency);
}
if (MaxFrequency != 0) {
output.WriteRawTag(24);
output.WriteInt32(MaxFrequency);
}
if (SetMicroStep != 0) {
output.WriteRawTag(32);
output.WriteInt32(SetMicroStep);
}
if (MicroStep != 0) {
output.WriteRawTag(40);
output.WriteInt32(MicroStep);
}
if (MaxChangeSlope != 0D) {
output.WriteRawTag(49);
output.WriteDouble(MaxChangeSlope);
}
if (HighLengthMicroSecond != 0D) {
output.WriteRawTag(57);
output.WriteDouble(HighLengthMicroSecond);
}
if (SpeedMaster != false) {
output.WriteRawTag(64);
output.WriteBool(SpeedMaster);
}
if (PulsePerRound != 0) {
output.WriteRawTag(72);
output.WriteInt32(PulsePerRound);
}
if (PulleyRadius != 0D) {
output.WriteRawTag(81);
output.WriteDouble(PulleyRadius);
}
if (ConfigWord != 0) {
output.WriteRawTag(88);
output.WriteInt32(ConfigWord);
}
if (DirectionThreadWize != false) {
output.WriteRawTag(96);
output.WriteBool(DirectionThreadWize);
}
if (KvalHold != 0) {
output.WriteRawTag(104);
output.WriteInt32(KvalHold);
}
if (KvalRun != 0) {
output.WriteRawTag(112);
output.WriteInt32(KvalRun);
}
if (KvalAcc != 0) {
output.WriteRawTag(120);
output.WriteInt32(KvalAcc);
}
if (KvalDec != 0) {
output.WriteRawTag(128, 1);
output.WriteInt32(KvalDec);
}
if (OverCurrentThreshold != 0) {
output.WriteRawTag(136, 1);
output.WriteInt32(OverCurrentThreshold);
}
if (StallThreshold != 0) {
output.WriteRawTag(144, 1);
output.WriteInt32(StallThreshold);
}
if (ThermalCompensationFactor != 0) {
output.WriteRawTag(152, 1);
output.WriteInt32(ThermalCompensationFactor);
}
if (LowSpeedOptimization != false) {
output.WriteRawTag(160, 1);
output.WriteBool(LowSpeedOptimization);
}
if (StSlp != 0) {
output.WriteRawTag(168, 1);
output.WriteInt32(StSlp);
}
if (IntSpd != 0) {
output.WriteRawTag(176, 1);
output.WriteInt32(IntSpd);
}
if (FnSlpAcc != 0) {
output.WriteRawTag(184, 1);
output.WriteInt32(FnSlpAcc);
}
if (FnSlpDec != 0) {
output.WriteRawTag(192, 1);
output.WriteInt32(FnSlpDec);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (HardwareMotorType != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HardwareMotorType);
}
if (MinFrequency != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinFrequency);
}
if (MaxFrequency != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxFrequency);
}
if (SetMicroStep != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(SetMicroStep);
}
if (MicroStep != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(MicroStep);
}
if (MaxChangeSlope != 0D) {
size += 1 + 8;
}
if (HighLengthMicroSecond != 0D) {
size += 1 + 8;
}
if (SpeedMaster != false) {
size += 1 + 1;
}
if (PulsePerRound != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(PulsePerRound);
}
if (PulleyRadius != 0D) {
size += 1 + 8;
}
if (ConfigWord != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(ConfigWord);
}
if (DirectionThreadWize != false) {
size += 1 + 1;
}
if (KvalHold != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(KvalHold);
}
if (KvalRun != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(KvalRun);
}
if (KvalAcc != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(KvalAcc);
}
if (KvalDec != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(KvalDec);
}
if (OverCurrentThreshold != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(OverCurrentThreshold);
}
if (StallThreshold != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(StallThreshold);
}
if (ThermalCompensationFactor != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(ThermalCompensationFactor);
}
if (LowSpeedOptimization != false) {
size += 2 + 1;
}
if (StSlp != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(StSlp);
}
if (IntSpd != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(IntSpd);
}
if (FnSlpAcc != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(FnSlpAcc);
}
if (FnSlpDec != 0) {
size += 2 + pb::CodedOutputStream.ComputeInt32Size(FnSlpDec);
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(HardwareMotor other) {
if (other == null) {
return;
}
if (other.HardwareMotorType != 0) {
HardwareMotorType = other.HardwareMotorType;
}
if (other.MinFrequency != 0) {
MinFrequency = other.MinFrequency;
}
if (other.MaxFrequency != 0) {
MaxFrequency = other.MaxFrequency;
}
if (other.SetMicroStep != 0) {
SetMicroStep = other.SetMicroStep;
}
if (other.MicroStep != 0) {
MicroStep = other.MicroStep;
}
if (other.MaxChangeSlope != 0D) {
MaxChangeSlope = other.MaxChangeSlope;
}
if (other.HighLengthMicroSecond != 0D) {
HighLengthMicroSecond = other.HighLengthMicroSecond;
}
if (other.SpeedMaster != false) {
SpeedMaster = other.SpeedMaster;
}
if (other.PulsePerRound != 0) {
PulsePerRound = other.PulsePerRound;
}
if (other.PulleyRadius != 0D) {
PulleyRadius = other.PulleyRadius;
}
if (other.ConfigWord != 0) {
ConfigWord = other.ConfigWord;
}
if (other.DirectionThreadWize != false) {
DirectionThreadWize = other.DirectionThreadWize;
}
if (other.KvalHold != 0) {
KvalHold = other.KvalHold;
}
if (other.KvalRun != 0) {
KvalRun = other.KvalRun;
}
if (other.KvalAcc != 0) {
KvalAcc = other.KvalAcc;
}
if (other.KvalDec != 0) {
KvalDec = other.KvalDec;
}
if (other.OverCurrentThreshold != 0) {
OverCurrentThreshold = other.OverCurrentThreshold;
}
if (other.StallThreshold != 0) {
StallThreshold = other.StallThreshold;
}
if (other.ThermalCompensationFactor != 0) {
ThermalCompensationFactor = other.ThermalCompensationFactor;
}
if (other.LowSpeedOptimization != false) {
LowSpeedOptimization = other.LowSpeedOptimization;
}
if (other.StSlp != 0) {
StSlp = other.StSlp;
}
if (other.IntSpd != 0) {
IntSpd = other.IntSpd;
}
if (other.FnSlpAcc != 0) {
FnSlpAcc = other.FnSlpAcc;
}
if (other.FnSlpDec != 0) {
FnSlpDec = other.FnSlpDec;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
hardwareMotorType_ = (global::Tango.PMR.Hardware.HardwareMotorType) input.ReadEnum();
break;
}
case 16: {
MinFrequency = input.ReadInt32();
break;
}
case 24: {
MaxFrequency = input.ReadInt32();
break;
}
case 32: {
SetMicroStep = input.ReadInt32();
break;
}
case 40: {
MicroStep = input.ReadInt32();
break;
}
case 49: {
MaxChangeSlope = input.ReadDouble();
break;
}
case 57: {
HighLengthMicroSecond = input.ReadDouble();
break;
}
case 64: {
SpeedMaster = input.ReadBool();
break;
}
case 72: {
PulsePerRound = input.ReadInt32();
break;
}
case 81: {
PulleyRadius = input.ReadDouble();
break;
}
case 88: {
ConfigWord = input.ReadInt32();
break;
}
case 96: {
DirectionThreadWize = input.ReadBool();
break;
}
case 104: {
KvalHold = input.ReadInt32();
break;
}
case 112: {
KvalRun = input.ReadInt32();
break;
}
case 120: {
KvalAcc = input.ReadInt32();
break;
}
case 128: {
KvalDec = input.ReadInt32();
break;
}
case 136: {
OverCurrentThreshold = input.ReadInt32();
break;
}
case 144: {
StallThreshold = input.ReadInt32();
break;
}
case 152: {
ThermalCompensationFactor = input.ReadInt32();
break;
}
case 160: {
LowSpeedOptimization = input.ReadBool();
break;
}
case 168: {
StSlp = input.ReadInt32();
break;
}
case 176: {
IntSpd = input.ReadInt32();
break;
}
case 184: {
FnSlpAcc = input.ReadInt32();
break;
}
case 192: {
FnSlpDec = input.ReadInt32();
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code
|