pdo.h File Reference

EtherCAT Process data object structure. More...

Go to the source code of this file.

Data Structures

struct  ec_pdo_t
 PDO description. More...

Functions

void ec_pdo_init (ec_pdo_t *)
 PDO constructor.
int ec_pdo_init_copy (ec_pdo_t *, const ec_pdo_t *)
 PDO copy constructor.
void ec_pdo_clear (ec_pdo_t *)
 PDO destructor.
void ec_pdo_clear_entries (ec_pdo_t *)
 Clear PDO entry list.
int ec_pdo_set_name (ec_pdo_t *, const char *)
 Set PDO name.
ec_pdo_entry_tec_pdo_add_entry (ec_pdo_t *, uint16_t, uint8_t, uint8_t)
 Add a new PDO entry to the configuration.
int ec_pdo_copy_entries (ec_pdo_t *, const ec_pdo_t *)
 Copy PDO entries from another PDO.
int ec_pdo_equal_entries (const ec_pdo_t *, const ec_pdo_t *)
 Compares the entries of two PDOs.
unsigned int ec_pdo_entry_count (const ec_pdo_t *)
 Get the number of PDO entries.
const ec_pdo_entry_tec_pdo_find_entry_by_pos_const (const ec_pdo_t *, unsigned int)
 Finds a PDO entry via its position in the list.
void ec_pdo_print_entries (const ec_pdo_t *)
 Outputs the PDOs in the list.


Detailed Description

EtherCAT Process data object structure.

Definition in file pdo.h.


Function Documentation

int ec_pdo_init_copy ( ec_pdo_t pdo,
const ec_pdo_t other_pdo 
)

PDO copy constructor.

Return values:
0 Success.
<0 Error code.
Parameters:
pdo  PDO to create.
other_pdo  PDO to copy from.

Definition at line 62 of file pdo.c.

int ec_pdo_set_name ( ec_pdo_t pdo,
const char *  name 
)

Set PDO name.

Return values:
0 Success.
<0 Error code.
Parameters:
pdo  PDO.
name  New name.

Definition at line 125 of file pdo.c.

ec_pdo_entry_t* ec_pdo_add_entry ( ec_pdo_t pdo,
uint16_t  index,
uint8_t  subindex,
uint8_t  bit_length 
)

Add a new PDO entry to the configuration.

Return values:
Pointer to the added entry, otherwise a ERR_PTR() code.
Parameters:
pdo  PDO.
index  New entry's index.
subindex  New entry's subindex.
bit_length  New entry's bit length.

Definition at line 157 of file pdo.c.

int ec_pdo_copy_entries ( ec_pdo_t pdo,
const ec_pdo_t other 
)

Copy PDO entries from another PDO.

Return values:
0 Success.
<0 Error code.
Parameters:
pdo  PDO whos entries shall be replaced.
other  Pdo with entries to copy.

Definition at line 186 of file pdo.c.

int ec_pdo_equal_entries ( const ec_pdo_t pdo1,
const ec_pdo_t pdo2 
)

Compares the entries of two PDOs.

Return values:
1 The entries of the given PDOs are equal.
0 The entries of the given PDOs differ.
Parameters:
pdo1  First PDO.
pdo2  Second PDO.

Definition at line 222 of file pdo.c.

unsigned int ec_pdo_entry_count ( const ec_pdo_t pdo  ) 

Get the number of PDO entries.

Returns:
Number of PDO entries.
Parameters:
pdo  PDO.

Definition at line 257 of file pdo.c.

const ec_pdo_entry_t* ec_pdo_find_entry_by_pos_const ( const ec_pdo_t pdo,
unsigned int  pos 
)

Finds a PDO entry via its position in the list.

Const version.

Returns:
Search result, or NULL.
Parameters:
pdo  PDO.
pos  Position in the list.

Definition at line 279 of file pdo.c.


Generated on Mon Jun 20 09:31:31 2016 for IgH EtherCAT Master by  doxygen 1.5.6