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...
This discussion was converted from issue #1622 on December 22, 2020 09:09.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
-
Portables have 3 type-related methods:
PortReader::getReadType()
PortWriter::getWriteType()
Portable::getType()
(by default returningPortReader::getReadType()
)getType()
andgetReadType()
are re-implemented by severalPortable
s (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 ourPortable
s? 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 aPortWriter
or vice versa. PerhapsPortable
should overridegetReadType()
andgetWriteType()
though, returning the value fromgetType()
? It makes sense forPortable
to return the same value for all these 3 methods...Beta Was this translation helpful? Give feedback.
All reactions