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

#include "commander.h"

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

Public Member Functions

 Commander ()
 
bool ConfigFromYaml (const YAML::Node &node) override
 
bool Read () override
 
bool Write (DeviceCmd &cmd) override
 
void Fault () override
 
void Reset () override
 
- Public Member Functions inherited from fastcat::DeviceBase
virtual ~DeviceBase ()
 
virtual FaultType Process ()
 
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

std::string device_cmd_type_string_
 
DeviceCmd device_cmd_ = {}
 
double enable_time_ = 0
 
double enable_duration_ = 1.0
 
bool start_enabled_ = false
 
uint16_t skip_n_loops_ = 0
 
uint16_t skip_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

◆ Commander()

fastcat::Commander::Commander ( )

Member Function Documentation

◆ ConfigFromYaml()

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

Implements fastcat::DeviceBase.

◆ Fault()

void fastcat::Commander::Fault ( )
overridevirtual

Reimplemented from fastcat::DeviceBase.

◆ Read()

bool fastcat::Commander::Read ( )
overridevirtual

Implements fastcat::DeviceBase.

◆ Reset()

void fastcat::Commander::Reset ( )
overridevirtual

Reimplemented from fastcat::DeviceBase.

◆ Write()

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

Reimplemented from fastcat::DeviceBase.

Member Data Documentation

◆ device_cmd_

DeviceCmd fastcat::Commander::device_cmd_ = {}
protected

◆ device_cmd_type_string_

std::string fastcat::Commander::device_cmd_type_string_
protected

◆ enable_duration_

double fastcat::Commander::enable_duration_ = 1.0
protected

◆ enable_time_

double fastcat::Commander::enable_time_ = 0
protected

◆ skip_counter_

uint16_t fastcat::Commander::skip_counter_ = 0
protected

◆ skip_n_loops_

uint16_t fastcat::Commander::skip_n_loops_ = 0
protected

◆ start_enabled_

bool fastcat::Commander::start_enabled_ = false
protected

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