Commit 643128db authored by Ricardo Cosme's avatar Ricardo Cosme

Merge branch 'idl2lua_interop-idls'

parents 89ee2485 4ed5b90c
......@@ -2,6 +2,11 @@ local openbus = require "openbus"
local log = require "openbus.util.logger"
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"
-- customize test configuration for this case
......@@ -11,7 +16,8 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/proxy.idl")
loadidl(orb, basicidl)
loadidl(orb, chainingidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::chaining::HelloProxy")
-- get bus context manager
......
......@@ -4,6 +4,11 @@ local util = require "openbus.util.server"
local sysex = require "openbus.util.sysex"
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"
-- customize test configuration for this case
......@@ -13,8 +18,8 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/proxy.idl")
orb:loadidlfile("helloidl/hello.idl")
loadidl(orb, basicidl)
loadidl(orb, chainingidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::chaining::HelloProxy")
local serviface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
......
......@@ -4,6 +4,11 @@ local util = require "openbus.util.server"
local sysex = require "openbus.util.sysex"
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"
-- customize test configuration for this case
......@@ -13,7 +18,8 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("helloidl/hello.idl")
loadidl(orb, basicidl)
loadidl(orb, chainingidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager
......
......@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext"
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"
-- customize test configuration for this case
......@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definitions
orb:loadidlfile("idl/messages.idl")
loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Broadcaster")
-- get bus context manager
......
......@@ -2,6 +2,10 @@ local openbus = require "openbus"
local log = require "openbus.util.logger"
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"
-- customize test configuration for this case
......@@ -11,7 +15,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/messages.idl")
loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger")
-- get bus context manager
......
......@@ -5,6 +5,10 @@ local ComponentContext = require "scs.core.ComponentContext"
local table = require "loop.table"
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"
-- customize test configuration for this case
......@@ -14,7 +18,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definitions
orb:loadidlfile("idl/messages.idl")
loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Forwarder")
-- get bus context manager
......
......@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext"
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"
-- customize test configuration for this case
......@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definitions
orb:loadidlfile("idl/messages.idl")
loadidl(orb, delegationidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::delegation::Messenger")
-- 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"
local util = require "openbus.util.server"
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"
-- customize test configuration for this case
......@@ -10,7 +14,7 @@ settestcfg(...)
-- setup and start the ORB
local orb = openbus.initORB(orbcfg)
orb:loadidlfile("idl/hello.idl")
loadidl(orb, basicidl)
-- load interface definition
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
......
......@@ -3,6 +3,9 @@ local log = require "openbus.util.logger"
local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext"
local idl = require "openbus.interop.idl"
local basicidl = require "openbus.interop.idl.basic"
require "openbus.test.util"
-- customize test configuration for this case
......@@ -13,8 +16,8 @@ local orb1 = openbus.initORB(orbcfg)
local orb2 = openbus.initORB(orbcfg)
-- load interface definition
orb1:loadidlfile("idl/hello.idl")
orb2:loadidlfile("idl/hello.idl")
idl.loadto(orb1, basicidl)
idl.loadto(orb2, basicidl)
local iface = orb1.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager
......
......@@ -4,6 +4,9 @@ local log = require "openbus.util.logger"
local except = require "openbus.util.except"
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"
......@@ -14,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/mock.idl")
loadidl(orb, protocolidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::protocol::Server")
-- get bus context manager
......
......@@ -7,12 +7,15 @@ local ComponentContext = require "scs.core.ComponentContext"
local impl, servant, iface do
require "openbus.test.lowlevel"
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"
-- initialize the ORB
local orb = initORB()
idl.loadto(orb)
-- load interface definition
orb:loadidlfile("idl/mock.idl")
loadidl(orb, protocolidl)
iface = orb.types:lookup("tecgraf::openbus::interop::protocol::Server")
impl = { __type = iface }
function impl:NonBusCall(...)
......
......@@ -2,6 +2,10 @@ local openbus = require "openbus"
local log = require "openbus.util.logger"
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"
-- customize test configuration for this case
......@@ -11,7 +15,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager
......
......@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext"
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"
-- customize test configuration for this case
......@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- read login private key
......
......@@ -4,6 +4,10 @@ local util = require "openbus.util.server"
local ComponentContext = require "scs.core.ComponentContext"
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"
-- customize test configuration for this case
......@@ -13,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager
......
......@@ -5,7 +5,9 @@ testcase=$2
tasks=$3
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
busconsole="$busconsole -d"
......
......@@ -2,6 +2,10 @@ local openbus = require "openbus"
local log = require "openbus.util.logger"
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"
-- customize test configuration for this case
......@@ -11,7 +15,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager
......
local openbus = require "openbus"
local log = require "openbus.util.logger"
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"
require "openbus.test.util"
......@@ -12,7 +17,7 @@ settestcfg(...)
local orb = openbus.initORB(orbcfg)
-- load interface definition
orb:loadidlfile("idl/hello.idl")
loadidl(orb, basicidl)
local iface = orb.types:lookup("tecgraf::openbus::interop::simple::Hello")
-- get bus context manager
......
......@@ -129,3 +129,17 @@ $(LUADIR)/openbus/core/legacy/parsed.lua: $(IDL2LUA) $(OLDIDL) $(OLDDEPENDENTIDL
$(OILBIN) $(IDL2LUA) -I $(OPENBUSSCSIDL) -I $(OPENBUSOLDIDL) -I $(OPENBUSNEWIDL) -o $@ $(OLDIDL)
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)
Markdown is supported
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