HEBI C++ API  3.10.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
info.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "hebi.h"
4 
5 #include <string>
6 
7 #include "color.hpp"
8 #include "gains.hpp"
9 #include "ip_address.hpp"
10 #include "message_helpers.hpp"
11 #include "util.hpp"
12 
13 namespace hebi {
14 
34 class Info final {
35 public:
36  enum class ControlStrategy {
38  Off,
40  DirectPWM,
43  Strategy2,
46  Strategy3,
49  Strategy4,
52  Strategy5
53  };
54 
55  enum class CalibrationState {
57  Normal,
64  };
65 
66  enum class MstopStrategy {
68  Disabled,
70  MotorOff,
73  };
74 
75  enum class PositionLimitStrategy {
81  MotorOff,
83  Disabled,
84  };
85 
86 protected:
88  class FloatField final {
89  public:
90 #ifndef DOXYGEN_OMIT_INTERNAL
91  FloatField(const HebiInfoRef& internal, HebiInfoFloatField field);
92 #endif // DOXYGEN_OMIT_INTERNAL
93  explicit operator bool() const { return has(); }
107  bool has() const;
110  float get() const;
111 
113  private:
114  const HebiInfoRef& internal_;
115  HebiInfoFloatField const field_;
116  };
117 
123  class HighResAngleField final {
124  public:
125 #ifndef DOXYGEN_OMIT_INTERNAL
126  HighResAngleField(const HebiInfoRef& internal, HebiInfoHighResAngleField field);
127 #endif // DOXYGEN_OMIT_INTERNAL
128  explicit operator bool() const { return has(); }
142  bool has() const;
148  double get() const;
160  void get(int64_t* revolutions, float* radian_offset) const;
161 
163  private:
164  const HebiInfoRef& internal_;
165  HebiInfoHighResAngleField const field_;
166  };
167 
169  class UInt64Field final {
170  public:
171 #ifndef DOXYGEN_OMIT_INTERNAL
172  UInt64Field(const HebiInfoRef& internal, HebiInfoUInt64Field field);
173 #endif // DOXYGEN_OMIT_INTERNAL
174  explicit operator bool() const { return has(); }
188  bool has() const;
191  uint64_t get() const;
192 
194  private:
195  const HebiInfoRef& internal_;
196  HebiInfoUInt64Field const field_;
197  };
198 
200  class IpAddressField final {
201  public:
202 #ifndef DOXYGEN_OMIT_INTERNAL
203  IpAddressField(const HebiInfoRef& internal, HebiInfoUInt64Field field);
204 #endif // DOXYGEN_OMIT_INTERNAL
205  explicit operator bool() const { return has(); }
219  bool has() const;
222  IpAddress get() const;
223 
225  private:
226  const HebiInfoRef& internal_;
227  HebiInfoUInt64Field const field_;
228  };
229 
231  class BoolField final {
232  public:
233 #ifndef DOXYGEN_OMIT_INTERNAL
234  BoolField(const HebiInfoRef& internal, HebiInfoBoolField field);
235 #endif // DOXYGEN_OMIT_INTERNAL
236  bool has() const;
240  bool get() const;
241 
243  private:
244  const HebiInfoRef& internal_;
245  HebiInfoBoolField const field_;
246  };
247 
249  class StringField final {
250  public:
251 #ifndef DOXYGEN_OMIT_INTERNAL
252  StringField(HebiInfoPtr internal, HebiInfoStringField field);
253 #endif // DOXYGEN_OMIT_INTERNAL
254  explicit operator bool() const { return has(); }
268  bool has() const;
271  std::string get() const;
272 
274  private:
275  HebiInfoPtr const internal_;
276  HebiInfoStringField const field_;
277  };
278 
280  class FlagField final {
281  public:
282 #ifndef DOXYGEN_OMIT_INTERNAL
283  FlagField(const HebiInfoRef& internal, HebiInfoFlagField field);
284 #endif // DOXYGEN_OMIT_INTERNAL
285  explicit operator bool() const { return has(); }
299  bool has() const;
300 
302  private:
303  const HebiInfoRef& internal_;
304  HebiInfoFlagField const field_;
305  };
306 
308  template<typename T>
309  class EnumField final {
310  public:
311 #ifndef DOXYGEN_OMIT_INTERNAL
312  EnumField(const HebiInfoRef& internal, HebiInfoEnumField field) : internal_(internal), field_(field) {}
313 #endif // DOXYGEN_OMIT_INTERNAL
314  explicit operator bool() const { return has(); }
328  bool has() const {
329  return (enumGetter(internal_, field_, nullptr) == HebiStatusSuccess);
330  }
333  T get() const {
334  int32_t ret{};
335  enumGetter(internal_, field_, &ret);
336  return static_cast<T>(ret);
337  }
338 
340  private:
341  const HebiInfoRef& internal_;
342  HebiInfoEnumField const field_;
343  };
344 
346  class IoBank final {
347  public:
348 #ifndef DOXYGEN_OMIT_INTERNAL
349  IoBank(HebiInfoPtr internal, HebiInfoRef& internal_ref, HebiInfoIoPinBank bank);
350 #endif // DOXYGEN_OMIT_INTERNAL
351  bool hasLabel(size_t pinNumber) const;
362  std::string getLabel(size_t pinNumber) const;
363 
365  private:
366  HebiInfoPtr internal_;
367  HebiInfoIoPinBank const bank_;
368  };
370  class LedField final {
371  public:
372 #ifndef DOXYGEN_OMIT_INTERNAL
373  LedField(const HebiInfoRef& internal, HebiInfoLedField field);
374 #endif // DOXYGEN_OMIT_INTERNAL
375  explicit operator bool() const { return hasColor(); }
389  bool hasColor() const;
391  Color getColor() const;
392 
394  private:
395  const HebiInfoRef& internal_;
396  HebiInfoLedField const field_;
397  };
398 
400  class Io final {
401  public:
402 #ifndef DOXYGEN_OMIT_INTERNAL
403  Io(HebiInfoPtr internal, HebiInfoRef& internal_ref)
404  : a_(internal, internal_ref, HebiInfoIoBankA),
405  b_(internal, internal_ref, HebiInfoIoBankB),
406  c_(internal, internal_ref, HebiInfoIoBankC),
407  d_(internal, internal_ref, HebiInfoIoBankD),
408  e_(internal, internal_ref, HebiInfoIoBankE),
409  f_(internal, internal_ref, HebiInfoIoBankF) {}
410 #endif // DOXYGEN_OMIT_INTERNAL
411 
412  // With all submessage and field getters: Note that the returned reference
413  // should not be used after the lifetime of this parent.
414 
415  // Subfields ----------------
416 
418  IoBank& a() { return a_; }
420  const IoBank& a() const { return a_; }
422  IoBank& b() { return b_; }
424  const IoBank& b() const { return b_; }
426  IoBank& c() { return c_; }
428  const IoBank& c() const { return c_; }
430  IoBank& d() { return d_; }
432  const IoBank& d() const { return d_; }
434  IoBank& e() { return e_; }
436  const IoBank& e() const { return e_; }
438  IoBank& f() { return f_; }
440  const IoBank& f() const { return f_; }
441 
443  private:
444  IoBank a_;
445  IoBank b_;
446  IoBank c_;
447  IoBank d_;
448  IoBank e_;
449  IoBank f_;
450  };
451 
453 
455  class Settings final {
456  protected:
458  class Actuator final {
459  public:
460 #ifndef DOXYGEN_OMIT_INTERNAL
461  Actuator(const HebiInfoRef& internal)
462  : position_gains_(internal, HebiInfoFloatPositionKp, HebiInfoBoolPositionDOnError),
463  velocity_gains_(internal, HebiInfoFloatVelocityKp, HebiInfoBoolVelocityDOnError),
464  effort_gains_(internal, HebiInfoFloatEffortKp, HebiInfoBoolEffortDOnError),
465  spring_constant_(internal, HebiInfoFloatSpringConstant),
466  velocity_limit_min_(internal, HebiInfoFloatVelocityLimitMin),
467  velocity_limit_max_(internal, HebiInfoFloatVelocityLimitMax),
468  effort_limit_min_(internal, HebiInfoFloatEffortLimitMin),
469  effort_limit_max_(internal, HebiInfoFloatEffortLimitMax),
470  position_limit_min_(internal, HebiInfoHighResAnglePositionLimitMin),
471  position_limit_max_(internal, HebiInfoHighResAnglePositionLimitMax),
472  control_strategy_(internal, HebiInfoEnumControlStrategy),
473  mstop_strategy_(internal, HebiInfoEnumMstopStrategy),
474  min_position_limit_strategy_(internal, HebiInfoEnumMinPositionLimitStrategy),
475  max_position_limit_strategy_(internal, HebiInfoEnumMaxPositionLimitStrategy) {}
476 #endif // DOXYGEN_OMIT_INTERNAL
477 
478  // With all submessage and field getters: Note that the returned reference
479  // should not be used after the lifetime of this parent.
480 
481  // Submessages ----------------
482 
484  const InfoGains& positionGains() const { return position_gains_; }
486  const InfoGains& velocityGains() const { return velocity_gains_; }
488  const InfoGains& effortGains() const { return effort_gains_; }
489 
490  // Subfields ----------------
491 
493  const FloatField& springConstant() const { return spring_constant_; }
495  const FloatField& velocityLimitMin() const { return velocity_limit_min_; }
497  const FloatField& velocityLimitMax() const { return velocity_limit_max_; }
499  const FloatField& effortLimitMin() const { return effort_limit_min_; }
501  const FloatField& effortLimitMax() const { return effort_limit_max_; }
503  const HighResAngleField& positionLimitMin() const { return position_limit_min_; }
505  const HighResAngleField& positionLimitMax() const { return position_limit_max_; }
507  const EnumField<ControlStrategy>& controlStrategy() const { return control_strategy_; }
509  const EnumField<MstopStrategy>& mstopStrategy() const { return mstop_strategy_; }
511  const EnumField<PositionLimitStrategy>& minPositionLimitStrategy() const { return min_position_limit_strategy_; }
513  const EnumField<PositionLimitStrategy>& maxPositionLimitStrategy() const { return max_position_limit_strategy_; }
514 
516  private:
517  InfoGains position_gains_;
518  InfoGains velocity_gains_;
519  InfoGains effort_gains_;
520 
521  FloatField spring_constant_;
522  FloatField velocity_limit_min_;
523  FloatField velocity_limit_max_;
524  FloatField effort_limit_min_;
525  FloatField effort_limit_max_;
526  HighResAngleField position_limit_min_;
527  HighResAngleField position_limit_max_;
528  EnumField<ControlStrategy> control_strategy_;
529  EnumField<MstopStrategy> mstop_strategy_;
530  EnumField<PositionLimitStrategy> min_position_limit_strategy_;
531  EnumField<PositionLimitStrategy> max_position_limit_strategy_;
532  };
533 
535  class Imu final {
536  public:
537 #ifndef DOXYGEN_OMIT_INTERNAL
538  Imu(const HebiInfoRef& internal)
539  : accel_includes_gravity_(internal, HebiInfoBoolAccelIncludesGravity) {}
540 #endif // DOXYGEN_OMIT_INTERNAL
541 
542  // With all submessage and field getters: Note that the returned reference
543  // should not be used after the lifetime of this parent.
544 
545  // Subfields ----------------
546 
548  const BoolField& accelIncludesGravity() const { return accel_includes_gravity_; }
549 
551  private:
552  BoolField accel_includes_gravity_;
553  };
554 
555  public:
556 #ifndef DOXYGEN_OMIT_INTERNAL
557  Settings(HebiInfoPtr internal_ptr, const HebiInfoRef& internal)
558  : actuator_(internal),
559  imu_(internal),
560  name_(internal_ptr, HebiInfoStringName),
561  family_(internal_ptr, HebiInfoStringFamily),
562  electrical_type_(internal_ptr, HebiInfoStringElectricalType),
563  electrical_revision_(internal_ptr, HebiInfoStringElectricalRevision),
564  mechanical_type_(internal_ptr, HebiInfoStringMechanicalType),
565  mechanical_revision_(internal_ptr, HebiInfoStringMechanicalRevision),
566  firmware_type_(internal_ptr, HebiInfoStringFirmwareType),
567  firmware_revision_(internal_ptr, HebiInfoStringFirmwareRevision),
568  user_settings_bytes_1_(internal_ptr, HebiInfoStringUserSettingsBytes1),
569  user_settings_bytes_2_(internal_ptr, HebiInfoStringUserSettingsBytes2),
570  user_settings_bytes_3_(internal_ptr, HebiInfoStringUserSettingsBytes3),
571  user_settings_bytes_4_(internal_ptr, HebiInfoStringUserSettingsBytes4),
572  user_settings_bytes_5_(internal_ptr, HebiInfoStringUserSettingsBytes5),
573  user_settings_bytes_6_(internal_ptr, HebiInfoStringUserSettingsBytes6),
574  user_settings_bytes_7_(internal_ptr, HebiInfoStringUserSettingsBytes7),
575  user_settings_bytes_8_(internal_ptr, HebiInfoStringUserSettingsBytes8),
576  user_settings_float_1_(internal, HebiInfoFloatUserSettingsFloat1),
577  user_settings_float_2_(internal, HebiInfoFloatUserSettingsFloat2),
578  user_settings_float_3_(internal, HebiInfoFloatUserSettingsFloat3),
579  user_settings_float_4_(internal, HebiInfoFloatUserSettingsFloat4),
580  user_settings_float_5_(internal, HebiInfoFloatUserSettingsFloat5),
581  user_settings_float_6_(internal, HebiInfoFloatUserSettingsFloat6),
582  user_settings_float_7_(internal, HebiInfoFloatUserSettingsFloat7),
583  user_settings_float_8_(internal, HebiInfoFloatUserSettingsFloat8),
584  ip_address_(internal, HebiInfoUInt64IpAddress),
585  subnet_mask_(internal, HebiInfoUInt64SubnetMask),
586  default_gateway_(internal, HebiInfoUInt64DefaultGateway),
587  save_current_settings_(internal, HebiInfoFlagSaveCurrentSettings) {}
588 #endif // DOXYGEN_OMIT_INTERNAL
589 
590  // With all submessage and field getters: Note that the returned reference
591  // should not be used after the lifetime of this parent.
592 
593  // Submessages ----------------
594 
596  const Actuator& actuator() const { return actuator_; }
598  const Imu& imu() const { return imu_; }
599 
600  // Subfields ----------------
601 
603  const StringField& name() const { return name_; }
605  const StringField& family() const { return family_; }
607  const StringField& electricalType() const { return electrical_type_; }
609  const StringField& electricalRevision() const { return electrical_revision_; }
611  const StringField& mechanicalType() const { return mechanical_type_; }
613  const StringField& mechanicalRevision() const { return mechanical_revision_; }
615  const StringField& firmwareType() const { return firmware_type_; }
617  const StringField& firmwareRevision() const { return firmware_revision_; }
620  const StringField& userSettingsBytes(size_t number) const
621  {
622  switch (number) {
623  case 1: return user_settings_bytes_1_;
624  case 2: return user_settings_bytes_2_;
625  case 3: return user_settings_bytes_3_;
626  case 4: return user_settings_bytes_4_;
627  case 5: return user_settings_bytes_5_;
628  case 6: return user_settings_bytes_6_;
629  case 7: return user_settings_bytes_7_;
630  case 8: return user_settings_bytes_8_;
631  }
632  throw std::out_of_range("Invalid option for bytes array user setting entry!");
633  }
636  const FloatField& userSettingsFloat(size_t number) const
637  {
638  switch (number) {
639  case 1: return user_settings_float_1_;
640  case 2: return user_settings_float_2_;
641  case 3: return user_settings_float_3_;
642  case 4: return user_settings_float_4_;
643  case 5: return user_settings_float_5_;
644  case 6: return user_settings_float_6_;
645  case 7: return user_settings_float_7_;
646  case 8: return user_settings_float_8_;
647  }
648  throw std::out_of_range("Invalid option for float user setting entry!");
649  }
651  const IpAddressField& ipAddress() const { return ip_address_; }
653  const IpAddressField& subnetMask() const { return subnet_mask_; }
655  const IpAddressField& defaultGateway() const { return default_gateway_; }
657  const FlagField& saveCurrentSettings() const { return save_current_settings_; }
658 
660  private:
661  Actuator actuator_;
662  Imu imu_;
663  StringField name_;
664  StringField family_;
665  StringField electrical_type_;
666  StringField electrical_revision_;
667  StringField mechanical_type_;
668  StringField mechanical_revision_;
669  StringField firmware_type_;
670  StringField firmware_revision_;
671  StringField user_settings_bytes_1_;
672  StringField user_settings_bytes_2_;
673  StringField user_settings_bytes_3_;
674  StringField user_settings_bytes_4_;
675  StringField user_settings_bytes_5_;
676  StringField user_settings_bytes_6_;
677  StringField user_settings_bytes_7_;
678  StringField user_settings_bytes_8_;
679  FloatField user_settings_float_1_;
680  FloatField user_settings_float_2_;
681  FloatField user_settings_float_3_;
682  FloatField user_settings_float_4_;
683  FloatField user_settings_float_5_;
684  FloatField user_settings_float_6_;
685  FloatField user_settings_float_7_;
686  FloatField user_settings_float_8_;
687  IpAddressField ip_address_;
688  IpAddressField subnet_mask_;
689  IpAddressField default_gateway_;
690  FlagField save_current_settings_;
691  };
692 
694  class Actuator final {
695  public:
696 #ifndef DOXYGEN_OMIT_INTERNAL
697  Actuator(const HebiInfoRef& internal) : calibration_state_(internal, HebiInfoEnumCalibrationState) {}
698 #endif // DOXYGEN_OMIT_INTERNAL
699 
700  // With all submessage and field getters: Note that the returned reference
701  // should not be used after the lifetime of this parent.
702 
703  // Subfields ----------------
704 
706  const EnumField<CalibrationState>& calibrationState() const { return calibration_state_; }
707 
709  private:
710  EnumField<CalibrationState> calibration_state_;
711  };
712 
713 private:
718  HebiInfoPtr internal_;
719  HebiInfoRef internal_ref_;
720 
721 public:
722 #ifndef DOXYGEN_OMIT_INTERNAL
723 
727  Info(HebiInfoPtr);
728 #endif // DOXYGEN_OMIT_INTERNAL
729 
732  Info(Info&& other);
733 
734  // With all submessage and field getters: Note that the returned reference
735  // should not be used after the lifetime of this parent.
736 
737  // Submessages -------------------------------------------------------------
738 
740  Io& io() { return io_; }
742  const Io& io() const { return io_; }
744  const Settings& settings() const { return settings_; }
746  const Actuator& actuator() const { return actuator_; }
747 
748  // Subfields -------------------------------------------------------------
749 
751  const StringField& serial() const { return serial_; }
753  const LedField& led() const { return led_; }
756  const UInt64Field& secondsCommanded() const { return seconds_commanded_; }
759  const UInt64Field& secondsOn() const { return seconds_on_; }
760 
765 
766  /* Disable move assigment operator. */
767  Info& operator=(Info&& other) = delete;
768 
769 private:
770  Io io_;
771  Settings settings_;
772  Actuator actuator_;
773 
774  StringField serial_;
775  LedField led_;
776  UInt64Field seconds_commanded_;
777  UInt64Field seconds_on_;
778 };
779 
780 } // namespace hebi
const FlagField & saveCurrentSettings() const
Indicates if the module should save the current values of all of its settings.
Definition: info.hpp:657
const IpAddressField & defaultGateway() const
Gets the default gateway for this module.
Definition: info.hpp:655
const FloatField & userSettingsFloat(size_t number) const
Definition: info.hpp:636
std::string get() const
If the field has a value, returns a copy of that value; otherwise, returns a default.
Definition: info.cpp:88
const HighResAngleField & positionLimitMin() const
The firmware safety limit for the minimum allowed position.
Definition: info.hpp:503
Module settings that are typically changed at a slower rate.
Definition: info.hpp:455
IoBank & f()
I/O pin bank f (pins 1-8 available)
Definition: info.hpp:438
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:84
A message field for an angle measurement which does not lose precision at very high angles.
Definition: info.hpp:123
#define HEBI_DISABLE_COPY(Class)
Definition: util.hpp:16
const IoBank & c() const
I/O pin bank c (pins 1-8 available)
Definition: info.hpp:428
Actuator-specific settings, such as controller gains.
Definition: info.hpp:458
const FloatField & effortLimitMin() const
The firmware safety limit for the minimum allowed effort.
Definition: info.hpp:499
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:74
const LedField & led() const
The module's LED.
Definition: info.hpp:753
const FloatField & springConstant() const
The spring constant of the module.
Definition: info.hpp:493
T get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: info.hpp:333
const FloatField & effortLimitMax() const
The firmware safety limit for the maximum allowed effort.
Definition: info.hpp:501
const IoBank & b() const
I/O pin bank b (pins 1-8 available)
Definition: info.hpp:424
const EnumField< ControlStrategy > & controlStrategy() const
How the position, velocity, and effort PID loops are connected in order to control motor PWM.
Definition: info.hpp:507
const StringField & electricalType() const
Gets the electrical type of this module.
Definition: info.hpp:607
PositionLimitStrategy
Definition: info.hpp:75
const UInt64Field & secondsCommanded() const
Definition: info.hpp:756
A message field representable by a bool value.
Definition: info.hpp:231
Definition: arm.cpp:10
IoBank & b()
I/O pin bank b (pins 1-8 available)
Definition: info.hpp:422
const HighResAngleField & positionLimitMax() const
The firmware safety limit for the maximum allowed position.
Definition: info.hpp:505
A message field for interfacing with a bank of I/O pins.
Definition: info.hpp:346
Actuator-specific information.
Definition: info.hpp:694
A message field representable by an unsigned 64 bit integer value.
Definition: info.hpp:200
const EnumField< CalibrationState > & calibrationState() const
The calibration state of the module.
Definition: info.hpp:706
const Actuator & actuator() const
Actuator-specific settings, such as controller gains.
Definition: info.hpp:596
const InfoGains & effortGains() const
Controller gains for the effort PID loop.
Definition: info.hpp:488
Info objects have various fields representing the module state; which fields are populated depends on...
Definition: info.hpp:34
const StringField & serial() const
Gets the serial number for this module (e.g., X5-0001).
Definition: info.hpp:751
MstopStrategy
Definition: info.hpp:66
IoBank & a()
I/O pin bank a (pins 1-8 available)
Definition: info.hpp:418
CalibrationState
Definition: info.hpp:55
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:6
const Imu & imu() const
IMU-specific settings.
Definition: info.hpp:598
const IoBank & e() const
I/O pin bank e (pins 1-8 available)
Definition: info.hpp:436
const InfoGains & positionGains() const
Controller gains for the position PID loop.
Definition: info.hpp:484
const Actuator & actuator() const
Actuator-specific information.
Definition: info.hpp:746
A two-state message field (either set/true or cleared/false).
Definition: info.hpp:280
const BoolField & accelIncludesGravity() const
Whether to include acceleration due to gravity in acceleration feedback.
Definition: info.hpp:548
A message field for interfacing with an LED.
Definition: info.hpp:370
const FloatField & velocityLimitMin() const
The firmware safety limit for the minimum allowed velocity.
Definition: info.hpp:495
bool hasLabel(size_t pinNumber) const
True if (and only if) the particular numbered pin in this bank has a string label set in this message...
Definition: info.cpp:106
uint64_t get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: info.cpp:49
const InfoGains & velocityGains() const
Controller gains for the velocity PID loop.
Definition: info.hpp:486
std::string getLabel(size_t pinNumber) const
If this numbered pin in this bank has a string label value, returns that value; otherwise returns an ...
Definition: info.cpp:110
Triggering the M-Stop results in the control strategy being set to 'off'. Remains 'off' until changed...
const Settings & settings() const
Module settings that are typically changed at a slower rate.
Definition: info.hpp:744
A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).
const StringField & mechanicalRevision() const
Gets the mechanical revision of this module.
Definition: info.hpp:613
const IpAddressField & subnetMask() const
Gets the subnet mask for this module.
Definition: info.hpp:653
HebiStatusCode enumGetter(const RefT &ref, MetadataT &metadata, int field, int32_t *value)
Definition: message_helpers.cpp:300
The effort (e.g., spring nonlinearity) has not been calibrated.
Any available digital or analog output pins on the device.
Definition: info.hpp:400
Io & io()
Any available digital or analog output pins on the device.
Definition: info.hpp:740
The motor is not given power (equivalent to a 0 PWM value)
const StringField & firmwareRevision() const
Gets the firmware revision of this module.
Definition: info.hpp:617
The current has not been calibrated.
Info & operator=(Info &&other)=delete
ControlStrategy
Definition: info.hpp:36
Info(Info &&other)
Move constructor (necessary for containment in STL template classes)
Definition: info.cpp:139
double get() const
If the field has a value, returns that value as a double; otherwise, returns a default.
Definition: info.cpp:26
const StringField & mechanicalType() const
Gets the mechanical type of this module.
Definition: info.hpp:611
A message field representable by a std::string.
Definition: info.hpp:249
const IoBank & a() const
I/O pin bank a (pins 1-8 available)
Definition: info.hpp:420
const StringField & firmwareType() const
Gets the firmware type of this module.
Definition: info.hpp:615
A simple wrapper class for IpAddress objects.
Definition: ip_address.hpp:36
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:9
const StringField & family() const
Gets the family for this module.
Definition: info.hpp:605
const StringField & electricalRevision() const
Gets the electrical revision of this module.
Definition: info.hpp:609
const UInt64Field & secondsOn() const
Definition: info.hpp:759
IoBank & e()
I/O pin bank e (pins 1-8 available)
Definition: info.hpp:434
const IoBank & d() const
I/O pin bank d (pins 1-8 available)
Definition: info.hpp:432
Color getColor() const
Returns the led color.
Definition: info.cpp:128
Exceeding the position limit results in the control strategy being set to 'off'. Remains 'off' until ...
const Io & io() const
Any available digital or analog output pins on the device.
Definition: info.hpp:742
IpAddress get() const
If the field has a value, returns that value; otherwise, returns 0.0.0.0.
Definition: info.cpp:64
float get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: info.cpp:11
const FloatField & velocityLimitMax() const
The firmware safety limit for the maximum allowed velocity.
Definition: info.hpp:497
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:60
const StringField & userSettingsBytes(size_t number) const
Definition: info.hpp:620
const StringField & name() const
Gets the name for this module.
Definition: info.hpp:603
The module has been calibrated; this is the normal state.
bool hasColor() const
Returns true if the LED color is set, and false otherwise.
Definition: info.cpp:124
const IoBank & f() const
I/O pin bank f (pins 1-8 available)
Definition: info.hpp:440
Triggering the M-Stop has no effect.
IoBank & d()
I/O pin bank d (pins 1-8 available)
Definition: info.hpp:430
const EnumField< PositionLimitStrategy > & minPositionLimitStrategy() const
The position limit strategy (at the minimum position) for the actuator.
Definition: info.hpp:511
bool get() const
If the field has a value, returns that value; otherwise, returns false.
Definition: info.cpp:76
const EnumField< PositionLimitStrategy > & maxPositionLimitStrategy() const
The position limit strategy (at the maximum position) for the actuator.
Definition: info.hpp:513
Exceeding the position limit has no effect.
A message field representable by an enum of a given type.
Definition: info.hpp:309
Structure to describe an RGB color.
Definition: color.hpp:8
A message field representable by an unsigned 64 bit integer value.
Definition: info.hpp:169
IMU-specific settings.
Definition: info.hpp:535
Exceeding the position limit results in the actuator holding the position. Needs to be manually set t...
Exceeding the position limit results in a virtual spring that pushes the actuator back to within the ...
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:22
const EnumField< MstopStrategy > & mstopStrategy() const
The motion stop strategy for the actuator.
Definition: info.hpp:509
const IpAddressField & ipAddress() const
Gets the IP address for this module.
Definition: info.hpp:651
bool has() const
Returns true if the flag is set, false if it is cleared.
Definition: info.cpp:102
IoBank & c()
I/O pin bank c (pins 1-8 available)
Definition: info.hpp:426
Triggering the M-Stop results in the motor holding the motor position. Operations resume to normal on...
A message field representable by a single-precision floating point value.
Definition: info.hpp:88
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:45
The factory zero position has not been set.
bool has() const
True if (and only if) the field has a value.
Definition: info.hpp:328