Skip to content

OdEntry Class

A single subindex entry in the local Object Dictionary (FR-CO-001): value + declared data type + access flags + PDO mappability. Stored inside ObjectDictionary; not intended to be constructed directly by callers — use the fluent Add* methods on the dictionary.

public sealed class OdEntry

Inheritance Object → OdEntry

Remarks

The stored raw value is a little-endian byte array in the same layout SDO expedited encoding uses on the wire. This keeps the SDO server code path allocation-cheap (no round-trip through typed converters on every request) while typed accessors on ObjectDictionary preserve type-safety for local reads/writes. The value is only ever read or replaced under the dictionary's lock; the non-copying RawSpan view is therefore internal and used solely from code paths that already hold that lock.

Properties

OdEntry.Access Property

Access permissions (read-only / write-only / read-write).

public CanKit.Pro.CANopen.OdAccess Access { get; }

Property Value

OdAccess

OdEntry.DataType Property

CiA 301 data type of the entry.

public CanKit.Pro.CANopen.OdDataType DataType { get; }

Property Value

OdDataType

OdEntry.PdoMappable Property

Whether the entry may be mapped into a PDO — the PDOMapping attribute of a CiA 306 device description. Communication-profile objects (1000h–1FFFh) are mappable only where CiA 301 permits it (for example 1001h/1002h); application objects default to mappable. A mapping entry that references a non-mappable object is rejected with SDO abort 0604 0041h (CiA 301 §7.5.2.36 / §7.5.2.38).

public bool PdoMappable { get; }

Property Value

Boolean

OdEntry.Size Property

Fixed on-the-wire size in bytes for the entry's DataType. For Domain the value is variable and this property returns the current stored length.

public int Size { get; }

Property Value

Int32

Methods

OdEntry.GetRawValue() Method

Snapshot of the raw little-endian bytes. Safe to hand out — callers get a fresh copy and cannot mutate the dictionary's private buffer.

public byte[] GetRawValue();

Returns

Byte[]