4#include <nlohmann/json_fwd.hpp>
40 return (
static_cast<uint32_t
>(e.
index) << 16) | (
static_cast<uint32_t
>(e.
subindex) << 8) |
50 .
index =
static_cast<uint16_t
>(packed >> 16),
51 .subindex =
static_cast<uint8_t
>((packed >> 8) & 0xFF),
52 .bitLength =
static_cast<uint8_t
>(packed & 0xFF),
91 std::vector<PdoMappingObject>
inputs;
Definition http_server.h:16
void to_json(nlohmann::json &j, const Device &d)
Serialises a Device to JSON.
Definition device.cc:915
PdoMappingEntry unpackMappingEntry(uint32_t packed)
Unpacks a 32-bit CoE mapping word into an entry — the inverse of packMappingEntry.
Definition pdo_mapping.h:48
uint32_t packMappingEntry(const PdoMappingEntry &e)
Packs an entry into its 32-bit CoE mapping word (ETG.1000.6 §5.6.7.4.7): index<<16 | subindex<<8 | bi...
Definition pdo_mapping.h:39
A device's complete PDO mapping across both directions.
Definition pdo_mapping.h:62
uint32_t inputBits
Total mapped input bits.
Definition pdo_mapping.h:66
uint32_t outputBits
Total mapped output bits (sum of entry widths).
Definition pdo_mapping.h:65
std::vector< PdoMappingEntry > inputs
TxPDO entries (slave→master), in window order.
Definition pdo_mapping.h:64
std::vector< PdoMappingEntry > outputs
RxPDO entries (master→slave), in window order.
Definition pdo_mapping.h:63
One object mapped into a slave's process data, with its position in the window.
Definition pdo_mapping.h:26
uint32_t bitOffset
Bit offset from the slave's direction window (read-only; 0 on write).
Definition pdo_mapping.h:30
uint8_t bitLength
Width of the entry in bits (the packed 7..0 field; max 255).
Definition pdo_mapping.h:29
uint16_t index
CoE object index; 0x0000 marks a padding gap (no object).
Definition pdo_mapping.h:27
uint8_t subindex
CoE object subindex.
Definition pdo_mapping.h:28
One PDO mapping object (0x16xx RxPDO / 0x1Axx TxPDO) and its ordered entries.
Definition pdo_mapping.h:75
std::vector< PdoMappingEntry > entries
Entries in the order they are mapped.
Definition pdo_mapping.h:77
uint16_t pdoIndex
Mapping-object index (0x16xx or 0x1Axx).
Definition pdo_mapping.h:76
A device's desired PDO configuration to write and assign — the write-side input to Device::writePdoMa...
Definition pdo_mapping.h:89
std::vector< PdoMappingObject > outputs
RxPDO objects, assigned to 0x1C12.
Definition pdo_mapping.h:90
std::vector< PdoMappingObject > inputs
TxPDO objects, assigned to 0x1C13.
Definition pdo_mapping.h:91