summaryrefslogtreecommitdiff
path: root/cesar/lib
diff options
context:
space:
mode:
authordufour2010-02-12 15:51:27 +0000
committerdufour2010-02-12 15:51:27 +0000
commitac263f91a4f5853419b9a8cc598a72540bf84307 (patch)
treef5ee835fdbfb6bf5a3315cd1c5fb88fc738e5685 /cesar/lib
parent38352f97090e3506ff2311dd66a852d2b4c8f3db (diff)
cesar/lib/stats: fix stats functions documentation
This commit includes: - comply to doxygen documentation style, - add missing documentation. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6710 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/lib')
-rw-r--r--cesar/lib/src/stats.c6
-rw-r--r--cesar/lib/stats.h48
2 files changed, 37 insertions, 17 deletions
diff --git a/cesar/lib/src/stats.c b/cesar/lib/src/stats.c
index 6c34645640..f7ca1497fe 100644
--- a/cesar/lib/src/stats.c
+++ b/cesar/lib/src/stats.c
@@ -63,7 +63,7 @@ lib_stats_book_t lib_stats_book;
/*********************************************************/
/**
- * Get ASCII code from quartet hexa
+ * Get ASCII code from quartet hexa.
*/
u8
quartet2ascii (u8 quartet)
@@ -82,8 +82,8 @@ quartet2ascii (u8 quartet)
/**
* Prepare the book to store a new stat
- * \param name : string to be displayed before the stat value
- * \param type : type and max size of the value in octet
+ * \param name string to be displayed before the stat value
+ * \param type type and max size of the value in octet
*/
void
lib_stats_new_stat (const char *name, lib_stats_types_t type)
diff --git a/cesar/lib/stats.h b/cesar/lib/stats.h
index fdbf07f28a..478ca95c5e 100644
--- a/cesar/lib/stats.h
+++ b/cesar/lib/stats.h
@@ -9,7 +9,7 @@
* }}} */
/**
* \file lib/stats.h
- * \brief Trace system.
+ * \brief Stats system.
* \ingroup lib
*
* The stats module provide stats registering function and stats retrieving
@@ -33,51 +33,71 @@ BEGIN_DECLS
#if CONFIG_STATS
/**
- * Init stat book : prepare the book so that one empty page is available
+ * Init stat book.
+ *
+ * Prepare the book so that one empty page is available.
*/
void
lib_stats_init (void);
/**
- * Uninit stat book : clear all the pages and stats of the book
+ * Uninit stat book.
+ *
+ * Clear all the pages and stats of the book.
*/
void
lib_stats_uninit (void);
/**
- * Write one page of stats to the bitstream
- * \param bitstream : bitstream where to write the page
- * \param page : page to send
+ * Write one page of stats to the bitstream.
+ * \param bitstream bitstream where to write the page
+ * \param page page number requested (starting from 0)
*/
void
lib_stats_get_page (bitstream_t *bitstream, u8 page);
/**
- * Add a new stat to the stat book using pointer to value
- * \param name : string to be displayed before the stat value
- * \param value : pointer to the value of the stat
- * \param type : type and max size of the value in octet
+ * Add a new stat to the stat book using pointer to value.
+ * \param name string to be displayed before the stat value (no copy of the
+ * name is done)
+ * \param value pointer to the value of the stat
+ * \param type type and max size of the value in octet
*/
void
lib_stats_set_stat_value (const char *name, void *value,
lib_stats_types_t type);
/**
- * Add a new stat to the stat book using callback
- * \param name : string to be displayed before the stat value
- * \param callback : if value param is NULL this callback will be used to
+ * Add a new stat to the stat book using callback.
+ * \param name string to be displayed before the stat value (no copy of the
+ * name is done)
+ * \param callback if value param is NULL this callback will be used to
* retrieve the stat
- * \param type : type and max size of the value in octet
+ * \param type type and max size of the value in octet
*/
void
lib_stats_set_stat_callback (const char *name, void *(*callback) (void),
lib_stats_types_t type);
+/**
+ * Add a new stat to the stat book using a pointer to a value without
+ * specifying its type.
+ * \param name string to be displayed before the stat value (no copy of the
+ * name is done)
+ * \param value pointer to the value of the stat
+ */
#define lib_stats_set_stat_value_notype(name, value) do { \
lib_stats_set_stat_value (name, value, sizeof (*value)); \
} \
while (0)
+/**
+ * Add a new stat to the stat book using callback without specifying its type.
+ * \param name string to be displayed before the stat value (no copy of the
+ * name is done)
+ * \param callback if value param is NULL this callback will be used to
+ * retrieve the stat
+ */
#define lib_stats_set_stat_callback_notype(name, callback) do { \
lib_stats_set_stat_callback (name, (void *) callback, \
sizeof (*callback ())); \