Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

CODirFind

Description

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

Prototype

CO_OBJ *COObjOpen(CO_DIR *cod, CPU_INT32U key);

ParameterDescription
cod pointer to the CANopen object directory
key object entry key; should be generated with the macro CO_DEV()

Returned Value

>0     The pointer to the identified object entry

=0     Addressed object was not found

Example

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.

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.

  • No labels