Small doxygen related changes
This commit is contained in:
parent
a452f2e27c
commit
e99a863631
@ -261,7 +261,7 @@ static void client (void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* pthread wrapper for \sa seeker()
|
* pthread wrapper for seeker()
|
||||||
* @param ptr
|
* @param ptr
|
||||||
*/
|
*/
|
||||||
void* pthSeeker (void* ptr) {
|
void* pthSeeker (void* ptr) {
|
||||||
@ -274,7 +274,7 @@ void* pthSeeker (void* ptr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* pthread wrapper for \sa client()
|
* pthread wrapper for client()
|
||||||
* @param ptr
|
* @param ptr
|
||||||
*/
|
*/
|
||||||
void* pthClient (void* ptr) {
|
void* pthClient (void* ptr) {
|
||||||
|
42
src/core.c
42
src/core.c
@ -38,8 +38,9 @@ static pthread_mutex_t lock_stats; //!< mutex for stats locking
|
|||||||
* in_addr_t to devAEM_t conversion utility function
|
* in_addr_t to devAEM_t conversion utility function
|
||||||
* @param in_addr Internet address (host byte order)
|
* @param in_addr Internet address (host byte order)
|
||||||
* @return devAEM_t representation of the address
|
* @return devAEM_t representation of the address
|
||||||
* @example
|
* @note
|
||||||
* @code{.c}
|
* for example:
|
||||||
|
* @code
|
||||||
* devAEM_t dev = addr2devAEM (ntohl(clntAddr.sin_addr.s_addr));
|
* devAEM_t dev = addr2devAEM (ntohl(clntAddr.sin_addr.s_addr));
|
||||||
* @endcode
|
* @endcode
|
||||||
*/
|
*/
|
||||||
@ -51,8 +52,9 @@ devAEM_t addr2devAEM (in_addr_t in_addr) {
|
|||||||
* devAEM_t to in_addr_t conversion utility function
|
* devAEM_t to in_addr_t conversion utility function
|
||||||
* @param dev devAEM_t address
|
* @param dev devAEM_t address
|
||||||
* @return Internet address (host byte order)
|
* @return Internet address (host byte order)
|
||||||
* @example
|
* @note
|
||||||
* @code{.c}
|
* for example:
|
||||||
|
* @code
|
||||||
* sockaddr_in_t srvAddr;
|
* sockaddr_in_t srvAddr;
|
||||||
* srvAddr.sin_addr.s_addr = htonl (devAEM2addr (dev));
|
* srvAddr.sin_addr.s_addr = htonl (devAEM2addr (dev));
|
||||||
* @endcode
|
* @endcode
|
||||||
@ -121,7 +123,7 @@ status_t log_init (void) {
|
|||||||
* Logs incoming messages
|
* Logs incoming messages
|
||||||
* @param msg Pointer to msg to log
|
* @param msg Pointer to msg to log
|
||||||
* @note
|
* @note
|
||||||
* This function depends on \sa settings.outLevel
|
* This function depends on settings.outLevel
|
||||||
*/
|
*/
|
||||||
void log_msg_in (msg_t* msg) {
|
void log_msg_in (msg_t* msg) {
|
||||||
if (settings.outLevel >= OUTLEVEL_1) {
|
if (settings.outLevel >= OUTLEVEL_1) {
|
||||||
@ -143,7 +145,7 @@ void log_msg_in (msg_t* msg) {
|
|||||||
* @param msg Pointer to msg to log
|
* @param msg Pointer to msg to log
|
||||||
* @param dev device that accepts the message
|
* @param dev device that accepts the message
|
||||||
* @note
|
* @note
|
||||||
* This function depends on \sa settings.outLevel
|
* This function depends on settings.outLevel
|
||||||
*/
|
*/
|
||||||
void log_msg_out (msg_t* msg, devAEM_t dev) {
|
void log_msg_out (msg_t* msg, devAEM_t dev) {
|
||||||
if (settings.outLevel >= OUTLEVEL_1) {
|
if (settings.outLevel >= OUTLEVEL_1) {
|
||||||
@ -164,7 +166,7 @@ void log_msg_out (msg_t* msg, devAEM_t dev) {
|
|||||||
* Logs new messages
|
* Logs new messages
|
||||||
* @param msg Pointer to msg to log
|
* @param msg Pointer to msg to log
|
||||||
* @note
|
* @note
|
||||||
* This function depends on \sa settings.outLevel
|
* This function depends on settings.outLevel
|
||||||
*/
|
*/
|
||||||
void log_msg_new (msg_t* msg) {
|
void log_msg_new (msg_t* msg) {
|
||||||
if (settings.outLevel >= OUTLEVEL_1) {
|
if (settings.outLevel >= OUTLEVEL_1) {
|
||||||
@ -389,7 +391,7 @@ status_t devList_init (devList_t* devList) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Returns an iterator for \sa devList AND \sa msg_t.recipients
|
* Returns an iterator for devList AND msg_t.recipients
|
||||||
* @param dev The device to search
|
* @param dev The device to search
|
||||||
* @return The iterator, namely the index to devList array in which is the \p dev
|
* @return The iterator, namely the index to devList array in which is the \p dev
|
||||||
*/
|
*/
|
||||||
@ -464,27 +466,26 @@ mIter_t msgList_preInc (mIter_t* it) {
|
|||||||
* @return The iterator values
|
* @return The iterator values
|
||||||
*/
|
*/
|
||||||
mIter_t msgList_preDec (mIter_t* it) {
|
mIter_t msgList_preDec (mIter_t* it) {
|
||||||
if (--*it < 0) *it = MSG_LIST_SIZE;
|
if (--*it < 0) *it = MSG_LIST_SIZE-1;
|
||||||
return *it;
|
return *it;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @param this Pointer to msgList to use
|
* @param this Pointer to msgList to use
|
||||||
* @return An iterator to the first message of \sa MSG_LIST_SIZE
|
* @return An iterator to the first message of MSG_LIST_SIZE
|
||||||
* of msgList.m[]
|
* of msgList.m[]
|
||||||
* @note
|
* @note
|
||||||
* As the msgList is a ring buffer we can not have a sensible end() iterator.
|
* As the msgList is a ring buffer we can not have a sensible end() iterator.
|
||||||
* end() will eventually merge with begin() when the size reaches \sa MSG_LIST_SIZE
|
* end() will eventually merge with begin() when the size reaches MSG_LIST_SIZE
|
||||||
* For that reason in all of our loops through msgList we shall take a begin()
|
* For that reason in all of our loops through msgList we shall take a begin()
|
||||||
* iterator and loop using size as sentinel
|
* iterator and loop using size as sentinel for example:
|
||||||
* @example
|
* @code
|
||||||
* @code{.c}
|
|
||||||
* mIter_t it = msgList_begin (&msgList); // get a message iterator
|
* mIter_t it = msgList_begin (&msgList); // get a message iterator
|
||||||
* size_t size= msgList_size(&msgList); // get current msgList size
|
* size_t size= msgList_size(&msgList); // get current msgList size
|
||||||
* for (size_t i=0 ; i<size ; ++i, msgList_preInc (&it)) { // don't forget to increase iterator
|
* for (size_t i=0 ; i<size ; ++i, msgList_preInc (&it)) { // don't forget to increase iterator
|
||||||
* // use msgList[it]
|
* // use msgList[it]
|
||||||
* }
|
* }
|
||||||
* @endcode
|
* @endcode
|
||||||
*/
|
*/
|
||||||
mIter_t msgList_begin (msgList_t* this) {
|
mIter_t msgList_begin (msgList_t* this) {
|
||||||
return this->first;
|
return this->first;
|
||||||
@ -492,7 +493,7 @@ mIter_t msgList_begin (msgList_t* this) {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @param this Pointer to msgList to use
|
* @param this Pointer to msgList to use
|
||||||
* @return An iterator to the last inserted message of \sa MSG_LIST_SIZE
|
* @return An iterator to the last inserted message of MSG_LIST_SIZE
|
||||||
* of msgList.m[]
|
* of msgList.m[]
|
||||||
*/
|
*/
|
||||||
mIter_t msgList_last (msgList_t* this) {
|
mIter_t msgList_last (msgList_t* this) {
|
||||||
@ -504,17 +505,16 @@ mIter_t msgList_last (msgList_t* this) {
|
|||||||
* @return The current used slots of msgList
|
* @return The current used slots of msgList
|
||||||
* @note
|
* @note
|
||||||
* As the msgList is a ring buffer we can not have a sensible end() iterator.
|
* As the msgList is a ring buffer we can not have a sensible end() iterator.
|
||||||
* end() will eventually merge with begin() when the size reaches \sa MSG_LIST_SIZE
|
* end() will eventually merge with begin() when the size reaches MSG_LIST_SIZE
|
||||||
* For that reason in all of our loops through msgList we shall take a begin()
|
* For that reason in all of our loops through msgList we shall take a begin()
|
||||||
* iterator and loop using size as sentinel
|
* iterator and loop using size as sentinel
|
||||||
* @example
|
* @code
|
||||||
* @code{.c}
|
|
||||||
* mIter_t it = msgList_begin (&msgList); // get a message iterator
|
* mIter_t it = msgList_begin (&msgList); // get a message iterator
|
||||||
* size_t size= msgList_size(&msgList); // get current msgList size
|
* size_t size= msgList_size(&msgList); // get current msgList size
|
||||||
* for (size_t i=0 ; i<size ; ++i, msgList_preInc (&it)) { // don't forget to increase iterator
|
* for (size_t i=0 ; i<size ; ++i, msgList_preInc (&it)) { // don't forget to increase iterator
|
||||||
* // use msgList[it]
|
* // use msgList[it]
|
||||||
* }
|
* }
|
||||||
* @endcode
|
* @endcode
|
||||||
*/
|
*/
|
||||||
size_t msgList_size (msgList_t* this) {
|
size_t msgList_size (msgList_t* this) {
|
||||||
return this->size;
|
return this->size;
|
||||||
@ -574,7 +574,7 @@ void msgList_release () { pthread_mutex_unlock (&lock_msgList); }
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Initialize statistics
|
* Initialize statistics
|
||||||
* @param s Pointer to \sa stat_t struct to initialize
|
* @param s Pointer to stat_t struct to initialize
|
||||||
* @return The status of the operation
|
* @return The status of the operation
|
||||||
*/
|
*/
|
||||||
status_t stats_init (stats_t* s) {
|
status_t stats_init (stats_t* s) {
|
||||||
|
@ -151,16 +151,16 @@ typedef iter_t dIter_t; //!< device list iterator type
|
|||||||
*
|
*
|
||||||
* Layout example:
|
* Layout example:
|
||||||
*
|
*
|
||||||
* msgList.m
|
* msgList.m
|
||||||
* dev1 dev2 dev3 ...
|
* dev1 dev2 dev3 ...
|
||||||
* [ 0 ] [ ] [x] [ ] <-- x marks "message has been send"
|
* [ 0 ] [ ] [x] [ ] <-- x marks "message has been send"
|
||||||
* | [ 1 ] [x] [x] [ ] <-- x marks "message has been send"
|
* | [ 1 ] [x] [x] [ ] <-- x marks "message has been send"
|
||||||
* time | [ 2 ]
|
* time | [ 2 ]
|
||||||
* [*1] | [ 3 ] ...
|
* [*1] | [ 3 ] ...
|
||||||
* \|/
|
* \|/
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* [MAX]
|
* [MAX]
|
||||||
*
|
*
|
||||||
* [*1]: msgList is actually implemented as a ring buffer so in that
|
* [*1]: msgList is actually implemented as a ring buffer so in that
|
||||||
* content, "time is a loop".
|
* content, "time is a loop".
|
||||||
|
Loading…
x
Reference in New Issue
Block a user