Parent class for all data storage devices (sd card, radio, etc) More...
#include <Storage.h>
Public Member Functions | |
Storage (String storage_name) | |
virtual bool | verify ()=0 |
Verifies connection with storage device. | |
virtual void | store (String data)=0 |
Send string data to storage device. | |
virtual void | storePacket (uint8_t *packet) |
Send packet data to storage device. | |
![]() | |
Device (String device_name) | |
Default constructor, sets a max_attempt of 1 (device recovery won't be attempted) | |
Device (String device_name, int max_attempts, int wait_factor) | |
const String & | getDeviceName () |
bool | getVerified () |
Get if the Device is Verified. | |
void | recoveryConfig (int max_attempts, int wait_factor) |
Set recovery config (used keep default constructor) | |
void | setWaitFactor (int wait_factor) |
Set wait_factor. | |
void | setMaxAttempts (int max_attempts) |
Set max_attempts. | |
bool | attemptConnection () |
If the sensor is verified, return true, if not and it has been long enough since the last attempt (decided by wait_factor and attempt_number), attempt to reverify (reinitialize) it. | |
Additional Inherited Members | |
![]() | |
bool | verified |
String | device_name |
Parent class for all data storage devices (sd card, radio, etc)
|
inline |
Send string data to storage device.
data | Data to store |
Implemented in RadioStorage, SDStorage, and FlashStorage.
Send packet data to storage device.
packet | Packet to store |
Reimplemented in FlashStorage, RadioStorage, and SDStorage.
|
pure virtual |
Verifies connection with storage device.
Implements Device.
Implemented in FlashStorage, RadioStorage, and SDStorage.