Tango.AreaDescription

C API wrapper for the Tango area description interface.

Summary

Public attributes

m_uuid
readonly string
The UUID for this area description.

Public static functions

ForUUID(string uuid)
Get an area description by UUID.
GetList()
Get a list of all the area descriptions on the device.
ImportFromFile(string filePath)
bool
Import an area description from a file path to the default area storage location.
SaveCurrent()
Saves the current area description, returning the area description saved.

Public functions

Delete()
bool
Delete an area description.
ExportToFile(string filePath)
bool
Export an area description from the default area storage location to the destination file directory.
GetMetadata()
Get the metadata for the Area Description.
SaveMetadata(Metadata metadata)
bool
Save the metadata for this area description.

Classes

Tango.AreaDescription.Metadata

Easy access to the metadata fields for an Area Description.

Public attributes

m_uuid

readonly string m_uuid

The UUID for this area description.

Public static functions

ForUUID

AreaDescription ForUUID(
  string uuid
)

Get an area description by UUID.

Details
Parameters
uuid
UUID to find.
Returns
An area description for that UUID. If no such area description exists, returns null.

GetList

AreaDescription[] GetList()

Get a list of all the area descriptions on the device.

Details
Returns
A list of area descriptions, or null if the list could not be queried.

ImportFromFile

bool ImportFromFile(
  string filePath
)

Import an area description from a file path to the default area storage location.

Details
Parameters
filePath
File path of the area description to be imported.
Returns
true if the area description was imported successfully, false otherwise.

SaveCurrent

AreaDescription SaveCurrent()

Saves the current area description, returning the area description saved.

You can only save an area description while connected to the Tango Service and if you have enabled Area Learning mode. If you loaded an area description before connecting, then calling this method appends any new learned areas to that area description and returns an area description with the same UUID. If you did not load an area description, this method creates a new area description and a new UUID for that area description.

Details
Returns
AreaDescription instance for the newly saved area description if saved successfully, null otherwise.
See logcat for details of why a saved failed.

Public functions

Delete

bool Delete()

Delete an area description.

Details
Returns
Returns true if the area description file is found and can be removed.

ExportToFile

bool ExportToFile(
  string filePath
)

Export an area description from the default area storage location to the destination file directory.

The exported file will use the UUID as its file name.

Details
Parameters
filePath
Destination file directory.
Returns
Returns true if the file was exported, or false if the export failed.

GetMetadata

Metadata GetMetadata()

Get the metadata for the Area Description.

If you want to create a metadata for a not yet saved Area Description, you should instead use the default constructor.

Details
Returns
The metadata, or null if that Area Description does not exist.

SaveMetadata

bool SaveMetadata(
  Metadata metadata
)

Save the metadata for this area description.

Details
Parameters
metadata
Metadata to save.
Returns
Returns true if the metadata was successfully saved, false otherwise.

Send feedback about...

Tango Unity SDK
Tango Unity SDK