This class describes Receive PDOs, meaning PDOs that send data from the host to the device. More...
#include <RPDO.h>
Public Types | |
typedef boost::shared_ptr< RPDO > | Ptr |
Convenience typedef to use PDOs with shared pointers. More... | |
typedef std::vector< boost::shared_ptr< RPDO > > | PtrList |
Convenience typedef to use PDO lists with shared pointers. More... | |
Public Types inherited from icl_hardware::canopen_schunk::PDO | |
enum | eTransmissionType { SYNCHRONOUS_ACYCLIC = 0, RTR_ONLY_SYNCHRONOUS = 252, RTR_ONLY_EVENT_DRIVEN = 253, EVENT_DRIVEN_MANUFACTURER_SPECIFIC = 254, EVENT_DRIVEN_PROFILE_SPECIFIC = 255, SYNCHRONOUS_CYCLIC = 1 } |
Transmission types of a PDO, needed when mapping PDOs. More... | |
typedef std::vector< MappingConfiguration > | MappingConfigurationList |
The MappingConfigurationList holds multiple Mapping configurations. The Mapping of a single PDO is defined by one such configuration list. More... | |
typedef std::vector< Mapping > | MappingList |
typedef std::vector< PDOStringMatch > | PDOStringMatchVec |
typedef boost::shared_ptr< PDO > | Ptr |
Convenience typedef to use PDOs with shared pointers. More... | |
typedef std::vector< boost::shared_ptr< PDO > > | PtrList |
Convenience typedef to use PDO lists with shared pointers. More... | |
Public Member Functions | |
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 while appending another mapping. More... | |
bool | download () |
Downloads RPDO data from the master to the slave (From PC to node) More... | |
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-operational or during the NMT state Operational. If an empty mapping is given, we leave the mapping as is. More... | |
RPDO (const uint8_t node_id, const uint8_t pdo_nr, const CanDevPtr &can_device) | |
Construct a new RPDO. More... | |
Public Member Functions inherited from icl_hardware::canopen_schunk::PDO | |
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 while appending another mapping. More... | |
PDO (const uint8_t node_id, const uint8_t pdo_nr, const CanDevPtr &can_device) | |
Construct a new PDO. More... | |
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-operational or during the NMT state Operational. If an empty mapping is given, we leave the mapping as is. More... | |
Static Public Attributes | |
static const uint16_t | OD_RPDO_COMMUNICATION_MIN = 0x1400 |
static const uint16_t | OD_RPDO_MAPPING_PARAMETER_MIN = 0x1600 |
Additional Inherited Members | |
Public Attributes inherited from icl_hardware::canopen_schunk::PDO | |
MappingList | m_mapping_list |
List of all mappings inside this PDO. More... | |
Protected Attributes inherited from icl_hardware::canopen_schunk::PDO | |
CanDevPtr | m_can_device |
Can Device handle. More... | |
uint8_t | m_node_id |
CANOPEN ID of the node this PDO belongs to. More... | |
uint8_t | m_pdo_nr |
The PDO number inside the logical device. Theoretically this can be in 0 to 511. More... | |
This class describes Receive PDOs, meaning PDOs that send data from the host to the device.
typedef std::vector<boost::shared_ptr<RPDO> > icl_hardware::canopen_schunk::RPDO::PtrList |
PDO::PDOStringMatchVec icl_hardware::canopen_schunk::RPDO::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 while appending another mapping.
sdo | Handle to the SDO object |
mappings | List of MappingConfigurations that should be mapped into this PDO |
transmission_type | Transmission type of this PDO |
dummy_mapping | if set to True, no download to the device will be performed, but the mapping will be done on host side. This is especially useful if a device has preconfigured PDOs which you like to use. |
cyclic_timeout_cycles | If the transmission type SYNCHRONOUS_CYCLIC is used, this parameter defines the PDO's frequency by defining the number of cycles between two send attempts. For example, a parameter value of 4 means, that the PDO is sent every 5th cycle. |
bool icl_hardware::canopen_schunk::RPDO::download | ( | ) |
PDO::PDOStringMatchVec icl_hardware::canopen_schunk::RPDO::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-operational or during the NMT state Operational. If an empty mapping is given, we leave the mapping as is.
sdo | Handle to the SDO object |
mappings | List of MappingConfigurations that should be mapped into this PDO |
transmission_type | Transmission type of this PDO |
dummy_mapping | if set to True, no download to the device will be performed, but the mapping will be done on host side. This is especially useful if a device has preconfigured PDOs which you like to use. |
cyclic_timeout_cycles | If the transmission type SYNCHRONOUS_CYCLIC is used, this parameter defines the PDO's frequency by defining the number of cycles between two send attempts. For example, a parameter value of 4 means, that the PDO is sent every 5th cycle. |
|
static |
|
static |