twisted.positioning.nmea.NMEAProtocol(LineReceiver, _sentence._PositioningSentenceProducerMixin)
class documentationtwisted.positioning.nmea
View Source
(View In Hierarchy)
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 | _receiver | A receiver for NMEAProtocol sentence objects. (type: INMEAReceiver ) |
_sentenceCallback | A 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 list s 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. |
dict
of bytestrings to list
s of str
)
Initializes an NMEAProtocol.
Parameters | receiver | A receiver for NMEAProtocol sentence objects. (type: INMEAReceiver ) |
sentenceCallback | A 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) |
Parses the data from the sentence and validates the checksum.
Parameters | rawSentence | The NMEA positioning sentence. (type: bytes ) |