Hi, Regulary, I get this kind of error in the log files and this time I am completely puzzled about the reason of the problem: 03.05.18 16:39:41.087 root WARN - Unknown XML element ‘Config’ occurs at (/opt/plcnext/projects/PCWE/Plc/Plm/PCWE.acf.config:9)
03.05.18 16:39:41.137 Arp.Plc.Domain.Internal.PlcManager ERROR - Exception occurs while loading plc component ‘Arp.Plc.Plm’: Load: Loading of the library ‘/opt/plcnext/shadowing/libNyxLibrary.so’ failed with error code /opt/plcnext/shadowing/libNyxLibrary.so: undefined symbol : _ZN8NyxTimer 9s _TimeRef E. (Arp::Exception)
03.05.18 16:39:41.166 Arp.Plc.Domain.Internal.PlcManager ERROR - Reverted all yet set up components. The targeted code is quite simple and attached to this post. Reorganizing the code just lead to moving the problem to another static class variable. None of theses variables are externalized through ports. The problem persist after a PLCnext level 1 reset. What is the problem? Thanks PCWE v7.2.2 PLCnext FW v.1.02 --------------------------------------------------- hpp file //#pragma once
//#include “Arp/System/Core/Arp.h”
#include //namespace NyxLibrary { namespace NyxLPC480 {
//using namespace Arp; class NyxTimer
{
public:
NyxTimer(void); static void Reset(int64_t p_MaxDelay);
static bool IsElapsed(void); private:
static std::chrono::steady_clock::time_point s_TimeRef;
static int64_t s_MaxDelay;
}; //}} // end of namespace NyxLibrary::NyxLPC480 --------------------------------------------------- cpp file: //#include “Arp/System/Core/Arp.h”
//#include “Arp/System/Commons/Logging.h”
#include
#include “NyxTimer.hpp” //namespace NyxLibrary { namespace NyxLPC480 {
//using namespace Arp; NyxTimer::NyxTimer(void){} void NyxTimer::Reset(int64_t p_MaxDelayMsec)
{
NyxTimer::s_TimeRef = std::chrono::steady_clock::now();
NyxTimer::s_MaxDelay = p_MaxDelayMsec;
} bool NyxTimer::IsElapsed(void)
{
std::chrono::steady_clock::time_point _now = std::chrono::steady_clock::now();
int64_t _elapsed_secs = std::chrono::duration_cast(_now - NyxTimer::s_TimeRef).count();
// Log::Debug(“Timer time elaspsed (msec) = {0} on {1}”, _elapsed_secs, NyxTimer::s_MaxDelay);
return ( _elapsed_secs > NyxTimer::s_MaxDelay );
} //}} // end of namespace NyxLibrary::NyxLPC480