IgH EtherCAT Master  1.7.0
sii_page.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * Copyright (C) 2026 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_SII_PAGE_H__
30#define __EC_SII_PAGE_H__
31
32#include <linux/types.h>
33#include <linux/list.h>
34
35/****************************************************************************/
36
42
43/****************************************************************************/
44
47typedef struct ec_sii_page
48{
49 struct list_head list;
50
51 // Identification for caching
52 uint32_t vendor_id;
53 uint32_t product_code;
54 uint32_t revision_number;
55 uint32_t serial_number;
56 uint16_t alias;
57
59
60 uint16_t *words;
61 size_t word_count;
63
64/****************************************************************************/
65
66// slave construction/destruction
69
70int ec_sii_page_alloc(ec_sii_page_t *, size_t);
72
73/****************************************************************************/
74
75#endif
void ec_sii_page_init(ec_sii_page_t *page)
SII page constructor.
Definition sii_page.c:39
int ec_sii_page_alloc(ec_sii_page_t *page, size_t word_count)
Free page memory.
Definition sii_page.c:76
int ec_sii_page_copy(ec_sii_page_t *page, const ec_sii_page_t *from)
Copy contents from other page.
Definition sii_page.c:100
void ec_sii_page_clear(ec_sii_page_t *page)
Slave destructor.
Definition sii_page.c:62
ec_sii_page_origin_t
Definition sii_page.h:37
@ EC_SII_PAGE_FETCHED
Completely read via SII.
Definition sii_page.h:39
@ EC_SII_PAGE_UNKNOWN
Information not available.
Definition sii_page.h:38
@ EC_SII_PAGE_CACHED
Taken from cache.
Definition sii_page.h:40
struct ec_sii_page ec_sii_page_t
Slave information interface memory page.
Slave information interface memory page.
Definition sii_page.h:48
uint16_t * words
Complete SII image.
Definition sii_page.h:60
uint32_t revision_number
Revision number.
Definition sii_page.h:54
ec_sii_page_origin_t origin
Page origin.
Definition sii_page.h:58
size_t word_count
Size of the SII contents in words.
Definition sii_page.h:61
uint32_t serial_number
Serial number.
Definition sii_page.h:55
struct list_head list
List item (for cache).
Definition sii_page.h:49
uint32_t vendor_id
Vendor ID.
Definition sii_page.h:52
uint16_t alias
Configured station alias.
Definition sii_page.h:56
uint32_t product_code
Vendor-specific product code.
Definition sii_page.h:53