master/slave.h
changeset 627 4793ca94f082
parent 626 a5e838c30733
child 628 e94a16bc52ce
equal deleted inserted replaced
626:a5e838c30733 627:4793ca94f082
    46 
    46 
    47 #include "../include/ecrt.h"
    47 #include "../include/ecrt.h"
    48 
    48 
    49 #include "globals.h"
    49 #include "globals.h"
    50 #include "datagram.h"
    50 #include "datagram.h"
       
    51 #include "pdo.h"
    51 
    52 
    52 /*****************************************************************************/
    53 /*****************************************************************************/
    53 
    54 
    54 /**
    55 /**
    55    State of an EtherCAT slave.
    56    State of an EtherCAT slave.
   116     uint16_t est_length; /**< Estimated length. This is no field of the SII,
   117     uint16_t est_length; /**< Estimated length. This is no field of the SII,
   117                             but it is used to calculate the length via
   118                             but it is used to calculate the length via
   118                             PDO ranges */
   119                             PDO ranges */
   119 }
   120 }
   120 ec_sync_t;
   121 ec_sync_t;
   121 
       
   122 /*****************************************************************************/
       
   123 
       
   124 /**
       
   125    PDO type.
       
   126 */
       
   127 
       
   128 typedef enum
       
   129 {
       
   130     EC_RX_PDO, /**< Reveive PDO */
       
   131     EC_TX_PDO /**< Transmit PDO */
       
   132 }
       
   133 ec_pdo_type_t;
       
   134 
       
   135 /*****************************************************************************/
       
   136 
       
   137 /**
       
   138    PDO description.
       
   139 */
       
   140 
       
   141 typedef struct
       
   142 {
       
   143     struct list_head list; /**< list item */
       
   144     ec_pdo_type_t type; /**< PDO type */
       
   145     uint16_t index; /**< PDO index */
       
   146     uint8_t sync_index; /**< assigned sync manager */
       
   147     char *name; /**< PDO name */
       
   148     struct list_head entries; /**< entry list */
       
   149 }
       
   150 ec_pdo_t;
       
   151 
       
   152 /*****************************************************************************/
       
   153 
       
   154 /**
       
   155    PDO entry description.
       
   156 */
       
   157 
       
   158 typedef struct
       
   159 {
       
   160     struct list_head list; /**< list item */
       
   161     uint16_t index; /**< PDO index */
       
   162     uint8_t subindex; /**< entry subindex */
       
   163     char *name; /**< entry name */
       
   164     uint8_t bit_length; /**< entry length in bit */
       
   165 }
       
   166 ec_pdo_entry_t;
       
   167 
   122 
   168 /*****************************************************************************/
   123 /*****************************************************************************/
   169 
   124 
   170 /**
   125 /**
   171    FMMU configuration.
   126    FMMU configuration.