# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.2.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.

"""
A Python interface to the MOMA C++ library.

Please see the c699util User's Guide for module documentation, including
example code.

User's Guide: 
    http://699wiki.com/wiki/index.php/C699util_User%27s_Guide

Developer's Guide: 
    http://699wiki.com/wiki/index.php/C699util_Developer%27s_Guide
"""

from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _c699util
else:
    import _c699util

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class SwigPyIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _c699util.delete_SwigPyIterator

    def value(self):
        return _c699util.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _c699util.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _c699util.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _c699util.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _c699util.SwigPyIterator_equal(self, x)

    def copy(self):
        return _c699util.SwigPyIterator_copy(self)

    def next(self):
        return _c699util.SwigPyIterator_next(self)

    def __next__(self):
        return _c699util.SwigPyIterator___next__(self)

    def previous(self):
        return _c699util.SwigPyIterator_previous(self)

    def advance(self, n):
        return _c699util.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _c699util.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _c699util.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _c699util.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _c699util.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _c699util.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _c699util.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register SwigPyIterator in _c699util:
_c699util.SwigPyIterator_swigregister(SwigPyIterator)
class PyMsgLogLine(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _c699util.PyMsgLogLine_swiginit(self, _c699util.new_PyMsgLogLine(*args))

    def unixTime(self):
        return _c699util.PyMsgLogLine_unixTime(self)

    def relativeTime(self):
        return _c699util.PyMsgLogLine_relativeTime(self)

    def msg(self):
        return _c699util.PyMsgLogLine_msg(self)
    __swig_destroy__ = _c699util.delete_PyMsgLogLine

# Register PyMsgLogLine in _c699util:
_c699util.PyMsgLogLine_swigregister(PyMsgLogLine)
class PyMsgLogCache(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _c699util.PyMsgLogCache_swiginit(self, _c699util.new_PyMsgLogCache())

    def size(self):
        return _c699util.PyMsgLogCache_size(self)

    def get(self, index):
        return _c699util.PyMsgLogCache_get(self, index)

    def __len__(self):
        return self.size()


    def __getitem__(self, index):
        if index < 0:
            index += self.size()
        return self.get(index)


    def __iter__(self):
        for i in range(len(self)):
            yield self[i]

    __swig_destroy__ = _c699util.delete_PyMsgLogCache

# Register PyMsgLogCache in _c699util:
_c699util.PyMsgLogCache_swigregister(PyMsgLogCache)
class PyDramsMarker(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _c699util.PyDramsMarker_swiginit(self, _c699util.new_PyDramsMarker(*args))

    def t_start_us(self):
        return _c699util.PyDramsMarker_t_start_us(self)

    def t_end_us(self):
        return _c699util.PyDramsMarker_t_end_us(self)

    def marker_id(self):
        return _c699util.PyDramsMarker_marker_id(self)

    def marker_type(self):
        return _c699util.PyDramsMarker_marker_type(self)

    def text(self):
        return _c699util.PyDramsMarker_text(self)

    def is_complete(self):
        return _c699util.PyDramsMarker_is_complete(self)
    __swig_destroy__ = _c699util.delete_PyDramsMarker

# Register PyDramsMarker in _c699util:
_c699util.PyDramsMarker_swigregister(PyDramsMarker)
class PyDramsMarkerCache(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _c699util.PyDramsMarkerCache_swiginit(self, _c699util.new_PyDramsMarkerCache())

    def size(self):
        return _c699util.PyDramsMarkerCache_size(self)

    def get(self, index):
        return _c699util.PyDramsMarkerCache_get(self, index)

    def __len__(self):
        return self.size()


    def __getitem__(self, index):
        if index < 0:
            index += self.size()
        return self.get(index)


    def __iter__(self):
        for i in range(len(self)):
            yield self[i]

    __swig_destroy__ = _c699util.delete_PyDramsMarkerCache

# Register PyDramsMarkerCache in _c699util:
_c699util.PyDramsMarkerCache_swigregister(PyDramsMarkerCache)
class ListOfIntegers(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _c699util.ListOfIntegers_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _c699util.ListOfIntegers___nonzero__(self)

    def __bool__(self):
        return _c699util.ListOfIntegers___bool__(self)

    def __len__(self):
        return _c699util.ListOfIntegers___len__(self)

    def __getslice__(self, i, j):
        return _c699util.ListOfIntegers___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _c699util.ListOfIntegers___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _c699util.ListOfIntegers___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _c699util.ListOfIntegers___delitem__(self, *args)

    def __getitem__(self, *args):
        return _c699util.ListOfIntegers___getitem__(self, *args)

    def __setitem__(self, *args):
        return _c699util.ListOfIntegers___setitem__(self, *args)

    def pop(self):
        return _c699util.ListOfIntegers_pop(self)

    def append(self, x):
        return _c699util.ListOfIntegers_append(self, x)

    def empty(self):
        return _c699util.ListOfIntegers_empty(self)

    def size(self):
        return _c699util.ListOfIntegers_size(self)

    def swap(self, v):
        return _c699util.ListOfIntegers_swap(self, v)

    def begin(self):
        return _c699util.ListOfIntegers_begin(self)

    def end(self):
        return _c699util.ListOfIntegers_end(self)

    def rbegin(self):
        return _c699util.ListOfIntegers_rbegin(self)

    def rend(self):
        return _c699util.ListOfIntegers_rend(self)

    def clear(self):
        return _c699util.ListOfIntegers_clear(self)

    def get_allocator(self):
        return _c699util.ListOfIntegers_get_allocator(self)

    def pop_back(self):
        return _c699util.ListOfIntegers_pop_back(self)

    def erase(self, *args):
        return _c699util.ListOfIntegers_erase(self, *args)

    def __init__(self, *args):
        _c699util.ListOfIntegers_swiginit(self, _c699util.new_ListOfIntegers(*args))

    def push_back(self, x):
        return _c699util.ListOfIntegers_push_back(self, x)

    def front(self):
        return _c699util.ListOfIntegers_front(self)

    def back(self):
        return _c699util.ListOfIntegers_back(self)

    def assign(self, n, x):
        return _c699util.ListOfIntegers_assign(self, n, x)

    def resize(self, *args):
        return _c699util.ListOfIntegers_resize(self, *args)

    def insert(self, *args):
        return _c699util.ListOfIntegers_insert(self, *args)

    def reserve(self, n):
        return _c699util.ListOfIntegers_reserve(self, n)

    def capacity(self):
        return _c699util.ListOfIntegers_capacity(self)
    __swig_destroy__ = _c699util.delete_ListOfIntegers

# Register ListOfIntegers in _c699util:
_c699util.ListOfIntegers_swigregister(ListOfIntegers)
class ListOfFloats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _c699util.ListOfFloats_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _c699util.ListOfFloats___nonzero__(self)

    def __bool__(self):
        return _c699util.ListOfFloats___bool__(self)

    def __len__(self):
        return _c699util.ListOfFloats___len__(self)

    def __getslice__(self, i, j):
        return _c699util.ListOfFloats___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _c699util.ListOfFloats___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _c699util.ListOfFloats___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _c699util.ListOfFloats___delitem__(self, *args)

    def __getitem__(self, *args):
        return _c699util.ListOfFloats___getitem__(self, *args)

    def __setitem__(self, *args):
        return _c699util.ListOfFloats___setitem__(self, *args)

    def pop(self):
        return _c699util.ListOfFloats_pop(self)

    def append(self, x):
        return _c699util.ListOfFloats_append(self, x)

    def empty(self):
        return _c699util.ListOfFloats_empty(self)

    def size(self):
        return _c699util.ListOfFloats_size(self)

    def swap(self, v):
        return _c699util.ListOfFloats_swap(self, v)

    def begin(self):
        return _c699util.ListOfFloats_begin(self)

    def end(self):
        return _c699util.ListOfFloats_end(self)

    def rbegin(self):
        return _c699util.ListOfFloats_rbegin(self)

    def rend(self):
        return _c699util.ListOfFloats_rend(self)

    def clear(self):
        return _c699util.ListOfFloats_clear(self)

    def get_allocator(self):
        return _c699util.ListOfFloats_get_allocator(self)

    def pop_back(self):
        return _c699util.ListOfFloats_pop_back(self)

    def erase(self, *args):
        return _c699util.ListOfFloats_erase(self, *args)

    def __init__(self, *args):
        _c699util.ListOfFloats_swiginit(self, _c699util.new_ListOfFloats(*args))

    def push_back(self, x):
        return _c699util.ListOfFloats_push_back(self, x)

    def front(self):
        return _c699util.ListOfFloats_front(self)

    def back(self):
        return _c699util.ListOfFloats_back(self)

    def assign(self, n, x):
        return _c699util.ListOfFloats_assign(self, n, x)

    def resize(self, *args):
        return _c699util.ListOfFloats_resize(self, *args)

    def insert(self, *args):
        return _c699util.ListOfFloats_insert(self, *args)

    def reserve(self, n):
        return _c699util.ListOfFloats_reserve(self, n)

    def capacity(self):
        return _c699util.ListOfFloats_capacity(self)
    __swig_destroy__ = _c699util.delete_ListOfFloats

# Register ListOfFloats in _c699util:
_c699util.ListOfFloats_swigregister(ListOfFloats)
class ListOfRfStatusEntrys(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _c699util.ListOfRfStatusEntrys_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _c699util.ListOfRfStatusEntrys___nonzero__(self)

    def __bool__(self):
        return _c699util.ListOfRfStatusEntrys___bool__(self)

    def __len__(self):
        return _c699util.ListOfRfStatusEntrys___len__(self)

    def __getslice__(self, i, j):
        return _c699util.ListOfRfStatusEntrys___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _c699util.ListOfRfStatusEntrys___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _c699util.ListOfRfStatusEntrys___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _c699util.ListOfRfStatusEntrys___delitem__(self, *args)

    def __getitem__(self, *args):
        return _c699util.ListOfRfStatusEntrys___getitem__(self, *args)

    def __setitem__(self, *args):
        return _c699util.ListOfRfStatusEntrys___setitem__(self, *args)

    def pop(self):
        return _c699util.ListOfRfStatusEntrys_pop(self)

    def append(self, x):
        return _c699util.ListOfRfStatusEntrys_append(self, x)

    def empty(self):
        return _c699util.ListOfRfStatusEntrys_empty(self)

    def size(self):
        return _c699util.ListOfRfStatusEntrys_size(self)

    def swap(self, v):
        return _c699util.ListOfRfStatusEntrys_swap(self, v)

    def begin(self):
        return _c699util.ListOfRfStatusEntrys_begin(self)

    def end(self):
        return _c699util.ListOfRfStatusEntrys_end(self)

    def rbegin(self):
        return _c699util.ListOfRfStatusEntrys_rbegin(self)

    def rend(self):
        return _c699util.ListOfRfStatusEntrys_rend(self)

    def clear(self):
        return _c699util.ListOfRfStatusEntrys_clear(self)

    def get_allocator(self):
        return _c699util.ListOfRfStatusEntrys_get_allocator(self)

    def pop_back(self):
        return _c699util.ListOfRfStatusEntrys_pop_back(self)

    def erase(self, *args):
        return _c699util.ListOfRfStatusEntrys_erase(self, *args)

    def __init__(self, *args):
        _c699util.ListOfRfStatusEntrys_swiginit(self, _c699util.new_ListOfRfStatusEntrys(*args))

    def push_back(self, x):
        return _c699util.ListOfRfStatusEntrys_push_back(self, x)

    def front(self):
        return _c699util.ListOfRfStatusEntrys_front(self)

    def back(self):
        return _c699util.ListOfRfStatusEntrys_back(self)

    def assign(self, n, x):
        return _c699util.ListOfRfStatusEntrys_assign(self, n, x)

    def resize(self, *args):
        return _c699util.ListOfRfStatusEntrys_resize(self, *args)

    def insert(self, *args):
        return _c699util.ListOfRfStatusEntrys_insert(self, *args)

    def reserve(self, n):
        return _c699util.ListOfRfStatusEntrys_reserve(self, n)

    def capacity(self):
        return _c699util.ListOfRfStatusEntrys_capacity(self)
    __swig_destroy__ = _c699util.delete_ListOfRfStatusEntrys

# Register ListOfRfStatusEntrys in _c699util:
_c699util.ListOfRfStatusEntrys_swigregister(ListOfRfStatusEntrys)
class ListOfTMDatapoints(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _c699util.ListOfTMDatapoints_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _c699util.ListOfTMDatapoints___nonzero__(self)

    def __bool__(self):
        return _c699util.ListOfTMDatapoints___bool__(self)

    def __len__(self):
        return _c699util.ListOfTMDatapoints___len__(self)

    def __getslice__(self, i, j):
        return _c699util.ListOfTMDatapoints___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _c699util.ListOfTMDatapoints___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _c699util.ListOfTMDatapoints___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _c699util.ListOfTMDatapoints___delitem__(self, *args)

    def __getitem__(self, *args):
        return _c699util.ListOfTMDatapoints___getitem__(self, *args)

    def __setitem__(self, *args):
        return _c699util.ListOfTMDatapoints___setitem__(self, *args)

    def pop(self):
        return _c699util.ListOfTMDatapoints_pop(self)

    def append(self, x):
        return _c699util.ListOfTMDatapoints_append(self, x)

    def empty(self):
        return _c699util.ListOfTMDatapoints_empty(self)

    def size(self):
        return _c699util.ListOfTMDatapoints_size(self)

    def swap(self, v):
        return _c699util.ListOfTMDatapoints_swap(self, v)

    def begin(self):
        return _c699util.ListOfTMDatapoints_begin(self)

    def end(self):
        return _c699util.ListOfTMDatapoints_end(self)

    def rbegin(self):
        return _c699util.ListOfTMDatapoints_rbegin(self)

    def rend(self):
        return _c699util.ListOfTMDatapoints_rend(self)

    def clear(self):
        return _c699util.ListOfTMDatapoints_clear(self)

    def get_allocator(self):
        return _c699util.ListOfTMDatapoints_get_allocator(self)

    def pop_back(self):
        return _c699util.ListOfTMDatapoints_pop_back(self)

    def erase(self, *args):
        return _c699util.ListOfTMDatapoints_erase(self, *args)

    def __init__(self, *args):
        _c699util.ListOfTMDatapoints_swiginit(self, _c699util.new_ListOfTMDatapoints(*args))

    def push_back(self, x):
        return _c699util.ListOfTMDatapoints_push_back(self, x)

    def front(self):
        return _c699util.ListOfTMDatapoints_front(self)

    def back(self):
        return _c699util.ListOfTMDatapoints_back(self)

    def assign(self, n, x):
        return _c699util.ListOfTMDatapoints_assign(self, n, x)

    def resize(self, *args):
        return _c699util.ListOfTMDatapoints_resize(self, *args)

    def insert(self, *args):
        return _c699util.ListOfTMDatapoints_insert(self, *args)

    def reserve(self, n):
        return _c699util.ListOfTMDatapoints_reserve(self, n)

    def capacity(self):
        return _c699util.ListOfTMDatapoints_capacity(self)
    __swig_destroy__ = _c699util.delete_ListOfTMDatapoints

# Register ListOfTMDatapoints in _c699util:
_c699util.ListOfTMDatapoints_swigregister(ListOfTMDatapoints)
class ListOfMetaMarkers(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def iterator(self):
        return _c699util.ListOfMetaMarkers_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _c699util.ListOfMetaMarkers___nonzero__(self)

    def __bool__(self):
        return _c699util.ListOfMetaMarkers___bool__(self)

    def __len__(self):
        return _c699util.ListOfMetaMarkers___len__(self)

    def __getslice__(self, i, j):
        return _c699util.ListOfMetaMarkers___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _c699util.ListOfMetaMarkers___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _c699util.ListOfMetaMarkers___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _c699util.ListOfMetaMarkers___delitem__(self, *args)

    def __getitem__(self, *args):
        return _c699util.ListOfMetaMarkers___getitem__(self, *args)

    def __setitem__(self, *args):
        return _c699util.ListOfMetaMarkers___setitem__(self, *args)

    def pop(self):
        return _c699util.ListOfMetaMarkers_pop(self)

    def append(self, x):
        return _c699util.ListOfMetaMarkers_append(self, x)

    def empty(self):
        return _c699util.ListOfMetaMarkers_empty(self)

    def size(self):
        return _c699util.ListOfMetaMarkers_size(self)

    def swap(self, v):
        return _c699util.ListOfMetaMarkers_swap(self, v)

    def begin(self):
        return _c699util.ListOfMetaMarkers_begin(self)

    def end(self):
        return _c699util.ListOfMetaMarkers_end(self)

    def rbegin(self):
        return _c699util.ListOfMetaMarkers_rbegin(self)

    def rend(self):
        return _c699util.ListOfMetaMarkers_rend(self)

    def clear(self):
        return _c699util.ListOfMetaMarkers_clear(self)

    def get_allocator(self):
        return _c699util.ListOfMetaMarkers_get_allocator(self)

    def pop_back(self):
        return _c699util.ListOfMetaMarkers_pop_back(self)

    def erase(self, *args):
        return _c699util.ListOfMetaMarkers_erase(self, *args)

    def __init__(self, *args):
        _c699util.ListOfMetaMarkers_swiginit(self, _c699util.new_ListOfMetaMarkers(*args))

    def push_back(self, x):
        return _c699util.ListOfMetaMarkers_push_back(self, x)

    def front(self):
        return _c699util.ListOfMetaMarkers_front(self)

    def back(self):
        return _c699util.ListOfMetaMarkers_back(self)

    def assign(self, n, x):
        return _c699util.ListOfMetaMarkers_assign(self, n, x)

    def resize(self, *args):
        return _c699util.ListOfMetaMarkers_resize(self, *args)

    def insert(self, *args):
        return _c699util.ListOfMetaMarkers_insert(self, *args)

    def reserve(self, n):
        return _c699util.ListOfMetaMarkers_reserve(self, n)

    def capacity(self):
        return _c699util.ListOfMetaMarkers_capacity(self)
    __swig_destroy__ = _c699util.delete_ListOfMetaMarkers

# Register ListOfMetaMarkers in _c699util:
_c699util.ListOfMetaMarkers_swigregister(ListOfMetaMarkers)
class MetaMarker(object):
    r"""Proxy of C++ MomGse::MetaMarker class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    startRelativeTimeInSecs = property(_c699util.MetaMarker_startRelativeTimeInSecs_get, _c699util.MetaMarker_startRelativeTimeInSecs_set, doc=r"""startRelativeTimeInSecs : double""")
    endRelativeTimeInSecs = property(_c699util.MetaMarker_endRelativeTimeInSecs_get, _c699util.MetaMarker_endRelativeTimeInSecs_set, doc=r"""endRelativeTimeInSecs : double""")
    metaMarkerId = property(_c699util.MetaMarker_metaMarkerId_get, _c699util.MetaMarker_metaMarkerId_set, doc=r"""metaMarkerId : int""")
    index = property(_c699util.MetaMarker_index_get, _c699util.MetaMarker_index_set, doc=r"""index : int""")
    msg = property(_c699util.MetaMarker_msg_get, _c699util.MetaMarker_msg_set, doc=r"""msg : std::string""")

    def __init__(self):
        r"""__init__(MetaMarker self) -> MetaMarker"""
        _c699util.MetaMarker_swiginit(self, _c699util.new_MetaMarker())
    __swig_destroy__ = _c699util.delete_MetaMarker

# Register MetaMarker in _c699util:
_c699util.MetaMarker_swigregister(MetaMarker)

def initC699Util(*args):
    r"""
    initC699Util(std::string telemetryFilename="")

    Parameters
    ----------
    telemetryFilename: std::string

    This method is intended for internal use only. Initialize the underlying 
    C++ library as needed.
    """
    return _c699util.initC699Util(*args)

def construct_tmfile(tmfilename):
    """
    construct_tmfile(string tmfilename) -> c699util::TMFile

    Parameters
    ----------
    tmfilename: string - absolute pathname of TMFile (i.e., there needs to be
                         'tm.mom' at the end)

    Constructs and returns a c699util.TMFile object, initializing the
    underlying library as needed.
    """
    initC699Util(tmfilename)
    return TMFile(tmfilename)


def get_tmfile(*args, **kwargs):
    """
    get_tmfile(*args, **kwargs) -> c699util::TMFile

    Parameters
    ----------
    *args, **kwargs: See tmread.get_tmfile() for options.

    This is a thin wrapper around tmread.get_tmfile(), so that we can avoid
    this sort of clunkiness in all of our scripts:

        import c699util, tmread
        tmfile = get_tmfile(12345)
        c_tmfile = c699util.construct_tmfile(tmfile.filename)

    With this function, we can instead just do:

        import c699util
        c_tmfile = c699util.get_tmfile(12345)

    Any arguments are passed directly to tmread.get_tmfile(), so you can
    specify zero parameters, or the TID number, or the directory, or the
    full path, etc.
    """
    from tmread import get_tmfile as _get_tmfile
    tmfile = _get_tmfile(*args, **kwargs)
    return construct_tmfile(tmfile.filename)


def construct_science_data_cache(tmfilename, skip_zero_id_markers=False, avg_summed_scans=False):
    """
    construct_science_data_cache(string tmfilename) -> c699util::ScienceDataCacheWrapper

    Parameters
    ----------
    tmfilename: string - absolute pathname of TMFile (i.e., there needs to be
                         'tm.mom' at the end)

    Constructs and returns a c699util.ScienceDataCacheWrapper object,
    initializing the underlying library as needed.
    """
    initC699Util(tmfilename)
    return ScienceDataCacheWrapper(skip_zero_id_markers, avg_summed_scans)


def construct_msglog_cache(tmfile_path : str) -> PyMsgLogCache:
    """
    Returns a PyMsgLogCache for the given tmfile_path.
    """
    initC699Util(tmfile_path)
    return PyMsgLogCache()


def construct_drams_marker_cache(tmfile_path : str) -> PyDramsMarkerCache:
    """
    Returns a PyDramsMarkerCache for the given tmfile_path.
    """
    initC699Util(tmfile_path)
    return PyDramsMarkerCache()


def get_science_data_cache(*args, **kwargs):
    """
    get_science_data_cache(*args, **kwargs) -> c699util::TMFile

    Parameters
    ----------
    *args, **kwargs: See tmread.get_tmfile() for options.

    This is a thin wrapper around tmread.get_tmfile(), so that we can avoid
    this sort of clunkiness in all of our scripts:

        import c699util, tmread
        tmfile = get_tmfile(12345)
        science_cache = c699util.construct_science_data_cache(tmfile.filename)

    With this function, we can instead just do:

        import c699util
        c_tmfile = c699util.get_science_data_cache(12345)

    Any arguments are passed directly to tmread.get_tmfile(), so you can
    specify zero parameters, or the TID number, or the directory, or the
    full path, etc.
    """
    from tmread import get_tmfile as _get_tmfile
    tmfile = _get_tmfile(*args, **kwargs)
    return construct_science_data_cache(tmfile.filename)


def get_scans(tmfile, *args, **kwargs):
    """
    get_scans(tmfile, *args, **kwargs) -> yields PythonStyleMomaScan objects

    Parameters
    ----------
    tmfile: c699util.TMFile object

    Yields PythonStyleMomaScan objects from the given c699util.TMFile object.
    NOTE THAT THIS CONSTRUCTS A NEW SCIENCE DATA CACHE EACH TIME IT IS CALLED.
    If you do this more than once per script, you should probably call
    c699util.construct_science_data_cache() and just keep reusing the returned
    ScienceDataCache.
    """
    scienceDataCache = construct_science_data_cache(tmfile.filename())
    for scan in scienceDataCache(*args, **kwargs):
        yield scan


def get_xina_umkid(tid, xina_marker_index, marker_id):
    """
    get_xina_umkid(int tid, int xina_marker_index, int marker_id) -> int

    Parameters
    ----------
    tid: int - the Telemetry ID number
    xina_marker_index: the 0-based index of the marker within the tlm file
    marker_id: the actual marker ID

    Returns the XINA Universal Marker ID, which is essentially a concatenation
    of TID, marker index, and marker ID.
    """
    return (tid * 10000000000) + (xina_marker_index * 100000) + marker_id

class TMDatapoint(object):
    r"""Proxy of C++ c699util::TMDatapoint class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        __init__(TMDatapoint self) -> TMDatapoint
        __init__(TMDatapoint self, double unix_timestamp, double relative_timestamp, double value) -> TMDatapoint

        Parameters
        ----------
        unix_timestamp: double
        relative_timestamp: double
        value: double

        """
        _c699util.TMDatapoint_swiginit(self, _c699util.new_TMDatapoint(*args))
    unix_timestamp = property(_c699util.TMDatapoint_unix_timestamp_get, _c699util.TMDatapoint_unix_timestamp_set, doc=r"""unix_timestamp : double""")
    relative_timestamp = property(_c699util.TMDatapoint_relative_timestamp_get, _c699util.TMDatapoint_relative_timestamp_set, doc=r"""relative_timestamp : double""")
    value = property(_c699util.TMDatapoint_value_get, _c699util.TMDatapoint_value_set, doc=r"""value : double""")
    __swig_destroy__ = _c699util.delete_TMDatapoint

# Register TMDatapoint in _c699util:
_c699util.TMDatapoint_swigregister(TMDatapoint)
cvar = _c699util.cvar
MIN_META_MARKER_ID = cvar.MIN_META_MARKER_ID
MAX_META_MARKER_ID = cvar.MAX_META_MARKER_ID

class RfStatusEntry(object):
    r"""Proxy of C++ c699util::RfStatusEntry class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    start_bin = property(_c699util.RfStatusEntry_start_bin_get, _c699util.RfStatusEntry_start_bin_set, doc=r"""start_bin : unsigned short""")
    rf_amp_v = property(_c699util.RfStatusEntry_rf_amp_v_get, _c699util.RfStatusEntry_rf_amp_v_set, doc=r"""rf_amp_v : double""")
    rf_amp_dac_v = property(_c699util.RfStatusEntry_rf_amp_dac_v_get, _c699util.RfStatusEntry_rf_amp_dac_v_set, doc=r"""rf_amp_dac_v : double""")
    aux_amp_dac_v = property(_c699util.RfStatusEntry_aux_amp_dac_v_get, _c699util.RfStatusEntry_aux_amp_dac_v_set, doc=r"""aux_amp_dac_v : double""")

    def __init__(self):
        r"""__init__(RfStatusEntry self) -> RfStatusEntry"""
        _c699util.RfStatusEntry_swiginit(self, _c699util.new_RfStatusEntry())
    __swig_destroy__ = _c699util.delete_RfStatusEntry

# Register RfStatusEntry in _c699util:
_c699util.RfStatusEntry_swigregister(RfStatusEntry)
class PythonStyleMomaScan(object):
    r"""Proxy of C++ c699util::PythonStyleMomaScan class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def unix_timestamp(self):
        r"""
        unix_timestamp(PythonStyleMomaScan self) -> double
        Return the unix timestamp (a number of seconds) of this scan
        """
        return _c699util.PythonStyleMomaScan_unix_timestamp(self)

    def relative_timestamp(self):
        r"""
        relative_timestamp(PythonStyleMomaScan self) -> double
        Return the relative timestamp (a number of seconds) of this scan
        """
        return _c699util.PythonStyleMomaScan_relative_timestamp(self)

    def marker_relative_timestamp(self):
        r"""
        marker_relative_timestamp(PythonStyleMomaScan self) -> double
        Return the scan marker's relative timestamp (a number of seconds)
        """
        return _c699util.PythonStyleMomaScan_marker_relative_timestamp(self)

    def marker_id(self):
        r"""
        marker_id(PythonStyleMomaScan self) -> int
        Returns the 0-based index of the marker packet that precedes this scan.
        """
        return _c699util.PythonStyleMomaScan_marker_id(self)

    def xina_marker_index(self):
        r"""
        xina_marker_index(PythonStyleMomaScan self) -> int
        Returns the 0-based index of the marker packet that precedes this scan.
        """
        return _c699util.PythonStyleMomaScan_xina_marker_index(self)

    def marker_text(self):
        r"""
        marker_text(PythonStyleMomaScan self) -> std::string
        Returns the text of the marker that preceded this scan.
        """
        return _c699util.PythonStyleMomaScan_marker_text(self)

    def get_meta_markers(self):
        r"""
        get_meta_markers(PythonStyleMomaScan self) -> ListOfMetaMarkers
        Returns a list of meta markers that apply to this scan.
        """
        return _c699util.PythonStyleMomaScan_get_meta_markers(self)

    def counts(self):
        r"""
        counts(PythonStyleMomaScan self) -> ListOfIntegers
        Returns ion counts for each bin. The returned list will contain one 
        count for each bin in the scan.
        """
        return _c699util.PythonStyleMomaScan_counts(self)

    def culled_counts(self):
        r"""
        culled_counts(PythonStyleMomaScan self) -> ListOfIntegers
        Returns a condensed version of the scan with less important points
        removed. This is intended for showing quick previews of scans on XINA
        Online without having to download the full scan. The format of the
        returned list is: x0,y0, x1,y1, x2,y2, etc, where x is the bin number
        and y is the ion count.

        """
        return _c699util.PythonStyleMomaScan_culled_counts(self)

    def m_over_z_values(self):
        r"""
        m_over_z_values(PythonStyleMomaScan self) -> ListOfFloats
        Returns the m/z values for this scan. The returned list will have one 
        m/z value for every bin.

        """
        return _c699util.PythonStyleMomaScan_m_over_z_values(self)

    def total_ion_count(self):
        r"""total_ion_count(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan_total_ion_count(self)

    def total_ion_counts(self):
        r"""
        total_ion_counts(PythonStyleMomaScan self) -> ListOfIntegers
        Returns a list of total ion counts. This method really only applies to 
        sum packet scans, which are created from multiple individual scans. 
        This method returns the TICs for those individual scans.

        """
        return _c699util.PythonStyleMomaScan_total_ion_counts(self)

    def corrected_total_ion_count(self):
        r"""corrected_total_ion_count(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_corrected_total_ion_count(self)

    def corrected_total_ion_count_factor(self):
        r"""corrected_total_ion_count_factor(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_corrected_total_ion_count_factor(self)

    def corrected_total_ion_count_factors(self):
        r"""corrected_total_ion_count_factors(PythonStyleMomaScan self) -> ListOfFloats"""
        return _c699util.PythonStyleMomaScan_corrected_total_ion_count_factors(self)

    def science_data_pkt_version(self):
        r"""science_data_pkt_version(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan_science_data_pkt_version(self)

    def highest_count(self):
        r"""
        highest_count(PythonStyleMomaScan self) -> int
        Returns the highest ion count in this scan.

        """
        return _c699util.PythonStyleMomaScan_highest_count(self)

    def highest_count_bin_num(self):
        r"""
        highest_count_bin_num(PythonStyleMomaScan self) -> int
        Returns the bin containing the highest ion count.

        """
        return _c699util.PythonStyleMomaScan_highest_count_bin_num(self)

    def lowest_count(self):
        r"""
        lowest_count(PythonStyleMomaScan self) -> int
        Returns the lowest ion count of this scan.

        """
        return _c699util.PythonStyleMomaScan_lowest_count(self)

    def rf_status_entries(self):
        r"""rf_status_entries(PythonStyleMomaScan self) -> ListOfRfStatusEntrys"""
        return _c699util.PythonStyleMomaScan_rf_status_entries(self)

    def rf_amp_start(self):
        r"""rf_amp_start(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_rf_amp_start(self)

    def rf_amp_end(self):
        r"""rf_amp_end(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_rf_amp_end(self)

    def rf_amp_dac_start(self):
        r"""rf_amp_dac_start(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_rf_amp_dac_start(self)

    def rf_amp_dac_end(self):
        r"""rf_amp_dac_end(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_rf_amp_dac_end(self)

    def aux_amp_dac_start(self):
        r"""aux_amp_dac_start(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_aux_amp_dac_start(self)

    def aux_amp_dac_end(self):
        r"""aux_amp_dac_end(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_aux_amp_dac_end(self)

    def total_scan_time(self):
        r"""
        total_scan_time(PythonStyleMomaScan self) -> double
        Returns how long this scan took, in seconds.

        """
        return _c699util.PythonStyleMomaScan_total_scan_time(self)

    def peak_counts_per_sec(self):
        r"""
        peak_counts_per_sec(PythonStyleMomaScan self) -> double
        Returns the highest count divided by the bin time.

        """
        return _c699util.PythonStyleMomaScan_peak_counts_per_sec(self)

    def src_pkt_type(self):
        r"""
        src_pkt_type(PythonStyleMomaScan self) -> int
        Return the packet type (probably 26 or 27) of the packet that this 
        scan is based off of. 

        """
        return _c699util.PythonStyleMomaScan_src_pkt_type(self)

    def num_scans(self):
        r"""
        num_scans(PythonStyleMomaScan self) -> int
        Returns the number of scans that went into this scan object.

        """
        return _c699util.PythonStyleMomaScan_num_scans(self)

    def has_scan_status(self):
        r"""
        has_scan_status(PythonStyleMomaScan self) -> bool
        Returns True if this scan has at least one scan status packet 
        associated with it, and False otherwise.

        """
        return _c699util.PythonStyleMomaScan_has_scan_status(self)

    def num_scan_status_pkts(self):
        r"""
        num_scan_status_pkts(PythonStyleMomaScan self) -> int
        Returns the number of scan status packets associated with this scan.

        """
        return _c699util.PythonStyleMomaScan_num_scan_status_pkts(self)

    def _seb_bin_time_readback(self):
        r"""_seb_bin_time_readback(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_bin_time_readback(self)

    def seb_bin_time_readback(self):
        """
        seb_bin_time_readback(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_bin_time_readback()
        return None


    def _seb_bin_time_readback_in_seconds(self):
        r"""_seb_bin_time_readback_in_seconds(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_bin_time_readback_in_seconds(self)

    def seb_bin_time_readback_in_seconds(self):
        """
        seb_bin_time_readback_in_seconds(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_bin_time_readback_in_seconds()
        return None


    def _seb_special_scan_id(self):
        r"""_seb_special_scan_id(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_special_scan_id(self)

    def seb_special_scan_id(self):
        """
        seb_special_scan_id(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_special_scan_id()
        return None


    def _seb_raw_scan_value(self):
        r"""_seb_raw_scan_value(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_raw_scan_value(self)

    def seb_raw_scan_value(self):
        """
        seb_raw_scan_value(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_raw_scan_value()
        return None


    def _seb_scan_value(self):
        r"""_seb_scan_value(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_scan_value(self)

    def seb_scan_value(self):
        """
        seb_scan_value(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_scan_value()
        return None


    def _seb_rf_freq_hz(self):
        r"""_seb_rf_freq_hz(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_rf_freq_hz(self)

    def seb_rf_freq_hz(self):
        """
        seb_rf_freq_hz(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_rf_freq_hz()
        return None


    def _seb_last_rf_amp_mon(self):
        r"""_seb_last_rf_amp_mon(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_last_rf_amp_mon(self)

    def seb_last_rf_amp_mon(self):
        """
        seb_last_rf_amp_mon(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_last_rf_amp_mon()
        return None


    def _seb_rf_amp_dac_set(self):
        r"""_seb_rf_amp_dac_set(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_rf_amp_dac_set(self)

    def seb_rf_amp_dac_set(self):
        """
        seb_rf_amp_dac_set(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_rf_amp_dac_set()
        return None


    def _seb_aux_amp_dac_set(self):
        r"""_seb_aux_amp_dac_set(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_aux_amp_dac_set(self)

    def seb_aux_amp_dac_set(self):
        """
        seb_aux_amp_dac_set(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_aux_amp_dac_set()
        return None


    def _seb_counter_sel(self):
        r"""_seb_counter_sel(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_counter_sel(self)

    def seb_counter_sel(self):
        """
        seb_counter_sel(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_counter_sel()
        return None


    def _seb_bin_count_set(self):
        r"""_seb_bin_count_set(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_bin_count_set(self)

    def seb_bin_count_set(self):
        """
        seb_bin_count_set(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_bin_count_set()
        return None


    def _seb_bin_count_reg(self):
        r"""_seb_bin_count_reg(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_bin_count_reg(self)

    def seb_bin_count_reg(self):
        """
        seb_bin_count_reg(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_bin_count_reg()
        return None


    def _seb_phase_cycle_rdbk(self):
        r"""_seb_phase_cycle_rdbk(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_phase_cycle_rdbk(self)

    def seb_phase_cycle_rdbk(self):
        """
        seb_phase_cycle_rdbk(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_phase_cycle_rdbk()
        return None


    def _seb_rf_step_set(self):
        r"""_seb_rf_step_set(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_rf_step_set(self)

    def seb_rf_step_set(self):
        """
        seb_rf_step_set(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_rf_step_set()
        return None


    def _seb_rf_step_reg(self):
        r"""_seb_rf_step_reg(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_rf_step_reg(self)

    def seb_rf_step_reg(self):
        """
        seb_rf_step_reg(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_rf_step_reg()
        return None


    def _seb_aux_step_set(self):
        r"""_seb_aux_step_set(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_aux_step_set(self)

    def seb_aux_step_set(self):
        """
        seb_aux_step_set(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_aux_step_set()
        return None


    def _seb_aux_step_reg(self):
        r"""_seb_aux_step_reg(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_aux_step_reg(self)

    def seb_aux_step_reg(self):
        """
        seb_aux_step_reg(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_aux_step_reg()
        return None


    def _seb_ionization_time_in_milliseconds(self):
        r"""_seb_ionization_time_in_milliseconds(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_ionization_time_in_milliseconds(self)

    def seb_ionization_time_in_milliseconds(self):
        """
        seb_ionization_time_in_milliseconds(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_ionization_time_in_milliseconds()
        return None


    def _seb_scan_em1(self):
        r"""_seb_scan_em1(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_scan_em1(self)

    def seb_scan_em1(self):
        """
        seb_scan_em1(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_scan_em1()
        return None


    def _seb_scan_em1_raw(self):
        r"""_seb_scan_em1_raw(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_scan_em1_raw(self)

    def seb_scan_em1_raw(self):
        """
        seb_scan_em1_raw(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_scan_em1_raw()
        return None


    def _seb_scan_em2(self):
        r"""_seb_scan_em2(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_scan_em2(self)

    def seb_scan_em2(self):
        """
        seb_scan_em2(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_scan_em2()
        return None


    def _seb_scan_em2_raw(self):
        r"""_seb_scan_em2_raw(PythonStyleMomaScan self) -> int"""
        return _c699util.PythonStyleMomaScan__seb_scan_em2_raw(self)

    def seb_scan_em2_raw(self):
        """
        seb_scan_em2_raw(PythonStyleMomaScan self) -> int

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_scan_em2_raw()
        return None


    def _seb_src_a_foc_a_dac_set(self):
        r"""_seb_src_a_foc_a_dac_set(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_src_a_foc_a_dac_set(self)

    def seb_src_a_foc_a_dac_set(self):
        """
        seb_src_a_foc_a_dac_set(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_src_a_foc_a_dac_set()
        return None


    def _seb_src_b_foc_a_dac_set(self):
        r"""_seb_src_b_foc_a_dac_set(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_src_b_foc_a_dac_set(self)

    def seb_src_b_foc_a_dac_set(self):
        """
        seb_src_b_foc_a_dac_set(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_src_b_foc_a_dac_set()
        return None


    def _seb_src_a_foc_a_dac_reg(self):
        r"""_seb_src_a_foc_a_dac_reg(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_src_a_foc_a_dac_reg(self)

    def seb_src_a_foc_a_dac_reg(self):
        """
        seb_src_a_foc_a_dac_reg(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_src_a_foc_a_dac_reg()
        return None


    def _seb_src_b_foc_a_dac_reg(self):
        r"""_seb_src_b_foc_a_dac_reg(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan__seb_src_b_foc_a_dac_reg(self)

    def seb_src_b_foc_a_dac_reg(self):
        """
        seb_src_b_foc_a_dac_reg(PythonStyleMomaScan self) -> double

        Someone who knows what this is should probably write this docstring.

        Returns None if this scan doesn't have an associated scan status packet.

        """
        if self.has_scan_status():
            return self._seb_src_b_foc_a_dac_reg()
        return None


    def has_seb_hk_pkt(self):
        r"""
        has_seb_hk_pkt(PythonStyleMomaScan self) -> bool
        Returns True if this scan has an associated SEB housekeeping packet, 
        and False otherwise.

        """
        return _c699util.PythonStyleMomaScan_has_seb_hk_pkt(self)

    def seb_is_emon_a(self):
        r"""
        seb_is_emon_a(PythonStyleMomaScan self) -> ListOfFloats
        Someone who knows what this is should probably write this docstring.

        """
        return _c699util.PythonStyleMomaScan_seb_is_emon_a(self)

    def seb_is_emon_b(self):
        r"""
        seb_is_emon_b(PythonStyleMomaScan self) -> ListOfFloats
        Someone who knows what this is should probably write this docstring.

        """
        return _c699util.PythonStyleMomaScan_seb_is_emon_b(self)

    def _seb_is_fil_a_on(self):
        r"""_seb_is_fil_a_on(PythonStyleMomaScan self) -> bool"""
        return _c699util.PythonStyleMomaScan__seb_is_fil_a_on(self)

    def seb_is_fil_a_on(self):
        """
        seb_is_fil_a_on(PythonStyleMomaScan self) -> bool

        Returns True if filament A is on, and False otherwise.

        Returns None if this scan doesn't have an associated SEB houskeeping packet.

        """
        if self.has_seb_hk_pkt():
            return self._seb_is_fil_a_on()
        return None


    def _seb_is_fil_b_on(self):
        r"""_seb_is_fil_b_on(PythonStyleMomaScan self) -> bool"""
        return _c699util.PythonStyleMomaScan__seb_is_fil_b_on(self)

    def seb_is_fil_b_on(self):
        """
        seb_is_fil_b_on(PythonStyleMomaScan self) -> bool

        Returns True if filament B is on, and False otherwise.

        Returns None if this scan doesn't have an associated SEB housekeeping packet.

        """
        if self.has_seb_hk_pkt():
            return self._seb_is_fil_b_on()
        return None


    def is_dark_count_scan(self):
        r"""is_dark_count_scan(PythonStyleMomaScan self) -> bool"""
        return _c699util.PythonStyleMomaScan_is_dark_count_scan(self)

    def determine_scan_mode(self):
        r"""
        determine_scan_mode(PythonStyleMomaScan self) -> int
        For the sake of code clarity, you should probably use 
        scan_mode_as_string() instead of this method.

        """
        return _c699util.PythonStyleMomaScan_determine_scan_mode(self)

    def scan_mode_as_string(self):
        r"""
        scan_mode_as_string(PythonStyleMomaScan self) -> std::string
        Returns either 'EI', 'Dark', 'LDI', or 'Unknown'

        """
        return _c699util.PythonStyleMomaScan_scan_mode_as_string(self)

    def gc_ion_source(self):
        r"""
        gc_ion_source(PythonStyleMomaScan self) -> bool
        Returns true if ion source is from the GC

        """
        return _c699util.PythonStyleMomaScan_gc_ion_source(self)

    def ldi_ion_source(self):
        r"""
        ldi_ion_source(PythonStyleMomaScan self) -> bool
        Returns true if ion source is from LDI

        """
        return _c699util.PythonStyleMomaScan_ldi_ion_source(self)

    def selected_ion_count_sum_by_bin(self, min_bin, max_bin):
        r"""
        selected_ion_count_sum_by_bin(PythonStyleMomaScan self, int min_bin, int max_bin) -> double

        Parameters
        ----------
        min_bin: int
        max_bin: int

        """
        return _c699util.PythonStyleMomaScan_selected_ion_count_sum_by_bin(self, min_bin, max_bin)

    def selected_ion_count_sum_by_mass(self, min_mass, max_mass):
        r"""
        selected_ion_count_sum_by_mass(PythonStyleMomaScan self, double min_mass, double max_mass) -> double

        Parameters
        ----------
        min_mass: double
        max_mass: double

        """
        return _c699util.PythonStyleMomaScan_selected_ion_count_sum_by_mass(self, min_mass, max_mass)

    def selected_ion_count_max_by_bin(self, min_bin, max_bin):
        r"""
        selected_ion_count_max_by_bin(PythonStyleMomaScan self, int min_bin, int max_bin) -> double

        Parameters
        ----------
        min_bin: int
        max_bin: int

        """
        return _c699util.PythonStyleMomaScan_selected_ion_count_max_by_bin(self, min_bin, max_bin)

    def selected_ion_count_max_by_mass(self, min_mass, max_mass):
        r"""
        selected_ion_count_max_by_mass(PythonStyleMomaScan self, double min_mass, double max_mass) -> double

        Parameters
        ----------
        min_mass: double
        max_mass: double

        """
        return _c699util.PythonStyleMomaScan_selected_ion_count_max_by_mass(self, min_mass, max_mass)

    def seb_sequence_pkt_indexes(self):
        r"""
        seb_sequence_pkt_indexes(PythonStyleMomaScan self) -> ListOfIntegers
        Returns a list of the packet indexes of any SEB sequences associated 
        with this scan.

        """
        return _c699util.PythonStyleMomaScan_seb_sequence_pkt_indexes(self)

    def em_on_times_in_ms(self):
        r"""
        em_on_times_in_ms(PythonStyleMomaScan self) -> ListOfFloats
        Returns a list containing two items:

            [EM A on time in milliseconds, EM B on time in milliseconds].

        """
        return _c699util.PythonStyleMomaScan_em_on_times_in_ms(self)

    def charge_control_duration(self):
        r"""
        charge_control_duration(PythonStyleMomaScan self) -> double
        Returns the charge control duration for this scan
        """
        return _c699util.PythonStyleMomaScan_charge_control_duration(self)

    def laser_shots(self):
        r"""
        laser_shots(PythonStyleMomaScan self) -> int
        Returns the number of laser shots for this scan
        """
        return _c699util.PythonStyleMomaScan_laser_shots(self)

    def avg_laser_energy(self):
        r"""avg_laser_energy(PythonStyleMomaScan self) -> double"""
        return _c699util.PythonStyleMomaScan_avg_laser_energy(self)

    def sd_laser_energy(self):
        r"""
        sd_laser_energy(PythonStyleMomaScan self) -> double
        Returns the standard deviation of the laser energy for this scan
        """
        return _c699util.PythonStyleMomaScan_sd_laser_energy(self)

    def get_pkt_type(self):
        """
        get_pkt_type(self PythonStyleMomaScan) -> int

        Returns the source packet type (probably 26 or 27)

        """
        return self.src_pkt_type()


    def get_relative_timestamp(self):
        """
        get_relative_timestamp(self PythonStyleMomaScan) -> double

        Returns the relative timestamp, in seconds.

        """
        return self.relative_timestamp()


    def get_mkid(self):
        """
        get_mkid(self PythonStyleMomaScan) -> int

        Returns this scan's Marker ID.

        """
        return self.marker_id()


    def get_marker_text(self):
        """
        get_marker_text(self PythonStyleMomaScan) -> string

        Returns the marker text of the marker that preceded this scan.

        """
        return self.marker_text()


    def __init__(self):
        r"""__init__(PythonStyleMomaScan self) -> PythonStyleMomaScan"""
        _c699util.PythonStyleMomaScan_swiginit(self, _c699util.new_PythonStyleMomaScan())
    __swig_destroy__ = _c699util.delete_PythonStyleMomaScan

# Register PythonStyleMomaScan in _c699util:
_c699util.PythonStyleMomaScan_swigregister(PythonStyleMomaScan)
class ScienceDataCacheWrapper(object):
    r"""Proxy of C++ c699util::ScienceDataCacheWrapper class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, skip_zero_id_markers=False, averageSummedScans=False):
        r"""
        __init__(ScienceDataCacheWrapper self, bool skip_zero_id_markers=False, bool averageSummedScans=False) -> ScienceDataCacheWrapper

        Parameters
        ----------
        skip_zero_id_markers: bool
        averageSummedScans: bool

        """
        _c699util.ScienceDataCacheWrapper_swiginit(self, _c699util.new_ScienceDataCacheWrapper(skip_zero_id_markers, averageSummedScans))

    def size(self):
        r"""
        size(ScienceDataCacheWrapper self) -> int
        Returns the number of scans in this cache.

        """
        return _c699util.ScienceDataCacheWrapper_size(self)

    def get_scan(self, scanIndex):
        r"""
        get_scan(ScienceDataCacheWrapper self, int scanIndex) -> PythonStyleMomaScan

        Parameters
        ----------
        scanIndex: int

        Returns the scan at the specified index.

        """
        return _c699util.ScienceDataCacheWrapper_get_scan(self, scanIndex)

    def has_gc_scans(self):
        r"""
        has_gc_scans(ScienceDataCacheWrapper self) -> bool
        Returns true if cache contains any GC scans.

        """
        return _c699util.ScienceDataCacheWrapper_has_gc_scans(self)

    def has_ldi_scans(self):
        r"""
        has_ldi_scans(ScienceDataCacheWrapper self) -> bool
        Returns true if cache contains any LDI scans.

        """
        return _c699util.ScienceDataCacheWrapper_has_ldi_scans(self)

    def __len__(self):
        """Return the number of scans contained in this cache."""
        return self.size()


    def __getitem__(self, index):
        """Return the mass spectrum at the specified index."""
        if index < 0:
            index += self.size()
        return self.get_scan(index)


    def __iter__(self):
        """
        __iter__(ScienceDataCacheWrapper self) -> yields PythonStyleMomaScan objects

        """
        for i in range(self.size()):
            yield self.get_scan(i)


    def __call__(self, type_filter=None, marker_filter=None,
                start_time=None, stop_time=None):
        """Iterate through this cache, filtering scans as specified.

        See the tm_filter documentation for details.
        """
        from tmread import tm_filter
        for scan in tm_filter(self, type_filter=type_filter,
                                    marker_filter=marker_filter,
                                    start_time=start_time,
                                    stop_time=stop_time):
            yield scan

    __swig_destroy__ = _c699util.delete_ScienceDataCacheWrapper

# Register ScienceDataCacheWrapper in _c699util:
_c699util.ScienceDataCacheWrapper_swigregister(ScienceDataCacheWrapper)
class TMPacket(object):
    r"""Proxy of C++ c699util::TMPacket class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, tmPacketPtr, markerCachePtr):
        r"""
        __init__(TMPacket self, GseLib::TMPacketPtr tmPacketPtr, MomGse::MarkerCache const * markerCachePtr) -> TMPacket

        Parameters
        ----------
        tmPacketPtr: GseLib::TMPacketPtr
        markerCachePtr: MomGse::MarkerCache const *

        """
        _c699util.TMPacket_swiginit(self, _c699util.new_TMPacket(tmPacketPtr, markerCachePtr))

    def _raw_packet(self):
        r"""
        _raw_packet(TMPacket self) -> ListOfIntegers
        Returns the packet bytes as a list of ints.

        """
        return _c699util.TMPacket__raw_packet(self)

    def raw_packet(self):
        """
        raw_packet(TMPacket self) -> bytes

        Parameters
        ----------
        self: c699util::TMPacket *

        Returns the raw TMPacket as a bytes object.

        """
        return bytes(self._raw_packet())


    def get_type(self):
        r"""
        get_type(TMPacket self) -> int
        Returns the packet type byte from the packet header, with the GSE 
        created bit masked out.

        """
        return _c699util.TMPacket_get_type(self)

    def full_type(self):
        r"""
        full_type(TMPacket self) -> int
        Returns the packet type byte from the packet header, which includes 
        the GSE created bit.

        """
        return _c699util.TMPacket_full_type(self)

    def total_length(self):
        r"""
        total_length(TMPacket self) -> int
        Returns the total number of bytes of this packet, which includes the 8 
        byte header and the 4 byte checksum.

        """
        return _c699util.TMPacket_total_length(self)

    def length(self):
        r"""
        length(TMPacket self) -> int
        Returns the number of bytes of the data segment of this packet, not 
        including the 8 byte header nor the 4 byte checksum.

        """
        return _c699util.TMPacket_length(self)

    def checksum(self):
        r"""
        checksum(TMPacket self) -> unsigned int
        Returns the checksum at the end of this packet.

        """
        return _c699util.TMPacket_checksum(self)

    def gse_created(self):
        r"""
        gse_created(TMPacket self) -> bool
        Returns True if the GSE-created bit is set in the packet header, and 
        False otherwise.

        """
        return _c699util.TMPacket_gse_created(self)

    def sequence(self):
        r"""
        sequence(TMPacket self) -> int
        Returns the packet sequence count (a one-byte value in the packet header).

        """
        return _c699util.TMPacket_sequence(self)

    def sclk(self):
        r"""
        sclk(TMPacket self) -> unsigned int
        Returns the FSW timestamp of this packet (a number of 100us ticks).

        """
        return _c699util.TMPacket_sclk(self)

    def sclk_in_seconds(self):
        """
        sclk_in_seconds(TMPacket self) -> double

        Returns the FSW timestamp of this packet, converted to seconds.
        """
        return self.sclk() / 10000.0


    def index(self):
        r"""
        index(TMPacket self) -> int
        Returns the 0-based index of this packet within the TMFile.

        """
        return _c699util.TMPacket_index(self)

    def marker_id(self):
        r"""marker_id(TMPacket self) -> int"""
        return _c699util.TMPacket_marker_id(self)

    def xina_marker_index(self):
        r"""xina_marker_index(TMPacket self) -> int"""
        return _c699util.TMPacket_xina_marker_index(self)

    def unix_timestamp(self):
        r"""
        unix_timestamp(TMPacket self) -> double
        Returns this packet's Unix timestamp (a number of seconds.)

        """
        return _c699util.TMPacket_unix_timestamp(self)

    def relative_timestamp(self):
        r"""
        relative_timestamp(TMPacket self) -> double
        Returns this packet's relative timestamp (a number of seconds).

        """
        return _c699util.TMPacket_relative_timestamp(self)

    def marker_text(self):
        r"""
        marker_text(TMPacket self) -> std::string
        Returns the text of the 'real' marker that precedes this packet.

        """
        return _c699util.TMPacket_marker_text(self)

    def get_meta_markers(self):
        r"""
        get_meta_markers(TMPacket self) -> ListOfMetaMarkers
        Returns a list of the meta markers that apply to this packet.

        """
        return _c699util.TMPacket_get_meta_markers(self)

    def all_raw_data(self, hkid):
        r"""
        all_raw_data(TMPacket self, int hkid) -> ListOfTMDatapoints

        Parameters
        ----------
        hkid: int

        """
        return _c699util.TMPacket_all_raw_data(self, hkid)

    def all_eng_data(self, hkid):
        r"""
        all_eng_data(TMPacket self, int hkid) -> ListOfTMDatapoints

        Parameters
        ----------
        hkid: int

        """
        return _c699util.TMPacket_all_eng_data(self, hkid)

    def all_sci_data(self, hkid):
        r"""
        all_sci_data(TMPacket self, int hkid) -> ListOfTMDatapoints

        Parameters
        ----------
        hkid: int

        """
        return _c699util.TMPacket_all_sci_data(self, hkid)

    def all_data(self, *args):
        r"""
        all_data(TMPacket self, int hkid, int mode=Gse::Sci) -> ListOfTMDatapoints

        Parameters
        ----------
        hkid: int
        mode: int

        If you want anything other than science data, use all_raw_data() or
        all_eng_data().

        """
        return _c699util.TMPacket_all_data(self, *args)

    def get_first_value(self, hkid):
        """
        get_first_value(self TMPacket, HKID int) -> double

        Parameters
        ----------
        hkid: int

        Look for samples of the specified HKID, and return just the first
        value (no timestamp).

        """
        datapoints = self.all_data(hkid)
        if len(datapoints) > 0:
            return datapoints[0].value
        return None


    def __hash__(self):
        """
        __hash__(self TMPacket) -> int

        Returns a hashed checksum.

        """
        return hash(self.checksum())


    def __getitem__(self, hkid):
        """
        __getitem__(self TMPacket, hkid int) -> tuple of TMDatapoints

        Parameters
        ----------
        hkid: int - housekeeping ID whose samples are to be returned

        Retuns a tuple of TMDatapoint objects for the given HKID.

        """
        return self.all_data(hkid)


    def __lt__(self, other):
        """
        __lt__(self TMPacket, TMPacket other) -> bool

        Parameters
        ----------
        other: TMPacket - the 'right hand side' to compare against

        This comparison is based on timestamp.

        """
        return self.unix_timestamp() < other.unix_timestamp()


    def raw_message(self):
        r"""
        raw_message(TMPacket self) -> std::string
        If this packet is a message log packet, then this method will return 
        the raw message log string (i.e., no sanitization will occur).

        """
        return _c699util.TMPacket_raw_message(self)

    def message(self):
        """
        message(self TMPacket) -> string

        If this packet is a message log packet, then this method will
        return the message with non-printable characters removed.

        """
        import string

        raw_msg = self.raw_message()
        sanitized_msg = ""
        for c in raw_msg:
            if c in string.printable:
                sanitized_msg += c

        if len(sanitized_msg) != len(raw_msg):
            import sys
            print("Message contains non-printable character",
                  [ord(c) for c in raw_msg],
                  file=sys.stderr)

        return sanitized_msg


    def get_pkt_type(self):
        """
        get_pkt_type(self TMPacket) -> int

        """
        return self.get_type()


    def get_relative_timestamp(self):
        """
        get_relative_timestamp(self TMPacket) -> double

        Returns the relative timestamp, in seconds.

        """
        return self.relative_timestamp()


    def get_mkid(self):
        """
        get_mkid(self TMPacket) -> int

        Returns the Marker ID for this packet.

        """
        return self.marker_id()


    def get_marker_text(self):
        """
        get_marker_text(self TMPacket) -> string

        Returns the text of the marker packet that precedes this packet.

        """
        return self.marker_text()

    __swig_destroy__ = _c699util.delete_TMPacket

# Register TMPacket in _c699util:
_c699util.TMPacket_swigregister(TMPacket)
class TMFile(object):
    r"""Proxy of C++ c699util::TMFile class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, filename):
        r"""
        __init__(TMFile self, std::string filename) -> TMFile

        Parameters
        ----------
        filename: std::string

        """
        _c699util.TMFile_swiginit(self, _c699util.new_TMFile(filename))

    def filename(self):
        r"""
        filename(TMFile self) -> std::string
        Returns the full path of the underlying file.

        """
        return _c699util.TMFile_filename(self)

    def absolute_directory(self):
        r"""
        absolute_directory(TMFile self) -> std::string
        Returns the full path of the directory that contains this TMFile.

        """
        return _c699util.TMFile_absolute_directory(self)

    def directory_string(self):
        r"""
        directory_string(TMFile self) -> std::string
        Returns this TID's directory name, typically something like
        '2012-04-02-12.35.42-12345-testname'

        """
        return _c699util.TMFile_directory_string(self)

    def get_mcal_filename(self):
        r"""
        get_mcal_filename(TMFile self) -> std::string
        Returns the absolute path of the mass calibration file that applies 
        to this TMFile.

        """
        return _c699util.TMFile_get_mcal_filename(self)

    def file_size(self):
        r"""
        file_size(TMFile self) -> long long
        Return the size of the underlying file, in bytes.
        """
        return _c699util.TMFile_file_size(self)

    def tid(self):
        r"""
        tid(TMFile self) -> int
        Returns the Telemetry ID of this TMFile.

        """
        return _c699util.TMFile_tid(self)

    def length(self):
        r"""
        length(TMFile self) -> int
        Returns the number of packets in this TMFile.

        """
        return _c699util.TMFile_length(self)

    def exists(self):
        r"""
        exists(TMFile self) -> bool
        Returns True if the underlying file exists, and False otherwise.

        """
        return _c699util.TMFile_exists(self)

    def model(self):
        r"""
        model(TMFile self) -> std::string
        Returns this TID's model ('ETU', 'FM', 'FM_SPARE') etc.

        """
        return _c699util.TMFile_model(self)

    def get_pkt(self, index):
        r"""
        get_pkt(TMFile self, int index) -> TMPacket

        Parameters
        ----------
        index: int

        Returns the packet at the specified index.

        """
        return _c699util.TMFile_get_pkt(self, index)

    def t0_in_unix_time(self):
        r"""
        t0_in_unix_time(TMFile self) -> double
        Returns the Unix time (a number of seconds) of the t0 packet.

        """
        return _c699util.TMFile_t0_in_unix_time(self)

    def t0_in_sclk(self):
        r"""
        t0_in_sclk(TMFile self) -> int
        Returns the FSW timestamp (in ticks, not seconds) of the t0 packet.

        """
        return _c699util.TMFile_t0_in_sclk(self)

    def get_meta_markers(self):
        r"""
        get_meta_markers(TMFile self) -> ListOfMetaMarkers
        Returns a list of this TMFile's meta markers.

        """
        return _c699util.TMFile_get_meta_markers(self)

    def is_time_synced(self):
        r"""is_time_synced(TMFile self) -> bool"""
        return _c699util.TMFile_is_time_synced(self)

    def __bool__(self):
        """
        __str__(TMFile self) -> bool

        Returns True if the underlying file exists, and False otherwise.

        """
        return self.exists()


    def __str__(self):
        """
        __str__(TMFile self) -> string

        Returns the absolute filename of the underlying file.

        """
        return self.filename()


    def __len__(self):
        """
        __len__(TMFile self) -> int

        Returns the number of packets in this TMFile.

        """
        return self.length()


    def __getitem__(self, index):
        """
        __getitem__(TMFile self) -> c699util::TMPacket

        Parameters
        ----------
        index: int - the 0-based index of the desired packet

        """
        if index < 0:
            index += len(self)
        return self.get_pkt(index)


    def __iter__(self):
        """
        __iter__(TMFile self) -> yields c699util::TMPacket objects

        """
        for i in range(self.length()):
            yield self.get_pkt(i)


    def __call__(self, type_filter=None, marker_filter=None,
                start_time=None, stop_time=None):
        """
        __call__(TMFile self) -> yields c699util::TMPacket objects

        Parameters
        ----------
        type_filter:   Optional. See tmread.tmfilter documentation for details.
        marker_filter: Optional. See tmread.tmfilter documentation for details.
        start_time:    Optional. See tmread.tmfilter documentation for details.
        stop_time:     Optional. See tmread.tmfilter documentation for details.

        This method yields packets that satisfy the specified filters.

        A few examples might be useful:

            for pkt in tmfile(type_filter=27):
                (pkt will only be of type 27, now)

            for pkt in tmfile(type_filter=[26,27]):
                (pkt will only be of types 26 or 27 now)

            for pkt in tmfile(marker_filter=50):
                (only packets when marker 50 was active will be yielded)

            for pkt in tmfile(start_time=100, stop_time=200):
                (only packets that come between 100 and 200 seconds will
                be yielded. This only works for relative time.)

        These filtering parameters can take on many more data types than
        are demonstrated above. It's likely that any data type you might
        want to use is handled. See tmread.tmfilter documentation for more
        details.

        """
        from tmread import tm_filter
        for packet in tm_filter(self, type_filter=type_filter,
                                marker_filter=marker_filter,
                                start_time=start_time,
                                stop_time=stop_time):
            yield packet


    def test_name(self):
        """
        test_name(TMFile self) -> string

        An example should suffice: if a TID's folder name is:

            2012-04-02-12.35.42-12345-testname

        then 'testname' would be returned.

        """
        return self.directory_string().split('-', maxsplit=5)[5]


    def message_log(self):
        """
        message_log(TMFile self) -> tmread.MessageLog

        See tmread.Messagelog documentation for details.
        """
        from tmread import MessageLog
        return MessageLog(self)

    __swig_destroy__ = _c699util.delete_TMFile

# Register TMFile in _c699util:
_c699util.TMFile_swigregister(TMFile)

