Architecture - Alban36/GPSLib GitHub Wiki

StreamReader : Read a stream or listen on a serial port for NMEA sentences. Public Methods : Constructor with either a stream or a COM Port as input Start() : Start a thread that will listen and treat incoming data Stop() : Stop listening on incoming data SetHistoryManager(HistoryManagerClass mgr) : Set the history manager to use in order to store decoded NMEA frames DefineException(vector) : Define the NMEA Frame to be ignored when readin data RegisterOnNMEAFrameCallback(void function(NMEAFrameClass ), all or vector) : Register a function to be called when all or the specified NMEA frames are decoded. Private Methods: ReadStream() : read a stream ReadComPort() : read a serial port Attributes: HistoryManager aHistoryMgr Thread that will perform the reading once the start method is launcher

HistoryManager : Store the decoded NMEA sentences in memory Public Methods: Constructor with settings SetSizeOfHistory(size_t size) : set the size of the number of decoded NMEA Frame to keep in history SetAsPermanent(bool value) : set if the history must be stored outside of memory GetLatestNMEAFrame(nothing or NMEA Frame Type) : get the last NMEA Frame in history or the last one from the specified type AddToHistory(NMEA Frame *) : Add an NMEA Frame to the history Attributes: A FIFO type structure of decoded NMEA Frame NMEAFrameDecoder : Convert a string into an NMEA frame data structure Public Methods: Decode(string) : Convert a string into the right NMEA Frame type data structure Private Methods: Memorise part of NMEA Frame in case the frame is cut in several sentence Attributes :

NMEA Frame : A parent class to define the common part of each NMEA Sentence

Methods: GetType () : Get the type of NMEA sentence this class is GetAge() : Get the age of the sentence VerifyChecksum() : Check that the checksum received for the frame is correct, else flag it as erronous

Attributes: DateReceived: Date the frame was received Type: type of NMEA Frame

Coordinate : Hold a coordinate position (latitude and longitude) Public Methods: Constructors with lat and long (in degree, min, sec or decimal or string or other) GetLat() / GetLon() Attributes: Coordinate Lat Coordinate Lon Coordinate: A coordinate Methods: AsDecimal() : return the coordinate as a decimal value Attributes: Degree Minute Second Orientation GPSRMC Frame: Attributes: DateTime in UTC : get from the time and the date part of the sentence received Navigation receiver CoordinatePoint Speed in knots : Structure that permits to get speed in KM/h as well TrueCourse : ? Variation : structure containing variation and its orientation (E or W)