********************
TCP CSV
********************

.. index:: presentations; TCP CSV

Overview
====================

TCPCSV Presentation is a simple TCP client which transmits CSV channel data

Each row of the CSV data is given as following format:

``channel_name,timestamp,value,unit``

+----------------------+-------------------+--------------+-------------+
|  <Channel Name>      |  <Timestamp>      |  <Value>     |  <Unit>     |
+----------------------+-------------------+--------------+-------------+

Where timestamp is adjusted to GMT and given in the format

``YYYY-mm-dd HH:MM:SS``

.. Warning:: 
    Be careful!  String samples are not escaped for commas at this time.

Configuration
====================

A typical TCP CSV configuration block looks like this::

    - name: tcpcsv
      driver: presentations.tcpcsv.tcpcsv:TCPCSV
      settings:
          server: <host IP address>
          port: <host port number>
          interval: 120
          channels: [sensor0.light, sensor0.temperature]

Settings
--------------------

server (required)
    IP address or hostname to connect to.

port (required)
    TCP port number to connect to.

interval (optional, default: 60)
    How often (in seconds) to emit CSV data.

channels (optional)
    List of channels to include in the data set. If this setting is not
    given, all channels will be included.



