AssetTrackerRK
Public Member Functions | Protected Attributes | Friends
AssistNowDownload Class Reference

Class to hold things used during download. More...

#include <UbloxGPS.h>

Public Member Functions

 AssistNowDownload ()
 Constructor.
 
virtual ~AssistNowDownload ()
 Destructor.
 
bool alloc (size_t bufferSize)
 Allocate the buffer to hold temporary data. Required! More...
 

Protected Attributes

size_t bufferSize = 0
 Size of buffer in bytes as determined from alloc()
 
GoogleMapsDeviceLocator locator
 Used to find location data from cellular or Wi-Fi.
 
float lat = 0.0
 Latitude in degrees from geolocation.
 
float lng = 0.0
 Longitude in degrees from geolocation.
 
float accuracy = 0.0
 Accuracy radius in meters from geolocation.
 
float elev = 0.0
 Elevation in meters from mean sea level from elevation API.
 
TCPClient client
 TCPClient used to contact the u-blox aiding service.
 
uint8_t * buffer
 Buffer to store data, allocated during alloc()
 
size_t bufferOffset = 0
 Offset currently being written to in buffer.
 
bool inHeader = true
 Set to true if we are processing the HTTP header or false if not.
 
size_t contentLength = 0
 Content length of the GPS data.
 

Friends

class UbloxAssistNow
 

Detailed Description

Class to hold things used during download.

Since download happens infrequently (only at startup if the GPS needs it, this object is allocated on the heap by UbloxAssistNow when needed and deleted when not.

Member Function Documentation

◆ alloc()

bool AssistNowDownload::alloc ( size_t  bufferSize)

Allocate the buffer to hold temporary data. Required!

Parameters
bufferSizeThe size of the buffer in bytes. This must be large enough to hold the entire download of aiding data!

The buffer size varies depending on the number of services, which aiding data is requested, and whether a location is provided.


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