26 std::array<uint8_t, mm::comm::kMaxProcessImageBytes>
bytes{};
51 std::vector<ProcessImageEntry>
inputs;
67 std::optional<Location>
find(uint16_t slavePosition, uint16_t index, uint8_t subindex)
const;
74std::vector<uint8_t>
extractBits(std::span<const uint8_t> src, uint32_t bitOffset,
80void insertBits(std::span<uint8_t> dst, uint32_t bitOffset, uint16_t bitLength,
81 std::span<const uint8_t> value);
95 const std::vector<Device>& devices);
Definition http_server.h:16
void insertBits(std::span< uint8_t > dst, uint32_t bitOffset, uint16_t bitLength, std::span< const uint8_t > value)
Inserts bitLength bits of value (LSB-first) into dst at bitOffset.
Definition process_image.cc:142
std::expected< ProcessImage, std::string > buildProcessImage(const mm::comm::PdoLayout &layout, const std::vector< Device > &devices)
Assembles a ProcessImage from the driver layout and per-device PDO mappings.
Definition process_image.cc:46
std::vector< uint8_t > extractBits(std::span< const uint8_t > src, uint32_t bitOffset, uint16_t bitLength)
Extracts bitLength bits at bitOffset from src into a fresh LSB-aligned little-endian byte vector (cei...
Definition process_image.cc:120
Layout of the process-data images, produced by configureProcessData.
Definition fieldbus_driver.h:155
Fixed-capacity byte buffer for one direction of the process image.
Definition process_image.h:24
std::array< uint8_t, mm::comm::kMaxProcessImageBytes > bytes
Definition process_image.h:26
uint32_t size
Definition process_image.h:25
Locates one mapped object within the flat process image.
Definition process_image.h:35
uint16_t index
CoE object index.
Definition process_image.h:37
uint16_t bitLength
Width of the value in bits.
Definition process_image.h:39
uint8_t subindex
CoE object subindex.
Definition process_image.h:38
uint32_t bitOffset
Absolute bit offset within the direction's image.
Definition process_image.h:40
uint16_t slavePosition
1-based bus position of the owning device.
Definition process_image.h:36
Where a mapped object sits in the image, and which direction it belongs to.
Definition process_image.h:57
uint32_t bitOffset
Absolute bit offset within the direction's image.
Definition process_image.h:58
uint16_t bitLength
Width of the value in bits.
Definition process_image.h:59
size_t entryIndex
Definition process_image.h:61
bool isOutput
True for an RxPDO output, false for a TxPDO input.
Definition process_image.h:60
The whole bus's process-data layout, resolved to absolute positions.
Definition process_image.h:49
uint32_t inputBytes
Size of the input image.
Definition process_image.h:53
std::optional< Location > find(uint16_t slavePosition, uint16_t index, uint8_t subindex) const
Locates a mapped object by bus position and CoE address.
Definition process_image.cc:100
uint32_t outputBytes
Size of the output image.
Definition process_image.h:52
std::vector< ProcessImageEntry > outputs
Master→slave objects, located in the output image.
Definition process_image.h:50
int expectedWkc
Working counter when every slave exchanges.
Definition process_image.h:54
std::vector< ProcessImageEntry > inputs
Slave→master objects, located in the input image.
Definition process_image.h:51