API referenceQnbot Exo PlusC++

Exoskeleton management

Core interfaces

Current version · 1.4.0

Manage all configured exoskeleton devices, or use device() to work with one device.

Details

Automatic reconnection advances independently of update() and runners.

Exo::device()

Select the only device.

Type

ExoDevice Exo::device() const;
ExoDevice Exo::device(const std::string& name) const;

Parameters

  • name: logical device name. Omitting it requires exactly one configured device.

Returns

ExoDevice.

Errors

  • InvalidArgumentError for an invalid name.
  • NotFoundSelectionError when no device matches; AmbiguousSelectionError when the selection is not unique.

Exo::start()

Start devices in the domain.

Type

void Exo::start() const;

Returns

void.

See also

Exo::update()

Advance runtime work once.

Type

UpdateResult Exo::update() const;

Returns

UpdateResult.

Example

Obtain exo from sdk.exo() and prepare the device configuration and subscriptions. These methods use the Core runner contract. Call sleep() once per update result, and do not start a background runner at the same time.

exo.start();
for (int i = 0; i < 100; ++i) {
    const auto update = exo.update();
    if (update.sleep() == qnbot::SleepResult::no_tasks) {
        std::this_thread::sleep_for(std::chrono::milliseconds(10));
    }
}
exo.close();

Related Core example (Glove): manual_runtime.cpp.

See also

Exo::run_forever()

Run on the current thread.

Type

void Exo::run_forever() const;

Returns

void.

Example

Obtain exo from sdk.exo() and prepare the device configuration and subscriptions. These methods use the Core runner contract. This call occupies the current thread. See the complete example for shutdown handling.

exo.start();
exo.run_forever();
exo.close();

Complete example: quick_start.cpp.

See also

Exo::run_background()

Start background execution.

Type

void Exo::run_background() const;

Returns

void.

Example

Obtain exo from sdk.exo() and prepare the device configuration and subscriptions. These methods use the Core runner contract. The application thread remains available. Request shutdown, join the thread, and then close the scope.

exo.start();
exo.run_background();
std::this_thread::sleep_for(std::chrono::seconds(1));
exo.request_stop();
exo.join();
exo.close();

Related Core example (Glove): background_runtime.cpp.

See also

Exo::request_stop()

Request runner shutdown.

Type

void Exo::request_stop() const;

Returns

void.

See also

Exo::join()

Wait for the background runner.

Type

void Exo::join() const;

Returns

void.

See also

Exo::stop()

Stop devices in the domain.

Type

void Exo::stop() const;

Returns

void.

See also

Exo::health()

Return Core health state.

Type

Health Exo::health() const;

Returns

Health.

See also

Exo::close()

Close the domain and invalidate child objects.

Type

void Exo::close() const;

Returns

void.

See also