Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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 }}
00137 #endif // TPDO_H