C++ API and example

1. Introduction

This page exist in order to extract the examples from the Doxygen documentation, Please have look at the end of this page there are all the examples.

2. C++ API and example

class Driver : public o80::Driver<DriverIn, DriverOut>
#include <driver.hpp>

Public Functions

Driver(double min, double max)
void start()
void stop()
void set(const DriverIn &in)
DriverOut get()

Private Members

double values_[2]
double min_
double max_
class DriverIn
#include <driver_in.hpp>

Public Functions

void print(bool endl)
std::string to_string() const

Public Members

double values[2]
class DriverOut
#include <driver_out.hpp>

Public Functions

void print(bool endl)

Public Members

double values[2]
class Joint : public o80::State<double, Joint>
#include <joint.hpp>

Public Functions

inline Joint()
inline Joint(double value)
class Standalone : public o80::Standalone<o80_EXAMPLE_QUEUE_SIZE, o80_EXAMPLE_NB_DOFS, Driver, Joint, o80::VoidExtendedState>
#include <standalone.hpp>

Public Functions

Standalone(std::shared_ptr<Driver> driver_ptr, double frequency, std::string segment_id)
DriverIn convert(const o80::States<2, Joint> &joints)
o80::States<2, Joint> convert(const DriverOut &driver_out)
namespace o80_example

Typedefs

typedef o80::StateXd<double, int> Joint2d

Functions

std::string get_segment_id(int id)
file driver.hpp
#include <unistd.h>
#include “o80/driver.hpp”
file driver_in.hpp
#include <iostream>
#include <string>
file driver_out.hpp
#include <iostream>
#include <string>
file joint.hpp
#include “o80/state.hpp”
file joint2d.hpp
#include “o80/statexd.hpp”
file standalone.hpp
#include “o80/memory_clearing.hpp”
#include “o80/standalone.hpp”
#include “o80_example/driver.hpp
#include “o80_example/joint.hpp

Defines

o80_EXAMPLE_SEGMENT
o80_EXAMPLE_QUEUE_SIZE
o80_EXAMPLE_NB_DOFS
file wrappers.cpp
#include “o80/pybind11_helper.hpp”

Functions

PYBIND11_MODULE(o80_example, m)
dir include
dir include/o80_example
dir srcpy