Skip to content

PdoMapping Class

Runtime PDO mapping table. Independent of the CANopen OD (the caller decides how / whether to reflect the mapping into OD 0x1600/0x1A00), keyed by PDO number (1..4).

public sealed class PdoMapping

Inheritance Object → PdoMapping

Constructors

PdoMapping() Constructor

Constructs an empty mapping.

public PdoMapping();

PdoMapping(IEnumerable<PdoMappingEntry>) Constructor

Constructs a mapping from a copy of entries.

public PdoMapping(System.Collections.Generic.IEnumerable<CanKit.Pro.CANopen.Pdo.PdoMappingEntry> entries);

Parameters

entries IEnumerable<PdoMappingEntry>

Properties

PdoMapping.Entries Property

Snapshot of the mapping entries (defensive copy so callers cannot mutate the live table).

public System.Collections.Generic.IReadOnlyList<CanKit.Pro.CANopen.Pdo.PdoMappingEntry> Entries { get; }

Property Value

IReadOnlyList<PdoMappingEntry>

PdoMapping.TotalBytes Property

Total assembled payload size in bytes across every mapping entry.

public int TotalBytes { get; }

Property Value

Int32

Methods

PdoMapping.Add(PdoMappingEntry) Method

Appends a new entry to the mapping.

public CanKit.Pro.CANopen.Pdo.PdoMapping Add(CanKit.Pro.CANopen.Pdo.PdoMappingEntry entry);

Parameters

entry PdoMappingEntry

Returns

PdoMapping

PdoMapping.Add(ushort, byte, byte) Method

Convenience overload of Add(PdoMappingEntry).

public CanKit.Pro.CANopen.Pdo.PdoMapping Add(ushort index, byte subindex, byte bitLength);

Parameters

index UInt16

subindex Byte

bitLength Byte

Returns

PdoMapping

PdoMapping.Clear() Method

Removes every mapped entry.

public void Clear();