IgH EtherCAT Master  1.5.2
debug.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_DEBUG_H__
38#define __EC_DEBUG_H__
39
40#include "../devices/ecdev.h"
41
42/*****************************************************************************/
43
46typedef struct
47{
49 struct net_device *dev;
50 struct net_device_stats stats;
51 uint8_t registered;
52 uint8_t opened;
53}
55
56/*****************************************************************************/
57
58int ec_debug_init(ec_debug_t *, ec_device_t *, const char *);
60void ec_debug_register(ec_debug_t *, const struct net_device *);
62void ec_debug_send(ec_debug_t *, const uint8_t *, size_t);
63
64#endif
65
66/*****************************************************************************/
void ec_debug_register(ec_debug_t *, const struct net_device *)
Register debug interface.
Definition: debug.c:132
void ec_debug_send(ec_debug_t *, const uint8_t *, size_t)
Sends frame data to the interface.
Definition: debug.c:176
int ec_debug_init(ec_debug_t *, ec_device_t *, const char *)
Debug interface constructor.
Definition: debug.c:74
void ec_debug_clear(ec_debug_t *)
Debug interface destructor.
Definition: debug.c:120
void ec_debug_unregister(ec_debug_t *)
Unregister debug interface.
Definition: debug.c:161
Debugging network interface.
Definition: debug.h:47
struct net_device * dev
net_device for virtual ethernet device
Definition: debug.h:49
ec_device_t * device
Parent device.
Definition: debug.h:48
uint8_t opened
net_device is opened
Definition: debug.h:52
uint8_t registered
net_device is opened
Definition: debug.h:51
EtherCAT device.
Definition: device.h:82