IgH EtherCAT Master
1.5.3
pdo.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* $Id$
4
*
5
* Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
6
*
7
* This file is part of the IgH EtherCAT Master.
8
*
9
* The IgH EtherCAT Master is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License version 2, as
11
* published by the Free Software Foundation.
12
*
13
* The IgH EtherCAT Master is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16
* Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License along
19
* with the IgH EtherCAT Master; if not, write to the Free Software
20
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
*
22
* ---
23
*
24
* The license mentioned above concerns the source code only. Using the
25
* EtherCAT technology and brand is only permitted in compliance with the
26
* industrial property and similar rights of Beckhoff Automation GmbH.
27
*
28
*****************************************************************************/
29
35
/*****************************************************************************/
36
37
#ifndef __EC_PDO_H__
38
#define __EC_PDO_H__
39
40
#include <linux/list.h>
41
42
#include "
globals.h
"
43
#include "
pdo_entry.h
"
44
45
/*****************************************************************************/
46
49
typedef
struct
{
50
struct
list_head list;
51
uint16_t
index
;
52
int8_t
sync_index
;
53
char
*
name
;
54
struct
list_head entries;
55
}
ec_pdo_t
;
56
57
/*****************************************************************************/
58
59
void
ec_pdo_init
(
ec_pdo_t
*);
60
int
ec_pdo_init_copy
(
ec_pdo_t
*,
const
ec_pdo_t
*);
61
void
ec_pdo_clear
(
ec_pdo_t
*);
62
void
ec_pdo_clear_entries
(
ec_pdo_t
*);
63
int
ec_pdo_set_name
(
ec_pdo_t
*,
const
char
*);
64
ec_pdo_entry_t
*
ec_pdo_add_entry
(
ec_pdo_t
*, uint16_t, uint8_t, uint8_t);
65
int
ec_pdo_copy_entries
(
ec_pdo_t
*,
const
ec_pdo_t
*);
66
int
ec_pdo_equal_entries
(
const
ec_pdo_t
*,
const
ec_pdo_t
*);
67
unsigned
int
ec_pdo_entry_count
(
const
ec_pdo_t
*);
68
const
ec_pdo_entry_t
*
ec_pdo_find_entry_by_pos_const
(
69
const
ec_pdo_t
*,
unsigned
int
);
70
71
void
ec_pdo_print_entries
(
const
ec_pdo_t
*);
72
73
/*****************************************************************************/
74
75
#endif
ec_pdo_init
void ec_pdo_init(ec_pdo_t *)
PDO constructor.
Definition:
pdo.c:46
ec_pdo_set_name
int ec_pdo_set_name(ec_pdo_t *, const char *)
Set PDO name.
Definition:
pdo.c:125
ec_pdo_copy_entries
int ec_pdo_copy_entries(ec_pdo_t *, const ec_pdo_t *)
Copy PDO entries from another PDO.
Definition:
pdo.c:186
globals.h
Global definitions and macros.
ec_pdo_entry_t
PDO entry description.
Definition:
pdo_entry.h:48
ec_pdo_t::index
uint16_t index
PDO index.
Definition:
pdo.h:51
ec_pdo_t::sync_index
int8_t sync_index
Assigned sync manager.
Definition:
pdo.h:52
ec_pdo_clear_entries
void ec_pdo_clear_entries(ec_pdo_t *)
Clear PDO entry list.
Definition:
pdo.c:106
ec_pdo_t
PDO description.
Definition:
pdo.h:49
ec_pdo_clear
void ec_pdo_clear(ec_pdo_t *)
PDO destructor.
Definition:
pdo.c:94
ec_pdo_entry_count
unsigned int ec_pdo_entry_count(const ec_pdo_t *)
Get the number of PDO entries.
Definition:
pdo.c:257
pdo_entry.h
EtherCAT Process data object structure.
ec_pdo_equal_entries
int ec_pdo_equal_entries(const ec_pdo_t *, const ec_pdo_t *)
Compares the entries of two PDOs.
Definition:
pdo.c:222
ec_pdo_print_entries
void ec_pdo_print_entries(const ec_pdo_t *)
Outputs the PDOs in the list.
Definition:
pdo.c:299
ec_pdo_t::name
char * name
PDO name.
Definition:
pdo.h:53
ec_pdo_init_copy
int ec_pdo_init_copy(ec_pdo_t *, const ec_pdo_t *)
PDO copy constructor.
Definition:
pdo.c:62
ec_pdo_add_entry
ec_pdo_entry_t * ec_pdo_add_entry(ec_pdo_t *, uint16_t, uint8_t, uint8_t)
Add a new PDO entry to the configuration.
Definition:
pdo.c:157
ec_pdo_find_entry_by_pos_const
const ec_pdo_entry_t * ec_pdo_find_entry_by_pos_const(const ec_pdo_t *, unsigned int)
Finds a PDO entry via its position in the list.
Definition:
pdo.c:279
Documentation automatically createt on Fri Jun 7 2024 11:28:45 by
. - IgH EtherCAT Master developed by
Ingenieurgemeinschaft IgH GmbH
. All rights reserved.