#include <mobile_io.hpp>
|
bool | update (int32_t timeout_ms=Group::DEFAULT_TIMEOUT_MS) |
|
bool | resetUI (bool acknowledge_send=true) |
|
bool | setAxisSnap (int axis_number, float snap_to, bool acknowledge_send=true) |
|
bool | disableAxisSnap (int axis_number, bool acknowledge_send=true) |
|
bool | setAxisValue (int axis_number, float value, bool acknowledge_send=true) |
|
bool | setAxisLabel (int axis_number, const std::string &message, bool acknowledge_send=true) |
|
bool | setButtonMode (int button_number, ButtonMode mode, bool acknowledge_send=true) |
|
bool | setButtonLed (int button_number, bool on, bool acknowledge_send=true) |
|
bool | setButtonLabel (int button_number, const std::string &message, bool acknowledge_send=true) |
|
bool | setLedColor (uint8_t r, uint8_t g, uint8_t b, bool acknowledge_send=true) |
|
bool | appendText (const std::string &message, bool acknowledge_send=true) |
|
bool | clearText (bool acknowledge_send=true) |
|
const hebi::Feedback & | getLastFeedback () const |
|
const Vector3f | getArPosition () const |
|
const Quaternionf | getArOrientation () const |
|
float | getAxis (int axis) const |
|
bool | getButton (int button) const |
|
ButtonState | getButtonDiff (int button) const |
|
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. More...
|
|
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. More...
|
|
|
static std::unique_ptr< MobileIO > | create (const std::string &family, const std::string &name) |
|
static std::unique_ptr< MobileIO > | create (const std::string &family, const std::string &name, const Lookup &lookup) |
|
◆ ButtonMode
Enumerator |
---|
Momentary | |
Toggle | |
◆ ButtonState
Enumerator |
---|
ToOff | |
Unchanged | |
ToOn | |
◆ create() [1/2]
std::unique_ptr< MobileIO > hebi::util::MobileIO::create |
( |
const std::string & |
family, |
|
|
const std::string & |
name |
|
) |
| |
|
static |
◆ create() [2/2]
std::unique_ptr< MobileIO > hebi::util::MobileIO::create |
( |
const std::string & |
family, |
|
|
const std::string & |
name, |
|
|
const Lookup & |
lookup |
|
) |
| |
|
static |
◆ update()
◆ resetUI()
bool hebi::util::MobileIO::resetUI |
( |
bool |
acknowledge_send = true | ) |
|
◆ setAxisSnap()
bool hebi::util::MobileIO::setAxisSnap |
( |
int |
axis_number, |
|
|
float |
snap_to, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ disableAxisSnap()
bool hebi::util::MobileIO::disableAxisSnap |
( |
int |
axis_number, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
|
inline |
◆ setAxisValue()
bool hebi::util::MobileIO::setAxisValue |
( |
int |
axis_number, |
|
|
float |
value, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ setAxisLabel()
bool hebi::util::MobileIO::setAxisLabel |
( |
int |
axis_number, |
|
|
const std::string & |
message, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ setButtonMode()
bool hebi::util::MobileIO::setButtonMode |
( |
int |
button_number, |
|
|
ButtonMode |
mode, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ setButtonLed()
bool hebi::util::MobileIO::setButtonLed |
( |
int |
button_number, |
|
|
bool |
on, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ setButtonLabel()
bool hebi::util::MobileIO::setButtonLabel |
( |
int |
button_number, |
|
|
const std::string & |
message, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ setLedColor()
bool hebi::util::MobileIO::setLedColor |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ appendText()
bool hebi::util::MobileIO::appendText |
( |
const std::string & |
message, |
|
|
bool |
acknowledge_send = true |
|
) |
| |
◆ clearText()
bool hebi::util::MobileIO::clearText |
( |
bool |
acknowledge_send = true | ) |
|
◆ getLastFeedback()
◆ getArPosition()
const Vector3f hebi::util::MobileIO::getArPosition |
( |
| ) |
const |
|
inline |
◆ getArOrientation()
const Quaternionf hebi::util::MobileIO::getArOrientation |
( |
| ) |
const |
|
inline |
◆ getAxis()
float hebi::util::MobileIO::getAxis |
( |
int |
axis | ) |
const |
◆ getButton()
bool hebi::util::MobileIO::getButton |
( |
int |
button | ) |
const |
◆ getButtonDiff()
◆ sendLayout()
bool hebi::util::MobileIO::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.
The layout file should be provided as a file path with contents of a JSON string buffer (this may be extended in the future to support other formats with optional arguments).
- Parameters
-
layout_file | The path to the layout file to send to the MobileIO object. |
- Returns
- true if the layout was successfully sent and an acknowledgment was received; false otherwise.
Note: A false return does not indicate a specific failure and may result from an error while sending or simply a timeout/dropped response packet after a successful transmission.
◆ sendLayoutBuffer()
bool hebi::util::MobileIO::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.
The layout should be provided as a JSON string buffer (this may be extended in the future to support other formats with optional arguments).
- Parameters
-
layout_buffer | A string containing the JSON layout to send to the MobileIO object. |
- Returns
- true if the layout was successfully sent and an acknowledgment was received; false otherwise.
Note: A false return does not indicate a specific failure and may result from an error while sending or simply a timeout/dropped response packet after a successful transmission.
◆ NumButtons
constexpr size_t hebi::util::MobileIO::NumButtons = 8 |
|
static |
The documentation for this class was generated from the following files: