[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[mihini-dev] RE : Mihini API Usage
|
Hi,
Regarding API #1 and #2 in your previous mail, those API are related to update capabilities of mihini agent and how to use them in an application.
To be frank, those capabilities are fairly advanced features.
You may start by reading the doc of the update module in mihini agent doc:
- section #6 "Software Update" in:
http://download.eclipse.org/mihini/org.eclipse.mihini-incubation-0.9/Docs/Modules_Documentation/agent_connector_libraries/Racon_Lua_library.html
- http://download.eclipse.org/mihini/org.eclipse.mihini-incubation-0.9/Docs/Modules_Documentation/agent/Software_Update_Module.html
- http://download.eclipse.org/mihini/org.eclipse.mihini-incubation-0.9/Docs/Modules_Documentation/agent/Software_Update_Package.html
Unfortunately, I don't have sample code for those two APIs.
For the API #3,
You can have a look at:
- http://download.eclipse.org/mihini/org.eclipse.mihini-incubation-0.9/Docs/Lua_User_API/racon.asset.html##%28asset%29.tree
- section "4. Data Reception (Data Writing)" in
http://download.eclipse.org/mihini/org.eclipse.mihini-incubation-0.9/Docs/Modules_Documentation/agent_connector_libraries/Racon_Lua_library.html
includes a small example of asset data tree usage.
Regards,
________________________________________
De : mihini-dev-bounces@xxxxxxxxxxx [mihini-dev-bounces@xxxxxxxxxxx] de la part de satishbaganal iit [satishbaganal@xxxxxxxxx]
Date d'envoi : vendredi 21 novembre 2014 15:33
À : mihini-dev@xxxxxxxxxxx
Objet : [mihini-dev] Mihini API Usage
Hi
Following is my code
---Initialize
assert(airvantage.init())
--Creates and returns a new airvantage.asset#asset instance.
asset = airvantage.newasset("house")
--Starts a newly created #asset.
assert(asset:start())
--Creates and returns a #table instance
--local tab1 = asset:newTable("bedroom", {"temperature", "humidity", "timestamp"}, "ram", "everyminute")
--Adds a row of data to the table.
tab1 :pushRow{ temperature=29.2, humidity=109.34, timestamp=os.time() }
Please Guide me how do i use the following api's and if any
examples share me.
1. asset:sendUpdateResult(componentName, updateResult)
2. asset:setUpdateHook(hook)
3. asset.tree