ethercat_logical_addressed_telegram.h
Go to the documentation of this file.
00001 // $Id: ethercat_logical_addressed_telegram.h,v 1.8 2006/02/20 15:57:33 kgad Exp $
00002 //===========================================================================
00003 //      This file is part of "EtherCAT Master Library".
00004 //      Copyright (C) 2005 FMTC vzw, Diamant Building, A. Reyerslaan 80,
00005 //      B-1030 Brussels, Belgium.
00006 //
00007 //      EtherCAT Master Library is free software; you can redistribute it
00008 //      and/or modify it under the terms of the GNU General Public License
00009 //      as published by the Free Software Foundation; either version 2 or
00010 //      (at your option) any later version.
00011 //
00012 //      EtherCAT Master Code is distributed in the hope that it will be
00013 //      useful, but WITHOUT ANY WARRANTY; without even the implied
00014 //      warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015 //      PURPOSE. See the GNU General Public License for more details.
00016 //
00017 //      You should have received a copy of the GNU General Public License
00018 //      along with the EtherCAT Master Library; if not, write to the Free
00019 //      Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00020 //      02111-1307 USA.
00021 //
00022 //      EtherCAT, the EtherCAT trade name and logo are the intellectual
00023 //      property of, and protected by Beckhoff. You can use "EtherCAT
00024 //      Master Library" for creating and/or selling or otherwise
00025 //      distributing an EtherCAT network master under the terms of the
00026 //      EtherCAT Master License.
00027 //
00028 //      You should have received a copy of the EtherCAT Master License
00029 //      along with the EtherCAT Master Library; if not, write to Beckhoff
00030 //      Automation GmbH, Eiserstrasse 5, D-33415 Verl, Germany.
00031 //===========================================================================
00032 
00033 #ifndef __ethercat_logical_addressed_telegram_h__
00034 #define __ethercat_logical_addressed_telegram_h__
00035 
00036 #include "ros_ethercat_eml/ethercat_telegram.h"
00037 
00039 
00043 class Logical_Addressing_Telegram : public EC_Telegram
00044 {
00045 public:
00047 
00053   Logical_Addressing_Telegram(uint8_t a_idx = 0x00,
00054                               uint32_t a_adr = 0x00000000,
00055                               uint16_t a_wkc = 0x0000,
00056                               uint16_t a_datalen = 0x0000,
00057                               const unsigned char * a_data = NULL);
00058 
00060 
00062   void set_adr(uint32_t a_adr)
00063   {
00064     m_adr = a_adr;
00065   }
00067 
00069   uint32_t get_adr() const
00070   {
00071     return m_adr;
00072   }
00073 
00074 protected:
00075   virtual unsigned char * dump_header_head(unsigned char * a_buffer) const;
00076   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const = 0;
00077 
00078   virtual const unsigned char * build_header_head(const unsigned char * a_buffer);
00079   virtual const unsigned char * build_command_field(const unsigned char * a_buffer) = 0;
00080 
00081 private:
00082   uint32_t m_adr;
00083 };
00084 
00086 
00087 class LRD_Telegram : public Logical_Addressing_Telegram
00088 {
00089 public:
00091 
00097   LRD_Telegram(uint8_t a_idx, uint32_t a_adr,
00098                uint16_t a_wkc,
00099                uint16_t a_datalen,
00100                const unsigned char * a_data);
00101 
00102 protected:
00103   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00104   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00105 };
00106 
00108 
00109 class LWR_Telegram : public Logical_Addressing_Telegram
00110 {
00111 public:
00113 
00119   LWR_Telegram(uint8_t a_idx, uint32_t a_adr,
00120                uint16_t a_wkc,
00121                uint16_t a_datalen,
00122                const unsigned char * a_data);
00123 
00124 protected:
00125   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00126   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00127 };
00128 
00130 
00131 class LRW_Telegram : public Logical_Addressing_Telegram
00132 {
00133 public:
00135 
00141   LRW_Telegram(uint8_t a_idx, uint32_t a_adr,
00142                uint16_t a_wkc,
00143                uint16_t a_datalen,
00144                const unsigned char * a_data);
00145 
00146 protected:
00147   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00148   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00149 };
00150 
00151 #endif // __ethercat_logical_addressed_telegram_h__


ros_ethercat_eml
Author(s): Tom Panis, Klaas Gadeyne, Bob Koninckx, Austin Hendrix, Manos Nikolaidis
autogenerated on Thu Jul 4 2019 20:01:49