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

Problems with error checking in asynPortDriver functions #137

Open
MarkRivers opened this issue May 28, 2021 · 0 comments
Open

Problems with error checking in asynPortDriver functions #137

MarkRivers opened this issue May 28, 2021 · 0 comments

Comments

@MarkRivers
Copy link
Member

In asynPortDriver.cpp most of the asynPortDriver::writeXXX() methods do this:

 /* Set the parameter in the parameter library. */
    status = (asynStatus) setXXXParam(addr, function, ...);

    /* Do callbacks so higher layers see any changes */
    status = (asynStatus) callParamCallbacks(addr, addr);

    if (status)

whereas asynPortDriver::writeFloat64() does this:

    /* Set the parameter and readback in the parameter library. */
    status = setDoubleParam(addr, function, value);

    /* Do callbacks so higher layers see any changes */
    callParamCallbacks(addr, addr);
    if (status)

I see problems in both versions: In the first case the status from the setXXXParam() call is being discarded; in the second the status from callParamCallbacks() is lost. Whatever the correct behavior should be I would expect all the types to implement the same error handling.

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

1 participant