C# Class Tango.AreaDescription

C API wrapper for the Tango area description interface.
Afficher le fichier Open project: ashomk/beerpong Class Usage Examples

Méthodes publiques

Свойство Type Description
m_uuid string

Méthodes publiques

Méthode 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

Méthode 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 méthode

Delete an area description.
public Delete ( ) : bool
Résultat bool

ExportToFile() public méthode

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.
Résultat bool

ForUUID() public static méthode

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

GetList() public static méthode

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

GetMetadata() public méthode

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
Résultat Tango.Metadata

ImportFromFile() public static méthode

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.
Résultat bool

SaveCurrent() public static méthode

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
Résultat AreaDescription

SaveMetadata() public méthode

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

Property Details

m_uuid public_oe property

The UUID for this area description.
public string m_uuid
Résultat string