Dodgy use of timeout in FileDescriptorActivity deployment
S Roderick <[email protected]> Tue, 25 Feb 2014 07:35:47 -0500
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <[email protected]> |
When deploying a FileDescriptorActivity the period deployment parameter is explicitly used to set the timeout. I'm curious why this was done?
1. it seems more than a bit dodgy to opaquely re-use a "period" parameter as a timeout
2. a subsequent query for the actual period of the resulting activity will return 0.0, even though the "period" was actually set in the deployment configuration. Confusing for users.
The dodgy code is below, from ocl/deployment/DeploymentComponent.cpp.
Cheers
S
else if ( act_type == "FileDescriptorActivity") {
using namespace RTT::extras;
newact = new FileDescriptorActivity(scheduler, priority, 0);
FileDescriptorActivity* fdact = dynamic_cast< RTT::extras::FileDescriptorActivity* > (newact);
if (fdact) fdact->setTimeout(period);
else newact = 0;
}
--
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev