Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::LogMetadata Class Reference

Provides information about a recorded log. More...

Inheritance diagram for gem::LogMetadata:
Collaboration diagram for gem::LogMetadata:

Classes

struct  __allow_private_constructor

Protected Types

using Base = ApiObject<ILogMetadata, false>
 The base class.

Protected Member Functions

LargeInteger getStartTimestampInMillis () const
 Retrieves the timestamp of the first recorded sensor data.
LargeInteger getEndTimestampInMillis () const
 Retrieves the timestamp of the last recorded sensor data.
int getDurationMillis () const
 Calculates the total duration of the recorded log.
int getActiveDurationMillis () const
 The active time represents only the periods when recording was running, not including any paused intervals.
Coordinates getStartPosition () const
 Retrieves the first recorded GPS position.
Coordinates getEndPosition () const
 Retrieves the last recorded GPS position.
ERecordingTransportMode getTransportMode () const
 Retrieves the transport mode used during the recording of the log.
ActivityRecord getActivityRecord () const
 Retrieves the recorded activity details.
RecordMetrics getMetrics () const
 Retrieves the record metrics.
CoordinatesList getRoute () const
 Retrieves a shortened version of the recorded route.
CoordinatesList getPreciseRoute () const
 Retrieves a detailed description of the recorded route.
const SoundMarksListRef getSoundMarks () const
 Retrieves a list of recorded sound marks.
const TextMarksListRef getTextMarks () const
 Retrieves a list of recorded text marks.
const BitmapListRef getBitmaps () const
 Retrieves a list of recorded bitmaps.
bool isDataTypeAvailable (sense::EDataType type) const
 Verifies if a specific data type has been recorded in the log file.
sense::DataTypeList getAvailableDataTypes () const
 Retrieves a list of the data types recorded in the log file.
bool isUploaded () const
 Checks if the log file has been uploaded to the server.
bool isProtected () const
 This method verifies whether the log file is marked as protected.
LargeUnsignedInteger getLogSize () const
 Retrieves the size of the log file.
StrongPointer< DataBuffergetUserMetadata (const String &key) const
 This method returns the metadata that was previously added using the AddUserMetadata method.
bool addUserMetadata (const String &key, const DataBuffer &dataBuffer)
 Add or overwrite metadata associated with a specific key.
bool addUserMetadata (const std::map< String, DataBuffer > &userMetadataMap)
 Add or overwrite multiple metadata entries at once.
void addActivityFiles (const std::vector< ActivityFile > &activityFiles)
 Adds multiple activity files to the log metadata.
const std::vector< ActivityFile > & getActivityFiles ()
 Retrieves the list of activity files attached to the log.

Static Protected Member Functions

static StrongPointer< LogMetadataproduce (const String &filepath)
 Creates a LogMetadata object for the specified log file.

Detailed Description

Provides information about a recorded log.

Member Function Documentation

◆ addActivityFiles()

void gem::LogMetadata::addActivityFiles ( const std::vector< ActivityFile > & activityFiles)
inlineprotected

Adds multiple activity files to the log metadata.

This method attaches a list of files (such as photos, videos, audio, or route files) to the current log. Each file is described by an ActivityFile structure, which includes its type, content, timestamp, and location.

Parameters
[in]activityFilesA vector of ActivityFile objects representing the files to be added to the log metadata.

◆ addUserMetadata() [1/2]

bool gem::LogMetadata::addUserMetadata ( const std::map< String, DataBuffer > & userMetadataMap)
inlineprotected

Add or overwrite multiple metadata entries at once.

This method takes a map of keys and associated data buffers, and stores each pair as metadata. For any key that already exists, the existing metadata will be overwritten.

Parameters
[in]userMetadataMapA map containing key–value pairs where the key identifies the metadata entry and the value is the associated data buffer.
Returns
Returns true if all metadata entries are successfully added or overwritten. Returns false if the input map is empty or if any key or data buffer is null.

◆ addUserMetadata() [2/2]

bool gem::LogMetadata::addUserMetadata ( const String & key,
const DataBuffer & dataBuffer )
inlineprotected

Add or overwrite metadata associated with a specific key.

This method stores the provided data buffer as metadata associated with the given key. If metadata already exists for the key, it will be overwritten with the new data.

Parameters
[in]keyThe key used to identify the metadata entry.
[in]dataBufferThe buffer containing the metadata to be stored. If the key already exists, the previous metadata will be replaced with this new data.
Returns
Returns true if the metadata is successfully added or overwritten, false if the data buffer is null or the operation fails.

◆ getActiveDurationMillis()

int gem::LogMetadata::getActiveDurationMillis ( ) const
inlineprotected

The active time represents only the periods when recording was running, not including any paused intervals.

Returns
An integer value representing the active duration in milliseconds.

◆ getActivityFiles()

const std::vector< ActivityFile > & gem::LogMetadata::getActivityFiles ( )
inlineprotected

Retrieves the list of activity files attached to the log.

This method returns all files (such as photos, videos, audio, or route files) that were added to the current log using AddActivityFiles. Each file is described by an ActivityFile structure, including its type, content, timestamp, and location.

Returns
A constant reference to a vector of ActivityFile objects representing the attached files.

◆ getActivityRecord()

ActivityRecord gem::LogMetadata::getActivityRecord ( ) const
inlineprotected

Retrieves the recorded activity details.

Returns
An ActivityRecord object containing the details of the recorded activity.

◆ getAvailableDataTypes()

sense::DataTypeList gem::LogMetadata::getAvailableDataTypes ( ) const
inlineprotected

Retrieves a list of the data types recorded in the log file.

Returns
A list of data types that have been recorded in the log file, represented as a DataTypeList. This method helps in identifying all the types of data that are accessible in the log.

◆ getBitmaps()

const BitmapListRef gem::LogMetadata::getBitmaps ( ) const
inlineprotected

Retrieves a list of recorded bitmaps.

Returns
A list of Bitmap objects representing the images recorded in the log.

◆ getDurationMillis()

int gem::LogMetadata::getDurationMillis ( ) const
inlineprotected

Calculates the total duration of the recorded log.

Returns
An integer value representing the duration in milliseconds.

◆ getEndPosition()

Coordinates gem::LogMetadata::getEndPosition ( ) const
inlineprotected

Retrieves the last recorded GPS position.

If the recorded log contains GPS data, this method returns the last valid sensor position. If no GPS data is recorded, it returns an invalid coordinate (0, 0).

Returns
The last recorded GPS position or (0, 0) if no GPS data is available.

◆ getEndTimestampInMillis()

LargeInteger gem::LogMetadata::getEndTimestampInMillis ( ) const
inlineprotected

Retrieves the timestamp of the last recorded sensor data.

Returns
A LargeInteger representing the timestamp in milliseconds since the epoch.

◆ getLogSize()

LargeUnsignedInteger gem::LogMetadata::getLogSize ( ) const
inlineprotected

Retrieves the size of the log file.

This method returns the size of the log file in bytes. The size is calculated based on the entire log content, including sensor data, metadata, and any additional recorded information.

Returns
The size of the log file in bytes.

◆ getMetrics()

RecordMetrics gem::LogMetadata::getMetrics ( ) const
inlineprotected

Retrieves the record metrics.

Returns
A RecordMetrics structure containing the metrics of the recorded log.

◆ getPreciseRoute()

CoordinatesList gem::LogMetadata::getPreciseRoute ( ) const
inlineprotected

Retrieves a detailed description of the recorded route.

This method returns the full list of GPS coordinates recorded during the log, including all available positions. It provides a precise and comprehensive representation of the route.

Returns
A list of GPS coordinates representing the exact path recorded.

◆ getRoute()

CoordinatesList gem::LogMetadata::getRoute ( ) const
inlineprotected

Retrieves a shortened version of the recorded route.

This method returns a concise list of GPS coordinates sampled from the recorded log. The positions are selected if either:

  1. The position is at least 20 meters away from the previous position, or
  2. 3 seconds have passed since the last recorded position, but only if the distance between the two positions is at least 20 meters.
    Returns
    A reduced list of coordinates representing a simplified version of the recorded route.

◆ getSoundMarks()

const SoundMarksListRef gem::LogMetadata::getSoundMarks ( ) const
inlineprotected

Retrieves a list of recorded sound marks.

Returns
A list of SoundMark objects representing the sound annotations recorded in the log.

◆ getStartPosition()

Coordinates gem::LogMetadata::getStartPosition ( ) const
inlineprotected

Retrieves the first recorded GPS position.

If the recorded log contains GPS data, this method returns the first valid sensor position. If no GPS data is recorded, it returns an invalid coordinate (0, 0).

Returns
The first recorded GPS position or (0, 0) if no GPS data is available.

◆ getStartTimestampInMillis()

LargeInteger gem::LogMetadata::getStartTimestampInMillis ( ) const
inlineprotected

Retrieves the timestamp of the first recorded sensor data.

Returns
A LargeInteger representing the timestamp in milliseconds since the epoch.

◆ getTextMarks()

const TextMarksListRef gem::LogMetadata::getTextMarks ( ) const
inlineprotected

Retrieves a list of recorded text marks.

Returns
A list of TextMark objects representing the text annotations recorded in the log.

◆ getTransportMode()

ERecordingTransportMode gem::LogMetadata::getTransportMode ( ) const
inlineprotected

Retrieves the transport mode used during the recording of the log.

Returns
The transport mode used when the log was recorded.

◆ getUserMetadata()

StrongPointer< DataBuffer > gem::LogMetadata::getUserMetadata ( const String & key) const
inlineprotected

This method returns the metadata that was previously added using the AddUserMetadata method.

Parameters
[in]keyThe key associated with the metadata to be retrieved.
Returns
A StrongPointer to the IDataBuffer containing the metadata associated with the provided key. If no metadata is found for the key, a null pointer or an empty buffer might be returned.

◆ isDataTypeAvailable()

bool gem::LogMetadata::isDataTypeAvailable ( sense::EDataType type) const
inlineprotected

Verifies if a specific data type has been recorded in the log file.

Parameters
[in]typeThe type to verify if it is available in the log file.
Returns
True if the specified data type has been recorded in the log file, and false if it has not been recorded.

◆ isProtected()

bool gem::LogMetadata::isProtected ( ) const
inlineprotected

This method verifies whether the log file is marked as protected.

A protected log file cannot be automatically deleted by the system, even if the maximum disk space usage is reached or the minimum retention time (in seconds) has passed. This ensures that the log file is preserved for further use or investigation.

Returns
True if the log file is protected; otherwise, returns false if it is not protected.

◆ isUploaded()

bool gem::LogMetadata::isUploaded ( ) const
inlineprotected

Checks if the log file has been uploaded to the server.

This method verifies whether the log file has been successfully uploaded to the server. A log is considered as "uploaded" when it has been successfully transferred and stored on the server for further processing or storage.

Returns
True if the log file has been uploaded to the server; otherwise, returns false if it has not been uploaded.

◆ produce()

StrongPointer< LogMetadata > gem::LogMetadata::produce ( const String & filepath)
inlinestaticprotected

Creates a LogMetadata object for the specified log file.

Parameters
[in]filepathThe file path of the log file for which metadata is to be created.
Returns
A StrongPointer to the LogMetadata object, or an empty pointer if the operation fails.