HEBI C++ API  3.9.0
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,
50  };
51 
52  enum class CalibrationState {
54  Normal,
61  };
62 
63  enum class MstopStrategy {
65  Disabled,
67  MotorOff,
70  };
71 
72  enum class PositionLimitStrategy {
78  MotorOff,
80  Disabled,
81  };
82 
83 protected:
85  class FloatField final {
86  public:
87 #ifndef DOXYGEN_OMIT_INTERNAL
88  FloatField(const HebiInfoRef& internal, HebiInfoFloatField field);
89 #endif // DOXYGEN_OMIT_INTERNAL
90  explicit operator bool() const { return has(); }
104  bool has() const;
107  float get() const;
108 
110  private:
111  const HebiInfoRef& internal_;
112  HebiInfoFloatField const field_;
113  };
114 
120  class HighResAngleField final {
121  public:
122 #ifndef DOXYGEN_OMIT_INTERNAL
123  HighResAngleField(const HebiInfoRef& internal, HebiInfoHighResAngleField field);
124 #endif // DOXYGEN_OMIT_INTERNAL
125  explicit operator bool() const { return has(); }
139  bool has() const;
145  double get() const;
157  void get(int64_t* revolutions, float* radian_offset) const;
158 
160  private:
161  const HebiInfoRef& internal_;
162  HebiInfoHighResAngleField const field_;
163  };
164 
166  class IpAddressField final {
167  public:
168 #ifndef DOXYGEN_OMIT_INTERNAL
169  IpAddressField(const HebiInfoRef& internal, HebiInfoUInt64Field field);
170 #endif // DOXYGEN_OMIT_INTERNAL
171  explicit operator bool() const { return has(); }
185  bool has() const;
188  IpAddress get() const;
189 
191  private:
192  const HebiInfoRef& internal_;
193  HebiInfoUInt64Field const field_;
194  };
195 
197  class BoolField final {
198  public:
199 #ifndef DOXYGEN_OMIT_INTERNAL
200  BoolField(const HebiInfoRef& internal, HebiInfoBoolField field);
201 #endif // DOXYGEN_OMIT_INTERNAL
202  bool has() const;
206  bool get() const;
207 
209  private:
210  const HebiInfoRef& internal_;
211  HebiInfoBoolField const field_;
212  };
213 
215  class StringField final {
216  public:
217 #ifndef DOXYGEN_OMIT_INTERNAL
218  StringField(HebiInfoPtr internal, HebiInfoStringField field);
219 #endif // DOXYGEN_OMIT_INTERNAL
220  explicit operator bool() const { return has(); }
234  bool has() const;
237  std::string get() const;
238 
240  private:
241  HebiInfoPtr const internal_;
242  HebiInfoStringField const field_;
243  };
244 
246  class FlagField final {
247  public:
248 #ifndef DOXYGEN_OMIT_INTERNAL
249  FlagField(const HebiInfoRef& internal, HebiInfoFlagField field);
250 #endif // DOXYGEN_OMIT_INTERNAL
251  explicit operator bool() const { return has(); }
265  bool has() const;
266 
268  private:
269  const HebiInfoRef& internal_;
270  HebiInfoFlagField const field_;
271  };
272 
274  template<typename T>
275  class EnumField final {
276  public:
277 #ifndef DOXYGEN_OMIT_INTERNAL
278  EnumField(const HebiInfoRef& internal, HebiInfoEnumField field) : internal_(internal), field_(field) {}
279 #endif // DOXYGEN_OMIT_INTERNAL
280  explicit operator bool() const { return has(); }
294  bool has() const {
295  return (enumGetter(internal_, field_, nullptr) == HebiStatusSuccess);
296  }
299  T get() const {
300  int32_t ret{};
301  enumGetter(internal_, field_, &ret);
302  return static_cast<T>(ret);
303  }
304 
306  private:
307  const HebiInfoRef& internal_;
308  HebiInfoEnumField const field_;
309  };
310 
312  class IoBank final {
313  public:
314 #ifndef DOXYGEN_OMIT_INTERNAL
315  IoBank(HebiInfoPtr internal, HebiInfoRef& internal_ref, HebiInfoIoPinBank bank);
316 #endif // DOXYGEN_OMIT_INTERNAL
317  bool hasLabel(size_t pinNumber) const;
328  std::string getLabel(size_t pinNumber) const;
329 
331  private:
332  HebiInfoPtr internal_;
333  HebiInfoRef& internal_ref_;
334  HebiInfoIoPinBank const bank_;
335  };
337  class LedField final {
338  public:
339 #ifndef DOXYGEN_OMIT_INTERNAL
340  LedField(const HebiInfoRef& internal, HebiInfoLedField field);
341 #endif // DOXYGEN_OMIT_INTERNAL
342  explicit operator bool() const { return hasColor(); }
356  bool hasColor() const;
358  Color getColor() const;
359 
361  private:
362  const HebiInfoRef& internal_;
363  HebiInfoLedField const field_;
364  };
365 
367  class Io final {
368  public:
369 #ifndef DOXYGEN_OMIT_INTERNAL
370  Io(HebiInfoPtr internal, HebiInfoRef& internal_ref)
371  : a_(internal, internal_ref, HebiInfoIoBankA),
372  b_(internal, internal_ref, HebiInfoIoBankB),
373  c_(internal, internal_ref, HebiInfoIoBankC),
374  d_(internal, internal_ref, HebiInfoIoBankD),
375  e_(internal, internal_ref, HebiInfoIoBankE),
376  f_(internal, internal_ref, HebiInfoIoBankF) {}
377 #endif // DOXYGEN_OMIT_INTERNAL
378 
379  // With all submessage and field getters: Note that the returned reference
380  // should not be used after the lifetime of this parent.
381 
382  // Subfields ----------------
383 
385  IoBank& a() { return a_; }
387  const IoBank& a() const { return a_; }
389  IoBank& b() { return b_; }
391  const IoBank& b() const { return b_; }
393  IoBank& c() { return c_; }
395  const IoBank& c() const { return c_; }
397  IoBank& d() { return d_; }
399  const IoBank& d() const { return d_; }
401  IoBank& e() { return e_; }
403  const IoBank& e() const { return e_; }
405  IoBank& f() { return f_; }
407  const IoBank& f() const { return f_; }
408 
410  private:
411  IoBank a_;
412  IoBank b_;
413  IoBank c_;
414  IoBank d_;
415  IoBank e_;
416  IoBank f_;
417  };
418 
420 
422  class Settings final {
423  protected:
425  class Actuator final {
426  public:
427 #ifndef DOXYGEN_OMIT_INTERNAL
428  Actuator(const HebiInfoRef& internal)
429  : position_gains_(internal, HebiInfoFloatPositionKp, HebiInfoBoolPositionDOnError),
430  velocity_gains_(internal, HebiInfoFloatVelocityKp, HebiInfoBoolVelocityDOnError),
431  effort_gains_(internal, HebiInfoFloatEffortKp, HebiInfoBoolEffortDOnError),
432  spring_constant_(internal, HebiInfoFloatSpringConstant),
433  velocity_limit_min_(internal, HebiInfoFloatVelocityLimitMin),
434  velocity_limit_max_(internal, HebiInfoFloatVelocityLimitMax),
435  effort_limit_min_(internal, HebiInfoFloatEffortLimitMin),
436  effort_limit_max_(internal, HebiInfoFloatEffortLimitMax),
437  position_limit_min_(internal, HebiInfoHighResAnglePositionLimitMin),
438  position_limit_max_(internal, HebiInfoHighResAnglePositionLimitMax),
439  control_strategy_(internal, HebiInfoEnumControlStrategy),
440  mstop_strategy_(internal, HebiInfoEnumMstopStrategy),
441  min_position_limit_strategy_(internal, HebiInfoEnumMinPositionLimitStrategy),
442  max_position_limit_strategy_(internal, HebiInfoEnumMaxPositionLimitStrategy) {}
443 #endif // DOXYGEN_OMIT_INTERNAL
444 
445  // With all submessage and field getters: Note that the returned reference
446  // should not be used after the lifetime of this parent.
447 
448  // Submessages ----------------
449 
451  const InfoGains& positionGains() const { return position_gains_; }
453  const InfoGains& velocityGains() const { return velocity_gains_; }
455  const InfoGains& effortGains() const { return effort_gains_; }
456 
457  // Subfields ----------------
458 
460  const FloatField& springConstant() const { return spring_constant_; }
462  const FloatField& velocityLimitMin() const { return velocity_limit_min_; }
464  const FloatField& velocityLimitMax() const { return velocity_limit_max_; }
466  const FloatField& effortLimitMin() const { return effort_limit_min_; }
468  const FloatField& effortLimitMax() const { return effort_limit_max_; }
470  const HighResAngleField& positionLimitMin() const { return position_limit_min_; }
472  const HighResAngleField& positionLimitMax() const { return position_limit_max_; }
474  const EnumField<ControlStrategy>& controlStrategy() const { return control_strategy_; }
476  const EnumField<MstopStrategy>& mstopStrategy() const { return mstop_strategy_; }
478  const EnumField<PositionLimitStrategy>& minPositionLimitStrategy() const { return min_position_limit_strategy_; }
480  const EnumField<PositionLimitStrategy>& maxPositionLimitStrategy() const { return max_position_limit_strategy_; }
481 
483  private:
484  InfoGains position_gains_;
485  InfoGains velocity_gains_;
486  InfoGains effort_gains_;
487 
488  FloatField spring_constant_;
489  FloatField velocity_limit_min_;
490  FloatField velocity_limit_max_;
491  FloatField effort_limit_min_;
492  FloatField effort_limit_max_;
493  HighResAngleField position_limit_min_;
494  HighResAngleField position_limit_max_;
495  EnumField<ControlStrategy> control_strategy_;
496  EnumField<MstopStrategy> mstop_strategy_;
497  EnumField<PositionLimitStrategy> min_position_limit_strategy_;
498  EnumField<PositionLimitStrategy> max_position_limit_strategy_;
499  };
500 
502  class Imu final {
503  public:
504 #ifndef DOXYGEN_OMIT_INTERNAL
505  Imu(const HebiInfoRef& internal)
506  : accel_includes_gravity_(internal, HebiInfoBoolAccelIncludesGravity) {}
507 #endif // DOXYGEN_OMIT_INTERNAL
508 
509  // With all submessage and field getters: Note that the returned reference
510  // should not be used after the lifetime of this parent.
511 
512  // Subfields ----------------
513 
515  const BoolField& accelIncludesGravity() const { return accel_includes_gravity_; }
516 
518  private:
519  BoolField accel_includes_gravity_;
520  };
521 
522  public:
523 #ifndef DOXYGEN_OMIT_INTERNAL
524  Settings(HebiInfoPtr internal_ptr, const HebiInfoRef& internal)
525  : actuator_(internal),
526  imu_(internal),
527  name_(internal_ptr, HebiInfoStringName),
528  family_(internal_ptr, HebiInfoStringFamily),
529  electrical_type_(internal_ptr, HebiInfoStringElectricalType),
530  electrical_revision_(internal_ptr, HebiInfoStringElectricalRevision),
531  mechanical_type_(internal_ptr, HebiInfoStringMechanicalType),
532  mechanical_revision_(internal_ptr, HebiInfoStringMechanicalRevision),
533  firmware_type_(internal_ptr, HebiInfoStringFirmwareType),
534  firmware_revision_(internal_ptr, HebiInfoStringFirmwareRevision),
535  user_settings_bytes_1_(internal_ptr, HebiInfoStringUserSettingsBytes1),
536  user_settings_bytes_2_(internal_ptr, HebiInfoStringUserSettingsBytes2),
537  user_settings_bytes_3_(internal_ptr, HebiInfoStringUserSettingsBytes3),
538  user_settings_bytes_4_(internal_ptr, HebiInfoStringUserSettingsBytes4),
539  user_settings_bytes_5_(internal_ptr, HebiInfoStringUserSettingsBytes5),
540  user_settings_bytes_6_(internal_ptr, HebiInfoStringUserSettingsBytes6),
541  user_settings_bytes_7_(internal_ptr, HebiInfoStringUserSettingsBytes7),
542  user_settings_bytes_8_(internal_ptr, HebiInfoStringUserSettingsBytes8),
543  user_settings_float_1_(internal, HebiInfoFloatUserSettingsFloat1),
544  user_settings_float_2_(internal, HebiInfoFloatUserSettingsFloat2),
545  user_settings_float_3_(internal, HebiInfoFloatUserSettingsFloat3),
546  user_settings_float_4_(internal, HebiInfoFloatUserSettingsFloat4),
547  user_settings_float_5_(internal, HebiInfoFloatUserSettingsFloat5),
548  user_settings_float_6_(internal, HebiInfoFloatUserSettingsFloat6),
549  user_settings_float_7_(internal, HebiInfoFloatUserSettingsFloat7),
550  user_settings_float_8_(internal, HebiInfoFloatUserSettingsFloat8),
551  ip_address_(internal, HebiInfoUInt64IpAddress),
552  subnet_mask_(internal, HebiInfoUInt64SubnetMask),
553  default_gateway_(internal, HebiInfoUInt64DefaultGateway),
554  save_current_settings_(internal, HebiInfoFlagSaveCurrentSettings) {}
555 #endif // DOXYGEN_OMIT_INTERNAL
556 
557  // With all submessage and field getters: Note that the returned reference
558  // should not be used after the lifetime of this parent.
559 
560  // Submessages ----------------
561 
563  const Actuator& actuator() const { return actuator_; }
565  const Imu& imu() const { return imu_; }
566 
567  // Subfields ----------------
568 
570  const StringField& name() const { return name_; }
572  const StringField& family() const { return family_; }
574  const StringField& electricalType() const { return electrical_type_; }
576  const StringField& electricalRevision() const { return electrical_revision_; }
578  const StringField& mechanicalType() const { return mechanical_type_; }
580  const StringField& mechanicalRevision() const { return mechanical_revision_; }
582  const StringField& firmwareType() const { return firmware_type_; }
584  const StringField& firmwareRevision() const { return firmware_revision_; }
587  const StringField& userSettingsBytes(size_t number) const
588  {
589  switch (number) {
590  case 1: return user_settings_bytes_1_;
591  case 2: return user_settings_bytes_2_;
592  case 3: return user_settings_bytes_3_;
593  case 4: return user_settings_bytes_4_;
594  case 5: return user_settings_bytes_5_;
595  case 6: return user_settings_bytes_6_;
596  case 7: return user_settings_bytes_7_;
597  case 8: return user_settings_bytes_8_;
598  }
599  throw std::out_of_range("Invalid option for bytes array user setting entry!");
600  }
603  const FloatField& userSettingsFloat(size_t number) const
604  {
605  switch (number) {
606  case 1: return user_settings_float_1_;
607  case 2: return user_settings_float_2_;
608  case 3: return user_settings_float_3_;
609  case 4: return user_settings_float_4_;
610  case 5: return user_settings_float_5_;
611  case 6: return user_settings_float_6_;
612  case 7: return user_settings_float_7_;
613  case 8: return user_settings_float_8_;
614  }
615  throw std::out_of_range("Invalid option for float user setting entry!");
616  }
618  const IpAddressField& ipAddress() const { return ip_address_; }
620  const IpAddressField& subnetMask() const { return subnet_mask_; }
622  const IpAddressField& defaultGateway() const { return default_gateway_; }
624  const FlagField& saveCurrentSettings() const { return save_current_settings_; }
625 
627  private:
628  Actuator actuator_;
629  Imu imu_;
630  StringField name_;
631  StringField family_;
632  StringField electrical_type_;
633  StringField electrical_revision_;
634  StringField mechanical_type_;
635  StringField mechanical_revision_;
636  StringField firmware_type_;
637  StringField firmware_revision_;
638  StringField user_settings_bytes_1_;
639  StringField user_settings_bytes_2_;
640  StringField user_settings_bytes_3_;
641  StringField user_settings_bytes_4_;
642  StringField user_settings_bytes_5_;
643  StringField user_settings_bytes_6_;
644  StringField user_settings_bytes_7_;
645  StringField user_settings_bytes_8_;
646  FloatField user_settings_float_1_;
647  FloatField user_settings_float_2_;
648  FloatField user_settings_float_3_;
649  FloatField user_settings_float_4_;
650  FloatField user_settings_float_5_;
651  FloatField user_settings_float_6_;
652  FloatField user_settings_float_7_;
653  FloatField user_settings_float_8_;
654  IpAddressField ip_address_;
655  IpAddressField subnet_mask_;
656  IpAddressField default_gateway_;
657  FlagField save_current_settings_;
658  };
659 
661  class Actuator final {
662  public:
663 #ifndef DOXYGEN_OMIT_INTERNAL
664  Actuator(const HebiInfoRef& internal) : calibration_state_(internal, HebiInfoEnumCalibrationState) {}
665 #endif // DOXYGEN_OMIT_INTERNAL
666 
667  // With all submessage and field getters: Note that the returned reference
668  // should not be used after the lifetime of this parent.
669 
670  // Subfields ----------------
671 
673  const EnumField<CalibrationState>& calibrationState() const { return calibration_state_; }
674 
676  private:
677  EnumField<CalibrationState> calibration_state_;
678  };
679 
680 private:
685  HebiInfoPtr internal_;
686  HebiInfoRef internal_ref_;
687 
688 public:
689 #ifndef DOXYGEN_OMIT_INTERNAL
690 
694  Info(HebiInfoPtr);
695 #endif // DOXYGEN_OMIT_INTERNAL
696 
699  Info(Info&& other);
700 
701  // With all submessage and field getters: Note that the returned reference
702  // should not be used after the lifetime of this parent.
703 
704  // Submessages -------------------------------------------------------------
705 
707  Io& io() { return io_; }
709  const Io& io() const { return io_; }
711  const Settings& settings() const { return settings_; }
713  const Actuator& actuator() const { return actuator_; }
714 
715  // Subfields -------------------------------------------------------------
716 
718  const StringField& serial() const { return serial_; }
720  const LedField& led() const { return led_; }
721 
726 
727  /* Disable move assigment operator. */
728  Info& operator=(Info&& other) = delete;
729 
730 private:
731  Io io_;
732  Settings settings_;
733  Actuator actuator_;
734 
735  StringField serial_;
736  LedField led_;
737 };
738 
739 } // namespace hebi
const FlagField & saveCurrentSettings() const
Indicates if the module should save the current values of all of its settings.
Definition: info.hpp:624
const IpAddressField & defaultGateway() const
Gets the default gateway for this module.
Definition: info.hpp:622
const FloatField & userSettingsFloat(size_t number) const
Definition: info.hpp:603
std::string get() const
If the field has a value, returns a copy of that value; otherwise, returns a default.
Definition: info.cpp:73
const HighResAngleField & positionLimitMin() const
The firmware safety limit for the minimum allowed position.
Definition: info.hpp:470
Module settings that are typically changed at a slower rate.
Definition: info.hpp:422
IoBank & f()
I/O pin bank f (pins 1-8 available)
Definition: info.hpp:405
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:69
A message field for an angle measurement which does not lose precision at very high angles.
Definition: info.hpp:120
#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:395
Actuator-specific settings, such as controller gains.
Definition: info.hpp:425
const FloatField & effortLimitMin() const
The firmware safety limit for the minimum allowed effort.
Definition: info.hpp:466
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:59
const LedField & led() const
The module's LED.
Definition: info.hpp:720
const FloatField & springConstant() const
The spring constant of the module.
Definition: info.hpp:460
T get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: info.hpp:299
const FloatField & effortLimitMax() const
The firmware safety limit for the maximum allowed effort.
Definition: info.hpp:468
const IoBank & b() const
I/O pin bank b (pins 1-8 available)
Definition: info.hpp:391
const EnumField< ControlStrategy > & controlStrategy() const
How the position, velocity, and effort PID loops are connected in order to control motor PWM.
Definition: info.hpp:474
const StringField & electricalType() const
Gets the electrical type of this module.
Definition: info.hpp:574
PositionLimitStrategy
Definition: info.hpp:72
A message field representable by a bool value.
Definition: info.hpp:197
Definition: arm.cpp:8
IoBank & b()
I/O pin bank b (pins 1-8 available)
Definition: info.hpp:389
const HighResAngleField & positionLimitMax() const
The firmware safety limit for the maximum allowed position.
Definition: info.hpp:472
A message field for interfacing with a bank of I/O pins.
Definition: info.hpp:312
Actuator-specific information.
Definition: info.hpp:661
A message field representable by an unsigned 64 bit integer value.
Definition: info.hpp:166
const EnumField< CalibrationState > & calibrationState() const
The calibration state of the module.
Definition: info.hpp:673
const Actuator & actuator() const
Actuator-specific settings, such as controller gains.
Definition: info.hpp:563
const InfoGains & effortGains() const
Controller gains for the effort PID loop.
Definition: info.hpp:455
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:718
MstopStrategy
Definition: info.hpp:63
IoBank & a()
I/O pin bank a (pins 1-8 available)
Definition: info.hpp:385
CalibrationState
Definition: info.hpp:52
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:6
const Imu & imu() const
IMU-specific settings.
Definition: info.hpp:565
const IoBank & e() const
I/O pin bank e (pins 1-8 available)
Definition: info.hpp:403
const InfoGains & positionGains() const
Controller gains for the position PID loop.
Definition: info.hpp:451
const Actuator & actuator() const
Actuator-specific information.
Definition: info.hpp:713
A two-state message field (either set/true or cleared/false).
Definition: info.hpp:246
const BoolField & accelIncludesGravity() const
Whether to include acceleration due to gravity in acceleration feedback.
Definition: info.hpp:515
A message field for interfacing with an LED.
Definition: info.hpp:337
const FloatField & velocityLimitMin() const
The firmware safety limit for the minimum allowed velocity.
Definition: info.hpp:462
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:91
const InfoGains & velocityGains() const
Controller gains for the velocity PID loop.
Definition: info.hpp:453
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:95
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:711
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:580
const IpAddressField & subnetMask() const
Gets the subnet mask for this module.
Definition: info.hpp:620
HebiStatusCode enumGetter(const RefT &ref, MetadataT &metadata, int field, int32_t *value)
Definition: message_helpers.cpp:298
The effort (e.g., spring nonlinearity) has not been calibrated.
Any available digital or analog output pins on the device.
Definition: info.hpp:367
Io & io()
Any available digital or analog output pins on the device.
Definition: info.hpp:707
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:584
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:124
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:578
A message field representable by a std::string.
Definition: info.hpp:215
const IoBank & a() const
I/O pin bank a (pins 1-8 available)
Definition: info.hpp:387
const StringField & firmwareType() const
Gets the firmware type of this module.
Definition: info.hpp:582
A simple wrapper class for IpAddress objects.
Definition: ip_address.hpp:34
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:572
const StringField & electricalRevision() const
Gets the electrical revision of this module.
Definition: info.hpp:576
IoBank & e()
I/O pin bank e (pins 1-8 available)
Definition: info.hpp:401
const IoBank & d() const
I/O pin bank d (pins 1-8 available)
Definition: info.hpp:399
Color getColor() const
Returns the led color.
Definition: info.cpp:113
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:709
IpAddress get() const
If the field has a value, returns that value; otherwise, returns 0.0.0.0.
Definition: info.cpp:49
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:464
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:45
const StringField & userSettingsBytes(size_t number) const
Definition: info.hpp:587
const StringField & name() const
Gets the name for this module.
Definition: info.hpp:570
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:109
const IoBank & f() const
I/O pin bank f (pins 1-8 available)
Definition: info.hpp:407
Triggering the M-Stop has no effect.
IoBank & d()
I/O pin bank d (pins 1-8 available)
Definition: info.hpp:397
const EnumField< PositionLimitStrategy > & minPositionLimitStrategy() const
The position limit strategy (at the minimum position) for the actuator.
Definition: info.hpp:478
bool get() const
If the field has a value, returns that value; otherwise, returns false.
Definition: info.cpp:61
const EnumField< PositionLimitStrategy > & maxPositionLimitStrategy() const
The position limit strategy (at the maximum position) for the actuator.
Definition: info.hpp:480
Exceeding the position limit has no effect.
A message field representable by an enum of a given type.
Definition: info.hpp:275
Structure to describe an RGB color.
Definition: color.hpp:8
IMU-specific settings.
Definition: info.hpp:502
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:476
const IpAddressField & ipAddress() const
Gets the IP address for this module.
Definition: info.hpp:618
bool has() const
Returns true if the flag is set, false if it is cleared.
Definition: info.cpp:87
IoBank & c()
I/O pin bank c (pins 1-8 available)
Definition: info.hpp:393
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:85
The factory zero position has not been set.
bool has() const
True if (and only if) the field has a value.
Definition: info.hpp:294