master/globals.h
branchstable-1.0
changeset 1624 9dc190591c0f
parent 1619 0d4119024f55
equal deleted inserted replaced
1623:05622513f627 1624:9dc190591c0f
    70  *****************************************************************************/
    70  *****************************************************************************/
    71 
    71 
    72 /** size of an EtherCAT frame header */
    72 /** size of an EtherCAT frame header */
    73 #define EC_FRAME_HEADER_SIZE 2
    73 #define EC_FRAME_HEADER_SIZE 2
    74 
    74 
    75 /** size of an EtherCAT command header */
    75 /** size of an EtherCAT datagram header */
    76 #define EC_COMMAND_HEADER_SIZE 10
    76 #define EC_DATAGRAM_HEADER_SIZE 10
    77 
    77 
    78 /** size of an EtherCAT command footer */
    78 /** size of an EtherCAT datagram footer */
    79 #define EC_COMMAND_FOOTER_SIZE 2
    79 #define EC_DATAGRAM_FOOTER_SIZE 2
    80 
    80 
    81 /** size of a sync manager configuration page */
    81 /** size of a sync manager configuration page */
    82 #define EC_SYNC_SIZE 8
    82 #define EC_SYNC_SIZE 8
    83 
    83 
    84 /** size of an FMMU configuration page */
    84 /** size of an FMMU configuration page */
    85 #define EC_FMMU_SIZE 16
    85 #define EC_FMMU_SIZE 16
    86 
    86 
    87 /** resulting maximum data size of a single command in a frame */
    87 /** resulting maximum data size of a single datagram in a frame */
    88 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \
    88 #define EC_MAX_DATA_SIZE (ETH_DATA_LEN - EC_FRAME_HEADER_SIZE \
    89                           - EC_COMMAND_HEADER_SIZE - EC_COMMAND_FOOTER_SIZE)
    89                           - EC_DATAGRAM_HEADER_SIZE - EC_DATAGRAM_FOOTER_SIZE)
    90 
    90 
    91 /*****************************************************************************/
    91 /*****************************************************************************/
    92 
    92 
    93 /**
    93 /**
    94    Convenience macro for printing EtherCAT-specific information to syslog.
    94    Convenience macro for printing EtherCAT-specific information to syslog.
   176 
   176 
   177 /*****************************************************************************/
   177 /*****************************************************************************/
   178 
   178 
   179 /**
   179 /**
   180    Code - Message pair.
   180    Code - Message pair.
   181    Some EtherCAT commands support reading a status code to display a certain
   181    Some EtherCAT datagrams support reading a status code to display a certain
   182    message. This type allows to map a code to a message string.
   182    message. This type allows to map a code to a message string.
   183 */
   183 */
   184 
   184 
   185 typedef struct
   185 typedef struct
   186 {
   186 {