VSCP Tables

VSCP tables is a built in feature of the VSCP daemon that let you collect data (measurements) from events in a SQL database over time automatically. The only thing you need to do is to add a VSCP decision matrix entry for the collection and a definition of your collection to the configuration.

You can build two types of tables

  • Dynamic table which works like any other database and save data in ever growing database.

  • Static table which is a table with a static number of record. A table of this type can for example collect temperatures from temperature sensor over the last 24 hours.

  • Max table which is a table that grows up to a specified size of elements and then clear all elements and start to fill the table again.

The collected data can be reached over

  • The tcp/ip interface.

  • The REST interface.

  • The websocket interface.

  • You can also read/write table data from Javascripts and LUA scripts.

Over the interfaces you can do statistical analysis of the data but the main use for the collected data is to display it in a user interface element such as a diagram or a table. The way VSCP handles measurements one display solution will work for all types of measurements. For a JavaScript application data over specific ranges or hole (static) tables can be fetched in an easy way over the REST or the websocket API's. Examples are provided. For higher level languages such as C/C++/C#/Java/Python etc the VSCP helper library is a great tool.

Tables are stored in

  • /srv/vscp/tables on Linux type systems.

  • /programdata/vscp/tables on Windows systems.

  • In memory on both Linux type and Windows systems.

The in memory type is very fast but is of course not persistent over time.

Configure a tables

You can define and configure tables in the main configuration file vscpd.xml or in the configuration database. Definitions in the xml file override conflicting definitions in the database configuration file.

Changes done in the VSCP administrative interface goes to the configuration database file.

The table definitions in the configuration file is described here.

Collect data

described here.

Very Simple Control Protocol
Thu Jan 17 2019 17:41:36 GMT+0000 (UTC)
This document is licensed under Creative Commons BY 4.0 and can be freely copied, redistributed, remixed, transformed, built upon as long as you give credits to the author.

results matching ""

    No results matching ""