13 #ifndef IS_UTILITIES_H 14 #define IS_UTILITIES_H 35 string base64Encode(
const unsigned char* bytes_to_encode,
unsigned int in_len);
51 size_t splitString(
const string& s,
const string& delimiter, vector<string>& result);
93 cMutexLocker(cMutex* mutex);
98 virtual ~cMutexLocker();
111 #if PLATFORM_IS_WINDOWS 113 void usleep(__int64 usec);
115 #define DEFAULT_COM_PORT "COM4" 118 #define SLEEP_MS(milliseconds) Sleep(milliseconds); 122 #define SLEEP_US(timeUs) usleep(timeUs); 128 #include <sys/time.h> 131 #define DEFAULT_COM_PORT "/dev/ttyUSB0" 134 #define SLEEP_MS(timeMs) usleep(timeMs * 1000); 138 #define SLEEP_US(timeUs) usleep(timeUs); 157 float step_sinwave(
float *sig_gen,
float freqHz,
float amplitude,
float periodSec);
159 FILE*
openFile(
const char* path,
const char* mode);
216 void convertMjdToDate(int32_t mjd, int32_t* year, int32_t* month, int32_t* day);
217 void convertGpsToHMS(int32_t gpsSeconds, int32_t* hour, int32_t* minutes, int32_t* seconds);
218 uint32_t
dateToWeekDay(uint32_t ul_year, uint32_t ul_month, uint32_t ul_day);
229 #endif // IS_UTILITIES_H
int bootloadVerifyProgress(const void *port, float percent)
uint64_t timerRawEnd(uint64_t start)
uint32_t dateToWeekDay(uint32_t ul_year, uint32_t ul_month, uint32_t ul_day)
uint64_t getTickCount(void)
size_t splitString(const string &s, const string &delimiter, vector< string > &result)
int bootloadUploadProgress(const void *port, float percent)
float step_sinwave(float *sig_gen, float freqHz, float amplitude, float periodSec)
Initialize signal generator.
void bootloadStatusInfo(const void *port, const char *str)
const unsigned char * getHexLookupTable()
string base64Encode(const unsigned char *bytes_to_encode, unsigned int in_len)
uint64_t timerUsEnd(uint64_t start)
FILE * openFile(const char *path, const char *mode)
void mutexLock(void *handle)
gen_3axis_sensord_t gen3AxisSensorDataD(double time, const double val[3])
void * threadCreateAndStart(void(*function)(void *info), void *info)
gen_3axis_sensor_t gen3AxisSensorData(double time, const float val[3])
void mutexFree(void *handle)
void threadJoinAndFree(void *handle)
int32_t convertGpsToMjd(int32_t gpsWeek, int32_t gpsSeconds)
gen_1axis_sensor_t gen1AxisSensorData(double time, const float val)
void mutexUnlock(void *handle)
gen_dual_3axis_sensor_t genDual3AxisSensorData(double time, const float val1[3], const float val2[3])
uint8_t getHexValue(unsigned char hex)
uint64_t current_timeUs()
void convertMjdToDate(int32_t mjd, 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 convertDateToMjd(int32_t year, int32_t month, int32_t day)
string base64Decode(const string &encoded_string)