-
Notifications
You must be signed in to change notification settings - Fork 7
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
Pass config options to CanBusControlboard's subdevices #207
Comments
Please note that while yarp-devices/libraries/YarpPlugins/CanBusControlboard/DeviceDriverImpl.cpp Lines 170 to 172 in 08f6a41
|
Work on #211 might shed some light regarding how class inheritance is going to be shaped. |
Probably blocked by #74. |
Originally a subtask of roboticslab-uc3m/questions-and-answers#49, I'm opening this to deal with the issues that led to 6467003 (rollback commit of 3fcf1b5).
#175 (comment)
yarp-devices/libraries/YarpPlugins/CanBusControlboard/DeviceDriverImpl.cpp
Line 301 in 08f6a41
Looks like
getValue
performs a lookup on the monitor instance (not on options passed throughopen
), ref.#175 (comment)
From PolyDriver.cpp:
The
system_resource
member is a local instance ofYarpDevMonitor
(which extendsSearchMonitor
). However, we don't use it at all if theconfig
parameter toPolyDriver::open
already has a monitor object attached to itself:The monitor linked to
config
registers adevice
key incoreOpen
. If this is not the local monitor instantiated inopen
,getValue
won't return what we actually expect.roboticslab-uc3m/questions-and-answers#49 (comment)
To sum up,
PolyDriver::getValue
does not work as expected when the instance has been configured and opened with aSearchable
object to which a monitor has been attached to (usually viaoptions.setMonitor(config.getMonitor())
). See #175 (comment) for full explanation. Might need to circumvent the way we usegetValue
in that repo (example) or enhance the value lookup mechanism upstream.roboticslab-uc3m/questions-and-answers#49 (comment)
There is no simple way to sort this out on the upstream side without proposing a breaking change of the (undocumented)
SearchMonitor
interface, which lacks option getters (check sources).On our end, the CanBusControlboard device might hold a vector of
Property
instances besides the existing one forPolyDriver
objects (ref) in order to store and access device configurations. This is a hack.The text was updated successfully, but these errors were encountered: