Ha Ok I understand.
Well the update system was designed for update outside of the system: I mean so that something external to the system could update the system. If you want to do it from within your application it might be a little more complicated.
You cannot require agent.appcon in your application as appcon/update is run in the agent VM, and not in the applications.
However you can use Lua RPC module to connect to the agent VM and call function from there.
require ‘rpc’, then call “newclient()” API. This object will provide a ‘call()’ method, to which you can give the function name/param you want to call on the remote VM. (the rpc client object is also callable)
You may have to look to the rpc code (luafwk/rpc/common.lua) to have more information.
This would have the same behavior as when you do the call manually from a Lua shell.
Hope that’ll help.
Cuero
From: mihini-dev-bounces@xxxxxxxxxxx [mailto:mihini-dev-bounces@xxxxxxxxxxx] On Behalf Of Mohammadu Ramsath
Sent: Monday, December 09, 2013 7:05 AM
To: Mihini project developer discussions
Subject: Re: [mihini-dev] Appcon module
i was able to do that manual part, accesing appcon module and function through lua shell,
however when i tried to include apcon module to my lua app (ex: local appcon = require "appcon") it shows errors
i even tried local appcon=require "agent.appcon" it also doesn't works
my need is , i want to use the functions available in the appcon module such as install, start etc. to my lua app
can you please help me.
Thanks