master/domain.h
changeset 792 3778920f61e4
parent 495 88c597598bbc
child 809 ec4ef8911824
equal deleted inserted replaced
791:3b81d074735c 792:3778920f61e4
    56    group of slaves.
    56    group of slaves.
    57 */
    57 */
    58 
    58 
    59 struct ec_domain
    59 struct ec_domain
    60 {
    60 {
    61     struct kobject kobj; /**< kobject */
    61     struct kobject kobj; /**< kobject. */
    62     struct list_head list; /**< list item */
    62     struct list_head list; /**< List item. */
    63     unsigned int index; /**< domain index (just a number) */
    63     unsigned int index; /**< Index (just a number). */
    64     ec_master_t *master; /**< EtherCAT master owning the domain */
    64     ec_master_t *master; /**< EtherCAT master owning the domain. */
    65     size_t data_size; /**< size of the process data */
    65     size_t data_size; /**< Size of the process data. */
    66     struct list_head datagrams; /**< process data datagrams */
    66     struct list_head datagrams; /**< Datagrams for process data exchange. */
    67     uint32_t base_address; /**< logical offset address of the process data */
    67     uint32_t base_address; /**< Logical offset address of the process data. */
    68     unsigned int response_count; /**< number of responding slaves */
    68     unsigned int working_counter; /**< Last working counter value. */
    69     unsigned int state; /**< domain error state */
    69     unsigned int state; /**< Error state. */
    70     struct list_head data_regs; /**< PDO data registrations */
    70     unsigned int working_counter_changes; /**< Working counter changes
    71     unsigned int working_counter_changes; /**< working counter changes
    71                                              since last notification. */
    72                                              since last notification */
    72     unsigned long notify_jiffies; /**< Time of last notification. */
    73     unsigned long notify_jiffies; /**< time of last notification */
       
    74 };
    73 };
    75 
    74 
    76 /*****************************************************************************/
    75 /*****************************************************************************/
    77 
    76 
    78 int ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int);
    77 int ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int);
    79 void ec_domain_destroy(ec_domain_t *);
    78 void ec_domain_destroy(ec_domain_t *);
    80 
    79 
    81 int ec_domain_alloc(ec_domain_t *, uint32_t);
    80 int ec_domain_finish(ec_domain_t *, uint32_t);
    82 
    81 
    83 /*****************************************************************************/
    82 /*****************************************************************************/
    84 
    83 
    85 #endif
    84 #endif