Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
youbot::EthercatMasterWithThread Class Reference

#include <EthercatMasterWithThread.hpp>

Inheritance diagram for youbot::EthercatMasterWithThread:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void AutomaticReceiveOn (const bool enableAutomaticReceive)
void AutomaticSendOn (const bool enableAutomaticSend)
void deleteDataTraceRegistration (const unsigned int JointNumber)
void deleteJointTrajectoryControllerRegistration (const unsigned int JointNumber)
void getEthercatDiagnosticInformation (std::vector< ec_slavet > &ethercatSlaveInfos)
unsigned int getNumberOfSlaves () const
 return the quantity of ethercat slave which have an input/output buffer
unsigned int getNumberOfThreadCyclesPerSecond ()
bool isErrorInSoemDriver ()
bool isEtherCATConnectionEstablished ()
bool isThreadActive ()
bool receiveProcessData ()
void registerDataTrace (void *object, const unsigned int JointNumber)
void registerJointLimitMonitor (JointLimitMonitor *object, const unsigned int JointNumber)
void registerJointTrajectoryController (JointTrajectoryController *object, const unsigned int JointNumber)
bool sendProcessData ()

Private Member Functions

bool closeEthercat ()
 closes the ethercat connection
 EthercatMasterWithThread (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)
void updateSensorActorValues ()
 ~EthercatMasterWithThread ()

Private Attributes

std::vector< YouBotSlaveMsgautomaticReceiveOffBufferVector
bool automaticReceiveOn
std::vector< YouBotSlaveMsgautomaticSendOffBufferVector
bool automaticSendOn
long int communicationErrors
ConfigFileconfigfile
std::vector< void * > dataTraces
boost::mutex dataTracesMutex
bool ethercatConnectionEstablished
std::vector< SlaveMessageInput * > ethercatInputBufferVector
std::vector< SlaveMessageOutput * > ethercatOutputBufferVector
std::vector< ec_slavetethercatSlaveInfo
unsigned int ethercatTimeout
std::string ethernetDevice
char IOmap_ [4096]
std::vector< JointLimitMonitor * > jointLimitMonitors
boost::mutex jointLimitMonitorVectorMutex
ec_mbxbuft mailboxBuffer
ec_mbxbuft mailboxBufferReceive
ec_mbxbuft mailboxBufferSend
std::vector
< YouBotSlaveMailboxMsgThreadSafe
mailboxMessages
unsigned int mailboxTimeout
long int maxCommunicationErrors
std::vector< bool > newInputMailboxMsgFlag
unsigned int nrOfSlaves
std::vector< bool > outstandingMailboxMsgFlag
std::vector< bool > pendingMailboxMsgsReply
std::vector
< YouBotSlaveMsgThreadSafe
slaveMessages
volatile bool stopThread
boost::thread_group threads
unsigned int timeTillNextEthercatUpdate
std::vector
< JointTrajectoryController * > 
trajectoryControllers
boost::mutex trajectoryControllerVectorMutex

Static Private Attributes

static std::string configFileName
static std::string configFilepath

Friends

class EthercatMaster
class YouBotGripper
class YouBotGripperBar
class YouBotJoint

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

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.

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

Parameters:
ethercatSlaveInfosethercat 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

Parameters:
msgBufferethercat mailbox message
jointNumberjoint 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

Parameters:
msgBufferethercat message
jointNumberjoint 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.

Definition at line 256 of file EthercatMasterWithThread.cpp.

establishes the ethercat connection

Definition at line 319 of file EthercatMasterWithThread.cpp.

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.

Implements youbot::EthercatMasterInterface.

Definition at line 264 of file EthercatMasterWithThread.cpp.

Implements youbot::EthercatMasterInterface.

Definition at line 117 of file EthercatMasterWithThread.cpp.

Definition at line 775 of file EthercatMasterWithThread.cpp.

receives mailbox messages and stores them in the buffer

Parameters:
mailboxMsgethercat mailbox message

Definition at line 602 of file EthercatMasterWithThread.cpp.

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.

Definition at line 225 of file EthercatMasterWithThread.cpp.

sends the mailbox Messages which have been stored in the buffer

Parameters:
mailboxMsgethercat mailbox message

Definition at line 577 of file EthercatMasterWithThread.cpp.

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

Parameters:
msgBufferethercat mailbox message
jointNumberjoint 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

Parameters:
msgBufferethercat message
jointNumberjoint number of the sender joint

Implements youbot::EthercatMasterInterface.

Definition at line 505 of file EthercatMasterWithThread.cpp.

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.


Friends And Related Function Documentation

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.


Member Data Documentation

Definition at line 211 of file EthercatMasterWithThread.hpp.

Definition at line 231 of file EthercatMasterWithThread.hpp.

Definition at line 209 of file EthercatMasterWithThread.hpp.

Definition at line 229 of file EthercatMasterWithThread.hpp.

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.

Definition at line 249 of file EthercatMasterWithThread.hpp.

Definition at line 233 of file EthercatMasterWithThread.hpp.

Definition at line 190 of file EthercatMasterWithThread.hpp.

Definition at line 188 of file EthercatMasterWithThread.hpp.

Definition at line 194 of file EthercatMasterWithThread.hpp.

Definition at line 196 of file EthercatMasterWithThread.hpp.

Definition at line 180 of file EthercatMasterWithThread.hpp.

Definition at line 182 of file EthercatMasterWithThread.hpp.

Definition at line 243 of file EthercatMasterWithThread.hpp.

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.

Definition at line 213 of file EthercatMasterWithThread.hpp.

Definition at line 215 of file EthercatMasterWithThread.hpp.

Definition at line 237 of file EthercatMasterWithThread.hpp.

Definition at line 217 of file EthercatMasterWithThread.hpp.

Definition at line 186 of file EthercatMasterWithThread.hpp.

Definition at line 219 of file EthercatMasterWithThread.hpp.

Definition at line 221 of file EthercatMasterWithThread.hpp.

Definition at line 192 of file EthercatMasterWithThread.hpp.

Definition at line 203 of file EthercatMasterWithThread.hpp.

boost::thread_group youbot::EthercatMasterWithThread::threads [private]

Definition at line 201 of file EthercatMasterWithThread.hpp.

Definition at line 199 of file EthercatMasterWithThread.hpp.

Definition at line 239 of file EthercatMasterWithThread.hpp.

Definition at line 241 of file EthercatMasterWithThread.hpp.


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


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Oct 6 2014 09:08:03