2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
argos_lib::HomingStorageInterface< T > Class Template Referenceabstract

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

#include <homing_interface.h>

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

Public Member Functions

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

Detailed Description

template<class T>
class argos_lib::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 > argos_lib::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 argos_lib::FSHomingStorage< T >, and argos_lib::FSHomingStorage< units::degree_t >.

◆ Save()

template<class T >
virtual bool argos_lib::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 argos_lib::FSHomingStorage< T >.


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