|
ASCEND Flight Software
|
Implementation of a Storage device to interface with an SD card. More...
#include <SDStorage.h>
Public Member Functions | |
| SDStorage () | |
| Construct a new SDStorage object. | |
| bool | verify () override |
| Verify SD card connection and create a new, unique file. | |
| void | store (String data) override |
| Store data on the SD card, ending with newline. | |
| void | storePacket (uint8_t *packet) override |
| Store data on the SD card. | |
Public Member Functions inherited from Storage | |
| Storage (String storage_name) | |
Public Member Functions inherited from 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. | |
Private Attributes | |
| String | file_name |
Additional Inherited Members | |
Protected Attributes inherited from Device | |
| bool | verified |
| String | device_name |
Implementation of a Storage device to interface with an SD card.
| SDStorage::SDStorage | ( | ) |
Construct a new SDStorage object.
|
overridevirtual |
Store data on the SD card, ending with newline.
| data | Data to store |
Implements Storage.
|
overridevirtual |
Store data on the SD card.
| packet | Pointer to packet bytes |
Reimplemented from Storage.
|
overridevirtual |
Verify SD card connection and create a new, unique file.
Implements Storage.
|
private |