AlteriomPainlessMesh v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
Loading...
Searching...
No Matches
Public Member Functions | List of all members
painlessmesh::rtc::RTCInterface Class Referenceabstract

#include <rtc.hpp>

Public Member Functions

virtual ~RTCInterface ()
 
virtual bool begin ()=0
 
virtual bool isAvailable ()=0
 
virtual uint32_t getUnixTime ()=0
 
virtual bool setUnixTime (uint32_t timestamp)=0
 
virtual RTCType getType ()=0
 

Detailed Description

Abstract RTC interface for painlessMesh

Users should implement this interface for their specific RTC hardware and pass an instance to mesh.enableRTC()

Constructor & Destructor Documentation

◆ ~RTCInterface()

virtual painlessmesh::rtc::RTCInterface::~RTCInterface ( )
inlinevirtual

Member Function Documentation

◆ begin()

virtual bool painlessmesh::rtc::RTCInterface::begin ( )
pure virtual

Initialize the RTC hardware

Returns
true if initialization successful, false otherwise

◆ getType()

virtual RTCType painlessmesh::rtc::RTCInterface::getType ( )
pure virtual

Get RTC type identifier

Returns
RTCType enum value

◆ getUnixTime()

virtual uint32_t painlessmesh::rtc::RTCInterface::getUnixTime ( )
pure virtual

Get current Unix timestamp from RTC

Returns
Unix timestamp (seconds since 1970-01-01 00:00:00 UTC)

◆ isAvailable()

virtual bool painlessmesh::rtc::RTCInterface::isAvailable ( )
pure virtual

Check if RTC is available and responding

Returns
true if RTC is working, false otherwise

◆ setUnixTime()

virtual bool painlessmesh::rtc::RTCInterface::setUnixTime ( uint32_t  timestamp)
pure virtual

Set RTC time from Unix timestamp

Parameters
timestampUnix timestamp to set
Returns
true if successful, false otherwise

The documentation for this class was generated from the following file: