EtherCAT Client Library Code 0.0.1
EtherCAT Client library that uses different communication protocols with EtherCAT Master server.
Loading...
Searching...
No Matches
ec_pdo.h
1#ifndef __EC_PDO__
2#define __EC_PDO__
3
4#include "api/ec_iface.h"
5
6template <class T>
7class EcPdo: public virtual EcIface
8{
9 public:
10 EcPdo(std::string protocol,std::string host_address,uint32_t host_port);
11 EcPdo(std::string robot_name="None");
12 ~EcPdo();
13
14 void esc_factory(SSI slave_descr);
15 bool init_read_pdo();
16 void read_pdo();
17 void write_pdo();
18 void stop_pdo();
19
20 private:
21 template<typename MapPdo>
22 void get_init_rx_pdo(const MapPdo& pdo_map);
23
24 std::map<int, std::shared_ptr<MotorPdo<T>>> _moto_pdo_map;
25 std::map<int, std::shared_ptr<FtPdo<T>>> _ft_pdo_map;
26 std::map<int, std::shared_ptr<PowPdo<T>>> _pow_pdo_map;
27 std::map<int, std::shared_ptr<ImuPdo<T>>> _imu_pdo_map;
28 std::map<int, std::shared_ptr<ValvePdo<T>>> _valve_pdo_map;
29 std::map<int, std::shared_ptr<PumpPdo<T>>> _pump_pdo_map;
30 std::map<int, std::shared_ptr<GripperPdo<T>>> _gripper_pdo_map;
31
32 std::string _protocol;
33 std::string _host_address;
34 uint32_t _host_port;
35
36 std::string _robot_name;
37 std::string _ec_pdo_start;
38 bool _init_read_pdo,_init_rx_pdo;
39 int _id_init_err_read;
40};
41
42#endif