ASCEND Flight Software
All Classes Files Functions Variables Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Storage Class Referenceabstract

Parent class for all data storage devices (sd card, radio, etc) More...

#include <Storage.h>

Inheritance diagram for Storage:
Collaboration diagram for Storage:

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.
 
- 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.
 

Additional Inherited Members

- Protected Attributes inherited from Device
bool verified
 
String device_name
 

Detailed Description

Parent class for all data storage devices (sd card, radio, etc)

Constructor & Destructor Documentation

◆ Storage()

Storage::Storage ( String  storage_name)
inline

Member Function Documentation

◆ store()

virtual void Storage::store ( String  data)
pure virtual

Send string data to storage device.

Parameters
dataData to store

Implemented in RadioStorage, SDStorage, and FlashStorage.

Here is the caller graph for this function:

◆ storePacket()

virtual void Storage::storePacket ( uint8_t *  packet)
inlinevirtual

Send packet data to storage device.

Parameters
packetPacket to store

Reimplemented in FlashStorage, RadioStorage, and SDStorage.

Here is the caller graph for this function:

◆ verify()

virtual bool Storage::verify ( )
pure virtual

Verifies connection with storage device.

Returns
true
false

Implements Device.

Implemented in FlashStorage, RadioStorage, and SDStorage.


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