mk2_gio_hardware_interface.hpp
Go to the documentation of this file.
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 
00025 #ifndef _MK2_GIO_HARDWARE_INTERFACE_H_
00026 #define _MK2_GIO_HARDWARE_INTERFACE_H_
00027 
00028 #include <ros_ethercat_model/hardware_interface.hpp>
00029 #include <sr_ronex_external_protocol/Ronex_Protocol_0x02000001_GIO_00.h>
00030 #include <vector>
00031 
00032 namespace ronex
00033 {
00034 class GeneralIOCommand
00035 {
00036 public:
00037   std::vector<bool> digital_;
00038 
00039   struct PWM
00040   {
00041     uint16_t period;
00042     uint16_t on_time_0;
00043     uint16_t on_time_1;
00044   };
00045 
00046   std::vector<PWM> pwm_;
00047   uint16_t pwm_clock_divider_;
00048 };
00049 
00050 class GeneralIOState
00051 {
00052 public:
00053   std::vector<bool> digital_;
00054   std::vector<uint16_t> analogue_;
00055 };
00056 
00067 class GeneralIO
00068   : public ros_ethercat_model::CustomHW
00069 {
00070 public:
00071   GeneralIOState state_;
00072   GeneralIOCommand command_;
00073 };
00074 }  // namespace ronex
00075 /* For the emacs weenies in the crowd.
00076 Local Variables:
00077    c-basic-offset: 2
00078 End:
00079 */
00080 
00081 #endif /* _MK2_GIO_HARDWARE_INTERFACE_H_ */


sr_ronex_hardware_interface
Author(s): Ugo Cupcic, Toni Oliver, Mark Pitchless
autogenerated on Thu Jun 6 2019 21:21:48