update
This commit is contained in:
parent
23d24127c1
commit
60fa5d14f4
4
das-dn/third_party/AdsLib/AdsDevice.cpp
vendored
4
das-dn/third_party/AdsLib/AdsDevice.cpp
vendored
@ -7,6 +7,8 @@
|
||||
#include "AdsException.h"
|
||||
#include "AdsLib.h"
|
||||
#include "Log.h"
|
||||
#include <error.h>
|
||||
#include <string.h>
|
||||
#include <limits>
|
||||
|
||||
namespace Beckhoff
|
||||
@ -166,7 +168,7 @@ AdsDeviceState AdsDevice::GetState() const
|
||||
if(m_Connected == true){
|
||||
auto error = AdsSyncReadStateReqEx(GetLocalPort(), &m_Addr, &state[0], &state[1]);
|
||||
if (error) {
|
||||
LOG_ERROR("AdsDevice can not read device state.");
|
||||
LOG_ERROR("AdsDevice can not read device state. \n" << error << strerror(errno));
|
||||
//throw AdsException(error);
|
||||
return {static_cast<ADSSTATE>(state[0]), static_cast<ADSSTATE>(state[1])};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user