EthercatMasterInterface.hpp
Go to the documentation of this file.
1 #ifndef YOUBOT_ETHERCATMASTERINTERFACE_H
2 #define YOUBOT_ETHERCATMASTERINTERFACE_H
3 
4 /****************************************************************
5  *
6  * Copyright (c) 2011
7  * All rights reserved.
8  *
9  * Hochschule Bonn-Rhein-Sieg
10  * University of Applied Sciences
11  * Computer Science Department
12  *
13  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14  *
15  * Author:
16  * Jan Paulus, Nico Hochgeschwender, Michael Reckhaus, Azamat Shakhimardanov
17  * Supervised by:
18  * Gerhard K. Kraetzschmar
19  *
20  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21  *
22  * This sofware is published under a dual-license: GNU Lesser General Public
23  * License LGPL 2.1 and BSD license. The dual-license implies that users of this
24  * code may choose which terms they prefer.
25  *
26  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
27  *
28  * Redistribution and use in source and binary forms, with or without
29  * modification, are permitted provided that the following conditions are met:
30  *
31  * * Redistributions of source code must retain the above copyright
32  * notice, this list of conditions and the following disclaimer.
33  * * Redistributions in binary form must reproduce the above copyright
34  * notice, this list of conditions and the following disclaimer in the
35  * documentation and/or other materials provided with the distribution.
36  * * Neither the name of the Hochschule Bonn-Rhein-Sieg nor the names of its
37  * contributors may be used to endorse or promote products derived from
38  * this software without specific prior written permission.
39  *
40  * This program is free software: you can redistribute it and/or modify
41  * it under the terms of the GNU Lesser General Public License LGPL as
42  * published by the Free Software Foundation, either version 2.1 of the
43  * License, or (at your option) any later version or the BSD license.
44  *
45  * This program is distributed in the hope that it will be useful,
46  * but WITHOUT ANY WARRANTY; without even the implied warranty of
47  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48  * GNU Lesser General Public License LGPL and the BSD license for more details.
49  *
50  * You should have received a copy of the GNU Lesser General Public
51  * License LGPL and BSD license along with this program.
52  *
53  ****************************************************************/
57 extern "C"{
59 #include <nicdrv.h>
61 }
62 
63 namespace youbot {
64 
69 friend class EthercatMaster;
70 friend class YouBotJoint;
71 friend class YouBotGripper;
72 friend class YouBotGripperBar;
73  protected:
75 
77 
78 
79  public:
80  virtual bool isThreadActive() = 0;
81 
83  virtual unsigned int getNumberOfSlaves() const = 0;
84 
85  virtual void AutomaticSendOn(const bool enableAutomaticSend) = 0;
86 
87  virtual void AutomaticReceiveOn(const bool enableAutomaticReceive) = 0;
88 
91  virtual void getEthercatDiagnosticInformation(std::vector<ec_slavet>& ethercatSlaveInfos) = 0;
92 
95  virtual bool sendProcessData() = 0;
96 
99  virtual bool receiveProcessData() = 0;
100 
103  virtual bool isErrorInSoemDriver() = 0;
104 
105  virtual bool isEtherCATConnectionEstablished() = 0;
106 
107  virtual void registerJointLimitMonitor(JointLimitMonitor* object, const unsigned int JointNumber) = 0;
108 
109 
110  private:
114  virtual void setMsgBuffer(const YouBotSlaveMsg& msgBuffer, const unsigned int jointNumber) = 0;
115 
119  virtual void getMsgBuffer(const unsigned int jointNumber, YouBotSlaveMsg& returnMsg) = 0;
120 
124  virtual void setMailboxMsgBuffer(const YouBotSlaveMailboxMsg& msgBuffer, const unsigned int jointNumber) = 0;
125 
129  virtual bool getMailboxMsgBuffer(YouBotSlaveMailboxMsg& mailboxMsg, const unsigned int jointNumber) = 0;
130 
131 };
132 
133 } // namespace youbot
134 #endif
virtual void setMsgBuffer(const YouBotSlaveMsg &msgBuffer, const unsigned int jointNumber)=0
The Ethercat Master factory.
virtual void setMailboxMsgBuffer(const YouBotSlaveMailboxMsg &msgBuffer, const unsigned int jointNumber)=0
The youBot gripper with one degree of freedom.
General typedefs and defines for EtherCAT.
virtual bool sendProcessData()=0
virtual void AutomaticReceiveOn(const bool enableAutomaticReceive)=0
virtual bool receiveProcessData()=0
It monitors the joint position and will decelerate and stop the joint if it is close the limits...
virtual bool isErrorInSoemDriver()=0
EtherCAT mailbox message of the youBot slaves.
The Ethercat Master interface.
One bar of the youBot gripper.
virtual void getEthercatDiagnosticInformation(std::vector< ec_slavet > &ethercatSlaveInfos)=0
virtual void getMsgBuffer(const unsigned int jointNumber, YouBotSlaveMsg &returnMsg)=0
virtual void AutomaticSendOn(const bool enableAutomaticSend)=0
Headerfile for ethercatmain.c.
virtual void registerJointLimitMonitor(JointLimitMonitor *object, const unsigned int JointNumber)=0
virtual bool isEtherCATConnectionEstablished()=0
virtual unsigned int getNumberOfSlaves() const =0
return the quantity of ethercat slave which have an input/output buffer
EtherCat message of the youBot EtherCat slaves.
virtual bool getMailboxMsgBuffer(YouBotSlaveMailboxMsg &mailboxMsg, const unsigned int jointNumber)=0


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