Hekateros  3.4.3
RoadNarrows Robotics Robot Arm Project
hekUtils.h File Reference

Hekateros common utilities. More...

#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#include <math.h>
#include <string>
#include <vector>
#include "rnr/rnrconfig.h"
#include "rnr/log.h"
#include "Hekateros/hekateros.h"

Go to the source code of this file.

Namespaces

 hekateros
 The Hekateros namespace encapsulates all Hekateros related constructs.
 

Macros

#define M_TAU   (2.0 * M_PI)
 tau = 2 * pi
 

Functions

uint_t hekateros::strToVersion (const std::string &str)
 Convert version dotted string to integer equivalent. More...
 
const char * hekateros::getStrError (const int ecode)
 Get the error string describing the Hekateros error code. More...
 
const char * hekateros::boolstr (bool b)
 Boolean to string. More...
 
double hekateros::degToRad (double d)
 Convert degrees to radians. More...
 
double hekateros::radToDeg (double r)
 Convert radians to degrees. More...
 
int hekateros::iabs (int a)
 Integer absolute value. More...
 
double hekateros::fcap (double a, double min, double max)
 Cap value within limits [min, max]. More...
 
int hekateros::cap (int a, int min, int max)
 Cap value within limits [min, max]. More...
 
double hekateros::signof (double a)
 Sign of a. More...
 
int hekateros::signof (int a)
 Sign of a. More...
 
bool hekateros::operator< (const struct timeval &lhs, const struct timeval &rhs)
 Compare operator to test if left hand side time is earlier than the right hand side time. More...
 
bool hekateros::operator== (const struct timeval &lhs, const struct timeval &rhs)
 Compare operator to test if left hand side time equals the right hand side time. More...
 
bool hekateros::operator> (const struct timeval &lhs, const struct timeval &rhs)
 Compare operator to test if left hand side time is later than the right hand side time. More...
 
struct timeval hekateros::operator+ (const struct timeval &op1, const struct timeval &op2)
 Addition operator. More...
 
struct timeval hekateros::operator- (const struct timeval &op1, const struct timeval &op2)
 Subtraction operator. More...
 
long hekateros::dt_usec (struct timeval &t1, struct timeval &t0)
 Calculate delta time in microseconds. More...
 
double hekateros::dt (struct timeval &t1, struct timeval &t0)
 Calculate delta time. More...
 
bool hekateros::operator< (const struct timespec &lhs, const struct timespec &rhs)
 Compare operator to test if left hand side time is earlier than the right hand side time. More...
 
bool hekateros::operator== (const struct timespec &lhs, const struct timespec &rhs)
 Compare operator to test if left hand side time equals the right hand side time. More...
 
bool hekateros::operator> (const struct timespec &lhs, const struct timespec &rhs)
 Compare operator to test if left hand side time is later than the right hand side time. More...
 
struct timespec hekateros::operator+ (const struct timespec &op1, const struct timespec &op2)
 Addition operator. More...
 
struct timespec hekateros::operator- (const struct timespec &op1, const struct timespec &op2)
 Subtraction operator. More...
 
long long hekateros::dt_nsec (struct timespec &t1, struct timespec &t0)
 Calculate delta time in nanoseconds. More...
 
double hekateros::dt (struct timespec &t1, struct timespec &t0)
 Calculate delta time. More...
 
std::string hekateros::getRealDeviceName (const std::string &strDevName)
 Get real device name. More...
 
std::vector< std::string > & hekateros::split (const std::string &s, char delim, std::vector< std::string > &elems)
 Split string at the delimiter character. More...
 
std::vector< std::string > hekateros::split (const std::string &s, char delim)
 Split string at the delimiter character. More...
 

Detailed Description

Hekateros common utilities.

LastChangedDate
2015-04-17 15:31:34 -0600 (Fri, 17 Apr 2015)
Rev
3942
Author
Daniel Packard (danie.nosp@m.l@ro.nosp@m.adnar.nosp@m.rows.nosp@m..com)
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)

Definition in file hekUtils.h.