Public Types | Public Member Functions | Static Public Attributes
icl_hardware::canopen_schunk::RPDO Class Reference

This class describes Receive PDOs, meaning PDOs that send data from the host to the device. More...

#include <RPDO.h>

Inheritance diagram for icl_hardware::canopen_schunk::RPDO:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr< RPDOPtr
 Convenience typedef to use PDOs with shared pointers.
typedef std::vector
< boost::shared_ptr< RPDO > > 
PtrList
 Convenience typedef to use PDO lists with shared pointers.

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.
bool download ()
 Downloads RPDO data from the master to the slave (From PC to node)
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.
 RPDO (const uint8_t node_id, const uint8_t pdo_nr, const CanDevPtr &can_device)
 Construct a new RPDO.

Static Public Attributes

static const uint16_t OD_RPDO_COMMUNICATION_MIN = 0x1400
static const uint16_t OD_RPDO_MAPPING_PARAMETER_MIN = 0x1600

Detailed Description

This class describes Receive PDOs, meaning PDOs that send data from the host to the device.

Definition at line 33 of file RPDO.h.


Member Typedef Documentation

typedef boost::shared_ptr<RPDO> icl_hardware::canopen_schunk::RPDO::Ptr

Convenience typedef to use PDOs with shared pointers.

Reimplemented from icl_hardware::canopen_schunk::PDO.

Definition at line 37 of file RPDO.h.

Convenience typedef to use PDO lists with shared pointers.

Reimplemented from icl_hardware::canopen_schunk::PDO.

Definition at line 39 of file RPDO.h.


Constructor & Destructor Documentation

icl_hardware::canopen_schunk::RPDO::RPDO ( const uint8_t  node_id,
const uint8_t  pdo_nr,
const CanDevPtr can_device 
)

Construct a new RPDO.

Parameters:
node_idID of the node this RPDO belongs to
pdo_nrnumbering of this RPDO inside the node
can_devicehandle to the CAN device

Definition at line 33 of file RPDO.cpp.


Member Function Documentation

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.

Note:
Do not call this method by hand, but use the wrapper functions in the DS301Node class. Otherwise the node will not know of the new mapping and won't be able to find a PDO by it's identifier string.
Parameters:
sdoHandle to the SDO object
mappingsList of MappingConfigurations that should be mapped into this PDO
transmission_typeTransmission type of this PDO
dummy_mappingif 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_cyclesIf 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.
Returns:
PDOStringMatchVec Vector of string to vec_index matchings. If an error occurs, the returned vector will be empty.

Definition at line 99 of file RPDO.cpp.

Downloads RPDO data from the master to the slave (From PC to node)

Parameters:
usrdataData vector that should be transferred to the node.
Returns:
bool True if download succeeds, false otherwise

Definition at line 39 of file RPDO.cpp.

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.

Note:
Do not call this method by hand, but use the wrapper functions in the DS301Node class. Otherwise the node will not know of the new mapping and won't be able to find a PDO by it's identifier string.
Parameters:
sdoHandle to the SDO object
mappingsList of MappingConfigurations that should be mapped into this PDO
transmission_typeTransmission type of this PDO
dummy_mappingif 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_cyclesIf 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.
Returns:
PDOStringMatchVec Vector of string to vec_index matchings. If an error occurs, the returned vector will be empty.

Definition at line 77 of file RPDO.cpp.


Member Data Documentation

Definition at line 41 of file RPDO.h.

Definition at line 42 of file RPDO.h.


The documentation for this class was generated from the following files:


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