semf
semf::app::Clock Class Referenceabstract

The Clock class provides real time clock functionality. It can return a DateTime object with actual date and time information from Rtc and the Rtc can be updated by setting a DateTime object to Clock. More...

#include <clock.h>

Inheritance diagram for semf::app::Clock:
Inheritance graph
Collaboration diagram for semf::app::Clock:
Collaboration graph

Public Member Functions

virtual ~Clock ()=default
 
virtual DateTimenow ()=0
 Returns the momentary date time from Rtc. More...
 
virtual void set (DateTime &datetimeToSet)=0
 Sets the DateTime information from datetimeToSet to the Rtc. More...
 
virtual Clockoperator= (const DateTime &datetimeToSet)=0
 Copies the date time. More...
 

Detailed Description

The Clock class provides real time clock functionality. It can return a DateTime object with actual date and time information from Rtc and the Rtc can be updated by setting a DateTime object to Clock.

The Rtc date and time can be modified by set().

See also
DateTime
Date
Time.

Definition at line 30 of file clock.h.

Constructor & Destructor Documentation

◆ ~Clock()

virtual semf::app::Clock::~Clock ( )
virtualdefault

Member Function Documentation

◆ now()

virtual DateTime & semf::app::Clock::now ( )
pure virtual

Returns the momentary date time from Rtc.

Returns
DateTime object with Rtc date and time information.

Implemented in semf::Clock.

◆ operator=()

virtual Clock & semf::app::Clock::operator= ( const DateTime datetimeToSet)
pure virtual

Copies the date time.

Parameters
datetimeToSetSource to copy the DateTime information from.
Returns
system clock object itself.

Implemented in semf::Clock.

◆ set()

virtual void semf::app::Clock::set ( DateTime datetimeToSet)
pure virtual

Sets the DateTime information from datetimeToSet to the Rtc.

Parameters
datetimeToSetdate and time source for Rtc.

Implemented in semf::Clock.