Skip to content

Units of timeouts #5

@MechatronixX

Description

@MechatronixX

It is unclear what units are used for the timeouts in e.g. the SDO client:

CANOPENDLL_API void setWriteObjectTimeout(unsigned int timeout);
CANOPENDLL_API void setReadObjectTimeout(unsigned int timeout);
CANOPENDLL_API void setNodeResponseTimeout(unsigned int timeout);

The scaling of the default values give an indication it might be microseconds.

#define WRITE_OBJ_TIMEOUT 200000
#define READ_OBJ_TIMEOUT 400000
#define TAIL_TO_TAIL_TIMEOUT 2000

Having to assume the units is unsafe. A suggestion is to rename the function parameters to e.g. timeout_microseconds, timeout_milliseconds etc and add suffixes to the default parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions