IgH EtherCAT Master  1.6.9
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.
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.

Detailed Description

EtherCAT domain structure.

Definition in file domain.h.

Function Documentation

◆ ec_domain_init()

void ec_domain_init ( ec_domain_t * domain,
ec_master_t * master,
unsigned int index )

Domain constructor.

Parameters
domainEtherCAT domain.
masterParent master.
indexIndex.

Definition at line 57 of file domain.c.

◆ ec_domain_clear()

void ec_domain_clear ( ec_domain_t * domain)

Domain destructor.

Parameters
domainEtherCAT domain

Definition at line 87 of file domain.c.

◆ ec_domain_add_fmmu_config()

void ec_domain_add_fmmu_config ( ec_domain_t * domain,
ec_fmmu_config_t * fmmu )

Adds an FMMU configuration to the domain.

Parameters
domainEtherCAT domain.
fmmuFMMU configuration.

Definition at line 121 of file domain.c.

◆ 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_fmmu_count()

unsigned int ec_domain_fmmu_count ( const ec_domain_t * domain)

Get the number of FMMU configurations of the domain.

Definition at line 331 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.