pluginLoaded

Create issue
Issue #108 resolved
Oliver Schwanke created an issue

Hi ,

This issue is about loading plugins and checking with the pluginLoaded function.

All this is relevant for a raspi (and maybe *nix in common)

1.:itoms pluginloader does not differentiate between debug/release builds

‌ using a debug build you can also load old and lying around release-build plugins, since their names are not the same (-d for debug) and vice versa

2.:they nameing conventions are not consistent across systems.

a pluginLoaded(“somePlotLibName”) returns true for debug builds and release builds on windows, but not on *nix, since their names are more like “libsomePlotLibName” and the trailing d is relevant also.

Would it be okay for you to have this unified, so the pluginLoaded checks only if one most-likely-the-right-one is loaded?

by that i mean it will return true if a debug or non-debug library is loaded and

if a lib is prepended or not?

And would you rather change this on the python interface or in the addinManager?

Example:

Expected:

pluginLoaded(“DummyMotor”)->True

pluginLoaded(“DummyMotord”)->True

pluginLoaded(“libDummyMotor”)->True

pluginLoaded(“libDummyMotord”)->True

Reality:

pluginLoaded(“DummyMotor”)->False

pluginLoaded(“DummyMotord”)->False

pluginLoaded(“libDummyMotor”)->False

pluginLoaded(“libDummyMotord”)->True

Comments (3)

  1. M. Gronle

    The current behaviour of itom.pluginLoaded is as follows:

    1. All loaded plugins (dataIO, actuator, algorithm) are checked and their objectName, hence the name of the plugin, that also appears in the plugin toolbox, is compared in a case-insensitive mode with the given parameter pluginName. If one plugin could be found, the method returns True and step 2 is skipped.
    2. if the plugin name could not be found as far, the base part of the filename (e.g. dummyGrabber for a filename dummyGrabber.dll) is compared to the given pluginName. If itom is compiled in debug, a “d” is appended to the pluginName.

    Questions:

    for check 1: is it ok to stay with the case-insensitive check? I would say yes, since we do not allow the same plugin name, that is only different in case of case-sensitivity.

    for check 2: to be honest, I would skip this check because I don’t think that it is useful. Isn’t it totally sufficient to check for the plugin name, how it can be used in itom. The filename is not relevant at all.

    Nevertheless, under Linux pluginLoaded(“DummyMotor”) should return True if the DummyMotor plugin is available. This has to be checked.

    @Oliver Schwanke : It would be great if you could shortly give your opinion to my questions. Then I would implement it. In the meantime I try to reproduce it under Debian.

  2. Log in to comment