# Path: habitat/parser.py
# class ParserModule(object):
#     """
#     Base class for real ParserModules to inherit from.
# 
#     **ParserModules** are classes which turn radio strings into useful data.
#     They do not have to inherit from :class:`ParserModule`, but can if they
#     want. They must implement :meth:`pre_parse` and :meth:`parse` as described
#     below.
#     """
#     def __init__(self, parser):
#         self.parser = parser
#         self.loadable_manager = parser.loadable_manager
# 
#     def pre_parse(self, string):
#         """
#         Go though *string* and attempt to extract a callsign, returning
#         it as a string. If *string* is not parseable by this module, raise
#         :py:class:`CantParse`. If *string* might be parseable but no callsign
#         could be extracted, raise :py:class:`CantExtractCallsign`.
#         """
#         raise ValueError()
# 
#     def parse(self, string, config):
#         """
#         Go through *string* which has been identified as the format this
#         parser module should be able to parse, extracting the data as per
#         the information in *config*, which is the ``sentence`` dictionary
#         extracted from the payload's configuration document.
#         """
#         raise ValueError()
# 
# class CantExtractCallsign(Exception):
#     """
#     Parser submodule cannot find a callsign, though in theory might be able
#     to parse the sentence if one were provided.
#     """
#     pass


import struct
from ..parser import ParserModule, CantExtractCallsign
                "name": "temperature"
            }
        ],
        "filters": {
            "post": [
                {
                    "type": "normal",
                    "filter": "common.numeric_scale",
                    "source": "latitude",
                    "scale": 1E-7
                },
                {
                    "type": "normal",
                    "filter": "common.numeric_scale",
                    "source": "longitude",
                    "scale": 1E-7
                }
            ]
        }
    }

For the list of format string specifiers, please see:
`<http://docs.python.org/2/library/struct.html>`_.

The filter ``common.numeric_scale`` may be useful for fixed-point data rather
than sending floats, and the various ``std_telem.binary*`` sensors may be
applicable.
"""



# Path: habitat/parser.py
# class ParserModule(object):
#     """
#     Base class for real ParserModules to inherit from.
# 
#     **ParserModules** are classes which turn radio strings into useful data.
#     They do not have to inherit from :class:`ParserModule`, but can if they
#     want. They must implement :meth:`pre_parse` and :meth:`parse` as described
#     below.
#     """
#     def __init__(self, parser):
#         self.parser = parser
#         self.loadable_manager = parser.loadable_manager
# 
#     def pre_parse(self, string):
#         """
#         Go though *string* and attempt to extract a callsign, returning
#         it as a string. If *string* is not parseable by this module, raise
#         :py:class:`CantParse`. If *string* might be parseable but no callsign
#         could be extracted, raise :py:class:`CantExtractCallsign`.
#         """
#         raise ValueError()
# 
#     def parse(self, string, config):
#         """
#         Go through *string* which has been identified as the format this
#         parser module should be able to parse, extracting the data as per
#         the information in *config*, which is the ``sentence`` dictionary
#         extracted from the payload's configuration document.
#         """
#         raise ValueError()
# 
# class CantExtractCallsign(Exception):
#     """
#     Parser submodule cannot find a callsign, though in theory might be able
#     to parse the sentence if one were provided.
#     """
#     pass


# Path: habitat/parser_modules/simple_binary_parser.py
import struct
from ..parser import ParserModule, CantExtractCallsign

                "name": "temperature"
            }
        ],
        "filters": {
            "post": [
                {
                    "type": "normal",
                    "filter": "common.numeric_scale",
                    "source": "latitude",
                    "scale": 1E-7
                },
                {
                    "type": "normal",
                    "filter": "common.numeric_scale",
                    "source": "longitude",
                    "scale": 1E-7
                }
            ]
        }
    }

For the list of format string specifiers, please see:
`<http://docs.python.org/2/library/struct.html>`_.

The filter ``common.numeric_scale`` may be useful for fixed-point data rather
than sending floats, and the various ``std_telem.binary*`` sensors may be
applicable.
"""



class SimpleBinaryParser(ParserModule):