semf
semf::Rtc Class Referenceabstract

Interface for the real time clock. More...

#include <rtc.h>

Inheritance diagram for semf::Rtc:
Inheritance graph
Collaboration diagram for semf::Rtc:
Collaboration graph

Public Member Functions

virtual ~Rtc ()=default
 
virtual uint16_t millisecond ()=0
 Get the milliseconds from the current time. More...
 
virtual void setMillisecond (uint16_t millisecond)=0
 For set a new time. More...
 
virtual uint8_t second () const =0
 Get the seconds from the current time. More...
 
virtual void setSecond (uint8_t second)=0
 For set a new time. More...
 
virtual uint8_t minute () const =0
 Get the minutes from the current time. More...
 
virtual void setMinute (uint8_t minute)=0
 For set a new time. More...
 
virtual uint8_t hour () const =0
 Get the hours from the current time. More...
 
virtual void setHour (uint8_t hour)=0
 For set a new time. More...
 
virtual uint8_t day () const =0
 
virtual void setDay (uint8_t day)=0
 For set a new date. More...
 
virtual uint8_t month () const =0
 Get the current month. More...
 
virtual void setMonth (uint8_t month)=0
 For set a new date. More...
 
virtual uint16_t year () const =0
 Get the current year. More...
 
virtual void setYear (uint16_t year)=0
 For set a new date. More...
 

Public Attributes

Signal< Errorerror
 

Detailed Description

Interface for the real time clock.

Definition at line 22 of file rtc.h.

Constructor & Destructor Documentation

◆ ~Rtc()

virtual semf::Rtc::~Rtc ( )
virtualdefault

Member Function Documentation

◆ day()

virtual uint8_t semf::Rtc::day ( ) const
pure virtual

Get the current day.

Returns
The current day.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ hour()

virtual uint8_t semf::Rtc::hour ( ) const
pure virtual

Get the hours from the current time.

Returns
The hours from the current time.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ millisecond()

virtual uint16_t semf::Rtc::millisecond ( )
pure virtual

Get the milliseconds from the current time.

Returns
The milliseconds from the current time.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ minute()

virtual uint8_t semf::Rtc::minute ( ) const
pure virtual

Get the minutes from the current time.

Returns
The minutes from the current time.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ month()

virtual uint8_t semf::Rtc::month ( ) const
pure virtual

Get the current month.

Returns
The current month.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ second()

virtual uint8_t semf::Rtc::second ( ) const
pure virtual

Get the seconds from the current time.

Returns
The seconds from the current time.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ setDay()

virtual void semf::Rtc::setDay ( uint8_t  day)
pure virtual

For set a new date.

Parameters
dayThe new day.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ setHour()

virtual void semf::Rtc::setHour ( uint8_t  hour)
pure virtual

For set a new time.

Parameters
hourThe hours for the new time.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ setMillisecond()

virtual void semf::Rtc::setMillisecond ( uint16_t  millisecond)
pure virtual

For set a new time.

Parameters
millisecondThe milliseconds for the new time.

Implemented in semf::Stm32Rtc.

◆ setMinute()

virtual void semf::Rtc::setMinute ( uint8_t  minute)
pure virtual

For set a new time.

Parameters
minuteThe minutes for the new time.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ setMonth()

virtual void semf::Rtc::setMonth ( uint8_t  month)
pure virtual

For set a new date.

Parameters
monthThe new month.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ setSecond()

virtual void semf::Rtc::setSecond ( uint8_t  second)
pure virtual

For set a new time.

Parameters
secondThe second for the new time.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ setYear()

virtual void semf::Rtc::setYear ( uint16_t  year)
pure virtual

For set a new date.

Parameters
yearThe new year.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

◆ year()

virtual uint16_t semf::Rtc::year ( ) const
pure virtual

Get the current year.

Returns
The current year.

Implemented in semf::Stm32Rtc.

Here is the caller graph for this function:

Member Data Documentation

◆ error

Signal<Error> semf::Rtc::error

Signal is emitted after an error in the hardware occurred.

Definition at line 99 of file rtc.h.