Xyris
0.5
Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
m
n
p
r
s
t
u
v
w
y
Functions
_
c
d
e
f
g
h
i
k
m
n
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Enumerator
a
b
c
e
g
i
k
m
n
r
s
t
u
v
w
y
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
Functions
_
c
f
g
i
k
l
m
n
o
p
r
s
t
w
Variables
_
a
b
c
d
e
f
i
m
n
p
r
s
t
w
Typedefs
Enumerations
Enumerator
a
b
g
i
l
o
p
t
Macros
_
a
b
c
e
f
k
l
m
n
p
r
s
t
v
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
time.hpp
Go to the documentation of this file.
1
/**
2
* @file time.hpp
3
* @author Michel (JMallone) Gomes (michels@utfpr.edu.br)
4
* @brief Time lib code
5
* @version 0.1
6
* @date 2021-07-27
7
*
8
* @copyright Copyright the Xyris Contributors (c) 2021
9
*
10
* References:
11
* https://github.com/sidsingh78/EPOCH-to-time-date-converter/blob/master/epoch_conv.c
12
* https://www.oryx-embedded.com/doc/date__time_8c_source.html
13
*/
14
#pragma once
15
#include <stdint.h>
16
17
namespace
Time
{
18
19
class
TimeDescriptor
{
20
public
:
21
// Constructors
22
TimeDescriptor
(
int
sec,
int
min,
int
hr,
int
d,
int
m,
int
y);
23
TimeDescriptor
();
24
~TimeDescriptor
();
25
// Getters
26
int
getSeconds
() {
return
_seconds
; }
27
int
getMinutes
() {
return
_minutes
; }
28
int
getHour
() {
return
_hour
; }
29
int
getDay
() {
return
_day
; }
30
int
getMonth
() {
return
_month
; }
31
int
getYear
() {
return
_year
; }
32
// Setters
33
void
setSeconds
(
int
sec) {
_seconds
= sec; }
34
void
setMinutes
(
int
min) {
_minutes
= min; }
35
void
setHour
(
int
hr) {
_hour
= hr; }
36
void
setDay
(
int
d) {
_day
= d; }
37
void
setMonth
(
int
m) {
_month
= m; }
38
void
setYear
(
int
y) {
_year
= y; }
39
// methods
40
void
toDate
();
41
42
private
:
43
void
converterEpochToDate
(uint64_t Number);
44
int
_seconds
;
45
int
_minutes
;
46
int
_hour
;
47
int
_day
;
48
int
_month
;
49
int
_year
;
50
int
_dayOfWeek
;
51
//int _dayOfYear;
52
//int _dayLight;
53
};
54
55
}
// !namespace Time
Time
Definition:
time.cpp:17
Time::TimeDescriptor::_hour
int _hour
Definition:
time.hpp:46
Time::TimeDescriptor::getHour
int getHour()
Definition:
time.hpp:28
Time::TimeDescriptor::setYear
void setYear(int y)
Definition:
time.hpp:38
Time::TimeDescriptor::setDay
void setDay(int d)
Definition:
time.hpp:36
Time::TimeDescriptor::_month
int _month
Definition:
time.hpp:48
Time::TimeDescriptor
Definition:
time.hpp:19
Time::TimeDescriptor::converterEpochToDate
void converterEpochToDate(uint64_t Number)
Definition:
time.cpp:39
Time::TimeDescriptor::setSeconds
void setSeconds(int sec)
Definition:
time.hpp:33
Time::TimeDescriptor::~TimeDescriptor
~TimeDescriptor()
Definition:
time.cpp:34
Time::TimeDescriptor::getMinutes
int getMinutes()
Definition:
time.hpp:27
Time::TimeDescriptor::_day
int _day
Definition:
time.hpp:47
Time::TimeDescriptor::getDay
int getDay()
Definition:
time.hpp:29
Time::TimeDescriptor::getYear
int getYear()
Definition:
time.hpp:31
Time::TimeDescriptor::TimeDescriptor
TimeDescriptor()
Definition:
time.cpp:19
Time::TimeDescriptor::setMonth
void setMonth(int m)
Definition:
time.hpp:37
Time::TimeDescriptor::_year
int _year
Definition:
time.hpp:49
Time::TimeDescriptor::_minutes
int _minutes
Definition:
time.hpp:45
Time::TimeDescriptor::setMinutes
void setMinutes(int min)
Definition:
time.hpp:34
Time::TimeDescriptor::getMonth
int getMonth()
Definition:
time.hpp:30
Time::TimeDescriptor::getSeconds
int getSeconds()
Definition:
time.hpp:26
Time::TimeDescriptor::_dayOfWeek
int _dayOfWeek
Definition:
time.hpp:50
Time::TimeDescriptor::toDate
void toDate()
Definition:
time.cpp:69
Time::TimeDescriptor::_seconds
int _seconds
Definition:
time.hpp:44
Time::TimeDescriptor::setHour
void setHour(int hr)
Definition:
time.hpp:35
Kernel
Library
time.hpp
Generated by
1.8.17