equal
deleted
inserted
replaced
7 #ifndef __EC_MASTER_H__ |
7 #ifndef __EC_MASTER_H__ |
8 #define __EC_MASTER_H__ |
8 #define __EC_MASTER_H__ |
9 |
9 |
10 #include <stdexcept> |
10 #include <stdexcept> |
11 using namespace std; |
11 using namespace std; |
|
12 |
|
13 #include "../master/ioctl.h" |
12 |
14 |
13 /****************************************************************************/ |
15 /****************************************************************************/ |
14 |
16 |
15 class MasterException: |
17 class MasterException: |
16 public runtime_error |
18 public runtime_error |
36 ~Master(); |
38 ~Master(); |
37 |
39 |
38 void open(unsigned int); |
40 void open(unsigned int); |
39 void close(); |
41 void close(); |
40 |
42 |
41 unsigned int slaveCount(); |
|
42 void listSlaves(); |
43 void listSlaves(); |
|
44 void listPdos(int); |
43 |
45 |
44 protected: |
46 protected: |
45 string slaveState(uint8_t) const; |
47 unsigned int slaveCount(); |
|
48 void slaveSyncs(uint16_t); |
|
49 void getSlave(ec_ioctl_slave_t *, uint16_t); |
|
50 void getSync(ec_ioctl_sync_t *, uint16_t, uint8_t); |
|
51 void getPdo(ec_ioctl_pdo_t *, uint16_t, uint8_t, uint8_t); |
|
52 void getPdoEntry(ec_ioctl_pdo_entry_t *, uint16_t, uint8_t, uint8_t, |
|
53 uint8_t); |
|
54 |
|
55 static string slaveState(uint8_t); |
46 |
56 |
47 private: |
57 private: |
48 unsigned int index; |
58 unsigned int index; |
49 int fd; |
59 int fd; |
50 }; |
60 }; |