ExampleSlave.cpp
Go to the documentation of this file.
2 
4 {
6  const uint32_t address)
7  : rokubimini::soem_interface::EthercatSlaveBase(bus, address), name_(name)
8 {
11  pdoInfo_.rxPdoSize_ = sizeof(command_);
12  pdoInfo_.txPdoSize_ = sizeof(reading_);
13  pdoInfo_.moduleId_ = 0x00123456;
14 }
15 
17 {
18  // Do nothing else
19  return true;
20 }
21 
23 {
25 }
26 
28 {
30 }
31 
33 {
34  // Do nothing
35 }
36 } // namespace soem_interface_examples
#define TX_PDO_ID
Definition: ExampleSlave.hpp:7
void shutdown() override
Used to shutdown slave specific objects.
void updateRead() override
Called during reading the ethercat bus. Use this method to extract readings from the ethercat bus buf...
void readTxPdo(const uint16_t slave, TxPdo &txPdo) const
ExampleSlave(const std::string &name, rokubimini::soem_interface::EthercatBusBase *bus, const uint32_t address)
Definition: ExampleSlave.cpp:5
bool startup() override
Startup non-ethercat specific objects for the slave.
#define RX_PDO_ID
Definition: ExampleSlave.hpp:6
unsigned int uint32_t
void updateWrite() override
Called during writing to the ethercat bus. Use this method to stage a command for the slave...
Class for managing an ethercat bus containing one or multiple slaves.
void writeRxPdo(const uint16_t slave, const RxPdo &rxPdo)


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