sofs19  0.1
FUSE based file system
probing.h File Reference

A probing toolkit. More...

#include <stdio.h>
#include <inttypes.h>
#include <stdarg.h>
#include <errno.h>

Go to the source code of this file.

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

A probing toolkit.

This toolkit provides a simple monitoring system which allows the programmer to include messages into his/her code. The system may be turned on or off. The system uses a probing ID to determine which messages must be displayed. The ID is a positive value. Upon writing the code, one should assign an ID to every probe message. Upon activating the probing system, one can set, add or remove ranges of IDs that must be logged or displayed.

Author
Artur Pereira - 2008-2009, 2016-2019
Miguel Oliveira e Silva - 2009, 2017
António Rui Borges - 2010-2015
Remarks
In case an error occurs, every function throws an error code (an int)