ethercat_device_addressed_telegram.h
Go to the documentation of this file.
00001 // $Id: ethercat_device_addressed_telegram.h,v 1.11 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_device_addressed_telegram_h__
00034 #define __ethercat_device_addressed_telegram_h__
00035 
00036 #include "ros_ethercat_eml/ethercat_telegram.h"
00037 
00039 
00046 class Device_Addressing_Telegram : public EC_Telegram
00047 {
00048 public:
00050 
00057   Device_Addressing_Telegram(uint8_t a_idx = 0x00,
00058                              uint16_t a_adp = 0x0000,
00059                              uint16_t a_ado = 0x0000,
00060                              uint16_t a_wkc = 0x0000,
00061                              uint16_t a_datalen = 0x0000,
00062                              const unsigned char * a_data = NULL);
00063   virtual ~Device_Addressing_Telegram()
00064   {
00065   }
00066 
00068   void set_adp(uint16_t a_adp)
00069   {
00070     m_adp = a_adp;
00071   }
00073   void set_ado(uint16_t a_ado)
00074   {
00075     m_ado = a_ado;
00076   }
00078   uint16_t get_adp() const
00079   {
00080     return m_adp;
00081   }
00083   uint16_t get_ado() const
00084   {
00085     return m_ado;
00086   }
00087 
00088 protected:
00089   virtual unsigned char * dump_header_head(unsigned char * a_buffer) const;
00090   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const = 0;
00091 
00092   virtual const unsigned char * build_header_head(const unsigned char * a_buffer);
00093   virtual const unsigned char * build_command_field(const unsigned char * a_buffer) = 0;
00094 
00095 private:
00096   uint16_t m_adp;
00097   uint16_t m_ado;
00098 };
00099 
00101 
00102 class APRD_Telegram : public Device_Addressing_Telegram
00103 {
00104 public:
00106 
00115   APRD_Telegram(uint8_t a_idx, uint16_t a_adp,
00116                 uint16_t a_ado,
00117                 uint16_t a_wkc,
00118                 uint16_t a_datalen,
00119                 const unsigned char * a_data);
00120 
00122   // APRD_Telegram(const unsigned char * a_telegram);
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 APWR_Telegram : public Device_Addressing_Telegram
00132 {
00133 public:
00135 
00142   APWR_Telegram(uint8_t a_idx, uint16_t a_adp,
00143                 uint16_t a_ado,
00144                 uint16_t a_wkc,
00145                 uint16_t a_datalen,
00146                 const unsigned char * a_data);
00147 
00148 protected:
00149   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00150   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00151 };
00152 
00154 
00155 class APRW_Telegram : public Device_Addressing_Telegram
00156 {
00157 public:
00159 
00166   APRW_Telegram(uint8_t a_idx, uint16_t a_adp,
00167                 uint16_t a_ado,
00168                 uint16_t a_wkc,
00169                 uint16_t a_datalen,
00170                 const unsigned char * a_data);
00171 
00172 protected:
00173   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00174   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00175 };
00176 
00178 
00179 class BWR_Telegram : public Device_Addressing_Telegram
00180 {
00181 public:
00183 
00189   BWR_Telegram(uint8_t a_idx, uint16_t a_ado,
00190                uint16_t a_wkc,
00191                uint16_t a_datalen,
00192                const unsigned char * a_data);
00193 
00194 protected:
00195   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00196   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00197 };
00198 
00200 
00201 class BRD_Telegram : public Device_Addressing_Telegram
00202 {
00203 public:
00205 
00211   BRD_Telegram(uint8_t a_idx, uint16_t a_ado,
00212                uint16_t a_wkc,
00213                uint16_t a_datalen,
00214                const unsigned char * a_data);
00215 
00216 protected:
00217   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00218   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00219 };
00220 
00222 
00226 class NPWR_Telegram : public Device_Addressing_Telegram
00227 {
00228 public:
00230 
00237   NPWR_Telegram(uint8_t a_idx, uint16_t a_adp,
00238                 uint16_t a_ado,
00239                 uint16_t a_wkc,
00240                 uint16_t a_datalen,
00241                 const unsigned char * a_data);
00242 
00243 protected:
00244   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00245   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00246 };
00247 
00249 
00253 class NPRW_Telegram : public Device_Addressing_Telegram
00254 {
00255 public:
00257 
00264   NPRW_Telegram(uint8_t a_idx, uint16_t a_adp,
00265                 uint16_t a_ado,
00266                 uint16_t a_wkc,
00267                 uint16_t a_datalen,
00268                 const unsigned char * a_data);
00269 
00270 protected:
00271   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00272   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00273 };
00274 
00276 
00280 class NPRD_Telegram : public Device_Addressing_Telegram
00281 {
00282 public:
00284 
00291   NPRD_Telegram(uint8_t a_idx, uint16_t a_adp,
00292                 uint16_t a_ado,
00293                 uint16_t a_wkc,
00294                 uint16_t a_datalen,
00295                 const unsigned char * a_data);
00296 
00297 protected:
00298   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00299   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00300 };
00301 
00303 
00304 class ARMW_Telegram : public Device_Addressing_Telegram
00305 {
00306 public:
00308 
00315   ARMW_Telegram(uint8_t a_idx, uint16_t a_adp,
00316                 uint16_t a_ado,
00317                 uint16_t a_wkc,
00318                 uint16_t a_datalen,
00319                 const unsigned char * a_data);
00320 
00321 protected:
00322   virtual unsigned char * dump_command_field(unsigned char * a_buffer) const;
00323   virtual const unsigned char * build_command_field(const unsigned char * a_buffer);
00324 };
00325 
00326 #endif // __ethercat_device_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