CanOpenCobId Class¶
CiA 301 pre-defined connection set: helpers that translate CANopen node identifiers into the 11-bit COB-IDs used for NMT, SYNC, EMCY, PDO, SDO and heartbeat traffic.
Inheritance Object → CanOpenCobId
Remarks¶
Constants and helpers only — no state, no allocation. The layout mirrors CiA 301 §7.2:
- NMT master command frame — 0x000
- SYNC — 0x080
- EMCY — 0x080 + node-id
- TPDO1..4 — 0x180/0x280/0x380/0x480 + node-id
- RPDO1..4 — 0x200/0x300/0x400/0x500 + node-id
- SDO server → client — 0x580 + node-id
- SDO client → server — 0x600 + node-id
- NMT error control (heartbeat / bootup) — 0x700 + node-id
Fields¶
CanOpenCobId.EmcyBase Field¶
Base COB-ID for EMCY frames: 0x080 + node-id.
Field Value¶
CanOpenCobId.HeartbeatBase Field¶
Base COB-ID for NMT error control (heartbeat + bootup): 0x700 + node-id.
Field Value¶
CanOpenCobId.MaxNodeId Field¶
Largest legal CANopen node identifier (CiA 301 §7.2.4).
Field Value¶
CanOpenCobId.MinNodeId Field¶
Smallest legal CANopen node identifier (CiA 301 §7.2.4).
Field Value¶
CanOpenCobId.NmtCommand Field¶
NMT master command COB-ID (single-broadcast, no node offset).
Field Value¶
CanOpenCobId.Rpdo1Base Field¶
Base COB-ID for RPDO1: 0x200 + node-id.
Field Value¶
CanOpenCobId.Rpdo2Base Field¶
Base COB-ID for RPDO2: 0x300 + node-id.
Field Value¶
CanOpenCobId.Rpdo3Base Field¶
Base COB-ID for RPDO3: 0x400 + node-id.
Field Value¶
CanOpenCobId.Rpdo4Base Field¶
Base COB-ID for RPDO4: 0x500 + node-id.
Field Value¶
CanOpenCobId.SdoRxBase Field¶
Base COB-ID for SDO client → server requests: 0x600 + node-id.
Field Value¶
CanOpenCobId.SdoTxBase Field¶
Base COB-ID for SDO server → client responses: 0x580 + node-id.
Field Value¶
CanOpenCobId.Sync Field¶
SYNC COB-ID.
Field Value¶
CanOpenCobId.Tpdo1Base Field¶
Base COB-ID for TPDO1: 0x180 + node-id.
Field Value¶
CanOpenCobId.Tpdo2Base Field¶
Base COB-ID for TPDO2: 0x280 + node-id.
Field Value¶
CanOpenCobId.Tpdo3Base Field¶
Base COB-ID for TPDO3: 0x380 + node-id.
Field Value¶
CanOpenCobId.Tpdo4Base Field¶
Base COB-ID for TPDO4: 0x480 + node-id.
Field Value¶
Methods¶
CanOpenCobId.Emcy(byte) Method¶
Returns 0x080 + node-id, the EMCY COB-ID.
Parameters¶
nodeId Byte
Returns¶
CanOpenCobId.Heartbeat(byte) Method¶
Returns 0x700 + node-id, the heartbeat / bootup COB-ID.
Parameters¶
nodeId Byte
Returns¶
CanOpenCobId.RpdoDefault(byte, int) Method¶
Returns the default RPDO COB-ID for pdoIndex (1..4) and nodeId according to the CiA 301 pre-defined connection set.
Parameters¶
nodeId Byte
pdoIndex Int32
Returns¶
CanOpenCobId.SdoRx(byte) Method¶
Returns 0x600 + node-id, the SDO client → server (SDO Rx) COB-ID.
Parameters¶
nodeId Byte
Returns¶
CanOpenCobId.SdoTx(byte) Method¶
Returns 0x580 + node-id, the SDO server → client (SDO Tx) COB-ID.
Parameters¶
nodeId Byte
Returns¶
CanOpenCobId.TpdoDefault(byte, int) Method¶
Returns the default TPDO COB-ID for pdoIndex (1..4) and nodeId according to the CiA 301 pre-defined connection set.
Parameters¶
nodeId Byte
pdoIndex Int32
Returns¶
CanOpenCobId.ValidateNodeId(byte) Method¶
Validates that nodeId falls in the legal CiA 301 range.
Parameters¶
nodeId Byte
Exceptions¶
ArgumentOutOfRangeException
Thrown when nodeId is
outside [1, 127].