Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
SocketConnect causes unrecoverable error on invalid address string
When trying to start a socket connection as a client using the SocketConnect command,
I ran into the issue that this command will cause an unrecoverable error on my system in case the address string is invalid. (I am currently running RobotWare 6.08.01)
From what I found out so far, an "invalid" IP address can be a malformed IP string, but apparently also IP addresses that are outside of the robot's subnet. Since the IP address I connect to is defined dynamically, I would like to be able to handle this issue in my program in case the address is invalid rather than just stopping everything.
Since its an unrecoverable error, I assume there is no option for error handling for me here. But is there a way to check, if a string represents a valid, reachable IP address before passing it to SocketConnect?
0
Comments
-
0
-
Update on this: Looks like this issue has been improved in RW 6.10.02, where SocketConnect now throws recoverable errors in this situation and we can use the new error codes ERR_SOCK_UNSPEC and ERR_SOCK_ADDR_INVALID to catch these errors.
0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 16 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 365 IRC5
- 86 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 854 RAPID Programming
- 37 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings