37 static std::unique_ptr<MobileIO>
create(
const std::string& family,
const std::string& name);
40 static std::unique_ptr<MobileIO>
create(
const std::string& family,
const std::string& name,
const Lookup& lookup);
46 bool resetUI(
bool acknowledge_send =
true);
51 bool setAxisSnap(
int axis_number,
float snap_to,
bool acknowledge_send =
true);
52 bool disableAxisSnap(
int axis_number,
bool acknowledge_send =
true) {
return setAxisSnap(axis_number, std::numeric_limits<float>::quiet_NaN(), acknowledge_send); }
53 bool setAxisValue(
int axis_number,
float value,
bool acknowledge_send =
true);
54 bool setAxisLabel(
int axis_number,
const std::string& message,
bool acknowledge_send =
true);
57 bool setButtonLed(
int button_number,
bool on,
bool acknowledge_send =
true);
60 bool setButtonLabel(
int button_number,
const std::string& message,
bool acknowledge_send =
true);
62 bool setLedColor(uint8_t r, uint8_t g, uint8_t b,
bool acknowledge_send =
true);
64 bool appendText(
const std::string& message,
bool acknowledge_send =
true);
65 bool clearText(
bool acknowledge_send =
true);
117 MobileIO(std::shared_ptr<hebi::Group> group) : group_(std::move(group)), fbk_(group_->size()) {}
119 std::shared_ptr<hebi::Group> group_;
122 std::bitset<NumButtons> buttons_{};
123 std::array<float, NumButtons> axes_{};
125 std::bitset<NumButtons> prev_buttons_{};
126 std::array<float, NumButtons> prev_axes_{};
A list of Feedback objects that can be received from a Group of modules; the size() must match the nu...
Definition: group_feedback.hpp:18
bool sendLayoutBuffer(const std::string &layout_buffer, int32_t timeout_ms=Group::DEFAULT_TIMEOUT_MS) const
Sends a layout to the MobileIO device from a string buffer, requesting delivery acknowledgment.
Definition: mobile_io.cpp:198
ButtonState getButtonDiff(int button) const
Definition: mobile_io.cpp:182
Structure to hold a 3-D floating point vector (i.e., x/y/z components)
Definition: vector_3_f.hpp:8
bool setAxisLabel(int axis_number, const std::string &message, bool acknowledge_send=true)
Definition: mobile_io.cpp:97
bool update(int32_t timeout_ms=Group::DEFAULT_TIMEOUT_MS)
Definition: mobile_io.cpp:30
Structure to hold a floating point quaternion (i.e., w/x/y/z components)
Definition: quaternion_f.hpp:8
static const int32_t DEFAULT_TIMEOUT_MS
The default timeout for any send-with-acknowledgement or request operation is 500 ms.
Definition: group.hpp:86
const Vector3f getArPosition() const
Definition: mobile_io.hpp:71
static std::unique_ptr< MobileIO > create(const std::string &family, const std::string &name)
Definition: mobile_io.cpp:14
Feedback objects have various fields representing feedback from modules; which fields are populated d...
Definition: feedback.hpp:32
Definition: mobile_io.hpp:24
bool setButtonLed(int button_number, bool on, bool acknowledge_send=true)
Definition: mobile_io.cpp:117
bool appendText(const std::string &message, bool acknowledge_send=true)
Definition: mobile_io.cpp:154
bool setButtonLabel(int button_number, const std::string &message, bool acknowledge_send=true)
Definition: mobile_io.cpp:136
bool setButtonMode(int button_number, ButtonMode mode, bool acknowledge_send=true)
Definition: mobile_io.cpp:107
bool setLedColor(uint8_t r, uint8_t g, uint8_t b, bool acknowledge_send=true)
Definition: mobile_io.cpp:146
const hebi::Feedback & getLastFeedback() const
Definition: mobile_io.hpp:68
bool sendLayout(const std::string &layout_file, int32_t timeout_ms=Group::DEFAULT_TIMEOUT_MS) const
Sends a layout file to the MobileIO device, requesting delivery acknowledgment.
Definition: mobile_io.cpp:190
bool resetUI(bool acknowledge_send=true)
Definition: mobile_io.cpp:59
float getAxis(int axis) const
Definition: mobile_io.cpp:170
bool clearText(bool acknowledge_send=true)
Definition: mobile_io.cpp:162
bool getButton(int button) const
Definition: mobile_io.cpp:176
const Quaternionf getArOrientation() const
Definition: mobile_io.hpp:74
bool setAxisValue(int axis_number, float value, bool acknowledge_send=true)
Definition: mobile_io.cpp:87
ButtonMode
Definition: mobile_io.hpp:28
Maintains a registry of network-connected modules and returns Group objects to the user.
Definition: lookup.hpp:24
bool setAxisSnap(int axis_number, float snap_to, bool acknowledge_send=true)
Definition: mobile_io.cpp:77
bool disableAxisSnap(int axis_number, bool acknowledge_send=true)
Definition: mobile_io.hpp:52
ButtonState
Definition: mobile_io.hpp:30
static constexpr size_t NumButtons
Definition: mobile_io.hpp:26