Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
ee0058e6
Commit
ee0058e6
authored
6 years ago
by
Theodoros Katzalis
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation for the constructors
parent
951541e3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/Helpers/TimeAndDate.hpp
+27
-9
27 additions, 9 deletions
inc/Helpers/TimeAndDate.hpp
with
27 additions
and
9 deletions
inc/Helpers/TimeAndDate.hpp
+
27
−
9
View file @
ee0058e6
...
@@ -2,9 +2,13 @@
...
@@ -2,9 +2,13 @@
#define ECSS_SERVICES_TIMEANDDATE_HPP
#define ECSS_SERVICES_TIMEANDDATE_HPP
#include
<cstdint>
#include
<cstdint>
#include
"macros.hpp"
/**
/**
* A class that represents the time and date.
* A class that represents the time and date.
*
* @note
* This class represents UTC date
*/
*/
class
TimeAndDate
{
class
TimeAndDate
{
public:
public:
...
@@ -15,8 +19,22 @@ public:
...
@@ -15,8 +19,22 @@ public:
uint8_t
minute
;
uint8_t
minute
;
uint8_t
second
;
uint8_t
second
;
TimeAndDate
();
/**
* Assign the instances with the Unix epoch 1/1/1970 00:00:00
*/
TimeAndDate
();
//
/**
* @param year the year as it used in Gregorian calendar (the well known civil calendar). For
* example 2019
* @param month the month as it used in Gregorian calendar. There isn't 0 month so we are
* start counting from 1!
* @param day the day as it used in Gregorian calendar. There isn't 0 day so we are start
* counting from 1!
* @param hour UTC (Coordinated Universal Time) hour in 24 format
* @param minute UTC minutes
* @param second UTC seconds
*/
TimeAndDate
(
uint16_t
year
,
uint8_t
month
,
uint8_t
day
,
uint8_t
hour
,
uint8_t
minute
,
uint8_t
TimeAndDate
(
uint16_t
year
,
uint8_t
month
,
uint8_t
day
,
uint8_t
hour
,
uint8_t
minute
,
uint8_t
second
);
second
);
...
@@ -36,6 +54,14 @@ public:
...
@@ -36,6 +54,14 @@ public:
*/
*/
bool
operator
>
(
const
TimeAndDate
&
Date
);
bool
operator
>
(
const
TimeAndDate
&
Date
);
/**
* Compare two timestamps.
*
* @param Date the date that will be compared with the pointer `this`
* @return true if the pointer `this` is equal to \p Date
*/
bool
operator
==
(
const
TimeAndDate
&
Date
);
/**
/**
* Compare two timestamps.
* Compare two timestamps.
*
*
...
@@ -51,14 +77,6 @@ public:
...
@@ -51,14 +77,6 @@ public:
* @return true if the pointer `this` is greater than or equal to \p Date
* @return true if the pointer `this` is greater than or equal to \p Date
*/
*/
bool
operator
>=
(
const
TimeAndDate
&
Date
);
bool
operator
>=
(
const
TimeAndDate
&
Date
);
/**
* Compare two timestamps.
*
* @param Date the date that will be compared with the pointer `this`
* @return true if the pointer `this` is equal to \p Date
*/
bool
operator
==
(
const
TimeAndDate
&
Date
);
};
};
#endif //ECSS_SERVICES_TIMEANDDATE_HPP
#endif //ECSS_SERVICES_TIMEANDDATE_HPP
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment