PdoMapping Class¶
A PDO mapping under construction: the ordered list of PdoMappingEntry values a
PDO carries. Handed to ConfigureTpdo / ConfigureRpdo, which copy the entries
into the node's mapping record; the node keeps no reference to this object, so mutating it
afterwards has no effect on the configured PDO.
Inheritance Object → PdoMapping
Constructors¶
PdoMapping() Constructor¶
Constructs an empty mapping.
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>
Fields¶
PdoMapping.MaxEntries Field¶
Largest number of one-bit entries a PDO can hold.
Field Value¶
Properties¶
PdoMapping.Entries Property¶
Read-only view of the mapping entries. The view tracks later Add(PdoMappingEntry) / Clear() calls and allocates nothing per access.
public System.Collections.Generic.IReadOnlyList<CanKit.Pro.CANopen.Pdo.PdoMappingEntry> Entries { get; }
Property Value¶
IReadOnlyList<PdoMappingEntry>
PdoMapping.TotalBits Property¶
Sum of the mapped bit lengths, excluding final byte padding.
Property Value¶
PdoMapping.TotalBytes Property¶
Total assembled payload size in bytes across every mapping entry.
Property Value¶
Methods¶
PdoMapping.Add(PdoMappingEntry) Method¶
Appends a new entry to the mapping.
Parameters¶
entry PdoMappingEntry
Returns¶
Exceptions¶
ArgumentOutOfRangeException
entry has a width the
PdoMappingEntry constructor refuses — default(PdoMappingEntry), or
an entry built past the constructor; the mapping is unchanged.
InvalidOperationException
The mapping would exceed 8 bytes or
MaxEntries entries; the mapping is unchanged.
PdoMapping.Add(ushort, byte, byte) Method¶
Convenience overload of Add(PdoMappingEntry).
Parameters¶
index UInt16
subindex Byte
bitLength Byte
Returns¶
PdoMapping.Clear() Method¶
Removes every mapped entry.