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.
It is unclear what units are used for the timeouts in e.g. the SDO client:
datalinkengineeringcanopen/canopen_stack_visual_studio_2008-2012/visual_studio/canopenlib32_dll/inc/ClientSDOClass.h
Lines 110 to 112 in f612417
The scaling of the default values give an indication it might be microseconds.
datalinkengineeringcanopen/canopen_stack_visual_studio_2008-2012/visual_studio/canopenlib32_dll/inc/ClientSDOClass.h
Lines 32 to 34 in f612417
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.