Public Member Functions | Private Attributes | List of all members
soem_interface_examples::ExampleSlave Class Reference

#include <ExampleSlave.hpp>

Inheritance diagram for soem_interface_examples::ExampleSlave:
Inheritance graph
[legend]

Public Member Functions

 ExampleSlave (const std::string &name, rokubimini::soem_interface::EthercatBusBase *bus, const uint32_t address)
 
PdoInfo getCurrentPdoInfo () const override
 Gets the current pdo information. More...
 
std::string getName () const override
 Returns the name of the slave. More...
 
void shutdown () override
 Used to shutdown slave specific objects. More...
 
bool startup () override
 Startup non-ethercat specific objects for the slave. More...
 
void updateRead () override
 Called during reading the ethercat bus. Use this method to extract readings from the ethercat bus buffer. More...
 
void updateWrite () override
 Called during writing to the ethercat bus. Use this method to stage a command for the slave. More...
 
 ~ExampleSlave () override=default
 
- Public Member Functions inherited from rokubimini::soem_interface::EthercatSlaveBase
 EthercatSlaveBase (EthercatBusBase *bus, const uint32_t address)
 
uint32_t getAddress () const
 Returns the bus address of the slave. More...
 
template<typename Value >
bool sendSdoRead (const uint16_t index, const uint8_t subindex, const bool completeAccess, Value &value)
 
virtual bool sendSdoReadDouble (const uint16_t index, const uint8_t subindex, const bool completeAccess, double &value)
 
virtual bool sendSdoReadFloat (const uint16_t index, const uint8_t subindex, const bool completeAccess, float &value)
 
virtual bool sendSdoReadGeneric (const std::string &indexString, const std::string &subindexString, const std::string &valueTypeString, std::string &valueString)
 
virtual bool sendSdoReadInt16 (const uint16_t index, const uint8_t subindex, const bool completeAccess, int16_t &value)
 
virtual bool sendSdoReadInt32 (const uint16_t index, const uint8_t subindex, const bool completeAccess, int32_t &value)
 
virtual bool sendSdoReadInt64 (const uint16_t index, const uint8_t subindex, const bool completeAccess, int64_t &value)
 
virtual bool sendSdoReadInt8 (const uint16_t index, const uint8_t subindex, const bool completeAccess, int8_t &value)
 
virtual bool sendSdoReadUInt16 (const uint16_t index, const uint8_t subindex, const bool completeAccess, uint16_t &value)
 
virtual bool sendSdoReadUInt32 (const uint16_t index, const uint8_t subindex, const bool completeAccess, uint32_t &value)
 
virtual bool sendSdoReadUInt64 (const uint16_t index, const uint8_t subindex, const bool completeAccess, uint64_t &value)
 
virtual bool sendSdoReadUInt8 (const uint16_t index, const uint8_t subindex, const bool completeAccess, uint8_t &value)
 
template<typename Value >
bool sendSdoWrite (const uint16_t index, const uint8_t subindex, const bool completeAccess, const Value value)
 
virtual bool sendSdoWriteDouble (const uint16_t index, const uint8_t subindex, const bool completeAccess, const double value)
 
virtual bool sendSdoWriteFloat (const uint16_t index, const uint8_t subindex, const bool completeAccess, const float value)
 
virtual bool sendSdoWriteGeneric (const std::string &indexString, const std::string &subindexString, const std::string &valueTypeString, const std::string &valueString)
 
virtual bool sendSdoWriteInt16 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const int16_t value)
 
virtual bool sendSdoWriteInt32 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const int32_t value)
 
virtual bool sendSdoWriteInt64 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const int64_t value)
 
virtual bool sendSdoWriteInt8 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const int8_t value)
 
virtual bool sendSdoWriteUInt16 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const uint16_t value)
 
virtual bool sendSdoWriteUInt32 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const uint32_t value)
 
virtual bool sendSdoWriteUInt64 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const uint64_t value)
 
virtual bool sendSdoWriteUInt8 (const uint16_t index, const uint8_t subindex, const bool completeAccess, const uint8_t value)
 
virtual ~EthercatSlaveBase ()=default
 

Private Attributes

RxPdo command_
 
const std::string name_
 
PdoInfo pdoInfo_
 
TxPdo reading_
 

Additional Inherited Members

- Protected Member Functions inherited from rokubimini::soem_interface::EthercatSlaveBase
void printWarnNotImplemented ()
 Prints a warning. Use this method to suppress compiler warnings. More...
 
- Protected Attributes inherited from rokubimini::soem_interface::EthercatSlaveBase
const uint32_t address_ { 0 }
 
EthercatBusBasebus_
 
std::recursive_mutex mutex_
 

Detailed Description

Definition at line 24 of file ExampleSlave.hpp.

Constructor & Destructor Documentation

soem_interface_examples::ExampleSlave::ExampleSlave ( const std::string &  name,
rokubimini::soem_interface::EthercatBusBase bus,
const uint32_t  address 
)

Definition at line 5 of file ExampleSlave.cpp.

soem_interface_examples::ExampleSlave::~ExampleSlave ( )
overridedefault

Member Function Documentation

PdoInfo soem_interface_examples::ExampleSlave::getCurrentPdoInfo ( ) const
inlineoverridevirtual

Gets the current pdo information.

Returns
The current pdo information.

Implements rokubimini::soem_interface::EthercatSlaveBase.

Definition at line 40 of file ExampleSlave.hpp.

std::string soem_interface_examples::ExampleSlave::getName ( ) const
inlineoverridevirtual

Returns the name of the slave.

Returns
Name of the ethercat bus

Implements rokubimini::soem_interface::EthercatSlaveBase.

Definition at line 30 of file ExampleSlave.hpp.

void soem_interface_examples::ExampleSlave::shutdown ( )
overridevirtual

Used to shutdown slave specific objects.

Implements rokubimini::soem_interface::EthercatSlaveBase.

Definition at line 32 of file ExampleSlave.cpp.

bool soem_interface_examples::ExampleSlave::startup ( )
overridevirtual

Startup non-ethercat specific objects for the slave.

Returns
True if succesful

Implements rokubimini::soem_interface::EthercatSlaveBase.

Definition at line 16 of file ExampleSlave.cpp.

void soem_interface_examples::ExampleSlave::updateRead ( )
overridevirtual

Called during reading the ethercat bus. Use this method to extract readings from the ethercat bus buffer.

Implements rokubimini::soem_interface::EthercatSlaveBase.

Definition at line 22 of file ExampleSlave.cpp.

void soem_interface_examples::ExampleSlave::updateWrite ( )
overridevirtual

Called during writing to the ethercat bus. Use this method to stage a command for the slave.

Implements rokubimini::soem_interface::EthercatSlaveBase.

Definition at line 27 of file ExampleSlave.cpp.

Member Data Documentation

RxPdo soem_interface_examples::ExampleSlave::command_
private

Definition at line 49 of file ExampleSlave.hpp.

const std::string soem_interface_examples::ExampleSlave::name_
private

Definition at line 46 of file ExampleSlave.hpp.

PdoInfo soem_interface_examples::ExampleSlave::pdoInfo_
private

Definition at line 47 of file ExampleSlave.hpp.

TxPdo soem_interface_examples::ExampleSlave::reading_
private

Definition at line 48 of file ExampleSlave.hpp.


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


rokubimini_ethercat
Author(s):
autogenerated on Wed Mar 3 2021 03:09:16