Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Units of timeouts #5

Open
MechatronixX opened this issue Jun 2, 2021 · 1 comment
Open

Units of timeouts #5

MechatronixX opened this issue Jun 2, 2021 · 1 comment

Comments

@MechatronixX
Copy link

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.

@lulu58
Copy link

lulu58 commented Mar 14, 2023

Hello Ulrik,
is it possible to update the project for newer release of Visual Studio?
I tried to compile with VS2021 with many errors, broke down the project for just the PCAN adapter and only 64bit builds, resolved all errors and warnings - my last problem is a problem by linking the can_dispatcher_x64.lib in canopenlib64.dll:
LNK2019 Verweis auf nicht aufgelöstes externes Symbol ""unsigned long __cdecl canopenDispatcher(void *)" (?canopenDispatcher@@YAKPEAX@Z)" in Funktion ""private: static unsigned long __cdecl CanInterface::canFrameDispatcherThread(void *)" (?canFrameDispatcherThread@CanInterface@@CAKPEAX@Z)".
Any hints are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants