A protocol that parses and verifies the checksum of an NMEA sentence (in string form, not NMEASentence), and delegates to a receiver.

It receives lines and verifies these lines are NMEA sentences. If they are, verifies their checksum and unpacks them into their components. It then wraps them in NMEASentence objects and calls the appropriate receiver method with them.

Parameters_receiverA receiver for NMEAProtocol sentence objects. (type: INMEAReceiver)
_sentenceCallbackA function that will be called with a new NMEASentence when it is created. Useful for massaging data from particularly misbehaving NMEA receivers. (type: unary callable)
Method __init__ Initializes an NMEAProtocol.
Method lineReceived Parses the data from the sentence and validates the checksum.
Class Variable _SENTENCE_CONTENTS Has the field names in an NMEA sentence for each sentence type (in order, obviously). (type: dict of bytestrings to lists of str)

Inherited from _PositioningSentenceProducerMixin:

Class Method getSentenceAttributes Returns a set of all attributes that might be found in the sentences produced by this protocol.

Inherited from _PositioningSentenceProducerMixin:

Class Method getSentenceAttributes Returns a set of all attributes that might be found in the sentences produced by this protocol.

Inherited from _PositioningSentenceProducerMixin:

Class Method getSentenceAttributes Returns a set of all attributes that might be found in the sentences produced by this protocol.

Inherited from _PositioningSentenceProducerMixin:

Class Method getSentenceAttributes Returns a set of all attributes that might be found in the sentences produced by this protocol.

Inherited from _PositioningSentenceProducerMixin:

Class Method getSentenceAttributes Returns a set of all attributes that might be found in the sentences produced by this protocol.
_SENTENCE_CONTENTS =
Has the field names in an NMEA sentence for each sentence type (in order, obviously). (type: dict of bytestrings to lists of str)
def __init__(self, receiver, sentenceCallback=None): (source)

Initializes an NMEAProtocol.

ParametersreceiverA receiver for NMEAProtocol sentence objects. (type: INMEAReceiver)
sentenceCallbackA function that will be called with a new NMEASentence when it is created. Useful for massaging data from particularly misbehaving NMEA receivers. (type: unary callable)
def lineReceived(self, rawSentence): (source)

Parses the data from the sentence and validates the checksum.

ParametersrawSentenceThe NMEA positioning sentence. (type: bytes)
API Documentation for Twisted, generated by pydoctor at 2016-04-04 15:02:49.