Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
mm::node::ProcessImageEntry Struct Reference

Locates one mapped object within the flat process image. More...

#include <process_image.h>

Collaboration diagram for mm::node::ProcessImageEntry:
[legend]

Public Attributes

uint16_t slavePosition = 0
 1-based bus position of the owning device.
 
uint16_t index = 0
 CoE object index.
 
uint8_t subindex = 0
 CoE object subindex.
 
uint16_t bitLength = 0
 Width of the value in bits.
 
uint32_t bitOffset = 0
 Absolute bit offset within the direction's image.
 
const DeviceParameterparameter = nullptr
 The owning device's parameter, resolved once when the image is built.
 

Detailed Description

Locates one mapped object within the flat process image.

bitOffset is absolute within its direction's image (the output image for an output entry, the input image for an input entry) — i.e. the slave's window offset plus the object's offset inside that window, already combined. Used by the node layer to decode a value out of the input image into its parameter's cell, or to insert one from that cell into the output image.

Member Data Documentation

◆ bitLength

uint16_t mm::node::ProcessImageEntry::bitLength = 0

Width of the value in bits.

◆ bitOffset

uint32_t mm::node::ProcessImageEntry::bitOffset = 0

Absolute bit offset within the direction's image.

◆ index

uint16_t mm::node::ProcessImageEntry::index = 0

CoE object index.

◆ parameter

const DeviceParameter* mm::node::ProcessImageEntry::parameter = nullptr

The owning device's parameter, resolved once when the image is built.

Why it is here rather than looked up per cycle. The RT loop decodes every mapped object into its cell after each exchange; a hash lookup per object is nothing for one device and 60–100 µs against a 1 ms grid for fifty of them. Resolving at publish time makes the decode loop a walk over contiguous entries with no lookups at all.

Valid for as long as the image generation is: initializeParameters replaces the parameter map, and scan / reset destroy the Device — but both pause the RT cycle across the change (ProcessData::pauseCycle), and a re-map rebuilds every entry here. nullptr when the object dictionary was not enumerated at build time, which is legal: the object is still exchanged, it simply has nowhere to decode into.

Const because the cell is written through DeviceParameter::storeBits, which is itself const — the value is a mutable atomic, like a lock. That keeps buildProcessImage taking the devices by const reference.

◆ slavePosition

uint16_t mm::node::ProcessImageEntry::slavePosition = 0

1-based bus position of the owning device.

◆ subindex

uint8_t mm::node::ProcessImageEntry::subindex = 0

CoE object subindex.


The documentation for this struct was generated from the following file: