IgH EtherCAT Master  1.5.2
domain.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_DOMAIN_H__
38#define __EC_DOMAIN_H__
39
40#include <linux/list.h>
41
42#include "globals.h"
43#include "datagram.h"
44#include "master.h"
45#include "fmmu_config.h"
46
47/*****************************************************************************/
48
55{
56 struct list_head list;
58 unsigned int index;
60 struct list_head fmmu_configs;
61 size_t data_size;
62 uint8_t *data;
66 struct list_head datagram_pairs;
68 uint16_t working_counter[EC_MAX_NUM_DEVICES];
73 unsigned int redundancy_active;
74 unsigned long notify_jiffies;
75};
76
77/*****************************************************************************/
78
79void ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int);
81
83int ec_domain_finish(ec_domain_t *, uint32_t);
84
85unsigned int ec_domain_fmmu_count(const ec_domain_t *);
86const ec_fmmu_config_t *ec_domain_find_fmmu(const ec_domain_t *, unsigned int);
87
88/*****************************************************************************/
89
90#endif
EtherCAT datagram structure.
void ec_domain_clear(ec_domain_t *)
Domain destructor.
Definition: domain.c:88
int ec_domain_finish(ec_domain_t *, uint32_t)
Finishes a domain.
Definition: domain.c:226
void ec_domain_add_fmmu_config(ec_domain_t *, ec_fmmu_config_t *)
Adds an FMMU configuration to the domain.
Definition: domain.c:122
const ec_fmmu_config_t * ec_domain_find_fmmu(const ec_domain_t *, unsigned int)
Get a certain FMMU configuration via its position in the list.
Definition: domain.c:350
void ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int)
Domain constructor.
Definition: domain.c:58
unsigned int ec_domain_fmmu_count(const ec_domain_t *)
Get the number of FMMU configurations of the domain.
Definition: domain.c:332
EtherCAT FMMU configuration structure.
Global definitions and macros.
ec_origin_t
Origin type.
Definition: globals.h:294
EtherCAT master structure.
EtherCAT domain.
Definition: domain.h:55
struct list_head list
List item.
Definition: domain.h:56
ec_origin_t data_origin
Origin of the data memory.
Definition: domain.h:63
ec_master_t * master
EtherCAT master owning the domain.
Definition: domain.h:57
unsigned long notify_jiffies
Time of last notification.
Definition: domain.h:74
uint32_t logical_base_address
Logical offset address of the process data.
Definition: domain.h:64
uint16_t working_counter[EC_MAX_NUM_DEVICES]
Last working counter values.
Definition: domain.h:68
size_t data_size
Size of the process data.
Definition: domain.h:61
struct list_head datagram_pairs
Datagrams pairs (main/backup) for process data exchange.
Definition: domain.h:66
uint8_t * data
Memory for the process data.
Definition: domain.h:62
unsigned int working_counter_changes
Working counter changes since last notification.
Definition: domain.h:71
unsigned int index
Index (just a number).
Definition: domain.h:58
unsigned int redundancy_active
Non-zero, if redundancy is in use.
Definition: domain.h:73
struct list_head fmmu_configs
FMMU configurations contained.
Definition: domain.h:60
uint16_t expected_working_counter
Expected working counter.
Definition: domain.h:70
FMMU configuration.
Definition: fmmu_config.h:46
EtherCAT master.
Definition: master.h:194