#include <EthercatMasterWithoutThread.hpp>
Public Member Functions | |
void | AutomaticReceiveOn (const bool enableAutomaticReceive) |
void | AutomaticSendOn (const bool enableAutomaticSend) |
void | getEthercatDiagnosticInformation (std::vector< ec_slavet > ðercatSlaveInfos) |
unsigned int | getNumberOfSlaves () const |
return the quantity of ethercat slave which have an input/output buffer | |
bool | isErrorInSoemDriver () |
bool | isEtherCATConnectionEstablished () |
bool | isThreadActive () |
bool | receiveProcessData () |
void | registerJointLimitMonitor (JointLimitMonitor *object, const unsigned int JointNumber) |
bool | sendProcessData () |
Private Member Functions | |
bool | closeEthercat () |
closes the ethercat connection | |
EthercatMasterWithoutThread (const std::string &configFile, const std::string &configFilePath) | |
bool | getMailboxMsgBuffer (YouBotSlaveMailboxMsg &mailboxMsg, const unsigned int jointNumber) |
void | getMsgBuffer (const unsigned int jointNumber, YouBotSlaveMsg &returnMsg) |
void | initializeEthercat () |
establishes the ethercat connection | |
void | parseYouBotErrorFlags (const YouBotSlaveMsg &messageBuffer) |
bool | receiveMailboxMessage (YouBotSlaveMailboxMsg &mailboxMsg) |
bool | sendMailboxMessage (const YouBotSlaveMailboxMsg &mailboxMsg) |
void | setMailboxMsgBuffer (const YouBotSlaveMailboxMsg &msgBuffer, const unsigned int jointNumber) |
void | setMsgBuffer (const YouBotSlaveMsg &msgBuffer, const unsigned int jointNumber) |
~EthercatMasterWithoutThread () | |
Private Attributes | |
ConfigFile * | configfile |
bool | ethercatConnectionEstablished |
std::vector< SlaveMessageInput * > | ethercatInputBufferVector |
std::vector< SlaveMessageOutput * > | ethercatOutputBufferVector |
std::vector< ec_slavet > | ethercatSlaveInfo |
unsigned int | ethercatTimeout |
std::string | ethernetDevice |
std::vector < YouBotSlaveMailboxMsg > | firstMailboxBufferVector |
char | IOmap_ [4096] |
ec_mbxbuft | mailboxBufferReceive |
ec_mbxbuft | mailboxBufferSend |
unsigned int | mailboxTimeout |
unsigned int | nrOfSlaves |
std::vector< YouBotSlaveMsg > | processDataBuffer |
Static Private Attributes | |
static std::string | configFileName |
static std::string | configFilepath |
Friends | |
class | EthercatMaster |
class | YouBotGripper |
class | YouBotGripperBar |
class | YouBotJoint |
The Ethercat Master is managing the whole ethercat communication It have to be a singleton in the system
Definition at line 87 of file EthercatMasterWithoutThread.hpp.
youbot::EthercatMasterWithoutThread::EthercatMasterWithoutThread | ( | const std::string & | configFile, |
const std::string & | configFilePath | ||
) | [private] |
Definition at line 67 of file EthercatMasterWithoutThread.cpp.
Definition at line 98 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::AutomaticReceiveOn | ( | const bool | enableAutomaticReceive | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 131 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::AutomaticSendOn | ( | const bool | enableAutomaticSend | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 122 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::closeEthercat | ( | ) | [private] |
closes the ethercat connection
Definition at line 377 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::getEthercatDiagnosticInformation | ( | std::vector< ec_slavet > & | ethercatSlaveInfos | ) | [virtual] |
provides all ethercat slave informations from the SOEM driver
ethercatSlaveInfos | ethercat slave informations |
Implements youbot::EthercatMasterInterface.
Definition at line 141 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::getMailboxMsgBuffer | ( | YouBotSlaveMailboxMsg & | mailboxMsg, |
const unsigned int | jointNumber | ||
) | [private, virtual] |
gets a mailbox message form the buffer which came form the motor controllers
msgBuffer | ethercat mailbox message |
jointNumber | joint number of the receiver joint |
Implements youbot::EthercatMasterInterface.
Definition at line 436 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::getMsgBuffer | ( | const unsigned int | jointNumber, |
YouBotSlaveMsg & | returnMsg | ||
) | [private, virtual] |
get a ethercat message form the buffer
msgBuffer | ethercat message |
jointNumber | joint number of the receiver joint |
Implements youbot::EthercatMasterInterface.
Definition at line 410 of file EthercatMasterWithoutThread.cpp.
unsigned int youbot::EthercatMasterWithoutThread::getNumberOfSlaves | ( | ) | const [virtual] |
return the quantity of ethercat slave which have an input/output buffer
Implements youbot::EthercatMasterInterface.
Definition at line 115 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::initializeEthercat | ( | ) | [private] |
establishes the ethercat connection
Definition at line 225 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::isErrorInSoemDriver | ( | ) | [virtual] |
checks if an error has occurred in the soem driver returns a true if an error has occurred
Implements youbot::EthercatMasterInterface.
Definition at line 201 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::isEtherCATConnectionEstablished | ( | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 210 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::isThreadActive | ( | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 107 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::parseYouBotErrorFlags | ( | const YouBotSlaveMsg & | messageBuffer | ) | [private] |
Definition at line 488 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::receiveMailboxMessage | ( | YouBotSlaveMailboxMsg & | mailboxMsg | ) | [private] |
receives mailbox messages and stores them in the buffer
mailboxMsg | ethercat mailbox message |
Definition at line 471 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::receiveProcessData | ( | ) | [virtual] |
receives ethercat messages from the motor controllers returns a true if everything it OK and returns false if something fail
Implements youbot::EthercatMasterInterface.
Definition at line 178 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::registerJointLimitMonitor | ( | JointLimitMonitor * | object, |
const unsigned int | JointNumber | ||
) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 217 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::sendMailboxMessage | ( | const YouBotSlaveMailboxMsg & | mailboxMsg | ) | [private] |
sends the mailbox Messages which have been stored in the buffer
mailboxMsg | ethercat mailbox message |
Definition at line 447 of file EthercatMasterWithoutThread.cpp.
bool youbot::EthercatMasterWithoutThread::sendProcessData | ( | ) | [virtual] |
sends ethercat messages to the motor controllers returns a true if everything it OK and returns false if something fail
Implements youbot::EthercatMasterInterface.
Definition at line 155 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::setMailboxMsgBuffer | ( | const YouBotSlaveMailboxMsg & | msgBuffer, |
const unsigned int | jointNumber | ||
) | [private, virtual] |
stores a mailbox message in a buffer which will be sent to the motor controllers
msgBuffer | ethercat mailbox message |
jointNumber | joint number of the sender joint |
Implements youbot::EthercatMasterInterface.
Definition at line 422 of file EthercatMasterWithoutThread.cpp.
void youbot::EthercatMasterWithoutThread::setMsgBuffer | ( | const YouBotSlaveMsg & | msgBuffer, |
const unsigned int | jointNumber | ||
) | [private, virtual] |
stores a ethercat message to the buffer
msgBuffer | ethercat message |
jointNumber | joint number of the sender joint |
Implements youbot::EthercatMasterInterface.
Definition at line 398 of file EthercatMasterWithoutThread.cpp.
friend class EthercatMaster [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 89 of file EthercatMasterWithoutThread.hpp.
friend class YouBotGripper [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 91 of file EthercatMasterWithoutThread.hpp.
friend class YouBotGripperBar [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 92 of file EthercatMasterWithoutThread.hpp.
friend class YouBotJoint [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 90 of file EthercatMasterWithoutThread.hpp.
Definition at line 183 of file EthercatMasterWithoutThread.hpp.
std::string youbot::EthercatMasterWithoutThread::configFileName [static, private] |
Definition at line 191 of file EthercatMasterWithoutThread.hpp.
std::string youbot::EthercatMasterWithoutThread::configFilepath [static, private] |
Definition at line 193 of file EthercatMasterWithoutThread.hpp.
Definition at line 195 of file EthercatMasterWithoutThread.hpp.
std::vector<SlaveMessageInput*> youbot::EthercatMasterWithoutThread::ethercatInputBufferVector [private] |
Definition at line 173 of file EthercatMasterWithoutThread.hpp.
std::vector<SlaveMessageOutput*> youbot::EthercatMasterWithoutThread::ethercatOutputBufferVector [private] |
Definition at line 171 of file EthercatMasterWithoutThread.hpp.
std::vector<ec_slavet> youbot::EthercatMasterWithoutThread::ethercatSlaveInfo [private] |
Definition at line 185 of file EthercatMasterWithoutThread.hpp.
unsigned int youbot::EthercatMasterWithoutThread::ethercatTimeout [private] |
Definition at line 189 of file EthercatMasterWithoutThread.hpp.
std::string youbot::EthercatMasterWithoutThread::ethernetDevice [private] |
Definition at line 165 of file EthercatMasterWithoutThread.hpp.
std::vector<YouBotSlaveMailboxMsg> youbot::EthercatMasterWithoutThread::firstMailboxBufferVector [private] |
Definition at line 175 of file EthercatMasterWithoutThread.hpp.
char youbot::EthercatMasterWithoutThread::IOmap_[4096] [private] |
Definition at line 187 of file EthercatMasterWithoutThread.hpp.
Definition at line 181 of file EthercatMasterWithoutThread.hpp.
Definition at line 177 of file EthercatMasterWithoutThread.hpp.
unsigned int youbot::EthercatMasterWithoutThread::mailboxTimeout [private] |
Definition at line 179 of file EthercatMasterWithoutThread.hpp.
unsigned int youbot::EthercatMasterWithoutThread::nrOfSlaves [private] |
Definition at line 169 of file EthercatMasterWithoutThread.hpp.
std::vector<YouBotSlaveMsg> youbot::EthercatMasterWithoutThread::processDataBuffer [private] |
Definition at line 167 of file EthercatMasterWithoutThread.hpp.