sofs19  0.1
FUSE based file system
probing

The probing toolkit. More...

Functions

void soProbeOpen (FILE *fp, uint32_t lower=0, uint32_t upper=1000)
 Opening of the probing system. More...
 
void soProbeClose (void)
 Closing the probing system.
 
void soProbeStream (FILE *fp)
 Set the probing file stream. More...
 
void soProbeSetIDs (uint32_t lower, uint32_t upper)
 Set probing IDs to the given range. More...
 
void soProbeAddIDs (uint32_t lower, uint32_t upper)
 Add a range of probing IDs. More...
 
void soProbeRemoveIDs (uint32_t lower, uint32_t upper)
 Remove a range of probing IDs. More...
 
void soProbe (uint32_t id, const char *fmt,...)
 Print a probing message with blue color if ID is visible. More...
 
void soProbe (const char *color, uint32_t id, const char *fmt,...)
 Print a probing message with given color if ID is visible. More...
 

Variables

const char * SOPROBE_RED
 the red probing color
 
const char * SOPROBE_GREEN
 the green probing color
 
const char * SOPROBE_YELLOW
 the yellow probing color
 
const char * SOPROBE_BLUE
 the blue probing color
 
const char * SOPROBE_MAGENTA
 the magenta probing color
 
const char * SOPROBE_CYAN
 the cyan probing color
 

Detailed Description

The probing toolkit.

This toolkit allows to selected the set of functions whose probing messages should be displayed

Function Documentation

◆ soProbeOpen()

void sofs19::soProbeOpen ( FILE *  fp,
uint32_t  lower = 0,
uint32_t  upper = 1000 
)

Opening of the probing system.

Parameters
fpa file pointer of the output stream to be used
lowerthe minimum probing ID to be activated
upperthe maximum probing ID to be activated

◆ soProbeStream()

void sofs19::soProbeStream ( FILE *  fp)

Set the probing file stream.

Only the stream is changed, keeping the activated ranges of IDs

Parameters
[in]fpa file pointer of the output stream to be used

◆ soProbeSetIDs()

void sofs19::soProbeSetIDs ( uint32_t  lower,
uint32_t  upper 
)

Set probing IDs to the given range.

remove all IDs and then activate the given range

Parameters
[in]lowerthe minimum probing ID to be activated
[in]upperthe maximum probing ID to be activated

◆ soProbeAddIDs()

void sofs19::soProbeAddIDs ( uint32_t  lower,
uint32_t  upper 
)

Add a range of probing IDs.

Parameters
[in]lowerthe minimum probing ID to be activated
[in]upperthe maximum probing ID to be activated

◆ soProbeRemoveIDs()

void sofs19::soProbeRemoveIDs ( uint32_t  lower,
uint32_t  upper 
)

Remove a range of probing IDs.

Parameters
[in]lowerthe minimum probing ID to be deactivated
[in]upperthe maximum probing ID to be deactivated

◆ soProbe() [1/2]

void sofs19::soProbe ( uint32_t  id,
const char *  fmt,
  ... 
)

Print a probing message with blue color if ID is visible.

Apart from the id argument it works like the fprintf function.

Parameters
[in]idthe probing ID of the message
[in]fmtthe format string (as in fprintf)

◆ soProbe() [2/2]

void sofs19::soProbe ( const char *  color,
uint32_t  id,
const char *  fmt,
  ... 
)

Print a probing message with given color if ID is visible.

Apart from the color and id arguments, it works like the fprintf function. The color is a string in ANSI terminal format. For instance "01;31" means red font. Four macros are defined for red, blue, green and yellow.

Parameters
[in]colorstring defining the probing color
[in]idthe probing ID of the message
[in]fmtthe format string (as in fprintf)