Za'atar Digital

eServices for the rest of us

User Tools

Site Tools


gpskit:docs:zdgpskit:nmea:sentence

Sentence

Super class Object
NameSpace zdGPSKit.NMEA

This is the generic class for all NMEA 0183 sentences. It implements all the common properties and methods needed to handle any NMEA 0183 sentence.

As its constructor is protected, it can't be instantiated directly with the New operator. Use the NewSentence() shared method instead.

Shared Properties


IgnoreChecksum

Syntax
IgnoreChecksum As Boolean

Set this shared property to True if you don't want the ParseNMEASentence() shared method to valid the sentence with its checksum.

As it's a shared method this setting has a global scope.

Methods


Age

Syntax
Age() As Double

Return the time elapsed since the creation of this instance in seconds.

Name

Syntax
Name() As String

Return the name of the NMEA0183 sentence without the '$' sign. Returns an empty string if there is no data in this instance.

NMEA0183Sentence

Syntax
NMEA0183Sentence() As String

Returns a well formed NMEA 0183 compliant sentence as an ASCII encoded string. If there is no data available, returns an empty string

Parameter

Syntax
Parameter( inIndex As Integer ) As Variant

Return the NMEA 0183 parameter value for inIndex ( one-based ). If the parameter has no actual value, the method returns an empty string.

If inIndex is out of range an OutOfBoundsException will be raised. Check its Message property to get more details.

ParameterCount

Syntax
ParameterCount() As integer

Returns the number of parameters available. The sentence name isn't considered as a parameter.

Shared Methods


NewSentence

Syntax
NewSentence( inSentence As String ) As zdGPSKit.NMEA.Sentence

Returns a newly created Sentence instance based on the passed NMEA 0183 sentence. It assumes the string is ASCII encoded. If the sentence is invalid it returns Nil.

This function can return any kind of subclass depending on the sentence name and if it's a known kind of sentence, e.g. a $GPGSA NMEA 0183 sentence, it will return a zdGPSKit.NMEA.GPGSA object.
It is still a Sentence object but subclassed to provide a better API to handle the $GPGSA parameters with human readable names and extended functionalities. FIXME

RegisterPostSmartCommandCreator

Syntax
RegisterPostSmartCommandCreatorHook(inHook As zdGPSKit.NMEA.Sentence.CommandCreatorHook)

Register a new Delegate for the PostSmartCommandCreator hook. There can be only one Delegate registered. Registering a Nil value will disable the hook.

RegisterPreSmartCommandCreator

Syntax
RegisterPreSmartCommandCreatorHook(inHook As zdGPSKit.NMEA.Sentence.CommandCreatorHook)

Register a new Delegate for the PreSmartCommandCreator hook. There can be only one Delegate registered. Registering a Nil value will disable the hook.

Delegates


SentenceCreatorHook

Syntax
SentenceCreatorHook(inDataString As String) As zdGPSKit.NMEA.Sentence

Use this Delegate to override the NMEA sentence creation process and implement your own NMEA sentence classes.

See NewSentence() method for more information.

gpskit/docs/zdgpskit/nmea/sentence.txt · Last modified: 2016/05/20 08:04 (external edit)