Bienvenue sur le site de la LibLapin.
Jetez un coup d'oeil en bas de la page pour choisir votre niveau de documentation en fonction de votre niveau avec la LibLapin.
Pour l'instant, c'est réglé sur 'Manuel complet'. Si c'est votre première fois avec la LibLapin, il vaudrait mieux choisir 'Débutant'.
De même, n'oubliez pas de préciser une version de la bibliothèque.

LibLapin's logo

LibLapin

Monitor





The monitor module header is lapin/monitor.h.
typedef enum e_bunny_monitored_type
{
     BMT_STRING,
     BMT_INTEGER,
     BMT_DOUBLE

} t‌_‌b‌u‌n‌n‌y‌_‌m‌o‌n‌i‌t‌o‌r‌e‌d‌_‌t‌y‌p‌e;




INDEX


Description

     Add inside the monitoring system the sent data. This macro is only available in C11 and is not available in C++. If you need to use this functionnality, you should call manually the function in which this macro is based.

Parameters

  • const char *name:
         The name of the monitored value.
  • *data_pointer:
         A data to monitor. Supported types are int*, double* and char*.

Return value

  • This function return true if the sent data was added.

Error values and logs

On error, b‌u‌n‌n‌y‌_‌e‌r‌r‌n‌o is set to:


  • ENOMEM:

    Out of memory.


Additional informations

This macro wraps a call to a real function, which is:

bool _b‌u‌n‌n‌y‌_‌a‌d‌d‌_‌m‌o‌n‌i‌t‌o‌r‌e‌d‌_‌v‌a‌l‌u‌e( const char *name, t_bunny_monitored_value type, const void *ptr



INDEX


Description

     Remove a previously registered and monitored value.

Parameters

  • const char *name:
         The name of the monitored value. NULL to remove all values.

Return value

  • This function returns true if the sent data was removed.

Error values and logs

On error, b‌u‌n‌n‌y‌_‌e‌r‌r‌n‌o is set to:


  • BE_CANNOT_FIND_ELEMENT:

    Cannot find the monitored value.




INDEX


Description

     Write inside the sent text_area the monitored value name, or several value depending of what is inside name.

Parameters

  • t‌_‌b‌u‌n‌n‌y‌_‌f‌o‌n‌t *text_area:
         The graphic space where all will be written.
  • const char *name:
         The name of the monitored value to write.
    NULL to write all values.
    You can use the character '*' as ending joker.



INDEX


Description

     Write on the sent fd the monitored value named name, or several values depending of what is inside name.

Parameters

  • int fd:
         The file descriptor used for writing.
  • const char *name:
         The name of the monitored value to write.
    NULL to write all values.
    You can use the character '*' as ending joker.

Return value

  • Return how many characters was written. -1 on error.

Error values and logs

On error, b‌u‌n‌n‌y‌_‌e‌r‌r‌n‌o is set to any value write can set.




INDEX