PdoMappingEntry Struct¶
A single entry in a PDO mapping: reference to an OD (index, subindex) plus the number
of bits contributed to the assembled PDO payload. Bits are packed LSB first without gaps;
the final byte is zero-padded. A PDO holds at most 64 mapped bits.
Implements IEquatable<PdoMappingEntry>
Remarks¶
Bit lengths are the same units the CiA 301 §7.5.2.38 mapping record uses (a 32-bit mapping
entry is index << 16 | subindex << 8 | bit-length). The node stores every
mapping in its mapping records — 1600h + n − 1 / 1A00h + n − 1 for PDO n, up to
17FFh / 1BFFh — whether it was configured through
ConfigureTpdo/ConfigureRpdo or written over SDO.
An entry whose index is one of the static data types 0001h–0007h (with
sub-index 0) is a <em>dummy mapping</em> (CiA 301 §7.5.2.36): it occupies the bits of its
data type (DummyBitLength(ushort)) in the PDO without touching the object dictionary,
which pads an RPDO to a peer's layout.
Constructors¶
PdoMappingEntry(ushort, byte, byte) Constructor¶
Constructs a new mapping entry.
Parameters¶
index UInt16
Target OD index, or a dummy data-type index 0001h–0007h.
subindex Byte
Target OD subindex (0 for a dummy entry).
bitLength Byte
Field size in bits, 1..64.
Properties¶
PdoMappingEntry.BitLength Property¶
Contribution size in bits.
Property Value¶
PdoMappingEntry.ByteLength Property¶
Number of bytes needed to hold this field separately, rounded up.
Property Value¶
PdoMappingEntry.Index Property¶
OD index this entry references.
Property Value¶
PdoMappingEntry.IsDummy Property¶
Whether this is a dummy mapping (CiA 301 §7.5.2.36): index 0001h–0007h,
sub-index 0. Its bits are padding — zeros in a TPDO, ignored in an RPDO.
Property Value¶
PdoMappingEntry.Subindex Property¶
OD subindex this entry references.
Property Value¶
Methods¶
PdoMappingEntry.DummyBitLength(ushort) Method¶
The bit length CiA 301 assigns to the dummy data type index
(0001h = 1, 0002h/0005h = 8, 0003h/0006h = 16, 0004h/0007h = 32),
or 0 for any other index.
Parameters¶
index UInt16
Returns¶
PdoMappingEntry.Equals(object) Method¶
Indicates whether this instance and a specified object are equal.
Parameters¶
obj Object
The object to compare with the current instance.
Returns¶
Boolean
true if obj and this instance are the same type and represent the same value; otherwise, false.
PdoMappingEntry.GetHashCode() Method¶
Returns the hash code for this instance.
Returns¶
Int32
A 32-bit signed integer that is the hash code for this instance.