MistyGro API
C++ API for MistyGro's ESP32 controller based on the Arduino framework
|
Firebase RTDB logger. More...
#include <firebase_logger.h>
Public Member Functions | |
FireLogger () | |
void | begin (const char *fire_url, const char *fire_token, const char *email, const char *pass) |
initialise and authorise system to use Firebase RTDB (real time database) make sure wifi is initialised before calling this method More... | |
void | set_int (const char *path, int64_t value) |
Set an integer value. More... | |
void | set_float (const char *path, double value) |
Set a float value. More... | |
void | set_string (const char *path, const char *value) |
Set a string value. More... | |
void | set_bool (const char *path, bool value) |
Set a bool value. More... | |
void | push_time (const char *path, time_t timestamp) |
Push a timestamp into a list to a relative path, useful to log times like when initialisation was completed. More... | |
bool | is_ready () |
Check if authenticated. More... | |
bool | is_keep_alive () |
Get TCP keepalive status. More... | |
bool | is_connected () |
Get http server connection status. More... | |
bool | check_and_refresh_token () |
refresh token if expired More... | |
Firebase RTDB logger.
Definition at line 27 of file firebase_logger.h.
FireLogger::FireLogger | ( | ) |
Definition at line 34 of file firebase_logger.cpp.
void FireLogger::begin | ( | const char * | fire_url, |
const char * | fire_token, | ||
const char * | email, | ||
const char * | pass | ||
) |
initialise and authorise system to use Firebase RTDB (real time database) make sure wifi is initialised before calling this method
fire_url | Firebase url for the RTDB |
fire_token | Token for auth |
user email | |
pass | user password |
Definition at line 36 of file firebase_logger.cpp.
bool FireLogger::check_and_refresh_token | ( | ) |
refresh token if expired
Definition at line 116 of file firebase_logger.cpp.
bool FireLogger::is_connected | ( | ) |
Get http server connection status.
Definition at line 32 of file firebase_logger.cpp.
bool FireLogger::is_keep_alive | ( | ) |
Get TCP keepalive status.
Definition at line 30 of file firebase_logger.cpp.
bool FireLogger::is_ready | ( | ) |
Check if authenticated.
Definition at line 114 of file firebase_logger.cpp.
void FireLogger::push_time | ( | const char * | path, |
time_t | timestamp | ||
) |
Push a timestamp into a list to a relative path, useful to log times like when initialisation was completed.
path | relative path for the user |
timestamp | time_t type timestamp |
Definition at line 107 of file firebase_logger.cpp.
void FireLogger::set_bool | ( | const char * | path, |
bool | value | ||
) |
Set a bool value.
path | relative path for the user |
value | bool value |
Definition at line 100 of file firebase_logger.cpp.
void FireLogger::set_float | ( | const char * | path, |
double | value | ||
) |
Set a float value.
path | relative path for the user |
value | float value |
Definition at line 86 of file firebase_logger.cpp.
void FireLogger::set_int | ( | const char * | path, |
int64_t | value | ||
) |
Set an integer value.
path | relative path for the user |
value | int value |
Definition at line 79 of file firebase_logger.cpp.
void FireLogger::set_string | ( | const char * | path, |
const char * | value | ||
) |
Set a string value.
path | relative path for the user |
value | char* value |
Definition at line 93 of file firebase_logger.cpp.