2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
Loading...
Searching...
No Matches
HomingStorageInterface< T > Class Template Referenceabstract

Interface capable of saving and loading home positions from persistent storage. More...

#include <homing_storage_interface.h>

Inheritance diagram for HomingStorageInterface< T >:
FSHomingStorage< units::degree_t > FSHomingStorage< T >

Public Member Functions

virtual bool Save (const T &homePosition)=0
 Save home position to persistent storage. More...
 
virtual std::optional< T > Load ()=0
 Load home position from persistent storage. More...
 

Detailed Description

template<class T>
class HomingStorageInterface< T >

Interface capable of saving and loading home positions from persistent storage.

Template Parameters
TType of the home position. Should be a units type

Member Function Documentation

◆ Load()

template<class T >
virtual std::optional< T > HomingStorageInterface< T >::Load ( )
pure virtual

Load home position from persistent storage.

Returns
Poisition from persistent storage or std::nullopt if load failed or no positions were previously stored

Implemented in FSHomingStorage< T >, and FSHomingStorage< units::degree_t >.

◆ Save()

template<class T >
virtual bool HomingStorageInterface< T >::Save ( const T &  homePosition)
pure virtual

Save home position to persistent storage.

Parameters
homePositionPosition to store
Returns
true Save successful
false Error saving

Implemented in FSHomingStorage< T >.


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