Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

CODirWrLong

Description

This function writes a 32bit value to the given object directory. The object entry is addressed with the given key.

...

The following example writes the value to the hypothetical application specific object entry "[1234:56]" within the object directory of the CANopen node AppNode.


Code Block
languagecpp
    CPU_INT16S  err;
    CPU_INT32U  value = 0xDEADBEEF;
    :
    err = CODirWrLong (&(AppNode.Dir), CO_DEV(0x1234, 0x56), value);
    if (err != CO_ERR_NONE) {
        /* object [1234:56] is missing or error during writing */
    }
    :


Note: This function uses CODirFind() on each function call. To improve access performance for multiple accesses to a single object entry, the application may use CODirFind() once and COObjWrValue() multiple times.End of topic