-
Notifications
You must be signed in to change notification settings - Fork 198
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
netbios,exception,and multithread #240
Comments
I don't understand why NetBIOS should be required? You either have to use IP addresses or any kind of name resolution, but DNS should be just fine.
I have no better approach for this.
you are probably right. This should be a rethrow instead of copy and throw.
Yes, this is fundamental ADS design. TwinCAT will only accept a single TCP connection from the same IP. #201 (comment) #49 (comment)
|
#86 (comment) |
20241129_095256.mp4For the first question, I am confused about how NetBIOS influences the program. In fact, there are no references to NetBIOS in the source code of the "main" program. NetBIOS runs as a service system and has no direct relationship with the "main" program. This makes the situation quite puzzling. I tried to capture the network traffic using Wireshark and found that the PLC conducts a name query via NBNS once when we attempt to connect to the PLC. This may be a design feature of the PLC and seems to have no relationship with the ADS library. The remote PLC is running TwinCAT 2, with the CPU being CX1100-0002 and the Ethernet module being CX1020-0011. The errorcode is 1861. I hope this information will be helpful to others. |
No, it should be safe to use AdsDevices in parallel without external synchronization. This is our testcase for this: https://github.com/Beckhoff/ADS/blob/master/AdsLibOOITest/main.cpp#L497-L510 |
Dear ADS Library Team,
I hope this message finds you well. I have been experimenting with the ADS library and have encountered a few issues that I would greatly appreciate your guidance on.
ADS/AdsLib/standalone/AmsRouter.cpp
Line 82 in 20d4a67
Exception Handling in AmsRouter.cpp: While reviewing the code, I observed that the exception is thrown using throw e instead of simply throw. It seems that using throw would be preferable as it preserves the original exception type, allowing it to be caught as an adsException or runtime_error. Could you please give some advice on this?
ADS/AdsLib/AdsDevice.h
Line 85 in 20d4a67
ADS/AdsLib/AdsDevice.cpp
Line 201 in 20d4a67
ADS/AdsLib/standalone/AdsLib.cpp
Line 106 in 20d4a67
ADS/AdsLib/standalone/AdsLib.cpp
Line 255 in 20d4a67
ADS/AdsLib/standalone/AmsRouter.cpp
Line 204 in 20d4a67
ADS/AdsLib/standalone/AmsConnection.cpp
Line 141 in 20d4a67
ADS/AdsLib/standalone/AmsConnection.cpp
Line 126 in 20d4a67
ADS/AdsLib/Sockets.cpp
Line 224 in 20d4a67
The text was updated successfully, but these errors were encountered: