28 #include <boost/shared_ptr.hpp> 34 namespace canopen_schunk {
67 index(index_), subindex(subindex_), length(length_), name(name_) {}
93 data.resize( mapping_configuration.length / 8, 0);
135 typedef std::vector<boost::shared_ptr<PDO> >
PtrList;
173 const MappingConfigurationList& mappings,
176 const uint16_t pdo_communication_parameter,
177 const uint16_t pdo_mapping_parameter,
178 const bool dummy_mapping =
false,
179 const uint8_t cyclic_timeout_cycles = 0);
207 const MappingConfigurationList& mappings,
210 const uint16_t pdo_communication_parameter,
211 const uint16_t pdo_mapping_parameter,
212 const bool dummy_mapping =
false,
213 const uint8_t cyclic_timeout_cycles = 0);
std::vector< Mapping > MappingList
MappingList m_mapping_list
List of all mappings inside this PDO.
std::vector< MappingConfiguration > MappingConfigurationList
The MappingConfigurationList holds multiple Mapping configurations. The Mapping of a single PDO is de...
std::vector< boost::shared_ptr< PDO > > PtrList
Convenience typedef to use PDO lists with shared pointers.
CanDevPtr m_can_device
Can Device handle.
std::vector< uint8_t > data
Actual data of the PDO is stored in this data vector.
Mapping(const MappingConfiguration &mapping_configuration_)
Mapping Creates a new mapping that stores the mapping information and the mapped data.
uint8_t m_node_id
CANOPEN ID of the node this PDO belongs to.
uint8_t pdo_mapping_index
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...
MappingConfiguration mapping_configuration
PDO(const uint8_t node_id, const uint8_t pdo_nr, const CanDevPtr &can_device)
Construct a new PDO.
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.
Unique index to find a mapped Object dictionary item in a PDO.
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...
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...
Holds the mapping parameter plus the actual data.
MappingConfiguration getConfiguration() const
getConfiguration Returns the current mapping configuration of the PDO
Mapping of a PDO. This is basically a description that says where to look in the object dictionary an...
boost::shared_ptr< PDO > Ptr
Convenience typedef to use PDOs with shared pointers.
MappingConfiguration(const uint16_t index_, const uint8_t subindex_, const uint8_t length_, const std::string &name_)
MappingConfiguration Create a new mapping configuration entry.