Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
youbot::EthercatMasterWithoutThread Class Reference

#include <EthercatMasterWithoutThread.hpp>

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

Public Member Functions

void AutomaticReceiveOn (const bool enableAutomaticReceive)
 
void AutomaticSendOn (const bool enableAutomaticSend)
 
void getEthercatDiagnosticInformation (std::vector< ec_slavet > &ethercatSlaveInfos)
 
unsigned int getNumberOfSlaves () const
 return the quantity of ethercat slave which have an input/output buffer More...
 
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 More...
 
 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 More...
 
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

ConfigFileconfigfile
 
bool ethercatConnectionEstablished
 
std::vector< SlaveMessageInput * > ethercatInputBufferVector
 
std::vector< SlaveMessageOutput * > ethercatOutputBufferVector
 
std::vector< ec_slavetethercatSlaveInfo
 
unsigned int ethercatTimeout
 
std::string ethernetDevice
 
std::vector< YouBotSlaveMailboxMsgfirstMailboxBufferVector
 
char IOmap_ [4096]
 
ec_mbxbuft mailboxBufferReceive
 
ec_mbxbuft mailboxBufferSend
 
unsigned int mailboxTimeout
 
unsigned int nrOfSlaves
 
std::vector< YouBotSlaveMsgprocessDataBuffer
 

Static Private Attributes

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

Friends

class EthercatMaster
 
class YouBotGripper
 
class YouBotGripperBar
 
class YouBotJoint
 

Additional Inherited Members

- Protected Member Functions inherited from youbot::EthercatMasterInterface
 EthercatMasterInterface ()
 
virtual ~EthercatMasterInterface ()
 

Detailed Description

The Ethercat Master is managing the whole ethercat communication It have to be a singleton in the system

Definition at line 84 of file EthercatMasterWithoutThread.hpp.

Constructor & Destructor Documentation

youbot::EthercatMasterWithoutThread::EthercatMasterWithoutThread ( const std::string &  configFile,
const std::string &  configFilePath 
)
private

Definition at line 66 of file EthercatMasterWithoutThread.cpp.

youbot::EthercatMasterWithoutThread::~EthercatMasterWithoutThread ( )
private

Definition at line 94 of file EthercatMasterWithoutThread.cpp.

Member Function Documentation

void youbot::EthercatMasterWithoutThread::AutomaticReceiveOn ( const bool  enableAutomaticReceive)
virtual

Implements youbot::EthercatMasterInterface.

Definition at line 123 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::AutomaticSendOn ( const bool  enableAutomaticSend)
virtual

Implements youbot::EthercatMasterInterface.

Definition at line 115 of file EthercatMasterWithoutThread.cpp.

bool youbot::EthercatMasterWithoutThread::closeEthercat ( )
private

closes the ethercat connection

Definition at line 344 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::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 132 of file EthercatMasterWithoutThread.cpp.

bool youbot::EthercatMasterWithoutThread::getMailboxMsgBuffer ( YouBotSlaveMailboxMsg mailboxMsg,
const unsigned int  jointNumber 
)
privatevirtual

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 398 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::getMsgBuffer ( const unsigned int  jointNumber,
YouBotSlaveMsg returnMsg 
)
privatevirtual

get a ethercat message form the buffer

Parameters
msgBufferethercat message
jointNumberjoint number of the receiver joint

Implements youbot::EthercatMasterInterface.

Definition at line 375 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 109 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::initializeEthercat ( )
private

establishes the ethercat connection

Definition at line 205 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 184 of file EthercatMasterWithoutThread.cpp.

bool youbot::EthercatMasterWithoutThread::isEtherCATConnectionEstablished ( )
virtual

Implements youbot::EthercatMasterInterface.

Definition at line 192 of file EthercatMasterWithoutThread.cpp.

bool youbot::EthercatMasterWithoutThread::isThreadActive ( )
virtual

Implements youbot::EthercatMasterInterface.

Definition at line 102 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::parseYouBotErrorFlags ( const YouBotSlaveMsg messageBuffer)
private

Definition at line 442 of file EthercatMasterWithoutThread.cpp.

bool youbot::EthercatMasterWithoutThread::receiveMailboxMessage ( YouBotSlaveMailboxMsg mailboxMsg)
private

receives mailbox messages and stores them in the buffer

Parameters
mailboxMsgethercat mailbox message

Definition at line 428 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 164 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::registerJointLimitMonitor ( JointLimitMonitor object,
const unsigned int  JointNumber 
)
virtual

Implements youbot::EthercatMasterInterface.

Definition at line 198 of file EthercatMasterWithoutThread.cpp.

bool youbot::EthercatMasterWithoutThread::sendMailboxMessage ( const YouBotSlaveMailboxMsg mailboxMsg)
private

sends the mailbox Messages which have been stored in the buffer

Parameters
mailboxMsgethercat mailbox message

Definition at line 408 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 144 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::setMailboxMsgBuffer ( const YouBotSlaveMailboxMsg msgBuffer,
const unsigned int  jointNumber 
)
privatevirtual

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 386 of file EthercatMasterWithoutThread.cpp.

void youbot::EthercatMasterWithoutThread::setMsgBuffer ( const YouBotSlaveMsg msgBuffer,
const unsigned int  jointNumber 
)
privatevirtual

stores a ethercat message to the buffer

Parameters
msgBufferethercat message
jointNumberjoint number of the sender joint

Implements youbot::EthercatMasterInterface.

Definition at line 364 of file EthercatMasterWithoutThread.cpp.

Friends And Related Function Documentation

friend class EthercatMaster
friend

Definition at line 85 of file EthercatMasterWithoutThread.hpp.

friend class YouBotGripper
friend

Definition at line 87 of file EthercatMasterWithoutThread.hpp.

friend class YouBotGripperBar
friend

Definition at line 88 of file EthercatMasterWithoutThread.hpp.

friend class YouBotJoint
friend

Definition at line 86 of file EthercatMasterWithoutThread.hpp.

Member Data Documentation

ConfigFile* youbot::EthercatMasterWithoutThread::configfile
private

Definition at line 181 of file EthercatMasterWithoutThread.hpp.

std::string youbot::EthercatMasterWithoutThread::configFileName
staticprivate

Definition at line 189 of file EthercatMasterWithoutThread.hpp.

std::string youbot::EthercatMasterWithoutThread::configFilepath
staticprivate

Definition at line 191 of file EthercatMasterWithoutThread.hpp.

bool youbot::EthercatMasterWithoutThread::ethercatConnectionEstablished
private

Definition at line 193 of file EthercatMasterWithoutThread.hpp.

std::vector<SlaveMessageInput*> youbot::EthercatMasterWithoutThread::ethercatInputBufferVector
private

Definition at line 171 of file EthercatMasterWithoutThread.hpp.

std::vector<SlaveMessageOutput*> youbot::EthercatMasterWithoutThread::ethercatOutputBufferVector
private

Definition at line 169 of file EthercatMasterWithoutThread.hpp.

std::vector<ec_slavet> youbot::EthercatMasterWithoutThread::ethercatSlaveInfo
private

Definition at line 183 of file EthercatMasterWithoutThread.hpp.

unsigned int youbot::EthercatMasterWithoutThread::ethercatTimeout
private

Definition at line 187 of file EthercatMasterWithoutThread.hpp.

std::string youbot::EthercatMasterWithoutThread::ethernetDevice
private

Definition at line 163 of file EthercatMasterWithoutThread.hpp.

std::vector<YouBotSlaveMailboxMsg> youbot::EthercatMasterWithoutThread::firstMailboxBufferVector
private

Definition at line 173 of file EthercatMasterWithoutThread.hpp.

char youbot::EthercatMasterWithoutThread::IOmap_[4096]
private

Definition at line 185 of file EthercatMasterWithoutThread.hpp.

ec_mbxbuft youbot::EthercatMasterWithoutThread::mailboxBufferReceive
private

Definition at line 179 of file EthercatMasterWithoutThread.hpp.

ec_mbxbuft youbot::EthercatMasterWithoutThread::mailboxBufferSend
private

Definition at line 175 of file EthercatMasterWithoutThread.hpp.

unsigned int youbot::EthercatMasterWithoutThread::mailboxTimeout
private

Definition at line 177 of file EthercatMasterWithoutThread.hpp.

unsigned int youbot::EthercatMasterWithoutThread::nrOfSlaves
private

Definition at line 167 of file EthercatMasterWithoutThread.hpp.

std::vector<YouBotSlaveMsg> youbot::EthercatMasterWithoutThread::processDataBuffer
private

Definition at line 165 of file EthercatMasterWithoutThread.hpp.


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


youbot_driver
Author(s): Jan Paulus
autogenerated on Mon Jun 10 2019 15:46:27