PointParser class
Parses a the List
The object maintains an internal state with all information that's been parsed so far. If then information is sent that seems to indicates a new point definition, the parser makes a choice:
- if the current state is sufficient to define a point, a point is created and returned
- otherwise it assumes that the previously provided information was not in fact a correct point. The parser resets its internal state and starts working on a new point. No point is returned.
Constructors
- PointParser(double? _minSecondsBetweenDatapoints, double? _accuracyThreshold, void resultReporter(GpsPoint point))
Properties
- accuracy ↔ int?
-
getter/setter pair
- altitude ↔ int?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAllNull → bool
-
no setter
- isUndefined → bool
-
Points are defined if the minimum required information is provided
(timestamp, latitude and longitude).
no setter
- latitudeE7 ↔ int?
-
getter/setter pair
- longitudeE7 ↔ int?
-
getter/setter pair
- pos ↔ int
-
Current position of the parser in the bytes list.
getter/setter pair
- posStartNextStreamChunk ↔ int?
-
Position up to which we've successfully parsed. This is where we should
continue parsing with the next chunk of data from a stream, if the current
chunk contained incomplete data to define a point.
getter/setter pair
- resultReporter → void Function(GpsPoint point)
-
Function called when a point has been identified (typically a Sink.add
accepting the points).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestampMs ↔ int?
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseUpdate(
List< int> bytes, int start, int end) → void -
Tries to update its fields based on information from the specified
bytes
, which should come from a JSON file. Creates and sends new points to resultReporter when such fully defined points are detected. -
reset(
) → void - Resets the internal parser state to completely null.
-
toGpsPointAndReset(
) → void - Creates and adds a point representing the current internal state to resultReporter, if the current state is sufficiently defined to represent such a point. The internal state is consequently reset, whether a point was created or not.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited