Skip to content

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. Bit lengths must be multiples of eight in this MVP (byte-aligned mapping), which matches every profile the tests exercise and keeps the packing/unpacking loop trivially correct.

public readonly struct PdoMappingEntry : System.IEquatable<CanKit.Pro.CANopen.Pdo.PdoMappingEntry>

Implements IEquatable<PdoMappingEntry>

Remarks

Bit lengths are the same units the CiA 301 Table 61 "PDO Mapping Parameter" record uses (byte 0 of a 32-bit mapping entry: index << 16 | subindex << 8 | bit-length). The MVP does not yet parse those OD records at run time — mappings are configured through CanOpenNode's typed API instead.

Constructors

PdoMappingEntry(ushort, byte, byte) Constructor

Constructs a new mapping entry.

public PdoMappingEntry(ushort index, byte subindex, byte bitLength);

Parameters

index UInt16

Target OD index.

subindex Byte

Target OD subindex.

bitLength Byte

Field size in bits; must be a positive multiple of eight and no larger than 64.

Properties

PdoMappingEntry.BitLength Property

Contribution size in bits (always a multiple of 8 in this MVP).

public byte BitLength { get; }

Property Value

Byte

PdoMappingEntry.ByteLength Property

Contribution size in bytes.

public int ByteLength { get; }

Property Value

Int32

PdoMappingEntry.Index Property

OD index this entry references.

public ushort Index { get; }

Property Value

UInt16

PdoMappingEntry.Subindex Property

OD subindex this entry references.

public byte Subindex { get; }

Property Value

Byte