C# Class Tango.AreaDescription

C API wrapper for the Tango area description interface.
Show file Open project: ashomk/beerpong Class Usage Examples

Public Properties

Property Type Description
m_uuid string

Public Methods

Method Description
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. The exported file will use the UUID as its file name.

ForUUID ( string uuid ) : AreaDescription

Get an area description by UUID.

GetList ( ) : Tango.AreaDescription[]

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

GetMetadata ( ) : Tango.Metadata

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.

ImportFromFile ( string filePath ) : bool

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

SaveCurrent ( ) : AreaDescription

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.

SaveMetadata ( Tango.Metadata metadata ) : bool

Save the metadata for this area description.

Private Methods

Method Description
AreaDescription ( string uuid ) : System

Initializes a new instance of the Tango.AreaDescription class. Private to make sure people use AreaDescription.ForUUID

_FreeMetadataPtr ( IntPtr metadataPtr ) : void

Free a previously gotten Metadata pointer.

_GetMetadataPtr ( ) : IntPtr

Get the low level metadata pointer for an area description. Make sure to free this with FreeMetadataPtr when you are done with it.

_GetUUIDList ( ) : string[]

Get a list of all area description UUIDs on the device.

_MetadataGetDoubleArray ( IntPtr rawMetadata, string key, int expectedCount, double &value ) : bool

Get a fixed-size double array from an area description metadata.

_MetadataGetInt64 ( IntPtr rawMetadata, string key, System.Int64 &value ) : bool

Get an Int64 value from an area description metadata.

_MetadataGetString ( IntPtr rawMetadata, string key, string &value ) : bool

Get a string value from an area description metadata.

_MetadataSetDoubleArray ( IntPtr rawMetadata, string key, double value ) : bool

Set a fixed-size double array in an area description metadata.

_MetadataSetInt64 ( IntPtr rawMetadata, string key, System.Int64 value ) : bool

Set an Int64 value in an area description metadata.

_MetadataSetString ( IntPtr rawMetadata, string key, string value ) : bool

Set a string value in an area description metadata.

_ReadUTF8String ( IntPtr rawPtr ) : string

Convert an IntPtr to a UTF-8 encoded C-string into a C# string.

Method Details

Delete() public method

Delete an area description.
public Delete ( ) : bool
return bool

ExportToFile() public method

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.
public ExportToFile ( string filePath ) : bool
filePath string Destination file directory.
return bool

ForUUID() public static method

Get an area description by UUID.
public static ForUUID ( string uuid ) : AreaDescription
uuid string UUID to find.
return AreaDescription

GetList() public static method

Get a list of all the area descriptions on the device.
public static GetList ( ) : Tango.AreaDescription[]
return Tango.AreaDescription[]

GetMetadata() public method

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.
public GetMetadata ( ) : Tango.Metadata
return Tango.Metadata

ImportFromFile() public static method

Import an area description from a file path to the default area storage location.
public static ImportFromFile ( string filePath ) : bool
filePath string File path of the area descrption to be imported.
return bool

SaveCurrent() public static method

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.
public static SaveCurrent ( ) : AreaDescription
return AreaDescription

SaveMetadata() public method

Save the metadata for this area description.
public SaveMetadata ( Tango.Metadata metadata ) : bool
metadata Tango.Metadata Metadata to save.
return bool

Property Details

m_uuid public property

The UUID for this area description.
public string m_uuid
return string