Commit 53bc1ba6 authored by Ricardo Cosme's avatar Ricardo Cosme Committed by Renato Figueiro Maia
Browse files

[OPENBUS-2935] Migração dos repositórios Subversion para Git

 + Uso das IDLs das interops no SDK Lua 2.1 conforme a nova organização de um repositório git para cada conjunto de IDLs.
  - Uso do idl2lua para disponibilizar as IDLs em módulos Lua.
parents c1b0dd2b 9193435e
...@@ -2,6 +2,11 @@ local openbus = require "openbus" ...@@ -2,6 +2,11 @@ local openbus = require "openbus"
local log = require "openbus.util.logger" local log = require "openbus.util.logger"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
local chainingidl = require "openbus.interop.idl.chaining"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -11,7 +16,8 @@ settestcfg(...) ...@@ -11,7 +16,8 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/proxy.idl") loadidl(orb, basicidl)
loadidl(orb, chainingidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::chaining::HelloProxy") local iface = orb.types:lookup("tecgraf::openbus::interop::chaining::HelloProxy")
-- get bus context manager -- get bus context manager
......
...@@ -4,6 +4,11 @@ local util = require "openbus.util.server" ...@@ -4,6 +4,11 @@ local util = require "openbus.util.server"
local sysex = require "openbus.util.sysex" local sysex = require "openbus.util.sysex"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
local chainingidl = require "openbus.interop.idl.chaining"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -13,8 +18,8 @@ settestcfg(...) ...@@ -13,8 +18,8 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/proxy.idl") loadidl(orb, basicidl)
orb:loadidlfile("helloidl/hello.idl") loadidl(orb, chainingidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::chaining::HelloProxy") local iface = orb.types:lookup("tecgraf::openbus::interop::chaining::HelloProxy")
local serviface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local serviface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
......
...@@ -4,6 +4,11 @@ local util = require "openbus.util.server" ...@@ -4,6 +4,11 @@ local util = require "openbus.util.server"
local sysex = require "openbus.util.sysex" local sysex = require "openbus.util.sysex"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
local chainingidl = require "openbus.interop.idl.chaining"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -13,7 +18,8 @@ settestcfg(...) ...@@ -13,7 +18,8 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("helloidl/hello.idl") loadidl(orb, basicidl)
loadidl(orb, chainingidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager -- get bus context manager
......
...@@ -4,6 +4,10 @@ local util = require "openbus.util.server" ...@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table" local table = require "loop.table"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local delegationidl = require "openbus.interop.idl.delegation"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -13,7 +17,7 @@ settestcfg(...) ...@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definitions -- load interface definitions
orb:loadidlfile("idl/messages.idl") loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Broadcaster") local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Broadcaster")
-- get bus context manager -- get bus context manager
......
...@@ -2,6 +2,10 @@ local openbus = require "openbus" ...@@ -2,6 +2,10 @@ local openbus = require "openbus"
local log = require "openbus.util.logger" local log = require "openbus.util.logger"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local delegationidl = require "openbus.interop.idl.delegation"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -11,7 +15,7 @@ settestcfg(...) ...@@ -11,7 +15,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/messages.idl") loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger") local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger")
-- get bus context manager -- get bus context manager
......
...@@ -5,6 +5,10 @@ local ComponentContext = require "scs.core.ComponentContext" ...@@ -5,6 +5,10 @@ local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table" local table = require "loop.table"
local Timer = require "cothread.Timer" local Timer = require "cothread.Timer"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local delegationidl = require "openbus.interop.idl.delegation"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -14,7 +18,7 @@ settestcfg(...) ...@@ -14,7 +18,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definitions -- load interface definitions
orb:loadidlfile("idl/messages.idl") loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Forwarder") local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Forwarder")
-- get bus context manager -- get bus context manager
......
...@@ -4,6 +4,10 @@ local util = require "openbus.util.server" ...@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table" local table = require "loop.table"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local delegationidl = require "openbus.interop.idl.delegation"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -13,7 +17,7 @@ settestcfg(...) ...@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definitions -- load interface definitions
orb:loadidlfile("idl/messages.idl") loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger") local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger")
-- get bus context manager -- get bus context manager
......
local _G = require "_G"
local array = require "table"
local unpack = array.unpack or _G.unpack
local idl = {}
function idl.loadto(orb, parsed)
orb.TypeRepository.registry:register(unpack(parsed))
end
return idl
\ No newline at end of file
...@@ -3,6 +3,10 @@ local log = require "openbus.util.logger" ...@@ -3,6 +3,10 @@ local log = require "openbus.util.logger"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local table = require "loop.table" local table = require "loop.table"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -10,7 +14,7 @@ settestcfg(...) ...@@ -10,7 +14,7 @@ settestcfg(...)
-- setup and start the ORB -- setup and start the ORB
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
orb:loadidlfile("idl/hello.idl") loadidl(orb, basicidl)
-- load interface definition -- load interface definition
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
......
...@@ -3,6 +3,9 @@ local log = require "openbus.util.logger" ...@@ -3,6 +3,9 @@ local log = require "openbus.util.logger"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
local idl = require "openbus.interop.idl"
local basicidl = require "openbus.interop.idl.basic"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -13,8 +16,8 @@ local orb1 = openbus.initORB(orbcfg) ...@@ -13,8 +16,8 @@ local orb1 = openbus.initORB(orbcfg)
local orb2 = openbus.initORB(orbcfg) local orb2 = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb1:loadidlfile("idl/hello.idl") idl.loadto(orb1, basicidl)
orb2:loadidlfile("idl/hello.idl") idl.loadto(orb2, basicidl)
local iface = orb1.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb1.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager -- get bus context manager
......
...@@ -4,6 +4,9 @@ local log = require "openbus.util.logger" ...@@ -4,6 +4,9 @@ local log = require "openbus.util.logger"
local except = require "openbus.util.except" local except = require "openbus.util.except"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local interopidl = require "openbus.interop.idl"
local loadidl = interopidl.loadto
local protocolidl = require "openbus.interop.idl.protocol"
require "openbus.test.util" require "openbus.test.util"
...@@ -14,7 +17,7 @@ settestcfg(...) ...@@ -14,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/mock.idl") loadidl(orb, protocolidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::protocol::Server") local iface = orb.types:lookup("tecgraf::openbus::interop::protocol::Server")
-- get bus context manager -- get bus context manager
......
...@@ -7,12 +7,15 @@ local ComponentContext = require "scs.core.ComponentContext" ...@@ -7,12 +7,15 @@ local ComponentContext = require "scs.core.ComponentContext"
local impl, servant, iface do local impl, servant, iface do
require "openbus.test.lowlevel" require "openbus.test.lowlevel"
local idl = require "openbus.core.idl" local idl = require "openbus.core.idl"
local interopidl = require "openbus.interop.idl"
local loadidl = interopidl.loadto
local protocolidl = require "openbus.interop.idl.protocol"
local sysex = require "openbus.util.sysex" local sysex = require "openbus.util.sysex"
-- initialize the ORB -- initialize the ORB
local orb = initORB() local orb = initORB()
idl.loadto(orb) idl.loadto(orb)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/mock.idl") loadidl(orb, protocolidl)
iface = orb.types:lookup("tecgraf::openbus::interop::protocol::Server") iface = orb.types:lookup("tecgraf::openbus::interop::protocol::Server")
impl = { __type = iface } impl = { __type = iface }
function impl:NonBusCall(...) function impl:NonBusCall(...)
......
...@@ -2,6 +2,10 @@ local openbus = require "openbus" ...@@ -2,6 +2,10 @@ local openbus = require "openbus"
local log = require "openbus.util.logger" local log = require "openbus.util.logger"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -11,7 +15,7 @@ settestcfg(...) ...@@ -11,7 +15,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/hello.idl") loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager -- get bus context manager
......
...@@ -4,6 +4,10 @@ local util = require "openbus.util.server" ...@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table" local table = require "loop.table"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -13,7 +17,7 @@ settestcfg(...) ...@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/hello.idl") loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- read login private key -- read login private key
......
...@@ -4,6 +4,10 @@ local util = require "openbus.util.server" ...@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table" local table = require "loop.table"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -13,7 +17,7 @@ settestcfg(...) ...@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/hello.idl") loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager -- get bus context manager
......
...@@ -5,7 +5,9 @@ testcase=$2 ...@@ -5,7 +5,9 @@ testcase=$2
tasks=$3 tasks=$3
services=$4 services=$4
busconsole="env LUA_PATH=${OPENBUS_SDKLUA_TEST}/?.lua ${OPENBUS_SDKLUA_HOME}/bin/busconsole" sdklua_interop=`dirname "$(readlink -f "$0")"`
busconsole="env LUA_PATH=${OPENBUS_SDKLUA_TEST}/?.lua;${sdklua_interop}/lua/?.lua ${OPENBUS_SDKLUA_HOME}/bin/busconsole"
if [[ "$mode" == "DEBUG" ]]; then if [[ "$mode" == "DEBUG" ]]; then
busconsole="$busconsole -d" busconsole="$busconsole -d"
......
...@@ -2,6 +2,10 @@ local openbus = require "openbus" ...@@ -2,6 +2,10 @@ local openbus = require "openbus"
local log = require "openbus.util.logger" local log = require "openbus.util.logger"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
require "openbus.test.util" require "openbus.test.util"
-- customize test configuration for this case -- customize test configuration for this case
...@@ -11,7 +15,7 @@ settestcfg(...) ...@@ -11,7 +15,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/hello.idl") loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager -- get bus context manager
......
local openbus = require "openbus" local openbus = require "openbus"
local log = require "openbus.util.logger" local log = require "openbus.util.logger"
local util = require "openbus.util.server" local util = require "openbus.util.server"
local idl = require "openbus.interop.idl"
local loadidl = idl.loadto
local basicidl = require "openbus.interop.idl.basic"
local ComponentContext = require "scs.core.ComponentContext" local ComponentContext = require "scs.core.ComponentContext"
require "openbus.test.util" require "openbus.test.util"
...@@ -12,7 +17,7 @@ settestcfg(...) ...@@ -12,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg) local orb = openbus.initORB(orbcfg)
-- load interface definition -- load interface definition
orb:loadidlfile("idl/hello.idl") loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello") local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager -- get bus context manager
......
...@@ -129,3 +129,17 @@ $(LUADIR)/openbus/core/legacy/parsed.lua: $(IDL2LUA) $(OLDIDL) $(OLDDEPENDENTIDL ...@@ -129,3 +129,17 @@ $(LUADIR)/openbus/core/legacy/parsed.lua: $(IDL2LUA) $(OLDIDL) $(OLDDEPENDENTIDL
$(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSOLDIDL) -I $(OPENBUSNEWIDL) -o $@ $(OLDIDL) $(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSOLDIDL) -I $(OPENBUSNEWIDL) -o $@ $(OLDIDL)
openbuslua.c: $(PRELOAD_DIR)/luaopenbus.c openbuslua.c: $(PRELOAD_DIR)/luaopenbus.c
INTEROPIDLSDIR=../interop/lua/openbus/interop/idl
IDL_INTEROPS="BASIC" "CHAINING" "DELEGATION" "PROTOCOL"
$(INTEROPIDLSDIR):
mkdir -p $(INTEROPIDLSDIR)
for interop in $(IDL_INTEROPS) ; do \
lc_interop=`echo $$interop | tr A-Z a-z` ; \
eval path='$$'{OPENBUS_SDK_IDL_INTEROP_$${interop}_HOME} ; \
$(OILBIN) $(IDL2LUA) -o $(INTEROPIDLSDIR)/$${lc_interop}.lua `ls $$path/*.*` ; \
done
parse-interops-idls: $(INTEROPIDLSDIR)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment