obci_readmanager.signal_processing.tags.read_tags_source module

This module provides classes for managing tag from source.

Author:
Mateusz Kruszyński <mateusz.kruszynski@gmail.com>
class obci_readmanager.signal_processing.tags.read_tags_source.FileTagsSource(p_file_path)[source]

Bases: obci_readmanager.signal_processing.tags.read_tags_source.TagsSource

Subclass of class ‘TagsSource’, manage tags from file and memory_source.

get_tags(p_tag_type=None, p_from=None, p_len=None, p_func=None)[source]

Get tags of given type :param p_tag_type from memory_source or read from p_file.

Parameters:
  • p_tag_type – type of tag
  • p_from – start timestamp
  • p_len – number of tag
  • p_func – logic who to choose tag eg. tag[‘desc’][u’index’] == tag[‘desc’][u’target’]
set_tags(p_tags)[source]

If MemoryTagsSource is not None: set tags in memory_source else: create MemoryTagsSource and set tags.

class obci_readmanager.signal_processing.tags.read_tags_source.MemoryTagsSource(p_tags=None)[source]

Bases: obci_readmanager.signal_processing.tags.read_tags_source.TagsSource

Subclass of class ‘TagsSource’, stores tags in memory in ‘dict’ structure.

get_tags(p_tag_type=None, p_from=None, p_len=None, p_func=None)[source]

Get tags of given type.

Parameters:
  • p_tag_type – type of tag
  • p_from – start timestamp
  • p_len – number of tag
  • p_func – logic who to choose tag eg. tag[‘desc’][u’index’] == tag[‘desc’][u’target’]
Returns:

filtered tags

set_tags(p_tags)[source]

Set tags.

Parameters:p_tag – dictionary with tags.
class obci_readmanager.signal_processing.tags.read_tags_source.TagsSource[source]

Bases: object

Base TagsSource class.

get_tags()[source]

Method must be implemented in subclass.