43 |
43 |
44 #include <linux/list.h> |
44 #include <linux/list.h> |
45 #include <linux/kobject.h> |
45 #include <linux/kobject.h> |
46 |
46 |
47 #include "globals.h" |
47 #include "globals.h" |
48 #include "slave.h" |
|
49 #include "datagram.h" |
48 #include "datagram.h" |
50 |
49 #include "master.h" |
51 /*****************************************************************************/ |
|
52 |
|
53 /** |
|
54 Data field registration type. |
|
55 */ |
|
56 |
|
57 typedef struct |
|
58 { |
|
59 struct list_head list; /**< list item */ |
|
60 ec_slave_t *slave; /**< slave */ |
|
61 const ec_sync_t *sync; /**< sync manager */ |
|
62 uint32_t field_offset; /**< data field offset */ |
|
63 void **data_ptr; /**< pointer to process data pointer(s) */ |
|
64 } |
|
65 ec_field_reg_t; |
|
66 |
50 |
67 /*****************************************************************************/ |
51 /*****************************************************************************/ |
68 |
52 |
69 /** |
53 /** |
70 EtherCAT domain. |
54 EtherCAT domain. |
80 ec_master_t *master; /**< EtherCAT master owning the domain */ |
64 ec_master_t *master; /**< EtherCAT master owning the domain */ |
81 size_t data_size; /**< size of the process data */ |
65 size_t data_size; /**< size of the process data */ |
82 struct list_head datagrams; /**< process data datagrams */ |
66 struct list_head datagrams; /**< process data datagrams */ |
83 uint32_t base_address; /**< logical offset address of the process data */ |
67 uint32_t base_address; /**< logical offset address of the process data */ |
84 unsigned int response_count; /**< number of responding slaves */ |
68 unsigned int response_count; /**< number of responding slaves */ |
85 struct list_head field_regs; /**< data field registrations */ |
69 struct list_head data_regs; /**< PDO data registrations */ |
86 }; |
70 }; |
87 |
71 |
88 /*****************************************************************************/ |
72 /*****************************************************************************/ |
89 |
73 |
90 int ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int); |
74 int ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int); |
91 void ec_domain_clear(struct kobject *); |
75 void ec_domain_clear(struct kobject *); |
92 int ec_domain_alloc(ec_domain_t *, uint32_t); |
76 int ec_domain_alloc(ec_domain_t *, uint32_t); |
|
77 void ec_domain_queue(ec_domain_t *); |
93 |
78 |
94 /*****************************************************************************/ |
79 /*****************************************************************************/ |
95 |
80 |
96 #endif |
81 #endif |