Last active
December 21, 2015 11:39
-
-
Save mastbaum/6300550 to your computer and use it in GitHub Desktop.
Specification for ln Backends
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backend.get_data_source_list() | |
Returns: list of data source names | |
Backend.create_data_source(name, type, reduction, interpolation, unit, description) | |
Returns: None | |
Backend.add_data(source_name, time, value) | |
Returns: (index, url) tuple, where index is index of data point and url is an image URL or None | |
Raises: | |
- TimeOrderError: The timestamp for the data point is before the last recorded data point | |
- BadTypeError: The value does not match the data type of the source or has the wrong dimensions for array types | |
Backend.get_data(source_name, offset=None, limit=None) | |
Returns: (times, values, resume) where times and values are arrays, resume is last returned index for pagination or None | |
Backend.update_config(source_name, unit='', description='') | |
Returns: None | |
Backend.get_config(source_name) | |
Returns: dict-like data source configuration | |
Backend.query(selectors, first, last, npoints) | |
Returns: (times, values) tuple, times and values are arrays | |
Backend.query_continuous(selectors, first, npoints) | |
Returns: Generator of (time, value) tuples |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment