#include <EthercatMasterWithThread.hpp>
The Ethercat Master is managing the whole ethercat communication It have to be a singleton in the system
Definition at line 88 of file EthercatMasterWithThread.hpp.
youbot::EthercatMasterWithThread::EthercatMasterWithThread | ( | const std::string & | configFile, |
const std::string & | configFilePath | ||
) | [private] |
Definition at line 68 of file EthercatMasterWithThread.cpp.
Definition at line 106 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::AutomaticReceiveOn | ( | const bool | enableAutomaticReceive | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 159 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::AutomaticSendOn | ( | const bool | enableAutomaticSend | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 132 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::closeEthercat | ( | ) | [private] |
closes the ethercat connection
Definition at line 484 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::deleteDataTraceRegistration | ( | const unsigned int | JointNumber | ) |
Definition at line 303 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::deleteJointTrajectoryControllerRegistration | ( | const unsigned int | JointNumber | ) |
Definition at line 242 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::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 181 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::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 562 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::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 528 of file EthercatMasterWithThread.cpp.
unsigned int youbot::EthercatMasterWithThread::getNumberOfSlaves | ( | ) | const [virtual] |
return the quantity of ethercat slave which have an input/output buffer
Implements youbot::EthercatMasterInterface.
Definition at line 125 of file EthercatMasterWithThread.cpp.
unsigned int youbot::EthercatMasterWithThread::getNumberOfThreadCyclesPerSecond | ( | ) |
Definition at line 256 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::initializeEthercat | ( | ) | [private] |
establishes the ethercat connection
Definition at line 319 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::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 216 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::isEtherCATConnectionEstablished | ( | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 264 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::isThreadActive | ( | ) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 117 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::parseYouBotErrorFlags | ( | const YouBotSlaveMsg & | messageBuffer | ) | [private] |
Definition at line 775 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::receiveMailboxMessage | ( | YouBotSlaveMailboxMsg & | mailboxMsg | ) | [private] |
receives mailbox messages and stores them in the buffer
mailboxMsg | ethercat mailbox message |
Definition at line 602 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::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 205 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::registerDataTrace | ( | void * | object, |
const unsigned int | JointNumber | ||
) |
Definition at line 287 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::registerJointLimitMonitor | ( | JointLimitMonitor * | object, |
const unsigned int | JointNumber | ||
) | [virtual] |
Implements youbot::EthercatMasterInterface.
Definition at line 271 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::registerJointTrajectoryController | ( | JointTrajectoryController * | object, |
const unsigned int | JointNumber | ||
) |
Definition at line 225 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::sendMailboxMessage | ( | const YouBotSlaveMailboxMsg & | mailboxMsg | ) | [private] |
sends the mailbox Messages which have been stored in the buffer
mailboxMsg | ethercat mailbox message |
Definition at line 577 of file EthercatMasterWithThread.cpp.
bool youbot::EthercatMasterWithThread::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 195 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::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 549 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::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 505 of file EthercatMasterWithThread.cpp.
void youbot::EthercatMasterWithThread::updateSensorActorValues | ( | ) | [private] |
sends and receives ethercat messages and mailbox messages to and from the motor controllers this method is executed in a separate thread
Definition at line 622 of file EthercatMasterWithThread.cpp.
friend class EthercatMaster [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 90 of file EthercatMasterWithThread.hpp.
friend class YouBotGripper [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 92 of file EthercatMasterWithThread.hpp.
friend class YouBotGripperBar [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 93 of file EthercatMasterWithThread.hpp.
friend class YouBotJoint [friend] |
Reimplemented from youbot::EthercatMasterInterface.
Definition at line 91 of file EthercatMasterWithThread.hpp.
std::vector<YouBotSlaveMsg> youbot::EthercatMasterWithThread::automaticReceiveOffBufferVector [private] |
Definition at line 211 of file EthercatMasterWithThread.hpp.
bool youbot::EthercatMasterWithThread::automaticReceiveOn [private] |
Definition at line 231 of file EthercatMasterWithThread.hpp.
std::vector<YouBotSlaveMsg> youbot::EthercatMasterWithThread::automaticSendOffBufferVector [private] |
Definition at line 209 of file EthercatMasterWithThread.hpp.
bool youbot::EthercatMasterWithThread::automaticSendOn [private] |
Definition at line 229 of file EthercatMasterWithThread.hpp.
long int youbot::EthercatMasterWithThread::communicationErrors [private] |
Definition at line 235 of file EthercatMasterWithThread.hpp.
Definition at line 223 of file EthercatMasterWithThread.hpp.
std::string youbot::EthercatMasterWithThread::configFileName [static, private] |
Definition at line 225 of file EthercatMasterWithThread.hpp.
std::string youbot::EthercatMasterWithThread::configFilepath [static, private] |
Definition at line 227 of file EthercatMasterWithThread.hpp.
std::vector<void*> youbot::EthercatMasterWithThread::dataTraces [private] |
Definition at line 247 of file EthercatMasterWithThread.hpp.
boost::mutex youbot::EthercatMasterWithThread::dataTracesMutex [private] |
Definition at line 249 of file EthercatMasterWithThread.hpp.
Definition at line 233 of file EthercatMasterWithThread.hpp.
std::vector<SlaveMessageInput*> youbot::EthercatMasterWithThread::ethercatInputBufferVector [private] |
Definition at line 190 of file EthercatMasterWithThread.hpp.
std::vector<SlaveMessageOutput*> youbot::EthercatMasterWithThread::ethercatOutputBufferVector [private] |
Definition at line 188 of file EthercatMasterWithThread.hpp.
std::vector<ec_slavet> youbot::EthercatMasterWithThread::ethercatSlaveInfo [private] |
Definition at line 194 of file EthercatMasterWithThread.hpp.
unsigned int youbot::EthercatMasterWithThread::ethercatTimeout [private] |
Definition at line 196 of file EthercatMasterWithThread.hpp.
std::string youbot::EthercatMasterWithThread::ethernetDevice [private] |
Definition at line 180 of file EthercatMasterWithThread.hpp.
char youbot::EthercatMasterWithThread::IOmap_[4096] [private] |
Definition at line 182 of file EthercatMasterWithThread.hpp.
std::vector<JointLimitMonitor*> youbot::EthercatMasterWithThread::jointLimitMonitors [private] |
Definition at line 243 of file EthercatMasterWithThread.hpp.
boost::mutex youbot::EthercatMasterWithThread::jointLimitMonitorVectorMutex [private] |
Definition at line 245 of file EthercatMasterWithThread.hpp.
Definition at line 184 of file EthercatMasterWithThread.hpp.
Definition at line 207 of file EthercatMasterWithThread.hpp.
Definition at line 205 of file EthercatMasterWithThread.hpp.
std::vector<YouBotSlaveMailboxMsgThreadSafe> youbot::EthercatMasterWithThread::mailboxMessages [private] |
Definition at line 213 of file EthercatMasterWithThread.hpp.
unsigned int youbot::EthercatMasterWithThread::mailboxTimeout [private] |
Definition at line 215 of file EthercatMasterWithThread.hpp.
long int youbot::EthercatMasterWithThread::maxCommunicationErrors [private] |
Definition at line 237 of file EthercatMasterWithThread.hpp.
std::vector<bool> youbot::EthercatMasterWithThread::newInputMailboxMsgFlag [private] |
Definition at line 217 of file EthercatMasterWithThread.hpp.
unsigned int youbot::EthercatMasterWithThread::nrOfSlaves [private] |
Definition at line 186 of file EthercatMasterWithThread.hpp.
std::vector<bool> youbot::EthercatMasterWithThread::outstandingMailboxMsgFlag [private] |
Definition at line 219 of file EthercatMasterWithThread.hpp.
std::vector<bool> youbot::EthercatMasterWithThread::pendingMailboxMsgsReply [private] |
Definition at line 221 of file EthercatMasterWithThread.hpp.
std::vector<YouBotSlaveMsgThreadSafe> youbot::EthercatMasterWithThread::slaveMessages [private] |
Definition at line 192 of file EthercatMasterWithThread.hpp.
volatile bool youbot::EthercatMasterWithThread::stopThread [private] |
Definition at line 203 of file EthercatMasterWithThread.hpp.
boost::thread_group youbot::EthercatMasterWithThread::threads [private] |
Definition at line 201 of file EthercatMasterWithThread.hpp.
unsigned int youbot::EthercatMasterWithThread::timeTillNextEthercatUpdate [private] |
Definition at line 199 of file EthercatMasterWithThread.hpp.
std::vector<JointTrajectoryController*> youbot::EthercatMasterWithThread::trajectoryControllers [private] |
Definition at line 239 of file EthercatMasterWithThread.hpp.
boost::mutex youbot::EthercatMasterWithThread::trajectoryControllerVectorMutex [private] |
Definition at line 241 of file EthercatMasterWithThread.hpp.