You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getType() and getReadType() are re-implemented by several Portables (some implementing the first and some the second), and used in several places and I believe they are used for ROS integration. getWriteType() does not seem to be used or re-implemented anywhere. Why is that? Should we implement this method for our Portables? Perhaps this was added so that there could be some check when connecting two ports?
I think it makes sense (more or less) to have 3 different methods since someone might be defining a PortReader that is not a PortWriter or vice versa. Perhaps Portable should override getReadType() and getWriteType() though, returning the value from getType()? It makes sense for Portable to return the same value for all these 3 methods...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Portables have 3 type-related methods:
PortReader::getReadType()PortWriter::getWriteType()Portable::getType()(by default returningPortReader::getReadType())getType()andgetReadType()are re-implemented by severalPortables (some implementing the first and some the second), and used in several places and I believe they are used for ROS integration.getWriteType()does not seem to be used or re-implemented anywhere. Why is that? Should we implement this method for ourPortables? Perhaps this was added so that there could be some check when connecting two ports?I think it makes sense (more or less) to have 3 different methods since someone might be defining a
PortReaderthat is not aPortWriteror vice versa. PerhapsPortableshould overridegetReadType()andgetWriteType()though, returning the value fromgetType()? It makes sense forPortableto return the same value for all these 3 methods...Beta Was this translation helpful? Give feedback.
All reactions