From c01d95f8834ffb9a8926948df5464bc08d2b0c15 Mon Sep 17 00:00:00 2001 From: Mathias Laurenz Baumann Date: Tue, 19 Apr 2011 22:57:49 +0200 Subject: [PATCH] more documentation --- Doxyfile | 2 +- include/psyc.h | 18 ++++++++++++++++++ include/psyc/parser.h | 39 +++++++++++++++++++++++++++++++++------ 3 files changed, 52 insertions(+), 7 deletions(-) diff --git a/Doxyfile b/Doxyfile index 4f868f6..47129a6 100644 --- a/Doxyfile +++ b/Doxyfile @@ -321,7 +321,7 @@ SYMBOL_CACHE_SIZE = 0 # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES -EXTRACT_ALL = YES +EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. diff --git a/include/psyc.h b/include/psyc.h index 0252999..3055da0 100644 --- a/include/psyc.h +++ b/include/psyc.h @@ -1,3 +1,21 @@ +/** @file psyc.h + * + * @brief Main psyc interface providing crucial functionality +*/ + +/** @mainpage Psyc Core Library + * + * @section intro_sec Introduction + * + * This is the introduction. + * + * @section install_sec Installation + * + * @subsection step1 Step 1: Opening the box + * + * etc... + */ + #include #include diff --git a/include/psyc/parser.h b/include/psyc/parser.h index 8bc6809..23ba5fc 100644 --- a/include/psyc/parser.h +++ b/include/psyc/parser.h @@ -6,12 +6,23 @@ * defined in this file. */ +/** @defgroup parsing Parsing Functions + * + * This module contains all parsing functions + * @{ + */ + #ifndef PSYC_PARSER_H # define PSYC_PARSER_H #include #include +/** Different types that a variable can have + * + * This enum lists all the types that a variable + * in a psyc packet can have + */ enum PSYC_Types { PSYC_TYPE_AMOUNT, PSYC_TYPE_COLOR, @@ -32,7 +43,9 @@ enum PSYC_Flags PSYC_HEADER_ONLY = 1, }; - +/** The return value definitions for packet parsing function + * @see PSYC_parse() + */ enum PSYC_ReturnCodes { PSYC_ERROR_END = -7, @@ -182,12 +195,24 @@ inline size_t PSYC_getContentLength (PSYC_State* s) #endif -/** - * Parse PSYC packets. - * Generalized line-based parser. - * @return see PSYC_ReturnCodes +/** Parse PSYC packets. + * + * Generalized line-based packet parser. + * + * @param state An initialized PSYC_State + * @param modifier A pointer to a character. In case of a variable, it will + * be set to the modifier of that variable + * @param name A pointer to a PSYC_Array. It will point to the name of + * the variable or method and its length will be set accordingly + * @param value A pointer to a PSYC_Array. It will point to the + * value/body the variable/method and its length will be set accordingly + * + * @return one of PSYC_ReturnCodes + * @see PSYC_ReturnCodes + * @see PSYC_State + * @see PSYC_Array */ -int PSYC_parse(PSYC_State* state, uint8_t* modifier, PSYC_Array* name, PSYC_Array* value); +PSYC_ReturnCodes PSYC_parse(PSYC_State* state, uint8_t* modifier, PSYC_Array* name, PSYC_Array* value); /** * List value parser. @@ -196,3 +221,5 @@ int PSYC_parse(PSYC_State* state, uint8_t* modifier, PSYC_Array* name, PSYC_Arra int PSYC_parseList(PSYC_ListState* state, PSYC_Array *name, PSYC_Array* value, PSYC_Array* elem); #endif // PSYC_PARSER_H + +/** @} */ // end of parsing group