MCU
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
TorqueControllerCASEWrapper< message_queue > Class Template Reference

makes CASE system a part of Controller hierarchy for use in TC Mux More...

#include <CASEControllerWrapper.h>

Inheritance diagram for TorqueControllerCASEWrapper< message_queue >:
Inheritance graph
Collaboration diagram for TorqueControllerCASEWrapper< message_queue >:
Collaboration graph

Public Member Functions

 TorqueControllerCASEWrapper ()=delete
 
 TorqueControllerCASEWrapper (CASESystem< message_queue > *case_instance)
 
TorqueControllerOutput_s evaluate (const SharedCarState_s &state) override
 packages CASE system command into Torque Controller Output More...
 
virtual TorqueControllerOutput_s evaluate (const SharedCarState_s &state)=0
 This mehod must be implemented by every controller in the Tc Muxer. This is called in the Muxer whenever the drivetrain command is obtained. TorqueControllerMux.cpp to see that in every tick of the system, the active controller must be ticked through this method. More...
 

Private Attributes

CASESystem< message_queue > * case_instance_
 

Detailed Description

template<typename message_queue>
class TorqueControllerCASEWrapper< message_queue >

makes CASE system a part of Controller hierarchy for use in TC Mux

Definition at line 9 of file CASEControllerWrapper.h.

Constructor & Destructor Documentation

◆ TorqueControllerCASEWrapper() [1/2]

template<typename message_queue >
TorqueControllerCASEWrapper< message_queue >::TorqueControllerCASEWrapper ( )
delete

◆ TorqueControllerCASEWrapper() [2/2]

template<typename message_queue >
TorqueControllerCASEWrapper< message_queue >::TorqueControllerCASEWrapper ( CASESystem< message_queue > *  case_instance)
inline
Parameters
case_instancerequires current state estimator instance to give access of the CASE instance to this specific controller so that it can update/control it.
Note
This also ensures there are not duplicates of this system for safety.

Definition at line 15 of file CASEControllerWrapper.h.

15 : case_instance_(case_instance)
16 {
17 }
CASESystem< message_queue > * case_instance_

Member Function Documentation

◆ evaluate()

template<typename message_queue >
TorqueControllerOutput_s TorqueControllerCASEWrapper< message_queue >::evaluate ( const SharedCarState_s state)
inlineoverridevirtual

packages CASE system command into Torque Controller Output

Parameters
statethis state is updated by the CASE system in main repeatedly

Implements Controller.

Definition at line 20 of file CASEControllerWrapper.h.

21 {
22 DrivetrainCommand_s curr_cmd = case_instance_->get_current_drive_command();
24 out.ready = true;
25 out.command = curr_cmd;
26 return out;
27 }
Stores setpoints for a command to the Drivetrain, containing speed and torque setpoints for each moto...
Packages drivetrain command with ready boolean to give feedback on controller successfully evaluating...
DrivetrainCommand_s command

Member Data Documentation

◆ case_instance_

template<typename message_queue >
CASESystem<message_queue>* TorqueControllerCASEWrapper< message_queue >::case_instance_
private

Definition at line 30 of file CASEControllerWrapper.h.


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