Commit 95648d14 authored by Ricardo Calheiros de Miranda Cosme's avatar Ricardo Calheiros de Miranda Cosme
Browse files

[Complementando o commit r84441]

* Adaptação do demo hello de Lua.
* Edentação do hello.idl.



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/trunk@84518 ae0415b3-e90b-0410-900d-d0be9363c56b
parent d3e95a4b
......@@ -2,15 +2,11 @@
#define HELLO_IDL
module demoidl {
module hello {
interface IHello {
void sayHello();
};
};
module hello {
interface IHello {
void sayHello();
};
};
};
#endif
......@@ -18,7 +18,7 @@ local CredentialManager = require "openbus.common.CredentialManager"
local IComponent = require "scs.core.IComponent"
-- oil.verbose:level(0)
orb:loadidlfile "hello.idl"
orb:loadidlfile "../idl/hello.idl"
function main ()
local IDLPATH_DIR = os.getenv("IDLPATH_DIR")
......@@ -52,8 +52,8 @@ function main ()
local offers = registryService:find({name = "type", value = "type"})
-- Assume que o publisher o nico servio cadastrado.
SS = orb:narrow(offers[1].member, "IDL:scs/core/IComponent:1.0")
local facet = SS:getFacet("IDL:Hello:1.0")
hello = orb:narrow(facet, "IDL:Hello:1.0")
local facet = SS:getFacet("IDL:demoidl/hello/IHello:1.0")
hello = orb:narrow(facet, "IDL:demoidl/hello/IHello:1.0")
hello:sayHello()
end
......
/*
** hello.idl
*/
interface Hello {
void sayHello() ;
} ;
......@@ -19,7 +19,7 @@ local CredentialManager = require "openbus.common.CredentialManager"
local IComponent = require "scs.core.IComponent"
-- oil.verbose:level(0)
orb:loadidlfile "hello.idl"
orb:loadidlfile "../idl/hello.idl"
oil.tasks:register(coroutine.create(function() return orb:run() end))
......@@ -65,7 +65,7 @@ function main ()
end
local M = IComponent("Membro", 1)
M = orb:newservant(M, nil, "IDL:scs/core/IComponent:1.0")
M:addFacet("faceta", "IDL:Hello:1.0", Hello)
M:addFacet("faceta", "IDL:demoidl/hello/IHello:1.0", Hello)
success, registryIdentifier = registryService:register({ properties = {{name = "type", value = {"type"}}}, member = M, })
print("*********************************************\n")
print("PUBLISHER\nServio Hello registrado no barramento do OpenBus.\n")
......
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