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 2 Next »

COObjGetSize

Description

This function returns the size of the given object directory entry.

Prototype

CPU_INT32U COObjGetSize(CO_OBJ *obj, CPU_INT32U width);

ParameterDescription
obj pointer to the CANopen directory entry
width Expected object size in byte (or 0 if unknown)

Returned Value

>0     object entry size in bytes

=0     an error is detected

Additional Information

The argument width is most likely given "0" (=unknown) when getting the size of an object entry. The intended use of this argument is for write access of dynamic sizes of user type objects (e.g. firmware loading with a maximum size).

Example

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

  • No labels