AssetTrackerRK
Public Member Functions | Friends
TinyGPSInteger Struct Reference

Class to parse and maintain integer data. More...

#include <TinyGPS++.h>

Public Member Functions

bool isValid () const
 Returns true if the data is valid. More...
 
bool isUpdated () const
 Returns true if the value has been updated. More...
 
uint32_t age () const
 Returns the age of the value in milliseconds. More...
 
uint32_t value ()
 Returns the current value and clears the updated flag.
 
void invalidate ()
 Sets the valid flag to false (marks data as invalid) More...
 
 TinyGPSInteger ()
 Constructor.
 

Friends

class TinyGPSPlus
 

Detailed Description

Class to parse and maintain integer data.

Member Function Documentation

◆ age()

uint32_t TinyGPSInteger::age ( ) const
inline

Returns the age of the value in milliseconds.

If the value is not valid, then ULONG_MAX is returned.

You might check to see if age is < 10000 to make sure the value has been retrieved in the last 10 seconds, for example.

◆ invalidate()

void TinyGPSInteger::invalidate ( )
inline

Sets the valid flag to false (marks data as invalid)

This is used internally when we get a valid GPS sentence that does not have a fix. It can be checked by using the isValid() method.

◆ isUpdated()

bool TinyGPSInteger::isUpdated ( ) const
inline

Returns true if the value has been updated.

Getting the value clears the updated flag, and commiting a change sets it.

◆ isValid()

bool TinyGPSInteger::isValid ( ) const
inline

Returns true if the data is valid.

The valid flag will be false if the GPS loses its fix, but will not be invalidated if the GPS stops returning data. If that is a possibility, you should also check the age.


The documentation for this struct was generated from the following files: