8#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__WIN32__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64) || defined(__WIN64__)
12#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNUC__) || defined(__GNUG__) || defined(unix) || defined(__unix) || defined(__unix__)
17#error OS not supported
21#pragma warning(disable : 4996)
26#elif defined(OS_LINUX)
27#define sscanf_s sscanf
28#define sprintf_s(buf, len, ...) snprintf((buf), (len), __VA_ARGS__)
30#include <sys/socket.h>
50 constexpr double red[] = { 0, 0.85, 0.929, 0.494, 0.466, 0.301, 0.635 };
54 constexpr double green[] = { 0.447, 0.325, 0.694, 0.184, 0.674, 0.745, 0.078 };
58 constexpr double blue[] = { 0.741, 0.098, 0.125, 0.556, 0.188, 0.933, 0.184 };
78 int filecp(
const char FileSource [],
const char FileDestination []);
88 int getIP_and_subnetmask(uint32_t* ip =
nullptr, uint32_t* mask =
nullptr, std::string* ip_str =
nullptr, std::string* mask_str =
nullptr);
97 uint32_t
get_remoteIP(uint32_t ip, uint32_t mask, std::string* str =
nullptr);
128 bool str2hex(std::string str,
unsigned int *p_v);
140 float rms(std::vector<float>
const& v);
A namespace providing a set of standard colors.
Definition: SBBUtils.h:47
constexpr double green[]
green tone of the set of colors
Definition: SBBUtils.h:54
constexpr double red[]
red tone of the set of colors
Definition: SBBUtils.h:50
constexpr double blue[]
blue tone of the set of colors
Definition: SBBUtils.h:58
constexpr int size
number of color in the color set.
Definition: SBBUtils.h:62
A namespace providing utility functions.
Definition: SBBUtils.h:70
uint32_t get_remoteIP(uint32_t ip, uint32_t mask, std::string *str=nullptr)
Get the remote IP.
bool set_env_var(std::string key, std::string val)
Set a local environment variable.
uint32_t ip_str2num(std::string ip_str)
Convert IP from string to uint32.
uint32_t get_broadcastIP(uint32_t ip, uint32_t mask, std::string *str=nullptr)
Get the broadcast IP.
std::string hex2str(unsigned int v)
Convert HEX from unsigned int to string.
bool str2hex(std::string str, unsigned int *p_v)
Convert HEX from string to unsigned int.
hhmmss_t sec2hhmmss(int secs)
Convert elapsed seconds to hh::mm:ss format.
void beep(int mode)
Send a beep message.
float rms(std::vector< float > const &v)
Get the RMS of a vector of float.
int getIP_and_subnetmask(uint32_t *ip=nullptr, uint32_t *mask=nullptr, std::string *ip_str=nullptr, std::string *mask_str=nullptr)
Get the local IP and subnet mask.
int filecp(const char FileSource[], const char FileDestination[])
Copy a file.
float average(std::vector< float > const &v)
Get the average of a vector of float.
std::string get_home_path()
Get the HOME path.
A structure for handling elapsed time in hour, minute, second format.
Definition: SBBUtils.h:167
int s
Definition: SBBUtils.h:168
int h
Definition: SBBUtils.h:170
int m
Definition: SBBUtils.h:169