IgH EtherCAT Master  1.6.9
domain.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH
4 *
5 * This file is part of the IgH EtherCAT Master.
6 *
7 * The IgH EtherCAT Master is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version 2, as
9 * published by the Free Software Foundation.
10 *
11 * The IgH EtherCAT Master is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
14 * Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with the IgH EtherCAT Master; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 ****************************************************************************/
21
26
27/****************************************************************************/
28
29#ifndef __EC_DOMAIN_H__
30#define __EC_DOMAIN_H__
31
32#include <linux/list.h>
33
34#include "globals.h"
35#include "datagram.h"
36#include "master.h"
37#include "fmmu_config.h"
38
39/****************************************************************************/
40
47{
48 struct list_head list;
50 unsigned int index;
51
52 struct list_head fmmu_configs;
53 size_t data_size;
54 uint8_t *data;
58 struct list_head datagram_pairs;
60 uint16_t working_counter[EC_MAX_NUM_DEVICES];
65 unsigned int redundancy_active;
66 unsigned long notify_jiffies;
67};
68
69/****************************************************************************/
70
71void ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int);
73
75int ec_domain_finish(ec_domain_t *, uint32_t);
76
77unsigned int ec_domain_fmmu_count(const ec_domain_t *);
78const ec_fmmu_config_t *ec_domain_find_fmmu(const ec_domain_t *, unsigned int);
79
80/****************************************************************************/
81
82#endif
EtherCAT datagram structure.
void ec_domain_clear(ec_domain_t *)
Domain destructor.
Definition domain.c:87
int ec_domain_finish(ec_domain_t *, uint32_t)
Finishes a domain.
Definition domain.c:225
void ec_domain_add_fmmu_config(ec_domain_t *, ec_fmmu_config_t *)
Adds an FMMU configuration to the domain.
Definition domain.c:121
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:349
void ec_domain_init(ec_domain_t *, ec_master_t *, unsigned int)
Domain constructor.
Definition domain.c:57
unsigned int ec_domain_fmmu_count(const ec_domain_t *)
Get the number of FMMU configurations of the domain.
Definition domain.c:331
EtherCAT FMMU configuration structure.
Global definitions and macros.
ec_origin_t
Origin type.
Definition globals.h:303
struct ec_master ec_master_t
Definition ecrt.h:300
struct ec_domain ec_domain_t
Definition ecrt.h:306
EtherCAT master structure.
EtherCAT domain.
Definition domain.h:47
struct list_head list
List item.
Definition domain.h:48
ec_origin_t data_origin
Origin of the data memory.
Definition domain.h:55
ec_master_t * master
EtherCAT master owning the domain.
Definition domain.h:49
unsigned long notify_jiffies
Time of last notification.
Definition domain.h:66
uint32_t logical_base_address
Logical offset address of the process data.
Definition domain.h:56
uint16_t working_counter[EC_MAX_NUM_DEVICES]
Last working counter values.
Definition domain.h:60
size_t data_size
Size of the process data.
Definition domain.h:53
struct list_head datagram_pairs
Datagrams pairs (main/backup) for process data exchange.
Definition domain.h:58
uint8_t * data
Memory for the process data.
Definition domain.h:54
unsigned int working_counter_changes
Working counter changes since last notification.
Definition domain.h:63
unsigned int index
Index (just a number).
Definition domain.h:50
unsigned int redundancy_active
Non-zero, if redundancy is in use.
Definition domain.h:65
struct list_head fmmu_configs
FMMU configurations contained.
Definition domain.h:52
uint16_t expected_working_counter
Expected working counter.
Definition domain.h:62
FMMU configuration.
Definition fmmu_config.h:38