fastcat 0.13.15
C++ EtherCAT Device Command & Control Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
fastcat::Pid Class Reference

#include "pid.h"

Inheritance diagram for fastcat::Pid:
Inheritance graph
[legend]
Collaboration diagram for fastcat::Pid:
Collaboration graph
[legend]

Public Member Functions

 Pid ()
 
bool ConfigFromYaml (const YAML::Node &node) override
 
bool Read () override
 
bool Write (DeviceCmd &cmd) override
 
void Fault () override
 
- Public Member Functions inherited from fastcat::DeviceBase
virtual ~DeviceBase ()
 
virtual FaultType Process ()
 
virtual void Reset ()
 
virtual void SetInitializationTime (double time_sec, double monotonic_time_sec)
 
void RegisterCmdQueue (std::shared_ptr< ThreadSafeQueue< DeviceCmd > > cmd_queue)
 
std::string GetName ()
 
std::shared_ptr< DeviceState > GetState ()
 
void SetTime (double time, double monotonic_time)
 
void SetLoopPeriod (double loop_period)
 

Protected Attributes

double kp_ = 0.0
 
double ki_ = 0.0
 
double kd_ = 0.0
 
double windup_limit_ = 0.0
 
PidActivateCmd pid_activate_cmd_ = {0}
 
double activation_time_ = 0.0
 
double error_ = 0.0
 
double prev_error_ = 0.0
 
double integral_error_ = 0.0
 
uint8_t persistence_counter_ = 0
 
- Protected Attributes inherited from fastcat::DeviceBase
std::string name_
 unique device name
 
double last_monotonic_time_ = 0.0
 
double loop_period_ = 0.0
 only some devices need
 
double initialization_time_sec_ = -1
 only some devices need
 
double monotonic_initialization_time_sec_ = -1
 only some devices need
 
bool device_fault_active_ = false
 device-level fault, manager also has fault status flag
 
std::shared_ptr< DeviceState > state_
 Fastcat state data.
 
std::shared_ptr< ThreadSafeQueue< DeviceCmd > > cmd_queue_
 for intra-device commands
 

Additional Inherited Members

- Public Attributes inherited from fastcat::DeviceBase
std::vector< Signal > signals_
 

Constructor & Destructor Documentation

◆ Pid()

fastcat::Pid::Pid ( )

Member Function Documentation

◆ ConfigFromYaml()

bool fastcat::Pid::ConfigFromYaml ( const YAML::Node &  node)
overridevirtual

Implements fastcat::DeviceBase.

Here is the call graph for this function:

◆ Fault()

void fastcat::Pid::Fault ( )
overridevirtual

Reimplemented from fastcat::DeviceBase.

Here is the call graph for this function:

◆ Read()

bool fastcat::Pid::Read ( )
overridevirtual

Implements fastcat::DeviceBase.

Here is the call graph for this function:

◆ Write()

bool fastcat::Pid::Write ( DeviceCmd &  cmd)
overridevirtual

Reimplemented from fastcat::DeviceBase.

Member Data Documentation

◆ activation_time_

double fastcat::Pid::activation_time_ = 0.0
protected

◆ error_

double fastcat::Pid::error_ = 0.0
protected

◆ integral_error_

double fastcat::Pid::integral_error_ = 0.0
protected

◆ kd_

double fastcat::Pid::kd_ = 0.0
protected

◆ ki_

double fastcat::Pid::ki_ = 0.0
protected

◆ kp_

double fastcat::Pid::kp_ = 0.0
protected

◆ persistence_counter_

uint8_t fastcat::Pid::persistence_counter_ = 0
protected

◆ pid_activate_cmd_

PidActivateCmd fastcat::Pid::pid_activate_cmd_ = {0}
protected

◆ prev_error_

double fastcat::Pid::prev_error_ = 0.0
protected

◆ windup_limit_

double fastcat::Pid::windup_limit_ = 0.0
protected

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