#include <tmc_coe_interpreter.h>
|
| bool | commandCodingTransition (uint8_t slave_number) |
| |
| uint8_t | deviceStateChange (uint8_t slave_number, nmt_state_t state) |
| |
| uint8_t | getCycleCounter () |
| |
| std::string | getSlaveName (uint8_t slave_number) |
| |
| uint8_t | initInterface (std::string ifname) |
| |
| bool | isCycleFinished () |
| |
| bool | isInterfaceUnresponsive () |
| |
| bool | OPstate () |
| |
| void | paramTransfer (std::vector< std::vector< std::string >> all_obj_name, std::vector< std::vector< std::string >> all_index, std::vector< std::vector< std::string >> all_sub_index, std::vector< std::vector< std::string >> all_datatype) |
| |
| bool | readSDO (uint8_t slave_number, std::string object_name, std::string *value) |
| |
| bool | safeOPstate (std::vector< int > en_slave) |
| |
| void | startCycleCounter () |
| |
| bool | statusWordState (uint8_t slave_number, fsa_state_t state) |
| |
| void | stopCycleCounter () |
| |
| void | stopInterface () |
| |
| | TmcCoeInterpreter (uint8_t SDO_PDO_retries, double interface_timeout) |
| |
| bool | writeSDO (uint8_t slave_number, std::string object_name, std::string *value) |
| |
| | ~TmcCoeInterpreter () |
| |
Definition at line 148 of file tmc_coe_interpreter.h.
◆ TmcCoeInterpreter()
| TmcCoeInterpreter::TmcCoeInterpreter |
( |
uint8_t |
SDO_PDO_retries, |
|
|
double |
interface_timeout |
|
) |
| |
Copyright (c) 2023-2024 Analog Devices, Inc. All Rights Reserved. This software is proprietary to Analog Devices, Inc. and its licensors.
Definition at line 12 of file tmc_coe_interpreter.cpp.
◆ ~TmcCoeInterpreter()
| TmcCoeInterpreter::~TmcCoeInterpreter |
( |
| ) |
|
◆ commandCodingTransition()
| bool TmcCoeInterpreter::commandCodingTransition |
( |
uint8_t |
slave_number | ) |
|
Command Coding Transition
- Parameters
-
| slave_number | = slave_number to which command to set |
- Returns
- true if status word is on OPERATION_ENABLED state
Definition at line 198 of file tmc_coe_interpreter.cpp.
◆ deviceStateChange()
Change Device State
- Parameters
-
| slave_number | = slave_number to which state to set |
| state | = state to change |
- Returns
- current state in integer
Definition at line 379 of file tmc_coe_interpreter.cpp.
◆ errorCheck()
| void TmcCoeInterpreter::errorCheck |
( |
| ) |
|
|
private |
◆ getCycleCounter()
| uint8_t TmcCoeInterpreter::getCycleCounter |
( |
| ) |
|
Getter for cycle_counter_ that indicates how many the cycle has been finished
- Returns
- cycle_counter value
Definition at line 689 of file tmc_coe_interpreter.cpp.
◆ getSlaveName()
| std::string TmcCoeInterpreter::getSlaveName |
( |
uint8_t |
slave_number | ) |
|
Getter for Slave Name
- Parameters
-
| slave_number | = slave_number to which name to get |
- Returns
- slave name in string
Definition at line 658 of file tmc_coe_interpreter.cpp.
◆ initInterface()
| uint8_t TmcCoeInterpreter::initInterface |
( |
std::string |
ifname | ) |
|
Initialize Ethernet Interface
- Parameters
-
| ifname | = Device name, ex. "eth0" |
- Returns
- total slave count, if 0 = fail
Definition at line 61 of file tmc_coe_interpreter.cpp.
◆ isCycleFinished()
| bool TmcCoeInterpreter::isCycleFinished |
( |
| ) |
|
Getter for b_cycle_finished_ flag that indicates if processdata cyle is finished
- Returns
- b_cycle_finished_ status
Definition at line 679 of file tmc_coe_interpreter.cpp.
◆ isInterfaceUnresponsive()
| bool TmcCoeInterpreter::isInterfaceUnresponsive |
( |
| ) |
|
Getter for b_interface_unresponsive_ flag that indicates if the master received no frames from the slave
- Returns
- b_interface_unresponsive_ status
Definition at line 718 of file tmc_coe_interpreter.cpp.
◆ OPstate()
| bool TmcCoeInterpreter::OPstate |
( |
| ) |
|
Set Device and StatusWord to Operational State
- Parameters
-
| en_slave | = vector of slaves enabled |
- Returns
- true if success, false if not
Definition at line 145 of file tmc_coe_interpreter.cpp.
◆ paramTransfer()
| void TmcCoeInterpreter::paramTransfer |
( |
std::vector< std::vector< std::string >> |
all_obj_name, |
|
|
std::vector< std::vector< std::string >> |
all_index, |
|
|
std::vector< std::vector< std::string >> |
all_sub_index, |
|
|
std::vector< std::vector< std::string >> |
all_datatype |
|
) |
| |
Initialize Ethernet Interface
- Parameters
-
| 2D | vector of all obj_name, index, sub-index, and datatype |
Definition at line 44 of file tmc_coe_interpreter.cpp.
◆ processData()
| void TmcCoeInterpreter::processData |
( |
| ) |
|
|
private |
◆ readSDO() [1/2]
| bool TmcCoeInterpreter::readSDO |
( |
uint8_t |
slave_number, |
|
|
std::string |
object_name, |
|
|
std::string * |
value |
|
) |
| |
Read to SDO [High Level]
- Parameters
-
| slave_number | = slave_number to which command to set |
| object_name | = Object Name to read |
| value | = will return actual value |
- Returns
- true if read succesful, false if not
Definition at line 481 of file tmc_coe_interpreter.cpp.
◆ readSDO() [2/2]
template<typename T >
| std::string TmcCoeInterpreter::readSDO |
( |
uint8_t |
slave_number, |
|
|
uint16_t |
index_number, |
|
|
uint16_t |
subindex_number, |
|
|
T |
value |
|
) |
| |
|
private |
Read to SDO [Low Level]
- Parameters
-
| slave_number | = slave_number to which command to set |
| index_number | = index to read |
| subindex_number | = subindex to read |
| value | = used to set datatype of the object |
- Returns
- actual value in string, returns empty if failed
Definition at line 860 of file tmc_coe_interpreter.cpp.
◆ safeOPstate()
| bool TmcCoeInterpreter::safeOPstate |
( |
std::vector< int > |
en_slave | ) |
|
Set Device to Safe_Operational State, also creates Cyclic processdata
- Parameters
-
| en_slave | = vector of slaves enabled |
- Returns
- true if success, false if not
Definition at line 90 of file tmc_coe_interpreter.cpp.
◆ setControlWord()
Set Control World
- Parameters
-
| slave_number | = slave_number to which command to set |
| response_SW | = required Status Word response |
| requested_CW | = requested Control Word |
- Returns
- 0 if Status Word does not recover from FAULT, -1 if timeout is activated, 1 if successful
Definition at line 289 of file tmc_coe_interpreter.cpp.
◆ startCycleCounter()
| void TmcCoeInterpreter::startCycleCounter |
( |
| ) |
|
◆ statusWordState()
Set statusWord to requested status
- Parameters
-
| slave_number | = slave_number to which status is set |
| status_ | = enum of available status |
- Returns
- true if current status is equal to set status, false if not
Definition at line 355 of file tmc_coe_interpreter.cpp.
◆ stopCycleCounter()
| void TmcCoeInterpreter::stopCycleCounter |
( |
| ) |
|
◆ stopInterface()
| void TmcCoeInterpreter::stopInterface |
( |
| ) |
|
◆ writeSDO() [1/2]
| bool TmcCoeInterpreter::writeSDO |
( |
uint8_t |
slave_number, |
|
|
std::string |
object_name, |
|
|
std::string * |
value |
|
) |
| |
Write to SDO [High Level]
- Parameters
-
| slave_number | = slave_number to which command to set |
| object_name | = Object Name to write |
| value | = value to set if write and returns actual value after set |
- Returns
- true if write succesful, false if not
Definition at line 569 of file tmc_coe_interpreter.cpp.
◆ writeSDO() [2/2]
template<typename T >
| std::string TmcCoeInterpreter::writeSDO |
( |
uint8_t |
slave_number, |
|
|
uint16_t |
index_number, |
|
|
uint16_t |
subindex_number, |
|
|
T |
value |
|
) |
| |
|
private |
Read / Write to SDO [Low Level]
- Parameters
-
| slave_number | = slave_number to which command to set |
| index_number | = index to read / write |
| subindex_number | = subindex to read / write |
| value | = value to set, will return value if set to read |
- Returns
- actual value in string, returns empty if failed
Definition at line 899 of file tmc_coe_interpreter.cpp.
◆ all_datatype_
| std::vector<std::vector<std::string> > TmcCoeInterpreter::all_datatype_ |
|
private |
◆ all_index_
| std::vector<std::vector<std::string> > TmcCoeInterpreter::all_index_ |
|
private |
◆ all_obj_name_
| std::vector<std::vector<std::string> > TmcCoeInterpreter::all_obj_name_ |
|
private |
◆ all_sub_index_
| std::vector<std::vector<std::string> > TmcCoeInterpreter::all_sub_index_ |
|
private |
◆ b_cycle_finished_
| bool TmcCoeInterpreter::b_cycle_finished_ |
|
private |
◆ b_exit_threads_
| bool TmcCoeInterpreter::b_exit_threads_ |
|
private |
◆ b_interface_unresponsive_
| bool TmcCoeInterpreter::b_interface_unresponsive_ |
|
private |
◆ b_start_cycle_count_
| bool TmcCoeInterpreter::b_start_cycle_count_ |
|
private |
◆ cycle_counter_
| uint8_t TmcCoeInterpreter::cycle_counter_ |
|
private |
◆ error_check_thread_
| boost::thread TmcCoeInterpreter::error_check_thread_ |
|
private |
◆ input_pdo_
| std::vector<input_pdo_t*> TmcCoeInterpreter::input_pdo_ |
◆ interface_timeout_
| double TmcCoeInterpreter::interface_timeout_ |
|
private |
◆ IOmap
◆ nmt_state_
◆ output_pdo_
◆ processdata_thread_
| boost::thread TmcCoeInterpreter::processdata_thread_ |
|
private |
◆ SDO_PDO_retries_
| uint8_t TmcCoeInterpreter::SDO_PDO_retries_ |
|
private |
◆ slave_
| std::vector<int> TmcCoeInterpreter::slave_ |
|
private |
◆ work_count_
| int TmcCoeInterpreter::work_count_ |
|
private |
The documentation for this class was generated from the following files: