nspyre.data.source
Module Contents
Classes
For sourcing data to the |
- class nspyre.data.source.DataSource(name, addr='localhost', port=DATASERV_PORT, auto_reconnect=False)
For sourcing data to the
DataServer
. Seepop()
for typical usage example.- Parameters:
name (str) – Name of the data set.
addr (str) – Network address of the data server.
port (int) – Port of the data server.
auto_reconnect (bool) – If True, automatically reconnect to the data server if it is disconnected. Otherwise raise an error if connection fails.
- start()
Connect to the data server.
- stop()
Disconnect from the data server.
- push(data)
Push new data to the data server.
- Parameters:
data – Any python object (must be pickleable) to send. Ideally, this should be a dictionary to allow for simple attribute access from the sink side like
sink.my_var
.