Skip to content
Snippets Groups Projects
Commit d2634806 authored by al.schwinn's avatar al.schwinn
Browse files

[SIL-137] Set Date&Time is required

parent ec48b0bd
No related branches found
No related tags found
No related merge requests found
...@@ -521,26 +521,26 @@ namespace Silecs ...@@ -521,26 +521,26 @@ namespace Silecs
*/ */
const float* getRefFloatArray2D(uint32_t& dim1, uint32_t& dim2); const float* getRefFloatArray2D(uint32_t& dim1, uint32_t& dim2);
/*! /*!
* \brief Extracts the current value from the register input buffer. * \brief Extracts the current value from the register input buffer.
* Date type represents the number of millisecond elapsed since 00:00:00 * Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC) * on January 1, 1970, Coordinated Universal Time (UTC)
* \return the buffer content in a unsigned double format * \return the buffer content in a unsigned double format
*/ */
double getValDate(); double getValDate();
/*! /*!
* \brief Extracts the vector of values from the register input buffer. * \brief Extracts the vector of values from the register input buffer.
* Date type represents the number of millisecond elapsed since 00:00:00 * Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC) * on January 1, 1970, Coordinated Universal Time (UTC)
* \param pVal a double* pointer to a memory location where the method will store a copy of the array * \param pVal a double* pointer to a memory location where the method will store a copy of the array
* \param dim vector length in unsigned long format * \param dim vector length in unsigned long format
*/ */
void getValDateArray(double* pVal, uint32_t dim); void getValDateArray(double* pVal, uint32_t dim);
/*! /*!
* \brief Extracts the 2D-array of values from the register input buffer. * \brief Extracts the 2D-array of values from the register input buffer.
* Date type represents the number of millisecond elapsed since 00:00:00 * Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC) * on January 1, 1970, Coordinated Universal Time (UTC)
* \param pVal a double* pointer to a memory location where the method will store a copy of the flat 2D-array * \param pVal a double* pointer to a memory location where the method will store a copy of the flat 2D-array
* \param dim1 first dimension of 2D-array in unsigned long format * \param dim1 first dimension of 2D-array in unsigned long format
...@@ -548,9 +548,9 @@ namespace Silecs ...@@ -548,9 +548,9 @@ namespace Silecs
*/ */
void getValDateArray2D(double* pVal, uint32_t dim1, uint32_t dim2); void getValDateArray2D(double* pVal, uint32_t dim1, uint32_t dim2);
/*! /*!
* \brief Return a reference to register input buffer. * \brief Return a reference to register input buffer.
* Date type represents the number of millisecond elapsed since 00:00:00 * Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC) * on January 1, 1970, Coordinated Universal Time (UTC)
* The usage of this method can speed up reading and writing operations when the buffer is very big and a small part of * The usage of this method can speed up reading and writing operations when the buffer is very big and a small part of
* information is requested. This method gives direct access on the buffer and his adoption is not recommended. * information is requested. This method gives direct access on the buffer and his adoption is not recommended.
...@@ -559,9 +559,9 @@ namespace Silecs ...@@ -559,9 +559,9 @@ namespace Silecs
*/ */
const double* getRefDateArray(uint32_t& dim); const double* getRefDateArray(uint32_t& dim);
/*! /*!
* \brief Return a reference to register input buffer. * \brief Return a reference to register input buffer.
* Date type represents the number of millisecond elapsed since 00:00:00 * Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC) * on January 1, 1970, Coordinated Universal Time (UTC)
* The usage of this method can speed up reading and writing operations when the buffer is very big and a small part of * The usage of this method can speed up reading and writing operations when the buffer is very big and a small part of
* information is requested. This method gives direct access on the buffer and his adoption is not recommended. * information is requested. This method gives direct access on the buffer and his adoption is not recommended.
...@@ -1029,10 +1029,18 @@ namespace Silecs ...@@ -1029,10 +1029,18 @@ namespace Silecs
/*! /*!
* \brief Converts the double Date type to tm broken-down time structure * \brief Converts the double Date type to tm broken-down time structure
* conforming to POSIX convention (look at localtime() manpages) * conforming to POSIX convention (look at localtime() man pages)
* \return tm broken-down time structure * \param date Floating-point number of second that has elapsed since UTC (00:00) on January 1, 1900
*/ * \return tm Broken-down time structure
*/
static struct tm getTMDate(double date); static struct tm getTMDate(double date);
/*!
* \brief Converts (static-cast) the floating-point SILECS Date type to standard time_t,
* as those returned by Linux function time().
* \param date Floating-point number of second that has elapsed since UTC (00:00) on January 1, 1900
* \return time_t value
*/
static time_t getEpochDate(double date); static time_t getEpochDate(double date);
// SET methods ======================================================== // SET methods ========================================================
...@@ -1230,9 +1238,31 @@ namespace Silecs ...@@ -1230,9 +1238,31 @@ namespace Silecs
*/ */
void setValFloatArray2D(const float* pVal, uint32_t dim1, uint32_t dim2); void setValFloatArray2D(const float* pVal, uint32_t dim1, uint32_t dim2);
//Set date is not required for the time being /*!
* \brief Set the value for the Date register output buffer.(Send must be done afterwards)
* Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC)
* \param val Value to be written in the buffer in a double format
*/
void setValDate(double val); void setValDate(double val);
/*!
* \brief Set the value for the Date array register output buffer.(Send must be done afterwards)
* Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC)
* \param pVal A double* pointer to a memory location from where the method will get the array values
* \param dim Vector length in unsigned long format
*/
void setValDateArray(const double* pVal, uint32_t dim); void setValDateArray(const double* pVal, uint32_t dim);
/*!
* \brief Set the value for the 2D-array register output buffer. (Send must be done afterwards)
* Date type represents the floating-point number of second elapsed since 00:00:00
* on January 1, 1970, Coordinated Universal Time (UTC)
* \param pVal A double* pointer to a memory location from where the method will get the flat 2D-array values
* \param dim1 First dimension of flat 2D-array in unsigned long format
* \param dim2 Second dimension of flat 2D-array in unsigned long format
*/
void setValDateArray2D(const double* pVal, uint32_t dim1, uint32_t dim2); void setValDateArray2D(const double* pVal, uint32_t dim1, uint32_t dim2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment