Functions | Variables
ISUtilities.cpp File Reference
#include <stdio.h>
#include <iostream>
#include <math.h>
#include <string>
#include "ISUtilities.h"
#include "ISPose.h"
#include "ISEarth.h"
#include <unistd.h>
#include <sys/time.h>
Include dependency graph for ISUtilities.cpp:

Go to the source code of this file.

Functions

string base64Decode (const string &encoded_string)
 
string base64Encode (const unsigned char *bytes_to_encode, unsigned int in_len)
 
void bootloadStatusInfo (const void *port, const char *str)
 
int bootloadUploadProgress (const void *port, float percent)
 
int bootloadVerifyProgress (const void *port, float percent)
 
int32_t convertDateToMjd (int32_t year, int32_t month, int32_t day)
 
void convertGpsToHMS (int32_t gpsSeconds, int32_t *hour, int32_t *minutes, int32_t *seconds)
 
int32_t convertGpsToMjd (int32_t gpsWeek, int32_t gpsSeconds)
 
void convertMjdToDate (int32_t mjd, int32_t *year, int32_t *month, int32_t *day)
 
int current_timeMs ()
 
int current_timeSec ()
 
int current_weekMs ()
 
uint64_t current_weekUs ()
 
uint32_t dateToWeekDay (uint32_t ul_year, uint32_t ul_month, uint32_t ul_day)
 
gen_1axis_sensor_t gen1AxisSensorData (double time, const float val)
 
gen_3axis_sensor_t gen3AxisSensorData (double time, const float val[3])
 
gen_3axis_sensord_t gen3AxisSensorDataD (double time, const double val[3])
 
gen_dual_3axis_sensor_t genDual3AxisSensorData (double time, const float val1[3], const float val2[3])
 
const unsigned char * getHexLookupTable ()
 
uint8_t getHexValue (unsigned char hex)
 
uint64_t getTickCount (void)
 
static bool is_base64 (unsigned char c)
 
void * mutexCreate (void)
 
void mutexFree (void *handle)
 
void mutexLock (void *handle)
 
void mutexUnlock (void *handle)
 
FILE * openFile (const char *path, const char *mode)
 
size_t splitString (const string &s, const string &delimiter, vector< string > &result)
 
float step_sinwave (float *sig_gen, float freqHz, float amplitude, float periodSec)
 Initialize signal generator. More...
 
const char * tempPath ()
 
void * threadCreateAndStart (void(*function)(void *info), void *info)
 
void threadJoinAndFree (void *handle)
 
uint64_t timerRawEnd (uint64_t start)
 
uint64_t timerRawStart ()
 
uint64_t timerUsEnd (uint64_t start)
 
uint64_t timerUsStart ()
 

Variables

static const string s_base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
 

Function Documentation

◆ base64Decode()

string base64Decode ( const string &  encoded_string)

Definition at line 105 of file ISUtilities.cpp.

◆ base64Encode()

string base64Encode ( const unsigned char *  bytes_to_encode,
unsigned int  in_len 
)

Definition at line 53 of file ISUtilities.cpp.

◆ bootloadStatusInfo()

void bootloadStatusInfo ( const void *  port,
const char *  str 
)

Definition at line 431 of file ISUtilities.cpp.

◆ bootloadUploadProgress()

int bootloadUploadProgress ( const void *  port,
float  percent 
)

Definition at line 401 of file ISUtilities.cpp.

◆ bootloadVerifyProgress()

int bootloadVerifyProgress ( const void *  port,
float  percent 
)

Definition at line 416 of file ISUtilities.cpp.

◆ convertDateToMjd()

int32_t convertDateToMjd ( int32_t  year,
int32_t  month,
int32_t  day 
)

Definition at line 655 of file ISUtilities.cpp.

◆ convertGpsToHMS()

void convertGpsToHMS ( int32_t  gpsSeconds,
int32_t *  hour,
int32_t *  minutes,
int32_t *  seconds 
)

Definition at line 689 of file ISUtilities.cpp.

◆ convertGpsToMjd()

int32_t convertGpsToMjd ( int32_t  gpsWeek,
int32_t  gpsSeconds 
)

Definition at line 667 of file ISUtilities.cpp.

◆ convertMjdToDate()

void convertMjdToDate ( int32_t  mjd,
int32_t *  year,
int32_t *  month,
int32_t *  day 
)

Definition at line 673 of file ISUtilities.cpp.

◆ current_timeMs()

int current_timeMs ( )

Definition at line 224 of file ISUtilities.cpp.

◆ current_timeSec()

int current_timeSec ( )

Definition at line 205 of file ISUtilities.cpp.

◆ current_weekMs()

int current_weekMs ( )

Time since week start (Sunday morning) in milliseconds, GMT

Definition at line 244 of file ISUtilities.cpp.

◆ current_weekUs()

uint64_t current_weekUs ( )

Definition at line 263 of file ISUtilities.cpp.

◆ dateToWeekDay()

uint32_t dateToWeekDay ( uint32_t  ul_year,
uint32_t  ul_month,
uint32_t  ul_day 
)

Definition at line 700 of file ISUtilities.cpp.

◆ gen1AxisSensorData()

gen_1axis_sensor_t gen1AxisSensorData ( double  time,
const float  val 
)

Definition at line 717 of file ISUtilities.cpp.

◆ gen3AxisSensorData()

gen_3axis_sensor_t gen3AxisSensorData ( double  time,
const float  val[3] 
)

Definition at line 725 of file ISUtilities.cpp.

◆ gen3AxisSensorDataD()

gen_3axis_sensord_t gen3AxisSensorDataD ( double  time,
const double  val[3] 
)

Definition at line 748 of file ISUtilities.cpp.

◆ genDual3AxisSensorData()

gen_dual_3axis_sensor_t genDual3AxisSensorData ( double  time,
const float  val1[3],
const float  val2[3] 
)

Definition at line 735 of file ISUtilities.cpp.

◆ getHexLookupTable()

const unsigned char* getHexLookupTable ( )

Return a pointer to 16 elements to map nibbles to for converting to hex

Returns
pointer to 16 bytes for mapping nibbles to chars

Definition at line 488 of file ISUtilities.cpp.

◆ getHexValue()

uint8_t getHexValue ( unsigned char  hex)

Get numberic value of a hex code - no bounds check is done, so non-hex chars will return undefined values

Parameters
hexthe hex digit, i.e. 'A'
Returns
the numberic value

Definition at line 494 of file ISUtilities.cpp.

◆ getTickCount()

uint64_t getTickCount ( void  )

Definition at line 377 of file ISUtilities.cpp.

◆ is_base64()

static bool is_base64 ( unsigned char  c)
inlinestatic

Definition at line 48 of file ISUtilities.cpp.

◆ mutexCreate()

void* mutexCreate ( void  )

Definition at line 553 of file ISUtilities.cpp.

◆ mutexFree()

void mutexFree ( void *  handle)

Free a mutex

Parameters
handlethe mutex handle to free

Definition at line 626 of file ISUtilities.cpp.

◆ mutexLock()

void mutexLock ( void *  handle)

Lock a mutex - mutex cannot be locked until mutexUnlock is called

Parameters
handlethe mutex handle to lock

Definition at line 580 of file ISUtilities.cpp.

◆ mutexUnlock()

void mutexUnlock ( void *  handle)

Unlock a mutex

Parameters
handlethe mutex handle to unlock

Definition at line 603 of file ISUtilities.cpp.

◆ openFile()

FILE* openFile ( const char *  path,
const char *  mode 
)

Definition at line 450 of file ISUtilities.cpp.

◆ splitString()

size_t splitString ( const string &  s,
const string &  delimiter,
vector< string > &  result 
)

Definition at line 157 of file ISUtilities.cpp.

◆ step_sinwave()

float step_sinwave ( float *  sig_gen,
float  freqHz,
float  amplitude,
float  periodSec 
)

Initialize signal generator.

param float loopPeriodSec Timestep interval in seconds param float freqHz Frequency of output sin wave param float amplitude Amplitude (peak to center/mean) of output sin wave

Step the signal generator output

Definition at line 437 of file ISUtilities.cpp.

◆ tempPath()

const char* tempPath ( )

Definition at line 468 of file ISUtilities.cpp.

◆ threadCreateAndStart()

void* threadCreateAndStart ( void(*)(void *info)  function,
void *  info 
)

Create a thread and execute a function

Parameters
functionthe function to execute in a background thread
infothe parameter to pass to the thread function
Returns
the thread handle

Definition at line 499 of file ISUtilities.cpp.

◆ threadJoinAndFree()

void threadJoinAndFree ( void *  handle)

Join a thread with this thread, waiting for it to finish, then free the thread

Parameters
handlethe thread handle to join, wait for finish and then to free

Definition at line 523 of file ISUtilities.cpp.

◆ timerRawEnd()

uint64_t timerRawEnd ( uint64_t  start)

Definition at line 356 of file ISUtilities.cpp.

◆ timerRawStart()

uint64_t timerRawStart ( )

Definition at line 337 of file ISUtilities.cpp.

◆ timerUsEnd()

uint64_t timerUsEnd ( uint64_t  start)

Definition at line 308 of file ISUtilities.cpp.

◆ timerUsStart()

uint64_t timerUsStart ( )

Definition at line 289 of file ISUtilities.cpp.

Variable Documentation

◆ s_base64_chars

const string s_base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
static

Definition at line 47 of file ISUtilities.cpp.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:06