YouBotJointParameterPasswordProtected.cpp
Go to the documentation of this file.
1 /****************************************************************
2  *
3  * Copyright (c) 2011
4  * All rights reserved.
5  *
6  * Hochschule Bonn-Rhein-Sieg
7  * University of Applied Sciences
8  * Computer Science Department
9  *
10  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11  *
12  * Author:
13  * Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov
14  * Supervised by:
15  * Gerhard K. Kraetzschmar
16  *
17  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18  *
19  * This sofware is published under a dual-license: GNU Lesser General Public
20  * License LGPL 2.1 and BSD license. The dual-license implies that users of this
21  * code may choose which terms they prefer.
22  *
23  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24  *
25  * Redistribution and use in source and binary forms, with or without
26  * modification, are permitted provided that the following conditions are met:
27  *
28  * * Redistributions of source code must retain the above copyright
29  * notice, this list of conditions and the following disclaimer.
30  * * Redistributions in binary form must reproduce the above copyright
31  * notice, this list of conditions and the following disclaimer in the
32  * documentation and/or other materials provided with the distribution.
33  * * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its
34  * contributors may be used to endorse or promote products derived from
35  * this software without specific prior written permission.
36  *
37  * This program is free software: you can redistribute it and/or modify
38  * it under the terms of the GNU Lesser General Public License LGPL as
39  * published by the Free Software Foundation, either version 2.1 of the
40  * License, or (at your option) any later version or the BSD license.
41  *
42  * This program is distributed in the hope that it will be useful,
43  * but WITHOUT ANY WARRANTY; without even the implied warranty of
44  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45  * GNU Lesser General Public License LGPL and the BSD license for more details.
46  *
47  * You should have received a copy of the GNU Lesser General Public
48  * License LGPL and BSD license along with this program.
49  *
50  ****************************************************************/
52 namespace youbot {
53 
55  // Bouml preserved body begin 000A4CF1
56  // Bouml preserved body end 000A4CF1
57 }
58 
60  // Bouml preserved body begin 000A4D71
61  // Bouml preserved body end 000A4D71
62 }
63 
65  // Bouml preserved body begin 00083371
66  this->name = "ActivateOvervoltageProtection";
68  // Bouml preserved body end 00083371
69 }
70 
72  // Bouml preserved body begin 000833F1
73  // Bouml preserved body end 000833F1
74 }
75 
76 void ActivateOvervoltageProtection::getParameter(bool& parameter) const {
77  // Bouml preserved body begin 00083471
78  parameter = this->value;
79  // Bouml preserved body end 00083471
80 }
81 
82 void ActivateOvervoltageProtection::setParameter(const bool parameter) {
83  // Bouml preserved body begin 000834F1
84  this->value = parameter;
85  // Bouml preserved body end 000834F1
86 }
87 
88 void ActivateOvervoltageProtection::toString(std::string& value) {
89  // Bouml preserved body begin 0009E4F1
90  std::stringstream ss;
91  ss << this->name << ": " << this->value;
92  value = ss.str();
93  // Bouml preserved body end 0009E4F1
94 }
95 
97  // Bouml preserved body begin 00083571
98 
99  message.stctOutput.commandNumber = msgType;
100  message.stctOutput.moduleAddress = DRIVE;
101  message.stctOutput.typeNumber = 245; //ActivateOvervoltageProtection
102  message.stctOutput.value = value;
103 
104  // Bouml preserved body end 00083571
105 }
106 
108  // Bouml preserved body begin 000835F1
109  this->value = message.stctInput.value;
110  // Bouml preserved body end 000835F1
111 }
112 
114  // Bouml preserved body begin 0007D871
115  this->name = "ActualCommutationOffset";
116  this->lowerLimit = INT_MIN;
117  this->upperLimit = INT_MAX;
119  // Bouml preserved body end 0007D871
120 }
121 
123  // Bouml preserved body begin 0007D8F1
124  // Bouml preserved body end 0007D8F1
125 }
126 
127 void ActualCommutationOffset::getParameter(int& parameter) const {
128  // Bouml preserved body begin 0007D971
129  parameter = this->value;
130  // Bouml preserved body end 0007D971
131 }
132 
133 void ActualCommutationOffset::setParameter(const int parameter) {
134  // Bouml preserved body begin 0007D9F1
135  if (this->lowerLimit > parameter) {
136  throw std::out_of_range("The parameter exceeds the lower limit");
137  }
138  if (this->upperLimit < parameter) {
139  throw std::out_of_range("The parameter exceeds the upper limit");
140  }
141 
142  this->value = parameter;
143  // Bouml preserved body end 0007D9F1
144 }
145 
146 void ActualCommutationOffset::toString(std::string& value) {
147  // Bouml preserved body begin 0009D771
148  std::stringstream ss;
149  ss << this->name << ": " << this->value;
150  value = ss.str();
151  // Bouml preserved body end 0009D771
152 }
153 
155  // Bouml preserved body begin 0007DA71
156 
157  message.stctOutput.commandNumber = msgType;
158  message.stctOutput.moduleAddress = DRIVE;
159  message.stctOutput.typeNumber = 165; //ActualCommutationOffset
160  message.stctOutput.value = value;
161 
162  // Bouml preserved body end 0007DA71
163 }
164 
166  // Bouml preserved body begin 0007DAF1
167  this->value = (int32)message.stctInput.value;
168  // Bouml preserved body end 0007DAF1
169 }
170 
172  // Bouml preserved body begin 000956F1
173  this->name = "ApproveProtectedParameters";
174  this->lowerLimit = INT_MIN;
175  this->upperLimit = INT_MAX;
177  // Bouml preserved body end 000956F1
178 }
179 
181  // Bouml preserved body begin 00095771
182  // Bouml preserved body end 00095771
183 }
184 
185 void ApproveProtectedParameters::getParameter(int& parameter) const {
186  // Bouml preserved body begin 000957F1
187  parameter = this->value;
188  // Bouml preserved body end 000957F1
189 }
190 
191 void ApproveProtectedParameters::setParameter(const int parameter) {
192  // Bouml preserved body begin 00095871
193  if (this->lowerLimit > parameter) {
194  throw std::out_of_range("The parameter exceeds the lower limit");
195  }
196  if (this->upperLimit < parameter) {
197  throw std::out_of_range("The parameter exceeds the upper limit");
198  }
199  this->value = parameter;
200  // Bouml preserved body end 00095871
201 }
202 
203 void ApproveProtectedParameters::toString(std::string& value) {
204  // Bouml preserved body begin 0009E671
205  std::stringstream ss;
206  ss << this->name << ": " << this->value;
207  value = ss.str();
208  // Bouml preserved body end 0009E671
209 }
210 
212  // Bouml preserved body begin 000958F1
213  message.stctOutput.commandNumber = msgType;
214  message.stctOutput.moduleAddress = DRIVE;
215  message.stctOutput.typeNumber = 248; //ApproveProtectedParameters
216  message.stctOutput.value = value;
217  // Bouml preserved body end 000958F1
218 }
219 
221  // Bouml preserved body begin 00095971
222  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
223  this->value = message.stctInput.value;
224  }
225  // Bouml preserved body end 00095971
226 }
227 
229  // Bouml preserved body begin 00082B71
230  this->name = "BEMFConstant";
231  this->lowerLimit = INT_MIN;
232  this->upperLimit = INT_MAX;
234  // Bouml preserved body end 00082B71
235 }
236 
238  // Bouml preserved body begin 00082BF1
239  // Bouml preserved body end 00082BF1
240 }
241 
242 void BEMFConstant::getParameter(int& parameter) const {
243  // Bouml preserved body begin 00082C71
244  parameter = this->value;
245  // Bouml preserved body end 00082C71
246 }
247 
248 void BEMFConstant::setParameter(const int parameter) {
249  // Bouml preserved body begin 00082CF1
250  if (this->lowerLimit > parameter) {
251  throw std::out_of_range("The parameter exceeds the lower limit");
252  }
253  if (this->upperLimit < parameter) {
254  throw std::out_of_range("The parameter exceeds the upper limit");
255  }
256 
257  this->value = parameter;
258  // Bouml preserved body end 00082CF1
259 }
260 
261 void BEMFConstant::toString(std::string& value) {
262  // Bouml preserved body begin 0009E1F1
263  std::stringstream ss;
264  ss << this->name << ": " << this->value;
265  value = ss.str();
266  // Bouml preserved body end 0009E1F1
267 }
268 
270  // Bouml preserved body begin 00082D71
271 
272  message.stctOutput.commandNumber = msgType;
273  message.stctOutput.moduleAddress = DRIVE;
274  message.stctOutput.typeNumber = 239; //BEMFConstant
275  message.stctOutput.value = value; //TODO do convertion
276 
277  // Bouml preserved body end 00082D71
278 }
279 
281  // Bouml preserved body begin 00082DF1
282  this->value = (int32)message.stctInput.value; //TODO do convertion
283  // Bouml preserved body end 00082DF1
284 }
285 
287  // Bouml preserved body begin 000704F1
288  this->name = "CommutationMode";
289  this->lowerLimit = 0;
290  this->upperLimit = 5;
292  // Bouml preserved body end 000704F1
293 }
294 
296  // Bouml preserved body begin 00070571
297  // Bouml preserved body end 00070571
298 }
299 
300 void CommutationMode::getParameter(unsigned int& parameter) const {
301  // Bouml preserved body begin 000705F1
302  parameter = this->value;
303  // Bouml preserved body end 000705F1
304 }
305 
306 void CommutationMode::setParameter(const unsigned int parameter) {
307  // Bouml preserved body begin 00093471
308  if (this->lowerLimit > parameter) {
309  throw std::out_of_range("The parameter exceeds the lower limit");
310  }
311  if (this->upperLimit < parameter) {
312  throw std::out_of_range("The parameter exceeds the upper limit");
313  }
314  this->value = parameter;
315  // Bouml preserved body end 00093471
316 }
317 
318 void CommutationMode::toString(std::string& value) {
319  // Bouml preserved body begin 0009E7F1
320  std::stringstream ss;
321  ss << this->name << ": " << this->value;
322  value = ss.str();
323  // Bouml preserved body end 0009E7F1
324 }
325 
327  // Bouml preserved body begin 00070671
328  message.stctOutput.commandNumber = msgType;
329  message.stctOutput.moduleAddress = DRIVE;
330  message.stctOutput.typeNumber = 159; //CommutationMode
331  message.stctOutput.value = value;
332  // Bouml preserved body end 00070671
333 }
334 
336  // Bouml preserved body begin 000720F1
337  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
338  this->value = message.stctInput.value; //TODO do convertion
339  }
340  // Bouml preserved body end 000720F1
341 }
342 
344  // Bouml preserved body begin 0008C371
345  this->name = "CommutationMotorCurrent";
346  this->lowerLimit = 0 * ampere;
347  this->upperLimit = INT_MAX * ampere;
349  // Bouml preserved body end 0008C371
350 }
351 
353  // Bouml preserved body begin 0008C3F1
354  // Bouml preserved body end 0008C3F1
355 }
356 
357 void CommutationMotorCurrent::getParameter(quantity<current>& parameter) const {
358  // Bouml preserved body begin 0008C471
359  parameter = this->value;
360  // Bouml preserved body end 0008C471
361 }
362 
363 void CommutationMotorCurrent::setParameter(const quantity<current>& parameter) {
364  // Bouml preserved body begin 0008C4F1
365  if (this->lowerLimit > parameter) {
366  throw std::out_of_range("The parameter exceeds the lower limit");
367  }
368  if (this->upperLimit < parameter) {
369  throw std::out_of_range("The parameter exceeds the upper limit");
370  }
371 
372  this->value = parameter;
373  // Bouml preserved body end 0008C4F1
374 }
375 
376 void CommutationMotorCurrent::toString(std::string& value) {
377  // Bouml preserved body begin 0009DCF1
378  std::stringstream ss;
379  ss << this->name << ": " << this->value.value();
380  value = ss.str();
381  // Bouml preserved body end 0009DCF1
382 }
383 
385  // Bouml preserved body begin 0008C571
386 
387  message.stctOutput.commandNumber = msgType;
388  message.stctOutput.moduleAddress = DRIVE;
389  message.stctOutput.typeNumber = 177; //CommutationMotorCurrent
390  message.stctOutput.value = (uint32)(value.value() * 1000.0); // ampere to milli ampere
391 
392  // Bouml preserved body end 0008C571
393 }
394 
396  // Bouml preserved body begin 0008C5F1
397  double temp = (uint32)message.stctInput.value;
398  this->value = temp/1000.0 * ampere; //milli ampere to ampere
399  // Bouml preserved body end 0008C5F1
400 }
401 
403  // Bouml preserved body begin 00079F71
404  this->name = "CurrentControlLoopDelay";
405  this->lowerLimit = 0;
406  this->upperLimit = INT_MAX * seconds;
408  // Bouml preserved body end 00079F71
409 }
410 
412  // Bouml preserved body begin 00079FF1
413  // Bouml preserved body end 00079FF1
414 }
415 
416 void CurrentControlLoopDelay::getParameter(quantity<si::time>& parameter) const {
417  // Bouml preserved body begin 0007A071
418  parameter = this->value;
419  // Bouml preserved body end 0007A071
420 }
421 
422 void CurrentControlLoopDelay::setParameter(const quantity<si::time>& parameter) {
423  // Bouml preserved body begin 0007A0F1
424  if (this->lowerLimit > parameter) {
425  throw std::out_of_range("The parameter exceeds the lower limit");
426  }
427  if (this->upperLimit < parameter) {
428  throw std::out_of_range("The parameter exceeds the upper limit");
429  }
430 
431  this->value = parameter;
432  // Bouml preserved body end 0007A0F1
433 }
434 
435 void CurrentControlLoopDelay::toString(std::string& value) {
436  // Bouml preserved body begin 0009CFF1
437  std::stringstream ss;
438  ss << this->name << ": " << this->value.value();
439  value = ss.str();
440  // Bouml preserved body end 0009CFF1
441 }
442 
444  // Bouml preserved body begin 0007A171
445 
446  message.stctOutput.commandNumber = msgType;
447  message.stctOutput.moduleAddress = DRIVE;
448  message.stctOutput.typeNumber = 134; //CurrentControlLoopDelay
449  message.stctOutput.value = (uint32)(value.value() * 1000 *1000 /50.0); //sec to µsec
450 
451  // Bouml preserved body end 0007A171
452 }
453 
455  // Bouml preserved body begin 0007A1F1
456  double temp = (uint32)message.stctInput.value;
457  this->value = (temp/(1000.0 * 1000.0)) * 50 * seconds; //µsec to sec
458  // Bouml preserved body end 0007A1F1
459 }
460 
462  // Bouml preserved body begin 000713F1
463  this->name = "EncoderResolution";
464  this->lowerLimit = 0;
465  this->upperLimit = INT_MAX;
467  // Bouml preserved body end 000713F1
468 }
469 
471  // Bouml preserved body begin 00071471
472  // Bouml preserved body end 00071471
473 }
474 
475 void EncoderResolution::getParameter(unsigned int& parameter) const {
476  // Bouml preserved body begin 000714F1
477  parameter = this->value;
478  // Bouml preserved body end 000714F1
479 }
480 
481 void EncoderResolution::setParameter(const unsigned int parameter) {
482  // Bouml preserved body begin 00093671
483  if (this->lowerLimit > parameter) {
484  throw std::out_of_range("The parameter exceeds the lower limit");
485  }
486  if (this->upperLimit < parameter) {
487  throw std::out_of_range("The parameter exceeds the upper limit");
488  }
489  this->value = parameter;
490  // Bouml preserved body end 00093671
491 }
492 
493 void EncoderResolution::toString(std::string& value) {
494  // Bouml preserved body begin 0009E9F1
495  std::stringstream ss;
496  ss << this->name << ": " << this->value;
497  value = ss.str();
498  // Bouml preserved body end 0009E9F1
499 }
500 
502  // Bouml preserved body begin 00071571
503  message.stctOutput.commandNumber = msgType;
504  message.stctOutput.moduleAddress = DRIVE;
505  message.stctOutput.typeNumber = 250; //EncoderResolution
506  message.stctOutput.value = (uint32)value;
507  // Bouml preserved body end 00071571
508 }
509 
511  // Bouml preserved body begin 00072371
512  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
513  this->value = (uint32)message.stctInput.value;
514  }
515  // Bouml preserved body end 00072371
516 }
517 
519  // Bouml preserved body begin 0007D471
520  this->name = "EncoderStopSwitch";
521  this->lowerLimit = 0;
522  this->upperLimit = 3;
524  // Bouml preserved body end 0007D471
525 }
526 
528  // Bouml preserved body begin 0007D4F1
529  // Bouml preserved body end 0007D4F1
530 }
531 
532 void EncoderStopSwitch::getParameter(unsigned int& parameter) const {
533  // Bouml preserved body begin 0007D571
534  parameter = this->value;
535  // Bouml preserved body end 0007D571
536 }
537 
538 void EncoderStopSwitch::setParameter(const unsigned int parameter) {
539  // Bouml preserved body begin 0007D5F1
540  if (this->lowerLimit > parameter) {
541  throw std::out_of_range("The parameter exceeds the lower limit");
542  }
543  if (this->upperLimit < parameter) {
544  throw std::out_of_range("The parameter exceeds the upper limit");
545  }
546 
547  this->value = parameter;
548  // Bouml preserved body end 0007D5F1
549 }
550 
551 void EncoderStopSwitch::toString(std::string& value) {
552  // Bouml preserved body begin 0009D6F1
553  std::stringstream ss;
554  ss << this->name << ": " << this->value;
555  value = ss.str();
556  // Bouml preserved body end 0009D6F1
557 }
558 
560  // Bouml preserved body begin 0007D671
561 
562  message.stctOutput.commandNumber = msgType;
563  message.stctOutput.moduleAddress = DRIVE;
564  message.stctOutput.typeNumber = 164; //EncoderStopSwitch
565  message.stctOutput.value = (uint32)value;
566 
567  // Bouml preserved body end 0007D671
568 }
569 
571  // Bouml preserved body begin 0007D6F1
572  this->value = (uint32)message.stctInput.value;
573  // Bouml preserved body end 0007D6F1
574 }
575 
577  // Bouml preserved body begin 00071CF1
578  this->name = "HallSensorPolarityReversal";
580  // Bouml preserved body end 00071CF1
581 }
582 
584  // Bouml preserved body begin 00071D71
585  // Bouml preserved body end 00071D71
586 }
587 
588 void HallSensorPolarityReversal::getParameter(bool& parameter) const {
589  // Bouml preserved body begin 00071DF1
590  parameter = this->value;
591  // Bouml preserved body end 00071DF1
592 }
593 
594 void HallSensorPolarityReversal::setParameter(const bool parameter) {
595  // Bouml preserved body begin 00093771
596  this->value = parameter;
597  // Bouml preserved body end 00093771
598 }
599 
600 void HallSensorPolarityReversal::toString(std::string& value) {
601  // Bouml preserved body begin 0009EAF1
602  std::stringstream ss;
603  ss << this->name << ": " << this->value;
604  value = ss.str();
605  // Bouml preserved body end 0009EAF1
606 }
607 
609  // Bouml preserved body begin 00071E71
610  message.stctOutput.commandNumber = msgType;
611  message.stctOutput.moduleAddress = DRIVE;
612  message.stctOutput.typeNumber = 254; //HallSensorPolarityReversal
613  message.stctOutput.value = (uint32)value;
614  // Bouml preserved body end 00071E71
615 }
616 
618  // Bouml preserved body begin 000724F1
619  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
620  this->value = (uint32)message.stctInput.value;
621  }
622  // Bouml preserved body end 000724F1
623 }
624 
626  // Bouml preserved body begin 000A1171
627  this->name = "I2tExceedCounter";
628  this->lowerLimit = 0;
629  this->upperLimit = INT_MAX;
631  // Bouml preserved body end 000A1171
632 }
633 
635  // Bouml preserved body begin 000A11F1
636  // Bouml preserved body end 000A11F1
637 }
638 
639 void I2tExceedCounter::getParameter(unsigned int& parameter) const {
640  // Bouml preserved body begin 000A1271
641  parameter = this->value;
642  // Bouml preserved body end 000A1271
643 }
644 
645 void I2tExceedCounter::setParameter(const unsigned int parameter) {
646  // Bouml preserved body begin 000A12F1
647  if (this->lowerLimit > parameter) {
648  throw std::out_of_range("The parameter exceeds the lower limit");
649  }
650  if (this->upperLimit < parameter) {
651  throw std::out_of_range("The parameter exceeds the upper limit");
652  }
653  this->value = parameter;
654  // Bouml preserved body end 000A12F1
655 }
656 
657 void I2tExceedCounter::toString(std::string& value) {
658  // Bouml preserved body begin 000A1371
659  std::stringstream ss;
660  ss << this->name << ": " << this->value;
661  value = ss.str();
662  // Bouml preserved body end 000A1371
663 }
664 
666  // Bouml preserved body begin 000A13F1
667  message.stctOutput.commandNumber = msgType;
668  message.stctOutput.moduleAddress = DRIVE;
669  message.stctOutput.typeNumber = 28; //I2tExceedCounter
670  message.stctOutput.value = (uint32)value;
671  // Bouml preserved body end 000A13F1
672 }
673 
675  // Bouml preserved body begin 000A1471
676  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
677  this->value = (uint32)message.stctInput.value;
678  }
679  // Bouml preserved body end 000A1471
680 }
681 
683  // Bouml preserved body begin 000A0871
684  this->name = "I2tLimit";
685  this->lowerLimit = 0;
686  this->upperLimit = INT_MAX;
688  // Bouml preserved body end 000A0871
689 }
690 
692  // Bouml preserved body begin 000A08F1
693  // Bouml preserved body end 000A08F1
694 }
695 
696 void I2tLimit::getParameter(unsigned int& parameter) const {
697  // Bouml preserved body begin 000A0971
698  parameter = this->value;
699  // Bouml preserved body end 000A0971
700 }
701 
702 void I2tLimit::setParameter(const unsigned int parameter) {
703  // Bouml preserved body begin 000A09F1
704  if (this->lowerLimit > parameter) {
705  throw std::out_of_range("The parameter exceeds the lower limit");
706  }
707  if (this->upperLimit < parameter) {
708  throw std::out_of_range("The parameter exceeds the upper limit");
709  }
710  this->value = parameter;
711  // Bouml preserved body end 000A09F1
712 }
713 
714 void I2tLimit::toString(std::string& value) {
715  // Bouml preserved body begin 000A0A71
716  std::stringstream ss;
717  ss << this->name << ": " << this->value;
718  value = ss.str();
719  // Bouml preserved body end 000A0A71
720 }
721 
723  // Bouml preserved body begin 000A0AF1
724  message.stctOutput.commandNumber = msgType;
725  message.stctOutput.moduleAddress = DRIVE;
726  message.stctOutput.typeNumber = 26; //I2tLimit
727  message.stctOutput.value = (uint32)value;
728  // Bouml preserved body end 000A0AF1
729 }
730 
732  // Bouml preserved body begin 000A0B71
733  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
734  this->value = (uint32)message.stctInput.value;
735  }
736  // Bouml preserved body end 000A0B71
737 }
738 
740  // Bouml preserved body begin 000710F1
741  this->name = "InitializationMode";
742  this->lowerLimit = 0;
743  this->upperLimit = 2;
745  // Bouml preserved body end 000710F1
746 }
747 
749  // Bouml preserved body begin 00071171
750  // Bouml preserved body end 00071171
751 }
752 
753 void InitializationMode::getParameter(int& parameter) const {
754  // Bouml preserved body begin 000711F1
755  parameter = this->value;
756  // Bouml preserved body end 000711F1
757 }
758 
759 void InitializationMode::setParameter(const int parameter) {
760  // Bouml preserved body begin 000935F1
761  if (this->lowerLimit > parameter) {
762  throw std::out_of_range("The parameter exceeds the lower limit");
763  }
764  if (this->upperLimit < parameter) {
765  throw std::out_of_range("The parameter exceeds the upper limit");
766  }
767  this->value = parameter;
768  // Bouml preserved body end 000935F1
769 }
770 
771 void InitializationMode::toString(std::string& value) {
772  // Bouml preserved body begin 0009E971
773  std::stringstream ss;
774  ss << this->name << ": " << this->value;
775  value = ss.str();
776  // Bouml preserved body end 0009E971
777 }
778 
780  // Bouml preserved body begin 00071271
781  message.stctOutput.commandNumber = msgType;
782  message.stctOutput.moduleAddress = DRIVE;
783  message.stctOutput.typeNumber = 249; //InitializationMode
784  message.stctOutput.value = value;
785  // Bouml preserved body end 00071271
786 }
787 
789  // Bouml preserved body begin 000722F1
790  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
791  this->value = (int32)message.stctInput.value;
792  }
793  // Bouml preserved body end 000722F1
794 }
795 
797  // Bouml preserved body begin 00082F71
798  this->name = "InitSineDelay";
799  this->lowerLimit = -32.768 * seconds;
800  this->upperLimit = +32.767 * seconds;
802  // Bouml preserved body end 00082F71
803 }
804 
806  // Bouml preserved body begin 00082FF1
807  // Bouml preserved body end 00082FF1
808 }
809 
810 void InitSineDelay::getParameter(quantity<si::time>& parameter) const {
811  // Bouml preserved body begin 00083071
812  parameter = this->value;
813  // Bouml preserved body end 00083071
814 }
815 
816 void InitSineDelay::setParameter(const quantity<si::time>& parameter) {
817  // Bouml preserved body begin 000830F1
818  if (this->lowerLimit > parameter) {
819  throw std::out_of_range("The parameter exceeds the lower limit");
820  }
821  if (this->upperLimit < parameter) {
822  throw std::out_of_range("The parameter exceeds the upper limit");
823  }
824 
825  this->value = parameter;
826  // Bouml preserved body end 000830F1
827 }
828 
829 void InitSineDelay::toString(std::string& value) {
830  // Bouml preserved body begin 0009E3F1
831  std::stringstream ss;
832  ss << this->name << ": " << this->value.value();
833  value = ss.str();
834  // Bouml preserved body end 0009E3F1
835 }
836 
838  // Bouml preserved body begin 00083171
839 
840  message.stctOutput.commandNumber = msgType;
841  message.stctOutput.moduleAddress = DRIVE;
842  message.stctOutput.typeNumber = 244; //InitSineDelay
843  message.stctOutput.value = (int32)(value.value() * 1000); //sec to µsec
844 
845  // Bouml preserved body end 00083171
846 }
847 
849  // Bouml preserved body begin 000831F1
850  double temp = (int32)message.stctInput.value;
851  this->value = (temp/1000.0) * seconds; //µsec to sec
852  // Bouml preserved body end 000831F1
853 }
854 
856  // Bouml preserved body begin 00082771
857  this->name = "MassInertiaConstant";
858  this->lowerLimit = INT_MIN;
859  this->upperLimit = INT_MAX;
861  // Bouml preserved body end 00082771
862 }
863 
865  // Bouml preserved body begin 000827F1
866  // Bouml preserved body end 000827F1
867 }
868 
869 void MassInertiaConstant::getParameter(int& parameter) const {
870  // Bouml preserved body begin 00082871
871  parameter = this->value;
872  // Bouml preserved body end 00082871
873 }
874 
875 void MassInertiaConstant::setParameter(const int parameter) {
876  // Bouml preserved body begin 000828F1
877  if (this->lowerLimit > parameter) {
878  throw std::out_of_range("The parameter exceeds the lower limit");
879  }
880  if (this->upperLimit < parameter) {
881  throw std::out_of_range("The parameter exceeds the upper limit");
882  }
883 
884  this->value = parameter;
885  // Bouml preserved body end 000828F1
886 }
887 
888 void MassInertiaConstant::toString(std::string& value) {
889  // Bouml preserved body begin 0009E171
890  std::stringstream ss;
891  ss << this->name << ": " << this->value;
892  value = ss.str();
893  // Bouml preserved body end 0009E171
894 }
895 
897  // Bouml preserved body begin 00082971
898 
899  message.stctOutput.commandNumber = msgType;
900  message.stctOutput.moduleAddress = DRIVE;
901  message.stctOutput.typeNumber = 238; //MassInertiaConstant
902  message.stctOutput.value = (int32)value; //TODO do convertion
903 
904  // Bouml preserved body end 00082971
905 }
906 
908  // Bouml preserved body begin 000829F1
909  this->value = (int32)message.stctInput.value; //TODO do convertion
910  // Bouml preserved body end 000829F1
911 }
912 
914  // Bouml preserved body begin 0006A5F1
915  this->name = "MaximumMotorCurrent";
916  this->lowerLimit = 0 * ampere;
917  this->upperLimit = INT_MAX * ampere;
919  // Bouml preserved body end 0006A5F1
920 }
921 
923  // Bouml preserved body begin 0006A671
924  // Bouml preserved body end 0006A671
925 }
926 
927 void MaximumMotorCurrent::getParameter(quantity<current>& parameter) const {
928  // Bouml preserved body begin 0006A6F1
929  parameter = this->value;
930  // Bouml preserved body end 0006A6F1
931 }
932 
933 void MaximumMotorCurrent::setParameter(const quantity<current>& parameter) {
934  // Bouml preserved body begin 0006A771
935  if (this->lowerLimit > parameter) {
936  throw std::out_of_range("The parameter exceeds the lower limit");
937  }
938  if (this->upperLimit < parameter) {
939  throw std::out_of_range("The parameter exceeds the upper limit");
940  }
941 
942  this->value = parameter;
943  // Bouml preserved body end 0006A771
944 }
945 
946 void MaximumMotorCurrent::toString(std::string& value) {
947  // Bouml preserved body begin 0009CA71
948  std::stringstream ss;
949  ss << this->name << ": " << this->value.value();
950  value = ss.str();
951  // Bouml preserved body end 0009CA71
952 }
953 
955  // Bouml preserved body begin 0006A7F1
956 
957  message.stctOutput.commandNumber = msgType;
958  message.stctOutput.moduleAddress = DRIVE;
959  message.stctOutput.typeNumber = 6; //MaximumMotorCurrent
960  message.stctOutput.value = (uint32)(value.value() * 1000.0); // ampere to milli ampere
961 
962  // Bouml preserved body end 0006A7F1
963 }
964 
966  // Bouml preserved body begin 0006A871
967  double temp = (uint32)message.stctInput.value;
968  this->value = temp/1000.0 * ampere; //milli ampere to ampere
969  // Bouml preserved body end 0006A871
970 }
971 
973  // Bouml preserved body begin 00070DF1
974  this->name = "MotorCoilResistance";
975  this->lowerLimit = INT_MIN * ohm;
976  this->upperLimit = INT_MAX * ohm;
978  // Bouml preserved body end 00070DF1
979 }
980 
982  // Bouml preserved body begin 00070E71
983  // Bouml preserved body end 00070E71
984 }
985 
986 void MotorCoilResistance::getParameter(quantity<resistance>& parameter) const {
987  // Bouml preserved body begin 00070EF1
988  parameter = this->value;
989  // Bouml preserved body end 00070EF1
990 }
991 
992 void MotorCoilResistance::setParameter(const quantity<resistance>& parameter) {
993  // Bouml preserved body begin 00093571
994  if (this->lowerLimit > parameter) {
995  throw std::out_of_range("The parameter exceeds the lower limit");
996  }
997  if (this->upperLimit < parameter) {
998  throw std::out_of_range("The parameter exceeds the upper limit");
999  }
1000  this->value = parameter;
1001  // Bouml preserved body end 00093571
1002 }
1003 
1004 void MotorCoilResistance::toString(std::string& value) {
1005  // Bouml preserved body begin 0009E8F1
1006  std::stringstream ss;
1007  ss << this->name << ": " << this->value.value();
1008  value = ss.str();
1009  // Bouml preserved body end 0009E8F1
1010 }
1011 
1013  // Bouml preserved body begin 00070F71
1014  message.stctOutput.commandNumber = msgType;
1015  message.stctOutput.moduleAddress = DRIVE;
1016  message.stctOutput.typeNumber = 240; //MotorCoilResistance
1017  message.stctOutput.value = (int32)(value.value() * 1000); //from ohm to milli ohm
1018  // Bouml preserved body end 00070F71
1019 }
1020 
1022  // Bouml preserved body begin 00072271
1023  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
1024  double temp = (int32)message.stctInput.value;
1025  this->value = temp/1000.0 * ohm;
1026  }
1027  // Bouml preserved body end 00072271
1028 }
1029 
1031  // Bouml preserved body begin 0009F671
1032  this->name = "MotorControllerTimeout";
1033  this->lowerLimit = 0;
1034  this->upperLimit = INT_MAX * seconds;
1036  // Bouml preserved body end 0009F671
1037 }
1038 
1040  // Bouml preserved body begin 0009F6F1
1041  // Bouml preserved body end 0009F6F1
1042 }
1043 
1044 void MotorControllerTimeout::getParameter(quantity<si::time>& parameter) const {
1045  // Bouml preserved body begin 0009F771
1046  parameter = this->value;
1047  // Bouml preserved body end 0009F771
1048 }
1049 
1050 void MotorControllerTimeout::setParameter(const quantity<si::time>& parameter) {
1051  // Bouml preserved body begin 0009F7F1
1052  if (this->lowerLimit > parameter) {
1053  throw std::out_of_range("The parameter exceeds the lower limit");
1054  }
1055  if (this->upperLimit < parameter) {
1056  throw std::out_of_range("The parameter exceeds the upper limit");
1057  }
1058 
1059  this->value = parameter;
1060  // Bouml preserved body end 0009F7F1
1061 }
1062 
1063 void MotorControllerTimeout::toString(std::string& value) {
1064  // Bouml preserved body begin 0009F871
1065  std::stringstream ss;
1066  ss << this->name << ": " << this->value.value();
1067  value = ss.str();
1068  // Bouml preserved body end 0009F871
1069 }
1070 
1072  // Bouml preserved body begin 0009F8F1
1073 
1074 
1075  if (msgType == SAP){
1076  message.stctOutput.commandNumber = SGP;
1077  }else if (msgType == GAP) {
1078  message.stctOutput.commandNumber = GGP;
1079  } else {
1080  message.stctOutput.commandNumber = msgType;
1081  }
1082  message.stctOutput.moduleAddress = DRIVE;
1083  message.stctOutput.typeNumber = 90; //MotorControllerTimeout
1084  message.stctOutput.value = value.value() * 1000; //sec to milli sec
1085 
1086  // Bouml preserved body end 0009F8F1
1087 }
1088 
1090  // Bouml preserved body begin 0009F971
1091  this->value = ((double)message.stctInput.value)/1000.0 * seconds; //milli sec to sec
1092  // Bouml preserved body end 0009F971
1093 }
1094 
1096  // Bouml preserved body begin 000719F1
1097  this->name = "MotorPoles";
1098  this->lowerLimit = 2;
1099  this->upperLimit = 254;
1101  // Bouml preserved body end 000719F1
1102 }
1103 
1105  // Bouml preserved body begin 00071A71
1106  // Bouml preserved body end 00071A71
1107 }
1108 
1109 void MotorPoles::getParameter(unsigned int& parameter) const {
1110  // Bouml preserved body begin 00071AF1
1111  parameter = this->value;
1112  // Bouml preserved body end 00071AF1
1113 }
1114 
1115 void MotorPoles::setParameter(const unsigned int parameter) {
1116  // Bouml preserved body begin 000937F1
1117  if (this->lowerLimit > parameter) {
1118  throw std::out_of_range("The parameter exceeds the lower limit");
1119  }
1120  if (this->upperLimit < parameter) {
1121  throw std::out_of_range("The parameter exceeds the upper limit");
1122  }
1123  this->value = parameter;
1124  // Bouml preserved body end 000937F1
1125 }
1126 
1127 void MotorPoles::toString(std::string& value) {
1128  // Bouml preserved body begin 0009EB71
1129  std::stringstream ss;
1130  ss << this->name << ": " << this->value;
1131  value = ss.str();
1132  // Bouml preserved body end 0009EB71
1133 }
1134 
1136  // Bouml preserved body begin 00071B71
1137  message.stctOutput.commandNumber = msgType;
1138  message.stctOutput.moduleAddress = DRIVE;
1139  message.stctOutput.typeNumber = 253; //MotorPoles
1140  message.stctOutput.value = (uint32)value;
1141  // Bouml preserved body end 00071B71
1142 }
1143 
1145  // Bouml preserved body begin 00072471
1146  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
1147  this->value = (uint32)message.stctInput.value;
1148  }
1149  // Bouml preserved body end 00072471
1150 }
1151 
1153  // Bouml preserved body begin 000A03F1
1154  this->name = "OperationalTime";
1155  this->lowerLimit = 0;
1156  this->upperLimit = INT_MAX * seconds;
1158  // Bouml preserved body end 000A03F1
1159 }
1160 
1162  // Bouml preserved body begin 000A0471
1163  // Bouml preserved body end 000A0471
1164 }
1165 
1166 void OperationalTime::getParameter(quantity<si::time>& parameter) const {
1167  // Bouml preserved body begin 000A04F1
1168  parameter = this->value;
1169  // Bouml preserved body end 000A04F1
1170 }
1171 
1172 void OperationalTime::setParameter(const quantity<si::time>& parameter) {
1173  // Bouml preserved body begin 000A0571
1174  if (this->lowerLimit > parameter) {
1175  throw std::out_of_range("The parameter exceeds the lower limit");
1176  }
1177  if (this->upperLimit < parameter) {
1178  throw std::out_of_range("The parameter exceeds the upper limit");
1179  }
1180 
1181  this->value = parameter;
1182  // Bouml preserved body end 000A0571
1183 }
1184 
1185 void OperationalTime::toString(std::string& value) {
1186  // Bouml preserved body begin 000A05F1
1187  std::stringstream ss;
1188  ss << this->name << ": " << this->value.value();
1189  value = ss.str();
1190  // Bouml preserved body end 000A05F1
1191 }
1192 
1194  // Bouml preserved body begin 000A0671
1195  message.stctOutput.commandNumber = msgType;
1196  message.stctOutput.moduleAddress = DRIVE;
1197  message.stctOutput.typeNumber = 30; //OperationalTime
1198  message.stctOutput.value = value.value() / 60.0; //sec to min
1199 
1200  // Bouml preserved body end 000A0671
1201 }
1202 
1204  // Bouml preserved body begin 000A06F1
1205  this->value = ((double)message.stctInput.value) * 60.0 * seconds; //min to sec
1206  // Bouml preserved body end 000A06F1
1207 }
1208 
1210  // Bouml preserved body begin 0006ADF1
1211  this->name = "PIDControlTime";
1212  this->lowerLimit = 0;
1213  this->upperLimit = INT_MAX * seconds;
1215  // Bouml preserved body end 0006ADF1
1216 }
1217 
1219  // Bouml preserved body begin 0006AE71
1220  // Bouml preserved body end 0006AE71
1221 }
1222 
1223 void PIDControlTime::getParameter(quantity<si::time>& parameter) const {
1224  // Bouml preserved body begin 0006AEF1
1225  parameter = this->value;
1226  // Bouml preserved body end 0006AEF1
1227 }
1228 
1229 void PIDControlTime::setParameter(const quantity<si::time>& parameter) {
1230  // Bouml preserved body begin 0006AF71
1231  if (this->lowerLimit > parameter) {
1232  throw std::out_of_range("The parameter exceeds the lower limit");
1233  }
1234  if (this->upperLimit < parameter) {
1235  throw std::out_of_range("The parameter exceeds the upper limit");
1236  }
1237 
1238  this->value = parameter;
1239  // Bouml preserved body end 0006AF71
1240 }
1241 
1242 void PIDControlTime::toString(std::string& value) {
1243  // Bouml preserved body begin 0009CF71
1244  std::stringstream ss;
1245  ss << this->name << ": " << this->value.value();
1246  value = ss.str();
1247  // Bouml preserved body end 0009CF71
1248 }
1249 
1251  // Bouml preserved body begin 0006AFF1
1252 
1253  message.stctOutput.commandNumber = msgType;
1254  message.stctOutput.moduleAddress = DRIVE;
1255  message.stctOutput.typeNumber = 133; //PIDControlTime
1256  message.stctOutput.value = value.value() * 1000; //sec to milli sec
1257 
1258  // Bouml preserved body end 0006AFF1
1259 }
1260 
1262  // Bouml preserved body begin 0006B071
1263  this->value = ((double)message.stctInput.value)/1000 * seconds; //milli sec to sec
1264  // Bouml preserved body end 0006B071
1265 }
1266 
1268  // Bouml preserved body begin 000716F1
1269  this->name = "ReversingEncoderDirection";
1271  // Bouml preserved body end 000716F1
1272 }
1273 
1275  // Bouml preserved body begin 00071771
1276  // Bouml preserved body end 00071771
1277 }
1278 
1279 bool ReversingEncoderDirection::getParameter(bool& parameter) const {
1280  // Bouml preserved body begin 000717F1
1281  parameter = this->value;
1282  return this->value;
1283  // Bouml preserved body end 000717F1
1284 }
1285 
1286 void ReversingEncoderDirection::setParameter(const bool parameter) {
1287  // Bouml preserved body begin 000936F1
1288  this->value = parameter;
1289  // Bouml preserved body end 000936F1
1290 }
1291 
1292 void ReversingEncoderDirection::toString(std::string& value) {
1293  // Bouml preserved body begin 0009EA71
1294  std::stringstream ss;
1295  ss << this->name << ": " << this->value;
1296  value = ss.str();
1297  // Bouml preserved body end 0009EA71
1298 }
1299 
1301  // Bouml preserved body begin 00071871
1302  message.stctOutput.commandNumber = msgType;
1303  message.stctOutput.moduleAddress = DRIVE;
1304  message.stctOutput.typeNumber = 251; //ReversingEncoderDirection
1305  message.stctOutput.value = value;
1306  // Bouml preserved body end 00071871
1307 }
1308 
1310  // Bouml preserved body begin 000723F1
1311  if (message.stctOutput.commandNumber == message.stctInput.commandNumber && message.stctInput.status == MAILBOX_SUCCESS) {
1312  this->value = message.stctInput.value;
1313  }
1314  // Bouml preserved body end 000723F1
1315 }
1316 
1318  // Bouml preserved body begin 0007C871
1319  this->name = "SetEncoderCounterZeroAtNextNChannel";
1321  // Bouml preserved body end 0007C871
1322 }
1323 
1325  // Bouml preserved body begin 0007C8F1
1326  // Bouml preserved body end 0007C8F1
1327 }
1328 
1330  // Bouml preserved body begin 0007C971
1331  parameter = this->value;
1332  // Bouml preserved body end 0007C971
1333 }
1334 
1336  // Bouml preserved body begin 0007C9F1
1337  this->value = parameter;
1338  // Bouml preserved body end 0007C9F1
1339 }
1340 
1342  // Bouml preserved body begin 0009D571
1343  std::stringstream ss;
1344  ss << this->name << ": " << this->value;
1345  value = ss.str();
1346  // Bouml preserved body end 0009D571
1347 }
1348 
1350  // Bouml preserved body begin 0007CA71
1351 
1352  message.stctOutput.commandNumber = msgType;
1353  message.stctOutput.moduleAddress = DRIVE;
1354  message.stctOutput.typeNumber = 161; //SetEncoderCounterZeroAtNextNChannel
1355  message.stctOutput.value = value;
1356 
1357  // Bouml preserved body end 0007CA71
1358 }
1359 
1361  // Bouml preserved body begin 0007CAF1
1362  this->value = message.stctInput.value;
1363  // Bouml preserved body end 0007CAF1
1364 }
1365 
1367  // Bouml preserved body begin 0007CC71
1368  this->name = "SetEncoderCounterZeroAtNextSwitch";
1370  // Bouml preserved body end 0007CC71
1371 }
1372 
1374  // Bouml preserved body begin 0007CCF1
1375  // Bouml preserved body end 0007CCF1
1376 }
1377 
1379  // Bouml preserved body begin 0007CD71
1380  parameter = this->value;
1381  // Bouml preserved body end 0007CD71
1382 }
1383 
1385  // Bouml preserved body begin 0007CDF1
1386  this->value = parameter;
1387  // Bouml preserved body end 0007CDF1
1388 }
1389 
1391  // Bouml preserved body begin 0009D5F1
1392  std::stringstream ss;
1393  ss << this->name << ": " << this->value;
1394  value = ss.str();
1395  // Bouml preserved body end 0009D5F1
1396 }
1397 
1399  // Bouml preserved body begin 0007CE71
1400 
1401  message.stctOutput.commandNumber = msgType;
1402  message.stctOutput.moduleAddress = DRIVE;
1403  message.stctOutput.typeNumber = 162; //SetEncoderCounterZeroAtNextSwitch
1404  message.stctOutput.value = value;
1405 
1406  // Bouml preserved body end 0007CE71
1407 }
1408 
1410  // Bouml preserved body begin 0007CEF1
1411  this->value = message.stctInput.value;
1412  // Bouml preserved body end 0007CEF1
1413 }
1414 
1416  // Bouml preserved body begin 0007D071
1417  this->name = "SetEncoderCounterZeroOnlyOnce";
1419  // Bouml preserved body end 0007D071
1420 }
1421 
1423  // Bouml preserved body begin 0007D0F1
1424  // Bouml preserved body end 0007D0F1
1425 }
1426 
1427 void SetEncoderCounterZeroOnlyOnce::getParameter(bool& parameter) const {
1428  // Bouml preserved body begin 0007D171
1429  parameter = this->value;
1430  // Bouml preserved body end 0007D171
1431 }
1432 
1434  // Bouml preserved body begin 0007D1F1
1435  this->value = parameter;
1436  // Bouml preserved body end 0007D1F1
1437 }
1438 
1440  // Bouml preserved body begin 0009D671
1441  std::stringstream ss;
1442  ss << this->name << ": " << this->value;
1443  value = ss.str();
1444  // Bouml preserved body end 0009D671
1445 }
1446 
1448  // Bouml preserved body begin 0007D271
1449 
1450  message.stctOutput.commandNumber = msgType;
1451  message.stctOutput.moduleAddress = DRIVE;
1452  message.stctOutput.typeNumber = 163; //SetEncoderCounterZeroOnlyOnce
1453  message.stctOutput.value = value;
1454 
1455  // Bouml preserved body end 0007D271
1456 }
1457 
1459  // Bouml preserved body begin 0007D2F1
1460  this->value = message.stctInput.value;
1461  // Bouml preserved body end 0007D2F1
1462 }
1463 
1465  // Bouml preserved body begin 0006EDF1
1466  this->name = "SineInitializationVelocity";
1467  this->lowerLimit = INT_MIN;
1468  this->upperLimit = INT_MAX;
1470  // Bouml preserved body end 0006EDF1
1471 }
1472 
1474  // Bouml preserved body begin 0006EE71
1475  // Bouml preserved body end 0006EE71
1476 }
1477 
1478 void SineInitializationVelocity::getParameter(int& parameter) const {
1479  // Bouml preserved body begin 0006EEF1
1480  parameter = this->value;
1481  // Bouml preserved body end 0006EEF1
1482 }
1483 
1484 void SineInitializationVelocity::setParameter(const int parameter) {
1485  // Bouml preserved body begin 0006EF71
1486  if (this->lowerLimit > parameter) {
1487  throw std::out_of_range("The parameter exceeds the lower limit");
1488  }
1489  if (this->upperLimit < parameter) {
1490  throw std::out_of_range("The parameter exceeds the upper limit");
1491  }
1492 
1493  this->value = parameter;
1494  // Bouml preserved body end 0006EF71
1495 }
1496 
1497 void SineInitializationVelocity::toString(std::string& value) {
1498  // Bouml preserved body begin 0009E271
1499  std::stringstream ss;
1500  ss << this->name << ": " << this->value;
1501  value = ss.str();
1502  // Bouml preserved body end 0009E271
1503 }
1504 
1506  // Bouml preserved body begin 0006EFF1
1507 
1508  message.stctOutput.commandNumber = msgType;
1509  message.stctOutput.moduleAddress = DRIVE;
1510  message.stctOutput.typeNumber = 241; //SineInitializationVelocity
1511  message.stctOutput.value = (int32)value;
1512  // Bouml preserved body end 0006EFF1
1513 }
1514 
1516  // Bouml preserved body begin 0006F071
1517  this->value = (int32)message.stctInput.value;
1518  // Bouml preserved body end 0006F071
1519 }
1520 
1522  // Bouml preserved body begin 0007DC71
1523  this->name = "StopSwitchPolarity";
1524  this->lowerLimit = 0;
1525  this->upperLimit = 3;
1527  // Bouml preserved body end 0007DC71
1528 }
1529 
1531  // Bouml preserved body begin 0007DCF1
1532  // Bouml preserved body end 0007DCF1
1533 }
1534 
1535 void StopSwitchPolarity::getParameter(unsigned int& parameter) const {
1536  // Bouml preserved body begin 0007DD71
1537  parameter = this->value;
1538  // Bouml preserved body end 0007DD71
1539 }
1540 
1541 void StopSwitchPolarity::setParameter(const unsigned int parameter) {
1542  // Bouml preserved body begin 0007DDF1
1543  if (this->lowerLimit > parameter) {
1544  throw std::out_of_range("The parameter exceeds the lower limit");
1545  }
1546  if (this->upperLimit < parameter) {
1547  throw std::out_of_range("The parameter exceeds the upper limit");
1548  }
1549 
1550  this->value = parameter;
1551  // Bouml preserved body end 0007DDF1
1552 }
1553 
1554 void StopSwitchPolarity::toString(std::string& value) {
1555  // Bouml preserved body begin 0009D7F1
1556  std::stringstream ss;
1557  ss << this->name << ": " << this->value;
1558  value = ss.str();
1559  // Bouml preserved body end 0009D7F1
1560 }
1561 
1563  // Bouml preserved body begin 0007DE71
1564 
1565  message.stctOutput.commandNumber = msgType;
1566  message.stctOutput.moduleAddress = DRIVE;
1567  message.stctOutput.typeNumber = 166; //StopSwitchPolarity
1568  message.stctOutput.value = value;
1569 
1570  // Bouml preserved body end 0007DE71
1571 }
1572 
1574  // Bouml preserved body begin 0007DEF1
1575  this->value = message.stctInput.value;
1576  // Bouml preserved body end 0007DEF1
1577 }
1578 
1580  // Bouml preserved body begin 0009FF71
1581  this->name = "ThermalWindingTimeConstant";
1582  this->lowerLimit = 0;
1583  this->upperLimit = INT_MAX * seconds;
1585  // Bouml preserved body end 0009FF71
1586 }
1587 
1589  // Bouml preserved body begin 0009FFF1
1590  // Bouml preserved body end 0009FFF1
1591 }
1592 
1593 void ThermalWindingTimeConstant::getParameter(quantity<si::time>& parameter) const {
1594  // Bouml preserved body begin 000A0071
1595  parameter = this->value;
1596  // Bouml preserved body end 000A0071
1597 }
1598 
1599 void ThermalWindingTimeConstant::setParameter(const quantity<si::time>& parameter) {
1600  // Bouml preserved body begin 000A00F1
1601  if (this->lowerLimit > parameter) {
1602  throw std::out_of_range("The parameter exceeds the lower limit");
1603  }
1604  if (this->upperLimit < parameter) {
1605  throw std::out_of_range("The parameter exceeds the upper limit");
1606  }
1607 
1608  this->value = parameter;
1609  // Bouml preserved body end 000A00F1
1610 }
1611 
1612 void ThermalWindingTimeConstant::toString(std::string& value) {
1613  // Bouml preserved body begin 000A0171
1614  std::stringstream ss;
1615  ss << this->name << ": " << this->value.value();
1616  value = ss.str();
1617  // Bouml preserved body end 000A0171
1618 }
1619 
1621  // Bouml preserved body begin 000A01F1
1622  message.stctOutput.commandNumber = msgType;
1623  message.stctOutput.moduleAddress = DRIVE;
1624  message.stctOutput.typeNumber = 25; //ThermalWindingTimeConstant
1625  message.stctOutput.value = value.value() * 1000; //sec to milli sec
1626 
1627  // Bouml preserved body end 000A01F1
1628 }
1629 
1631  // Bouml preserved body begin 000A0271
1632  this->value = ((double)message.stctInput.value)/1000.0 * seconds; //milli sec to sec
1633  // Bouml preserved body end 000A0271
1634 }
1635 
1637  // Bouml preserved body begin 000CB871
1638  this->name = "MotorHaltedVelocity";
1639  this->lowerLimit = INT_MIN;
1640  this->upperLimit = INT_MAX;
1642  // Bouml preserved body end 000CB871
1643 }
1644 
1646  // Bouml preserved body begin 000CB8F1
1647  // Bouml preserved body end 000CB8F1
1648 }
1649 
1650 void MotorHaltedVelocity::getParameter(int& parameter) const {
1651  // Bouml preserved body begin 000CB971
1652  parameter = this->value;
1653  // Bouml preserved body end 000CB971
1654 }
1655 
1656 void MotorHaltedVelocity::setParameter(const int parameter) {
1657  // Bouml preserved body begin 000CB9F1
1658  if (this->lowerLimit > parameter) {
1659  throw std::out_of_range("The parameter exceeds the lower limit");
1660  }
1661  if (this->upperLimit < parameter) {
1662  throw std::out_of_range("The parameter exceeds the upper limit");
1663  }
1664 
1665  this->value = parameter;
1666  // Bouml preserved body end 000CB9F1
1667 }
1668 
1669 void MotorHaltedVelocity::toString(std::string& value) {
1670  // Bouml preserved body begin 000CBA71
1671  std::stringstream ss;
1672  ss << this->name << ": " << this->value;
1673  value = ss.str();
1674  // Bouml preserved body end 000CBA71
1675 }
1676 
1678  // Bouml preserved body begin 000CBAF1
1679 
1680  message.stctOutput.commandNumber = msgType;
1681  message.stctOutput.moduleAddress = DRIVE;
1682  message.stctOutput.typeNumber = 9; //MotorHaltedVelocity
1683  message.stctOutput.value = (int32)value;
1684  // Bouml preserved body end 000CBAF1
1685 }
1686 
1688  // Bouml preserved body begin 000CBB71
1689  this->value = (int32)message.stctInput.value;
1690  // Bouml preserved body end 000CBB71
1691 }
1692 
1693 
1694 } // namespace youbot
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setParameter(const quantity< si::time > &parameter)
void setParameter(const quantity< current > &parameter)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setParameter(const unsigned int parameter)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getParameter(quantity< current > &parameter) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setParameter(const unsigned int parameter)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setParameter(const quantity< current > &parameter)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setParameter(const unsigned int parameter)
void setParameter(const quantity< si::time > &parameter)
void getParameter(quantity< resistance > &parameter) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getParameter(quantity< current > &parameter) const
void getParameter(unsigned int &parameter) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setParameter(const quantity< si::time > &parameter)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getParameter(quantity< si::time > &parameter) const
void getParameter(unsigned int &parameter) const
void getParameter(unsigned int &parameter) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getParameter(unsigned int &parameter) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getParameter(quantity< si::time > &parameter) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setParameter(const quantity< si::time > &parameter)
int32_t int32
Definition: osal.h:32
EtherCAT mailbox message of the youBot slaves.
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setParameter(const unsigned int parameter)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getParameter(quantity< si::time > &parameter) const
void getParameter(unsigned int &parameter) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
uint32_t uint32
Definition: osal.h:35
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setParameter(const unsigned int parameter)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setParameter(const quantity< si::time > &parameter)
void setParameter(const quantity< si::time > &parameter)
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
Stores YouBotJoint informations which are needed in the driver.
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void getParameter(unsigned int &parameter) const
void setYouBotMailboxMsg(const YouBotSlaveMailboxMsg &message, const YouBotJointStorage &storage)
void setParameter(const quantity< resistance > &parameter)
void setParameter(const unsigned int parameter)
void getParameter(quantity< si::time > &parameter) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void getParameter(quantity< si::time > &parameter) const
void getParameter(unsigned int &parameter) const
void getParameter(quantity< si::time > &parameter) const
void getYouBotMailboxMsg(YouBotSlaveMailboxMsg &message, TMCLCommandNumber msgType, const YouBotJointStorage &storage) const
void setParameter(const unsigned int parameter)


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:26