Skip to content

SrdoMapping Class

The application objects an SRDO carries (CiA DSP 304 V1.0 §8.4.2.2, object 1381h–13C0h): up to MaxEntries byte-aligned entries whose widths sum to at most 8 bytes — the plain-data frame. The record in the dictionary holds each entry twice (odd sub-index plain, even sub-index inverted); this type names the objects once. Each entry must name an object of fixed width equal to the entry's: the dictionary, the device-description loader and the peer configuration refuse a string or a domain. That is this implementation's rule, not a clause of DSP 304 — safety process data has a fixed width, and the width is what the mapping entry and the checksum pin.

public sealed class SrdoMapping

Inheritance Object → SrdoMapping

Constructors

SrdoMapping() Constructor

An empty mapping.

public SrdoMapping();

Fields

SrdoMapping.MaxEntries Field

8 one-byte objects fill the frame; the record therefore has 16 sub-indices.

public const int MaxEntries = 8;

Field Value

Int32

Properties

SrdoMapping.Entries Property

The entries, in frame order.

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

Property Value

IReadOnlyList<PdoMappingEntry>

SrdoMapping.TotalBytes Property

Length of the plain-data frame in bytes.

public int TotalBytes { get; }

Property Value

Int32

Methods

SrdoMapping.Add(PdoMappingEntry) Method

Appends an object. Dummy entries (0002h–0007h) are not accepted: safety data is never padding.

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

Parameters

entry PdoMappingEntry

Returns

SrdoMapping

Exceptions

ArgumentOutOfRangeException
The width is not a byte multiple of 8..64 bits.

InvalidOperationException
A ninth entry, a dummy, or more than 8 bytes.

SrdoMapping.Add(ushort, byte, byte) Method

Appends an object. Dummy entries (0002h–0007h) are not accepted: safety data is never padding.

public CanKit.Pro.CANopen.Safety.SrdoMapping Add(ushort index, byte subindex, byte bitLength);

Parameters

index UInt16

subindex Byte

bitLength Byte

Returns

SrdoMapping

Exceptions

ArgumentOutOfRangeException
The width is not a byte multiple of 8..64 bits.

InvalidOperationException
A ninth entry, a dummy, or more than 8 bytes.

SrdoMapping.ToArray() Method

The entries as an array (a copy).

public CanKit.Pro.CANopen.Pdo.PdoMappingEntry[] ToArray();

Returns

PdoMappingEntry[]