00001 /* 00002 * Copyright (c) 2013, Shadow Robot Company, All rights reserved. 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 3.0 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library. 00016 */ 00017 00028 #ifndef SR_RONEX_DRIVERS_STANDARD_ETHERCAT_DEVICE_H 00029 #define SR_RONEX_DRIVERS_STANDARD_ETHERCAT_DEVICE_H 00030 00031 #include <ros_ethercat_hardware/ethercat_hardware.h> 00032 #include "realtime_tools/realtime_publisher.h" 00033 #include "sr_ronex_drivers/cod_decod/cod_decod_manager.hpp" 00034 #include <string> 00035 00036 class StandardEthercatDevice : public EthercatDevice 00037 { 00038 public: 00039 virtual int initialize(hardware_interface::HardwareInterface *hw, bool allow_unprogrammed = true); 00040 00041 protected: 00042 string reason_; 00043 int level_; 00044 int device_offset_; 00045 00046 protected: 00047 int command_base_; 00048 int status_base_; 00049 00050 int n_digital_outputs; 00051 int n_analog_outputs; 00052 int n_digital_inputs; 00053 int n_analog_inputs; 00054 int n_PWM_outputs; 00055 00056 boost::scoped_ptr<sr_cod_decod::CodDecodManager> cod_decod_manager_; 00057 }; 00058 00059 #endif // SR_RONEX_DRIVERS_STANDARD_ETHERCAT_DEVICE_H 00060