1 #ifndef YOUBOT_ETHERCATMASTERWITHTHREAD_H 2 #define YOUBOT_ETHERCATMASTERWITHTHREAD_H 60 #include <boost/thread.hpp> 61 #include <boost/date_time/posix_time/posix_time.hpp> boost::mutex jointLimitMonitorVectorMutex
void AutomaticReceiveOn(const bool enableAutomaticReceive)
unsigned int ethercatTimeout
void setMailboxMsgBuffer(const YouBotSlaveMailboxMsg &msgBuffer, const unsigned int jointNumber)
ec_mbxbuft mailboxBufferReceive
void setMsgBuffer(const YouBotSlaveMsg &msgBuffer, const unsigned int jointNumber)
The Ethercat Master factory.
void updateSensorActorValues()
bool isEtherCATConnectionEstablished()
std::vector< SlaveMessageInput * > ethercatInputBufferVector
boost::mutex trajectoryControllerVectorMutex
bool getMailboxMsgBuffer(YouBotSlaveMailboxMsg &mailboxMsg, const unsigned int jointNumber)
std::vector< YouBotSlaveMailboxMsgThreadSafe > mailboxMessages
Reads and writes a configuration file.
std::vector< bool > outstandingMailboxMsgFlag
void deleteJointTrajectoryControllerRegistration(const unsigned int JointNumber)
unsigned int getNumberOfThreadCyclesPerSecond()
unsigned int timeTillNextEthercatUpdate
static std::string configFilepath
The youBot gripper with one degree of freedom.
void registerJointTrajectoryController(JointTrajectoryController *object, const unsigned int JointNumber)
std::vector< YouBotSlaveMsgThreadSafe > slaveMessages
General typedefs and defines for EtherCAT.
std::vector< JointLimitMonitor * > jointLimitMonitors
std::vector< void * > dataTraces
std::vector< SlaveMessageOutput * > ethercatOutputBufferVector
void getMsgBuffer(const unsigned int jointNumber, YouBotSlaveMsg &returnMsg)
void deleteDataTraceRegistration(const unsigned int JointNumber)
void initializeEthercat()
establishes the ethercat connection
bool receiveMailboxMessage(YouBotSlaveMailboxMsg &mailboxMsg)
bool receiveProcessData()
EthercatMasterWithThread(const std::string &configFile, const std::string &configFilePath)
bool sendMailboxMessage(const YouBotSlaveMailboxMsg &mailboxMsg)
It monitors the joint position and will decelerate and stop the joint if it is close the limits...
boost::mutex dataTracesMutex
unsigned int mailboxTimeout
void registerDataTrace(void *object, const unsigned int JointNumber)
std::string ethernetDevice
EtherCAT mailbox message of the youBot slaves.
ec_mbxbuft mailboxBufferSend
long int communicationErrors
void AutomaticSendOn(const bool enableAutomaticSend)
The Ethercat Master interface.
One bar of the youBot gripper.
long int maxCommunicationErrors
std::vector< JointTrajectoryController * > trajectoryControllers
std::vector< YouBotSlaveMsg > automaticReceiveOffBufferVector
void getEthercatDiagnosticInformation(std::vector< ec_slavet > ðercatSlaveInfos)
Headerfile for ethercatmain.c.
std::vector< ec_slavet > ethercatSlaveInfo
void registerJointLimitMonitor(JointLimitMonitor *object, const unsigned int JointNumber)
static std::string configFileName
Joint Trajectory Controller.
bool isErrorInSoemDriver()
void parseYouBotErrorFlags(const YouBotSlaveMsg &messageBuffer)
std::vector< bool > newInputMailboxMsgFlag
EtherCat message of the youBot EtherCat slaves.
std::vector< bool > pendingMailboxMsgsReply
~EthercatMasterWithThread()
bool ethercatConnectionEstablished
boost::thread_group threads
bool closeEthercat()
closes the ethercat connection
std::vector< YouBotSlaveMsg > automaticSendOffBufferVector
unsigned int getNumberOfSlaves() const
return the quantity of ethercat slave which have an input/output buffer
uint8 ec_mbxbuft[EC_MAXMBX+1]