12#ifndef SRC_APRA_UTILS_H_
13#define SRC_APRA_UTILS_H_
28 static bool saveRawFile(
string fileName, uint8_t *data,
size_t size);
29 static string makeDir(
string path);
30 static string exec(
const string &cmd,
bool debug =
false);
32 uint8_t numberOfBytes);
35 static bool fileExists(
const std::string &path);
38 std::string
const pattern);
39 static string trim(
string str);
41 bool recursive =
true);
52 static void getFilesInDirectoryRecursive(
const std::string &directoryPath,
53 std::vector<std::string> &fileList);
static uint16_t convertToUFormat(double value, uint8_t format)
static bool fileExists(const std::string &path)
static bool saveRawFile(string fileName, uint8_t *data, size_t size)
static string makeDir(string path)
static uint64_t mergefrom8Bytes(uint8_t *bytes)
static bool inRange(int64_t value, Range range)
static double convertFrom12p4(uint16_t value)
static void getFilesInDirectory(string path, vector< string > &files, bool recursive=true)
static double convertFromUFormat(uint16_t value, uint8_t format)
static uint16_t convertTo10p6(double value)
static string trim(string str)
static vector< uint8_t > extractBytes(uint64_t hexData, uint8_t numberOfBytes)
static uint64_t combineBytes(vector< uint8_t > byteArray)
static string exec(const string &cmd, bool debug=false)
static bool directoryExists(const std::string &path)
static uint16_t convertToU12p4(double value)
static string readTextFile(string filePath)
static bool caseInsensitiveSearch(std::string const str, std::string const pattern)
static double convertFrom10p6(uint16_t value)
static void extractTo8Bytes(uint64_t timeInSec, uint8_t *bytes)