Skip to content

Commit

Permalink
Build errors on develop branch when enabling LUA (#583610)
Browse files Browse the repository at this point in the history
Fixed typo in src/core/lua/CMakeLists.txt,
Completed changes about mInterfaceSpec into a reference in src/core/lua folder

Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=583610
  • Loading branch information
gpiasenza authored Nov 4, 2024
1 parent 7217400 commit e6bd606
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/core/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ elseif("${FORTE_USE_LUATYPES}" STREQUAL "Lua")
find_package(Lua REQUIRED)
endif(NOT DEFINED LUA_FOUND)

forte_add_include_directories(${LUA_INCLUDE_DIR})
forte_add_include_directories(${LUA_INCLUDE_DIRS})
forte_add_link_library(${LUA_LIBRARIES})

endif("${FORTE_USE_LUATYPES}" STREQUAL "LuaJIT")
Expand Down
7 changes: 0 additions & 7 deletions src/core/lua/luaadapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ CLuaAdapter::CLuaAdapter(CStringDictionary::TStringId paInstanceNameId, const CL

CLuaAdapter::~CLuaAdapter() = default;

bool CLuaAdapter::initialize() {
//before calling super we need to configure the interface of the FB
setupFBInterface(getFBInterfaceSpec());
return CAdapter::initialize();
}


void CLuaAdapter::readInputData(TEventID paEIID) {
if(nullptr != getFBInterfaceSpec().mEIWithIndexes && scmNoDataAssociated != getFBInterfaceSpec().mEIWithIndexes[paEIID]) {
const TDataIOID *eiWithStart = &(getFBInterfaceSpec().mEIWith[getFBInterfaceSpec().mEIWithIndexes[paEIID]]);
Expand Down
3 changes: 0 additions & 3 deletions src/core/lua/luaadapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class CLuaAdapter : public CAdapter {
CLuaAdapter(CStringDictionary::TStringId paInstanceNameId, const CLuaAdapterTypeEntry* paTypeEntry, bool paIsPlug, forte::core::CFBContainer &paContainer);
~CLuaAdapter() override;


bool initialize() override;

CStringDictionary::TStringId getFBTypeId() const override {
return mTypeEntry->getTypeNameId();
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/lua/luaadaptertypeentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ class CLuaAdapterTypeEntry: public CTypeLib::CAdapterTypeEntry {

CAdapter* createAdapterInstance(CStringDictionary::TStringId paInstanceNameId, forte::core::CFBContainer &paContainer, bool paIsPlug) override;

const SFBInterfaceSpec* getSocketInterfaceSpec() const {
return &mSocketInterfaceSpec;
const SFBInterfaceSpec & getSocketInterfaceSpec() const {
return mSocketInterfaceSpec;
}

const SFBInterfaceSpec* getPlugInterfaceSpec() const {
return &mPlugInterfaceSpec;
const SFBInterfaceSpec & getPlugInterfaceSpec() const {
return mPlugInterfaceSpec;
}
};

Expand Down
1 change: 0 additions & 1 deletion src/core/lua/luabfb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ CLuaBFB::CLuaBFB(CStringDictionary::TStringId paInstanceNameId, const CLuaBFBTyp

bool CLuaBFB::initialize() {
//before calling super we need to configure the interface of the FB
setupFBInterface(getFBInterfaceSpec());
createVarInternals();
return CGenFunctionBlock<CBasicFB>::initialize();
}
Expand Down
3 changes: 1 addition & 2 deletions src/core/lua/luabfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ class CLuaBFB : public CGenFunctionBlock<CBasicFB> {

bool initialize() override;

bool createInterfaceSpec(const char *paConfigString, SFBInterfaceSpec &paInterfaceSpec) override {
paInterfaceSpec = *mInterfaceSpec;
bool createInterfaceSpec(const char *paConfigString, SFBInterfaceSpec &) override {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/lua/luabfbtypeentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class CLuaBFBTypeEntry: public CTypeLib::CFBTypeEntry {

CFunctionBlock* createFBInstance(CStringDictionary::TStringId paInstanceNameId, forte::core::CFBContainer &paContainer) override;

const SFBInterfaceSpec* getInterfaceSpec() const {
return &m_interfaceSpec;
const SFBInterfaceSpec& getInterfaceSpec() const {
return m_interfaceSpec;
}

const SInternalVarsInformation* getInternalVarsInformation() const {
Expand Down
7 changes: 0 additions & 7 deletions src/core/lua/luacfb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ CLuaCFB::CLuaCFB(CStringDictionary::TStringId paInstanceNameId, const CLuaCFBTyp

CLuaCFB::~CLuaCFB() = default;


bool CLuaCFB::initialize() {
//before calling super we need to configure the interface of the FB
setupFBInterface(getFBInterfaceSpec());
return CGenFunctionBlock<CCompositeFB>::initialize();
}

bool CLuaCFB::createInternalFBs(){
const SCFB_FBNData &fbnData = getFBNData();
if(fbnData.mNumFBs){
Expand Down
5 changes: 1 addition & 4 deletions src/core/lua/luacfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ class CLuaCFB : public CGenFunctionBlock<CCompositeFB> {
return mTypeEntry->getTypeNameId();
}

bool initialize() override;

bool createInterfaceSpec(const char *, SFBInterfaceSpec &paInterfaceSpec) override {
paInterfaceSpec = *mInterfaceSpec;
bool createInterfaceSpec(const char *, SFBInterfaceSpec &) override {
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/lua/luacfbtypeentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class CLuaCFBTypeEntry: public CTypeLib::CFBTypeEntry {

CFunctionBlock* createFBInstance(CStringDictionary::TStringId paInstanceNameId, forte::core::CFBContainer &paContainer) override;

const SFBInterfaceSpec* getInterfaceSpec() const {
return &m_interfaceSpec;
const SFBInterfaceSpec& getInterfaceSpec() const {
return m_interfaceSpec;
}

SCFB_FBNData& getFbnSpec(){
Expand Down

0 comments on commit e6bd606

Please sign in to comment.