gusimplewhiteboard
guWhiteboard::APM_Interface Class Reference

Class for interacting with and reading the values of APM sensors and motors. More...

#include <APM_Interface.hpp>

Inheritance diagram for guWhiteboard::APM_Interface:
Collaboration diagram for guWhiteboard::APM_Interface:

Public Member Functions

 APM_Interface ()
 default constructor More...
 
bool operator== (const APM_Interface &s)
 comparison operator More...
 
bool operator!= (const APM_Interface &s)
 return false if the two interfaces are the same More...
 
 APM_Interface (const std::string &str)
 string constructor (see from_string() below) More...
 
void from_string (const std::string &str)
 parse class properties from a string More...
 
std::string description () const
 pretty print method for showing the current property values More...
 
- Public Member Functions inherited from wb_apm_interface
 PROPERTY (enum apm_mode, mode) PROPERTY(union apm_data
 what type of machine More...
 
data wb_apm_interface ()
 stuct constructor More...
 

Detailed Description

Class for interacting with and reading the values of APM sensors and motors.

Examples

get the yaw of a quad

APM_Interface i = APM_Status_t.get();
fprintf(stderr, "yaw: %d", i.data().quad.yaw());

Definition at line 32 of file APM_Interface.hpp.

Constructor & Destructor Documentation

◆ APM_Interface() [1/2]

guWhiteboard::APM_Interface::APM_Interface ( )
inline

default constructor

Definition at line 38 of file APM_Interface.hpp.

◆ APM_Interface() [2/2]

guWhiteboard::APM_Interface::APM_Interface ( const std::string &  str)
inline

string constructor (see from_string() below)

Parameters
[in]stra serialised string containing properties to set in this class

Definition at line 80 of file APM_Interface.hpp.

References from_string().

Member Function Documentation

◆ description()

std::string guWhiteboard::APM_Interface::description ( ) const
inline

pretty print method for showing the current property values

Returns
pretty printed string

Definition at line 122 of file APM_Interface.hpp.

References Plane, and Quad.

◆ from_string()

void guWhiteboard::APM_Interface::from_string ( const std::string &  str)
inline

parse class properties from a string

Parameters
[in]stra serialised string containing properties to set in this class

Definition at line 85 of file APM_Interface.hpp.

References DELIMITER, Plane, and Quad.

Referenced by APM_Interface().

◆ operator!=()

bool guWhiteboard::APM_Interface::operator!= ( const APM_Interface s)
inline

return false if the two interfaces are the same

Definition at line 71 of file APM_Interface.hpp.

◆ operator==()

bool guWhiteboard::APM_Interface::operator== ( const APM_Interface s)
inline

comparison operator

Definition at line 42 of file APM_Interface.hpp.

References PLANE, Plane, QUAD, and Quad.


The documentation for this class was generated from the following file: