master/domain.h
changeset 195 674071846ee3
parent 179 fb4c9dd11ca0
child 197 b9a6e2c22745
child 1618 5cff10efb927
equal deleted inserted replaced
194:c21e7c12dd50 195:674071846ee3
     1 /******************************************************************************
     1 /******************************************************************************
     2  *
     2  *
     3  *  d o m a i n . h
     3  *  d o m a i n . h
     4  *
     4  *
     5  *  Struktur für eine Gruppe von EtherCAT-Slaves.
     5  *  EtherCAT domain structure.
     6  *
     6  *
     7  *  $Id$
     7  *  $Id$
     8  *
     8  *
     9  *****************************************************************************/
     9  *****************************************************************************/
    10 
    10 
    19 #include "command.h"
    19 #include "command.h"
    20 
    20 
    21 /*****************************************************************************/
    21 /*****************************************************************************/
    22 
    22 
    23 /**
    23 /**
    24    Datenfeld-Konfiguration.
    24    Data field registration type.
    25 */
    25 */
    26 
    26 
    27 typedef struct
    27 typedef struct
    28 {
    28 {
    29     struct list_head list;
    29     struct list_head list; /**< list item */
    30     ec_slave_t *slave;
    30     ec_slave_t *slave; /**< slave */
    31     const ec_sync_t *sync;
    31     const ec_sync_t *sync; /**< sync manager */
    32     uint32_t field_offset;
    32     uint32_t field_offset; /**< data field offset */
    33     void **data_ptr;
    33     void **data_ptr; /**< pointer to process data pointer(s) */
    34 }
    34 }
    35 ec_field_reg_t;
    35 ec_field_reg_t;
    36 
    36 
    37 /*****************************************************************************/
    37 /*****************************************************************************/
    38 
    38 
    39 /**
    39 /**
    40    EtherCAT-Domäne
    40    EtherCAT domain.
    41 
    41    Handles the process data and the therefore needed commands of a certain
    42    Verwaltet die Prozessdaten und das hierfür nötige Kommando einer bestimmten
    42    group of slaves.
    43    Menge von Slaves.
       
    44 */
    43 */
    45 
    44 
    46 struct ec_domain
    45 struct ec_domain
    47 {
    46 {
    48     struct kobject kobj; /**< Kobject der Domäne */
    47     struct kobject kobj; /**< kobject */
    49     struct list_head list; /**< Listenkopf */
    48     struct list_head list; /**< list item */
    50     unsigned int index; /**< Domänen-Index */
    49     unsigned int index; /**< domain index (just a number) */
    51     ec_master_t *master; /**< EtherCAT-Master, zu der die Domäne gehört. */
    50     ec_master_t *master; /**< EtherCAT master owning the domain */
    52     size_t data_size; /**< Größe der Prozessdaten */
    51     size_t data_size; /**< size of the process data */
    53     struct list_head commands; /**< EtherCAT-Kommandos für die Prozessdaten */
    52     struct list_head commands; /**< process data commands */
    54     uint32_t base_address; /**< Logische Basisaddresse der Domain */
    53     uint32_t base_address; /**< logical offset address of the process data */
    55     unsigned int response_count; /**< Anzahl antwortender Slaves */
    54     unsigned int response_count; /**< number of responding slaves */
    56     struct list_head field_regs; /**< Liste der Datenfeldregistrierungen */
    55     struct list_head field_regs; /**< data field registrations */
    57 };
    56 };
    58 
    57 
    59 /*****************************************************************************/
    58 /*****************************************************************************/
    60 
    59 
    61 int ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int);
    60 int ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int);
    63 int ec_domain_alloc(ec_domain_t *, uint32_t);
    62 int ec_domain_alloc(ec_domain_t *, uint32_t);
    64 
    63 
    65 /*****************************************************************************/
    64 /*****************************************************************************/
    66 
    65 
    67 #endif
    66 #endif
    68 
       
    69 /* Emacs-Konfiguration
       
    70 ;;; Local Variables: ***
       
    71 ;;; c-basic-offset:4 ***
       
    72 ;;; End: ***
       
    73 */