2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
argos_lib::swerve::NetworkTablesHomingStorage Class Reference

Saves and loads swerve module homes to networkTables. More...

#include <network_tables_homing_storage.h>

Inheritance diagram for argos_lib::swerve::NetworkTablesHomingStorage:
argos_lib::SwerveHomeStorageInterface

Public Member Functions

 NetworkTablesHomingStorage (const std::string &tableName, const std::string &frontLeftPath, const std::string &frontRightPath, const std::string &rearRightPath, const std::string &rearLeftPath)
 Construct a new Network Tables Homing Storage object.
 
bool Save (const argos_lib::swerve::SwerveModulePositions &homePosition) override
 Save home positions to network tables.
 
std::optional< argos_lib::swerve::SwerveModulePositionsLoad () override
 Load home positions from network tables.
 

Private Attributes

const std::string m_tableName
 
const std::string m_frontLeftPath
 
const std::string m_frontRightPath
 
const std::string m_rearRightPath
 
const std::string m_rearLeftPath
 

Detailed Description

Saves and loads swerve module homes to networkTables.

Constructor & Destructor Documentation

◆ NetworkTablesHomingStorage()

NetworkTablesHomingStorage::NetworkTablesHomingStorage ( const std::string &  tableName,
const std::string &  frontLeftPath,
const std::string &  frontRightPath,
const std::string &  rearRightPath,
const std::string &  rearLeftPath 
)

Construct a new Network Tables Homing Storage object.

Parameters
tableNameNetwork table name
frontLeftPathKey name for front left module
frontRightPathKey name for front right module
rearRightPathKey name for rear right module
rearLeftPathKey name for rear left module

Member Function Documentation

◆ Load()

std::optional< argos_lib::swerve::SwerveModulePositions > NetworkTablesHomingStorage::Load ( )
overridevirtual

Load home positions from network tables.

Returns
Loaded positions or nullopt if failed

Implements argos_lib::SwerveHomeStorageInterface.

◆ Save()

bool NetworkTablesHomingStorage::Save ( const argos_lib::swerve::SwerveModulePositions homePosition)
overridevirtual

Save home positions to network tables.

Parameters
homePositionPositions to store
Returns
true if successful

Implements argos_lib::SwerveHomeStorageInterface.

Member Data Documentation

◆ m_frontLeftPath

const std::string argos_lib::swerve::NetworkTablesHomingStorage::m_frontLeftPath
private

◆ m_frontRightPath

const std::string argos_lib::swerve::NetworkTablesHomingStorage::m_frontRightPath
private

◆ m_rearLeftPath

const std::string argos_lib::swerve::NetworkTablesHomingStorage::m_rearLeftPath
private

◆ m_rearRightPath

const std::string argos_lib::swerve::NetworkTablesHomingStorage::m_rearRightPath
private

◆ m_tableName

const std::string argos_lib::swerve::NetworkTablesHomingStorage::m_tableName
private

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