IgH EtherCAT Master  1.6.2
domain.h File Reference

EtherCAT domain structure. More...

Go to the source code of this file.

Data Structures

struct  ec_domain
 EtherCAT domain. More...
 

Functions

void ec_domain_init (ec_domain_t *, ec_master_t *, unsigned int)
 Domain constructor.
 
void ec_domain_clear (ec_domain_t *)
 Domain destructor.
 
void ec_domain_add_fmmu_config (ec_domain_t *, ec_fmmu_config_t *)
 Adds an FMMU configuration to the domain.
 
int ec_domain_finish (ec_domain_t *, uint32_t)
 Finishes a domain. More...
 
unsigned int ec_domain_fmmu_count (const ec_domain_t *)
 Get the number of FMMU configurations of the domain.
 
const ec_fmmu_config_tec_domain_find_fmmu (const ec_domain_t *, unsigned int)
 Get a certain FMMU configuration via its position in the list. More...
 

Detailed Description

EtherCAT domain structure.

Definition in file domain.h.

Function Documentation

◆ ec_domain_finish()

int ec_domain_finish ( ec_domain_t domain,
uint32_t  base_address 
)

Finishes a domain.

This allocates the necessary datagrams and writes the correct logical addresses to every configured FMMU.

Todo:
Check for FMMUs that do not fit into any datagram.
Return values
0Success
<0Error code.
Parameters
domainEtherCAT domain.
base_addressLogical base address.

Definition at line 225 of file domain.c.

◆ ec_domain_find_fmmu()

const ec_fmmu_config_t* ec_domain_find_fmmu ( const ec_domain_t domain,
unsigned int  pos 
)

Get a certain FMMU configuration via its position in the list.

Returns
FMMU at position pos, or NULL.
Parameters
domainEtherCAT domain.
posList position.

Definition at line 349 of file domain.c.