HEBI C++ API  1.0.0
hebi::Info Class Referencefinal

Info objects have various fields representing the module state; which fields are populated depends on the module type and various other settings. More...

#include <info.hpp>

Classes

class  BoolField
 A message field representable by a bool value. More...
 
class  EnumField
 A message field representable by an enum of a given type. More...
 
class  FlagField
 A two-state message field (either set/true or cleared/false). More...
 
class  FloatField
 A message field representable by a single-precision floating point value. More...
 
class  LedField
 A message field for interfacing with an LED. More...
 
class  Settings
 Module settings that are typically changed at a slower rate. More...
 
class  StringField
 A message field representable by a std::string. More...
 

Public Types

enum  ControlStrategy {
  ControlStrategy::Off, ControlStrategy::DirectPWM, ControlStrategy::Strategy2, ControlStrategy::Strategy3,
  ControlStrategy::Strategy4
}
 

Public Member Functions

 Info (Info &&other)
 Move constructor (necessary for containment in STL template classes) More...
 
 ~Info () noexcept
 Cleans up info object as necessary. More...
 
const Settingssettings () const
 Module settings that are typically changed at a slower rate. More...
 
const LedFieldled () const
 The module's LED. More...
 
const StringFieldserial () const
 Gets the serial number for this module (e.g., X5-0001). More...
 

Protected Types

using InfoGains = Gains< HebiInfoPtr, FloatField, BoolField, HebiInfoFloatField, HebiInfoBoolField >
 

Detailed Description

Info objects have various fields representing the module state; which fields are populated depends on the module type and various other settings.

This object has a hierarchical structure – there are some direct general-purpose fields at the top level, and many more specific fields contained in different nested subobjects.

The subobjects contain references to the parent info object, and so should not be used after the parent object has been destroyed.

The fields in the info object are typed; generally, these are optional-style read-only fields (i.e., have the concept of has/get), although the return types and exact interface vary slightly between fields. Where appropriate, the explicit bool operator has been overridden so that you can shortcut if(field.has()) by calling if(field).

Although this header file can be used to look at the hierarchy of the messages, in general the online documentation at apidocs.hebi.us presents this information. in a more readable form.

Member Typedef Documentation

using hebi::Info::InfoGains = Gains<HebiInfoPtr, FloatField, BoolField, HebiInfoFloatField, HebiInfoBoolField>
protected

Member Enumeration Documentation

Enumerator
Off 

The motor is not given power (equivalent to a 0 PWM value)

DirectPWM 

A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).

Strategy2 

A combination of the position, velocity, and effort loops with P and V feeding to T; documented on docs.hebi.us under "Control Modes".

Strategy3 

A combination of the position, velocity, and effort loops with P, V, and T feeding to PWM; documented on docs.hebi.us under "Control Modes".

Strategy4 

A combination of the position, velocity, and effort loops with P feeding to T and V feeding to PWM; documented on docs.hebi.us under "Control Modes".

Constructor & Destructor Documentation

hebi::Info::Info ( Info &&  other)

Move constructor (necessary for containment in STL template classes)

hebi::Info::~Info ( )
noexcept

Cleans up info object as necessary.

Member Function Documentation

const Settings& hebi::Info::settings ( ) const
inline

Module settings that are typically changed at a slower rate.

const Info::LedField & hebi::Info::led ( ) const

The module's LED.

const StringField& hebi::Info::serial ( ) const
inline

Gets the serial number for this module (e.g., X5-0001).


The documentation for this class was generated from the following files: