mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
more documentation
This commit is contained in:
parent
138a16e7a7
commit
7d225af313
3 changed files with 52 additions and 7 deletions
2
Doxyfile
2
Doxyfile
|
@ -321,7 +321,7 @@ SYMBOL_CACHE_SIZE = 0
|
||||||
# Private class members and static file members will be hidden unless
|
# Private class members and static file members will be hidden unless
|
||||||
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
|
# 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
|
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
|
||||||
# will be included in the documentation.
|
# will be included in the documentation.
|
||||||
|
|
|
@ -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 <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -6,12 +6,23 @@
|
||||||
* defined in this file.
|
* defined in this file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @defgroup parsing Parsing Functions
|
||||||
|
*
|
||||||
|
* This module contains all parsing functions
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef PSYC_PARSER_H
|
#ifndef PSYC_PARSER_H
|
||||||
# define PSYC_PARSER_H
|
# define PSYC_PARSER_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
/** 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 {
|
enum PSYC_Types {
|
||||||
PSYC_TYPE_AMOUNT,
|
PSYC_TYPE_AMOUNT,
|
||||||
PSYC_TYPE_COLOR,
|
PSYC_TYPE_COLOR,
|
||||||
|
@ -32,7 +43,9 @@ enum PSYC_Flags
|
||||||
PSYC_HEADER_ONLY = 1,
|
PSYC_HEADER_ONLY = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** The return value definitions for packet parsing function
|
||||||
|
* @see PSYC_parse()
|
||||||
|
*/
|
||||||
enum PSYC_ReturnCodes
|
enum PSYC_ReturnCodes
|
||||||
{
|
{
|
||||||
PSYC_ERROR_END = -7,
|
PSYC_ERROR_END = -7,
|
||||||
|
@ -182,12 +195,24 @@ inline size_t PSYC_getContentLength (PSYC_State* s)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/** Parse PSYC packets.
|
||||||
* Parse PSYC packets.
|
*
|
||||||
* Generalized line-based parser.
|
* Generalized line-based packet parser.
|
||||||
* @return see PSYC_ReturnCodes
|
*
|
||||||
|
* @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.
|
* 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);
|
int PSYC_parseList(PSYC_ListState* state, PSYC_Array *name, PSYC_Array* value, PSYC_Array* elem);
|
||||||
|
|
||||||
#endif // PSYC_PARSER_H
|
#endif // PSYC_PARSER_H
|
||||||
|
|
||||||
|
/** @} */ // end of parsing group
|
||||||
|
|
Loading…
Reference in a new issue