29 namespace canopen_schunk {
32 :
PDO (node_id, pdo_nr, can_device),
33 m_data_update_received(false)
44 ss <<
"PDO Update called with wrong canopen ID. Received ID: " << node_id <<
" Node ID: " <<
m_node_id <<
". Update ignored.";
69 byte_offset += it->data.size();
87 const bool dummy_mapping,
88 const uint8_t cyclic_timeout_cycles)
98 pdo_communication_parameter,
99 pdo_mapping_parameter,
101 cyclic_timeout_cycles);
107 const bool dummy_mapping,
108 const uint8_t cyclic_timeout_cycles)
118 pdo_communication_parameter,
119 pdo_mapping_parameter,
121 cyclic_timeout_cycles);
void update(const CanMsg &msg)
update updates the TPDO data with newly received messages
MappingList m_mapping_list
List of all mappings inside this PDO.
static const uint16_t OD_TPDO_COMMUNICATION_MIN
std::vector< MappingConfiguration > MappingConfigurationList
The MappingConfigurationList holds multiple Mapping configurations. The Mapping of a single PDO is de...
PDOStringMatchVec remap(SDO &sdo, const MappingConfigurationList &mappings, const eTransmissionType &transmission_type, const bool dummy_mapping=false, const uint8_t cyclic_timeout_cycles=0)
Configure a PDO by sending some SDO packages. This can be either done during NMT state pre-operationa...
void upload()
Upload data from the slave to the master (Node to PC)
std::vector< boost::function< void()> > m_notify_callbacks
static const uint16_t OD_TPDO_MAPPING_PARAMETER_MIN
PDO related exceptions go here.
uint8_t m_node_id
CANOPEN ID of the node this PDO belongs to.
PDOStringMatchVec remap(SDO &sdo, const MappingConfigurationList &mappings, const eTransmissionType &transmission_type, const uint16_t pdo_cob_id, const uint16_t pdo_communication_parameter, const uint16_t pdo_mapping_parameter, const bool dummy_mapping=false, const uint8_t cyclic_timeout_cycles=0)
Configure a PDO by sending some SDO packages. This can be either done during NMT state pre-operationa...
void registerNotifyCallback(const boost::function< void()> &f)
Register a notification callback function for incoming PDO messages.
eTransmissionType
Transmission types of a PDO, needed when mapping PDOs.
uint8_t m_pdo_nr
The PDO number inside the logical device. Theoretically this can be in 0 to 511.
TPDO(const uint8_t node_id, const uint8_t pdo_nr, const CanDevPtr &can_device)
Construct a new TPDO.
boost::mutex m_data_buffer_mutex
std::vector< PDOStringMatch > PDOStringMatchVec
PDOStringMatchVec appendMapping(SDO &sdo, const MappingConfigurationList &mappings, const eTransmissionType &transmission_type, const uint16_t pdo_cob_id, const uint16_t pdo_communication_parameter, const uint16_t pdo_mapping_parameter, const bool dummy_mapping=false, const uint8_t cyclic_timeout_cycles=0)
Appends one or more mapping parameters to the existing mapping. Note that the PDO will be disabled wh...
std::vector< uint8_t > m_data_buffer
PDOStringMatchVec appendMapping(SDO &sdo, const MappingConfigurationList &mappings, const eTransmissionType &transmission_type, const bool dummy_mapping=false, const uint8_t cyclic_timeout_cycles=0)
Appends one or more mapping parameters to the existing mapping. Note that the PDO will be disabled wh...
The PDO class provides access to one (of the possible multiple) Process Data Object of a canOpen node...
The SDO class represents Service Data Objects (SDO) that are used for slow access of the canOpen obje...
boost::condition_variable m_data_buffer_updated_cond
void notify_one() BOOST_NOEXCEPT
static const uint16_t ID_TPDO1_MIN