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 
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 
37 typedef enum {
42 
43 /****************************************************************************/
44 
47 typedef struct ec_sii_page
48 {
49  struct list_head list;
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;
60  uint16_t *words;
61  size_t word_count;
63 
64 /****************************************************************************/
65 
66 // slave construction/destruction
69 
70 int ec_sii_page_alloc(ec_sii_page_t *, size_t);
72 
73 /****************************************************************************/
74 
75 #endif
size_t word_count
Size of the SII contents in words.
Definition: sii_page.h:61
ec_sii_page_origin_t origin
Page origin.
Definition: sii_page.h:58
uint16_t alias
Configured station alias.
Definition: sii_page.h:56
int ec_sii_page_copy(ec_sii_page_t *, const ec_sii_page_t *)
Copy contents from other page.
Definition: sii_page.c:100
Completely read via SII.
Definition: sii_page.h:39
Taken from cache.
Definition: sii_page.h:40
Slave information interface memory page.
Definition: sii_page.h:47
uint32_t revision_number
Revision number.
Definition: sii_page.h:54
int ec_sii_page_alloc(ec_sii_page_t *, size_t)
Free page memory.
Definition: sii_page.c:76
uint32_t vendor_id
Vendor ID.
Definition: sii_page.h:52
ec_sii_page_origin_t
Definition: sii_page.h:37
void ec_sii_page_init(ec_sii_page_t *)
SII page constructor.
Definition: sii_page.c:39
uint16_t * words
Complete SII image.
Definition: sii_page.h:60
uint32_t product_code
Vendor-specific product code.
Definition: sii_page.h:53
struct ec_sii_page ec_sii_page_t
Slave information interface memory page.
uint32_t serial_number
Serial number.
Definition: sii_page.h:55
struct list_head list
List item (for cache).
Definition: sii_page.h:49
void ec_sii_page_clear(ec_sii_page_t *)
Slave destructor.
Definition: sii_page.c:62
Information not available.
Definition: sii_page.h:38