cacao  Release 0.1.03-dev
Compute And Control For Adaptive Optics
00CORE.h File Reference

Function prototypes for module 00CORE. More...

Go to the source code of this file.

Functions

INITIALIZATION

Module initialization functions

void __attribute__ ((constructor)) libinit_00CORE()
 
00CORE - 1. PRINT, ERROR REPORTING, EVENT LOGGING
int printRED (char *string)
 Print string in red. More...
 
errno_t printWARNING (const char *restrict file, const char *restrict func, int line, const char *restrict warnmessage)
 Print warning and continue. More...
 
errno_t printERROR (const char *restrict file, const char *restrict func, int line, const char *restrict errmessage)
 Print error (in red) and continue. More...
 
void CORE_logFunctionCall (const int funclevel, const int loglevel, const int logfuncMODE, const char *FileName, const char *FunctionName, const long line, char *comments)
 Log function call to file. More...
 
00CORE - 2. CONFIGURATION AND INFORMATION
int set_precision (int vp)
 
int CLIWritePid ()
 
00CORE - 3. TIME UTILITIES
struct timespec timespec_diff (struct timespec start, struct timespec end)
 
double timespec_diff_double (struct timespec start, struct timespec end)
 

Detailed Description

Function prototypes for module 00CORE.

Function Documentation

◆ __attribute__()

void __attribute__ ( (constructor)  )

◆ CLIWritePid()

int CLIWritePid ( )

◆ CORE_logFunctionCall()

void CORE_logFunctionCall ( const int  funclevel,
const int  loglevel,
const int  logfuncMODE,
const char *  FileName,
const char *  FunctionName,
const long  line,
char *  comments 
)

Log function call to file.

◆ printERROR()

errno_t printERROR ( const char *restrict  file,
const char *restrict  func,
int  line,
const char *restrict  errmessage 
)

Print error (in red) and continue.

Purpose

Print error string

Arguments

Parameters
[in]fileCHAR* file name from which error is issued
[in]funcCHAR* function name from which error is issued
[in]lineint line number from which error is issued
[in]warnmessageCHAR* error message to be printed

◆ printRED()

int printRED ( char *  string)

Print string in red.

Purpose

Print red string to stdout

Arguments

Parameters
[in]stringCHAR*

◆ printWARNING()

errno_t printWARNING ( const char *restrict  file,
const char *restrict  func,
int  line,
const char *restrict  warnmessage 
)

Print warning and continue.

Purpose

Print warning string

Arguments

Parameters
[in]fileCHAR* file name from which warning is issued
[in]funcCHAR* function name from which warning is issued
[in]lineint line number from which warning is issued
[in]warnmessageCHAR* warning message to be printed

Color codes for printf 30 Black 31 Red 32 Green 33 Yellow 34 Blue 35 Magenta 36 Cyan 37 White

◆ set_precision()

int set_precision ( int  vp)

Purpose

Set default precision (single or double)

Arguments

Parameters
[in]vpint precision mode
[in]warnmessageCHAR* error message to be printed
  • 0: single precision
  • 1: double precision

◆ timespec_diff()

struct timespec timespec_diff ( struct timespec  start,
struct timespec  end 
)

◆ timespec_diff_double()

double timespec_diff_double ( struct timespec  start,
struct timespec  end 
)