Module pdo

Module pdo 

Source
Expand description

Implementation of PDO configuration objects and PDO transmission

§PDO Default Configuration

PDO default configuration can be controlled in the device config, so that PDOs may be mapped to certain object and enabled by default in a device. This is done in the [pdos] section of the config, which is defined by the PdoDefaultConfig struct.

The default PDO COB ID may be specified as an absolute value, or it may be offset by the node ID at runtime.

Example default PDO config:

[pdos]
num_rpdo = 4
num_tpdo = 4

# Enable TPDO1 to send on 0x200 + NODE_ID
[pdos.tpdo.1]
enabled = true
cob_id = 0x200
add_node_id = true
transmission_type = 254
mappings = [
    { index=0x2000, sub=1, size=32 },
]

# Configure RPDO0 to receive on extended ID 0x5000
[pdos.rpdo.0]
enabled = true
extended = true
rtr_disabled = false
cob_id = 0x5000
add_node_id = false
transmission_type = 254
mappings = [
    { index = 0x2000, sub=2, size=32 },
]

Structs§

Pdo
Represents a single PDO state
PdoCommObject
Implements a PDO communications config object for both RPDOs and TPDOs
PdoDefaults
Initialization values for a PDO
PdoMappingObject
Implements a PDO mapping config object for both TPDOs and RPDOs