73 #ifndef DOXYGEN_OMIT_INTERNAL 79 #endif // DOXYGEN_OMIT_INTERNAL 94 #ifndef DOXYGEN_OMIT_INTERNAL 101 float initial_feedback_frequency = 0.0
f,
102 int32_t initial_command_lifetime = 0);
103 #endif // DOXYGEN_OMIT_INTERNAL void addFeedbackHandler(GroupFeedbackHandler handler)
Adds a handler function to be called by the internal feedback request thread.
std::string startLog(const std::string &dir)
Starts log (stopping any active log).
A list of Feedback objects that can be received from a Group of modules; the size() must match the nu...
void clearFeedbackHandlers()
Removes all feedback handlers presently added.
Represents a group of physical HEBI modules, and allows Command, Feedback, and Info objects to be sen...
A list of Info objects that can be received from a Group of modules; the size() must match the number...
Group(HebiGroupPtr group, float initial_feedback_frequency=0.0f, int32_t initial_command_lifetime=0)
float getFeedbackFrequencyHz()
Gets the frequency of the internal feedback request + callback thread.
~Group() noexcept
Destructor cleans up group.
bool sendCommandWithAcknowledgement(const GroupCommand &group_command, int32_t timeout_ms=DEFAULT_TIMEOUT_MS)
Send a command to the given group, requesting an acknowledgement of transmission to be sent back...
struct _HebiGroup * HebiGroupPtr
The C-style's API representation of a group.
struct _HebiGroupFeedback * HebiGroupFeedbackPtr
The C-style's API representation of group feedback.
void callAttachedHandlers(HebiGroupFeedbackPtr group_feedback)
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
int size()
Returns the number of modules in the group.
static const int32_t DEFAULT_TIMEOUT_MS
The default timeout for any send-with-acknowledgement or request operation is 500 ms...
bool sendCommand(const GroupCommand &group_command)
Send a command to the given group without requesting an acknowledgement.
bool setCommandLifetimeMs(int32_t ms)
Sets the command lifetime for the modules in this group.
#define HEBI_DISABLE_COPY_MOVE(Class)
std::shared_ptr< LogFile > stopLog()
Stops any active log.
static std::shared_ptr< Group > createImitation(size_t size)
Creates an imitation group of provided size.
bool getNextFeedback(GroupFeedback &feedback, int32_t timeout_ms=DEFAULT_TIMEOUT_MS)
Returns the most recently stored feedback from a sent feedback request, or returns the next one recei...
A list of Command objects appropriate for sending to a Group of modules; the size() must match the nu...
bool requestInfo(GroupInfo &info, int32_t timeout_ms=DEFAULT_TIMEOUT_MS)
Request info from the group, and store it in the passed-in info object.
std::vector< GroupFeedbackHandler > handlers_
const int number_of_modules_
bool setFeedbackFrequencyHz(float frequency)
Sets the frequency of the internal feedback request + callback thread.
friend void callbackWrapper(HebiGroupFeedbackPtr group_feedback, void *user_data)
bool sendFeedbackRequest()
Requests feedback from the group.
std::function< void(const GroupFeedback &)> GroupFeedbackHandler
Definition of a callback function for GroupFeedback returned from a Group of modules.