Versions Compared

Key

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

CODirFind

Description

This function searches the given key within the given object directory.

...

The function CODirFind() is often called from the application to get an object directory entry. The following example checks the existence of the mandatory object entry "[1017:00] - Heartbeat" within the object directory of the CANopen node AppNode.


Code Block
languagecpp
    CO_OBJ *obj;
    :
    obj = CODirFind (&(AppNode.Dir), CO_DEV(0x1017, 0x00));
    if (obj == 0) {
        /* object [1017:00] is missing */
    } else {
        /* object [1017:00] is available */
    }
    :


Note: When using static object directories, the pointer to the identified object entry can be stored and reused with the object entry API functions. The object entry address will NOT change.End of topic