ethercatcpp
device.h
Go to the documentation of this file.
1 /* File: device.h
2  * This file is part of the program ethercatcpp-core
3  * Program description : EtherCAT driver libraries for UNIX
4  * Copyright (C) 2017-2024 - Robin Passama (LIRMM / CNRS) Arnaud Meline
5  * (LIRMM / CNRS) Benjamin Navarro (LIRMM / CNRS). All Right reserved.
6  *
7  * This software is free software: you can redistribute it and/or modify
8  * it under the terms of the CeCILL-C license as published by
9  * the CEA CNRS INRIA, either version 1
10  * of the License, or (at your option) any later version.
11  * This software 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
14  * CeCILL-C License for more details.
15  *
16  * You should have received a copy of the CeCILL-C License
17  * along with this software. If not, it can be found on the official
18  * website of the CeCILL licenses family (http://www.cecill.info/index.en.html).
19  */
30 #pragma once
31 
32 #include <vector>
33 
38 namespace ethercatcpp {
39 
40 class SlaveInfo;
41 class Master;
42 class BusDevice;
43 
49 class Device {
50 public:
51  Device();
52  virtual ~Device();
53 
54 protected:
55  friend class Master;
56  friend class BusDevice;
57 
64  virtual SlaveInfo* slave_address() = 0;
65 
72  virtual std::vector<Device*> device_vector() = 0;
73 };
74 
75 } // namespace ethercatcpp
ethercatcpp::Master
This class define The EtherCAT Master.
Definition: master.h:50
ethercatcpp::Device::Device
Device()
ethercatcpp::BusDevice
This class define an EtherCAT bus device.
Definition: bus_device.h:49
ethercatcpp::Device
This abstract class define an EtherCAT device.
Definition: device.h:49
ethercatcpp::Device::~Device
virtual ~Device()
ethercatcpp::Device::slave_address
virtual SlaveInfo * slave_address()=0
Get the device corresponding physical slave address.
ethercatcpp::Device::device_vector
virtual std::vector< Device * > device_vector()=0
Get the vector of sub-devices contained by the device.
ethercatcpp