TPDO.h
Go to the documentation of this file.
00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
00002 // -- BEGIN LICENSE BLOCK ----------------------------------------------
00003 // This file is part of the SCHUNK Canopen Driver suite.
00004 //
00005 // This program is free software licensed under the LGPL
00006 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
00007 // You can find a copy of this license in LICENSE folder in the top
00008 // directory of the source code.
00009 //
00010 // © Copyright 2016 SCHUNK GmbH, Lauffen/Neckar Germany
00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
00012 // -- END LICENSE BLOCK ------------------------------------------------
00013 //----------------------------------------------------------------------
00020 //----------------------------------------------------------------------
00021 
00022 #ifndef TPDO_H
00023 #define TPDO_H
00024 
00025 #include "PDO.h"
00026 
00027 namespace icl_hardware {
00028 namespace canopen_schunk {
00029 
00033 class TPDO : public PDO
00034 {
00035 public:
00037   typedef boost::shared_ptr<TPDO> Ptr;
00039   typedef std::vector<boost::shared_ptr<TPDO> > PtrList;
00040 
00041   static const uint16_t OD_TPDO_COMMUNICATION_MIN = 0x1800;
00042   static const uint16_t OD_TPDO_MAPPING_PARAMETER_MIN = 0x1A00;
00043 
00051   TPDO(const uint8_t node_id, const uint8_t pdo_nr, const CanDevPtr& can_device);
00052 
00057   void update(const CanMsg& msg);
00058 
00064   void upload ();
00065 
00087   PDOStringMatchVec remap (SDO& sdo,
00088                            const MappingConfigurationList& mappings,
00089                            const eTransmissionType& transmission_type,
00090                            const bool dummy_mapping = false,
00091                            const uint8_t cyclic_timeout_cycles = 0);
00092 
00113   PDOStringMatchVec appendMapping(SDO& sdo,
00114                                   const MappingConfigurationList& mappings,
00115                                   const eTransmissionType& transmission_type,
00116                                   const bool dummy_mapping = false,
00117                                   const uint8_t cyclic_timeout_cycles = 0);
00118 
00124   void registerNotifyCallback (const boost::function <void()>& f);
00125 
00126 private:
00127   std::vector<boost::function <void()> > m_notify_callbacks;
00128 
00129   boost::mutex m_data_buffer_mutex;
00130   boost::condition_variable m_data_buffer_updated_cond;
00131   bool m_data_update_received;
00132   std::vector<uint8_t> m_data_buffer;
00133 };
00134 
00135 
00136 }} // end of NS
00137 #endif // TPDO_H


schunk_canopen_driver
Author(s): Felix Mauch , Georg Heppner
autogenerated on Sun May 22 2016 03:30:56