Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mihini-dev] RE : Mhiini Table Creation

Hi,

The path in newTable API is a string used to structure the data to be sent to the server (with sub levels etc).
This path comes from the underlying IoT/M2M protocol used by Mihini: M3DA, you can have a look at http://wiki.eclipse.org/Mihini/M3DA_Specification to have more details on the protocol.

For example, if your asset is called "house"
    local asset = airvantage.newasset("house"), 
your table could be called "bedroom" and contains several variables:
    local tab1 = asset:newTable("bedroom", {"temperature", "humidity", "timestamp"}, "file", "now")
(With this example, the full path of the variable "temperature" is "house.bedroom.temperature": the separator for those paths is "." (dot))
 

Regarding your question about TCP socket, one of the main goal of using Mihini agent API (pushdata / table) is that the agent is responsible to send the data through a socket to a server.
Once you've called pushdata/table.pushRow APIs, the agent stores the data and is responsible for sending your data according to the data policy specified ("now" in my previous example, meaning  "a couple of seconds after the data has been pushed").

Let me know if this clearer for you.

Regards,

Laurent.

________________________________________
De : mihini-dev-bounces@xxxxxxxxxxx [mihini-dev-bounces@xxxxxxxxxxx] de la part de satishbaganal iit [satishbaganal@xxxxxxxxx]
Date d'envoi : vendredi 14 novembre 2014 15:06
À : mihini-dev@xxxxxxxxxxx
Objet : [mihini-dev] Mhiini Table Creation

Hi Guys

    Can You please explain me in creation of new table
"airvantage.table.newTable(path,columns,storage,sendPolicy)" what is the
 "path" variable refers is it path to create a table or just a name.

And is it possible to send the created table or pushdata using TCP socket if
yes please guide me how to use the tcp socket to send created table.


Back to the top