Commit f3408b4d authored by claes's avatar claes

Doxygen tags for PRM

parent 479dbac4
...@@ -128,14 +128,16 @@ validateTm ( ...@@ -128,14 +128,16 @@ validateTm (
return TIME__SUCCESS; return TIME__SUCCESS;
} }
/* Add two timespecs, result = t + d, where: //! Add an absolute time and a delta time.
/*! Add two timespecs, result = t + d, where:
- 'result' and 't' is an absolute time, and - 'result' and 't' is an absolute time, and
- 'd' is a delta time. - 'd' is a delta time.
If 'result' argument is NULL If 'result' argument is NULL
then 't' will be used as resultant. then 't' will be used as resultant.
Returns the address to the resulting time. */ Returns the address to the resulting time.
*/
pwr_tTime * pwr_tTime *
time_Aadd ( time_Aadd (
...@@ -159,14 +161,15 @@ time_Aadd ( ...@@ -159,14 +161,15 @@ time_Aadd (
return r; return r;
} }
/* Compare two timespecs. //! Compare two timespecs.
Returns /*! Returns
1 if t1 > t2 1 if t1 > t2
0 if t1 == t2 0 if t1 == t2
-1 if t1 < t2 -1 if t1 < t2
If argument 't2' is NULL the comparison will If argument 't2' is NULL the comparison will
be done as if t2 == 0. */ be done as if t2 == 0.
*/
int int
time_Acomp ( time_Acomp (
...@@ -191,10 +194,11 @@ time_Acomp ( ...@@ -191,10 +194,11 @@ time_Acomp (
return ((t1->tv_sec > t2->tv_sec) ? 1 : -1); return ((t1->tv_sec > t2->tv_sec) ? 1 : -1);
} }
/* Subtract a time from a time, //! Subtract a time from a time,
r = t - s /*! r = t - s
Result is always a delta time. */ Result is always a delta time.
*/
pwr_tDeltaTime * pwr_tDeltaTime *
time_Adiff ( time_Adiff (
...@@ -226,10 +230,11 @@ time_Adiff ( ...@@ -226,10 +230,11 @@ time_Adiff (
return r; return r;
} }
/* Subtract a delta time from a time, //! Subtract a delta time from a time,
r = t - s /*! r = t - s
Result is always an abstime. */ Result is always an abstime.
*/
pwr_tTime * pwr_tTime *
time_Asub ( time_Asub (
...@@ -263,12 +268,13 @@ time_Asub ( ...@@ -263,12 +268,13 @@ time_Asub (
} }
/* Take the absolute walue of a delta time. //! Take the absolute walue of a delta time.
/*!
'result' = |'t'| 'result' = |'t'|
A NULL address => abs value is written to 't'. A NULL address => abs value is written to 't'.
Returns the address to the resulting time. */ Returns the address to the resulting time.
*/
pwr_tDeltaTime * pwr_tDeltaTime *
time_Dabs ( time_Dabs (
...@@ -288,8 +294,8 @@ time_Dabs ( ...@@ -288,8 +294,8 @@ time_Dabs (
return r; return r;
} }
/* Add two delta times, the result is also delta. //! Add two delta times, the result is also delta.
If 'result' is NULL then 'a' will be added to 't'. */ /*! If 'result' is NULL then 'a' will be added to 't'. */
pwr_tDeltaTime * pwr_tDeltaTime *
time_Dadd ( time_Dadd (
...@@ -313,14 +319,15 @@ time_Dadd ( ...@@ -313,14 +319,15 @@ time_Dadd (
return r; return r;
} }
/* Compare two delta times. //! Compare two delta times.
Returns /*! Returns
1 if t1 > t2 1 if t1 > t2
0 if t1 == t2 0 if t1 == t2
-1 if t1 < t2 -1 if t1 < t2
If argument 't2' is NULL the comparison will If argument 't2' is NULL the comparison will
be done as if t2 == 0. */ be done as if t2 == 0.
*/
int int
time_Dcomp ( time_Dcomp (
...@@ -342,13 +349,14 @@ time_Dcomp ( ...@@ -342,13 +349,14 @@ time_Dcomp (
return ((t1->tv_sec > t2->tv_sec) ? 1 : -1); return ((t1->tv_sec > t2->tv_sec) ? 1 : -1);
} }
/* Negate a delta time, //! Negate a delta time,
/*!
result = -d result = -d
If 'result' argument is NULL If 'result' argument is NULL
then 'd' will be used as resultant. then 'd' will be used as resultant.
Returns the address to the resulting time. */ Returns the address to the resulting time.
*/
pwr_tDeltaTime * pwr_tDeltaTime *
time_Dneg ( time_Dneg (
...@@ -368,7 +376,8 @@ time_Dneg ( ...@@ -368,7 +376,8 @@ time_Dneg (
return r; return r;
} }
/* Subtract two delta times, the result is also delta. */ //! Subtract two delta times.
/*! The result is also delta. */
pwr_tDeltaTime * pwr_tDeltaTime *
time_Dsub ( time_Dsub (
...@@ -402,7 +411,7 @@ time_Dsub ( ...@@ -402,7 +411,7 @@ time_Dsub (
return r; return r;
} }
/* Convert a delta time to ascii string. */ //! Convert a delta time to ascii string.
pwr_tStatus pwr_tStatus
time_DtoAscii ( time_DtoAscii (
...@@ -441,8 +450,8 @@ time_DtoAscii ( ...@@ -441,8 +450,8 @@ time_DtoAscii (
} }
/* Convert timespec to ascii //! Convert timespec to ascii
/*!
NOTE: Not thread safe. */ NOTE: Not thread safe. */
pwr_tStatus pwr_tStatus
...@@ -481,8 +490,7 @@ time_AtoAscii ( ...@@ -481,8 +490,7 @@ time_AtoAscii (
return TIME__SUCCESS; return TIME__SUCCESS;
} }
/* Convert ascii to timespec. */ //! Convert ascii to timespec.
pwr_tStatus pwr_tStatus
time_AsciiToD ( time_AsciiToD (
char *tstr, char *tstr,
...@@ -545,7 +553,7 @@ time_AsciiToD ( ...@@ -545,7 +553,7 @@ time_AsciiToD (
} }
/* Convert ascii time to timespec. */ //! Convert ascii time to timespec.
pwr_tStatus pwr_tStatus
time_AsciiToA ( time_AsciiToA (
...@@ -590,7 +598,7 @@ time_AsciiToA ( ...@@ -590,7 +598,7 @@ time_AsciiToA (
return TIME__SUCCESS; return TIME__SUCCESS;
} }
/* Convert time struct to string. */ //! Convert time struct to string.
pwr_tStatus pwr_tStatus
time_TmToAscii ( time_TmToAscii (
...@@ -620,7 +628,7 @@ time_TmToAscii ( ...@@ -620,7 +628,7 @@ time_TmToAscii (
return TIME__SUCCESS; return TIME__SUCCESS;
} }
/* Convert timestring to struct. */ //! Convert timestring to struct.
pwr_tStatus pwr_tStatus
time_AsciiToTm ( time_AsciiToTm (
...@@ -814,7 +822,7 @@ time_AtoFormAscii ( ...@@ -814,7 +822,7 @@ time_AtoFormAscii (
} }
} }
/* Convert millisec to timespec. */ //! Convert millisec to timespec.
pwr_tDeltaTime * pwr_tDeltaTime *
time_MsToD ( time_MsToD (
...@@ -833,8 +841,7 @@ time_MsToD ( ...@@ -833,8 +841,7 @@ time_MsToD (
return t; return t;
} }
//! Convert float to time.
/* Convert float to time. */
pwr_tDeltaTime * pwr_tDeltaTime *
time_FloatToD ( time_FloatToD (
...@@ -854,7 +861,7 @@ time_FloatToD ( ...@@ -854,7 +861,7 @@ time_FloatToD (
} }
/* Convert time to float. */ //! Convert time to float.
pwr_tFloat32 pwr_tFloat32
time_DToFloat ( time_DToFloat (
......
...@@ -35,10 +35,19 @@ typedef unsigned int time_tClock; ...@@ -35,10 +35,19 @@ typedef unsigned int time_tClock;
# error Not defined for this platform # error Not defined for this platform
#endif #endif
/*! \file co_time.h
\brief Time function.
This include file contains definitions and function prototypes
needed to use time functions.
*/
/*! \addtogroup Time */
/*@{*/
//! Time string format
typedef enum { typedef enum {
time_eFormat_DateAndTime = 0, time_eFormat_DateAndTime = 0, //!< Display date and time, 01-JAN-1970 01:00:00.00
time_eFormat_Time = 1, time_eFormat_Time = 1, //!< Display time only 01:00:00.00
time_eFormat_ComprDateAndTime = 2 time_eFormat_ComprDateAndTime = 2 //!< Date and time compressed format, 70-01-01 00:00:00
} time_eFormat; } time_eFormat;
#define SWE 0 #define SWE 0
...@@ -123,6 +132,8 @@ int eln_clock_getres (clockid_t, struct timespec*); ...@@ -123,6 +132,8 @@ int eln_clock_getres (clockid_t, struct timespec*);
#define clock_getres eln_clock_getres #define clock_getres eln_clock_getres
#endif #endif
/*@}*/
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment