Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
169 lines (145 loc) · 14.9 KB

File metadata and controls

169 lines (145 loc) · 14.9 KB

docs » plugins.core.tangent.manager.connection


Represents a Tangent Connection.

API Overview

API Documentation

Variables

Signature plugins.core.tangent.manager.connections -> table
Type Variable
Description A table containing all the Tangent connections.

Constructors

Signature plugins.core.tangent.manager.connection(bundleID, manager) -> Connection object
Type Constructor
Description Creates a new Connection object.
Parameters
  • applicationName - The application name as a string. This is what appears in Tangent Mapper.
  • displayName - The application display name as a string. This is what appears in CommandPost.
  • systemPath - A string containing the absolute path of the directory that contains the Controls and Default Map XML files.
  • userPath - An optional string containing the absolute path of the directory that contains the User’s Default Map XML files.
  • task - An optional string containing the name of the task associated with the application. This is used to assist with automatic switching of panels when your application gains mouse focus on the GUI. This parameter should only be required if the string passed in appStr does not match the Task name that the OS identifies as your application. Typically, this is only usually required for Plugins which run within a parent Host application. Under these circumstances it is the name of the Host Application’s Task which should be passed.
  • pluginPath - A string containing the absolute path of the directory that contains the built-in Default Map XML files.
  • addDefaultModes - A boolean which indicates whether or not CommandPost should add any default modes.
  • setupFn - Setup function.
  • transportFn - Transport function.
  • manager - The Tangent Manager module
Returns
  • A new Connection object.

Methods

Signature plugins.core.tangent.manager.connection:addMode(id, name) -> plugins.core.tangent.manager.mode
Type Method
Description Adds a new mode with the specified details and returns it.
Parameters
  • id - The id number of the Mode.
  • name - The name of the Mode.
Returns
  • The new mode

| Signature | plugins.core.tangent.manager.connection:applicationName() -> string | nil | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets the application name. | | Parameters |

  • None
| | Returns |
  • The application name as a string.
|

Signature plugins.core.tangent.manager.connection:device() -> hs.tangent
Type Method
Description Gets the hs.tangent object for the connnection.
Parameters
  • None
Returns
  • A hs.tangent object
Signature plugins.core.tangent.manager.connection:displayName() -> string
Type Method
Description Gets the display name for the connnection.
Parameters
  • None
Returns
  • A string
Signature plugins.core.tangent.manager.connection:getControlsXML() -> string
Type Method
Description Gets the controls XML.
Parameters
  • None
Returns
  • The XML controls
Signature plugins.core.tangent.manager.connection:getMode(id) -> plugins.core.tangent.manager.mode
Type Method
Description Returns the mode with the specified ID, or nil.
Parameters
  • id - The ID to find.
Returns
  • The mode, or nil.

| Signature | plugins.core.tangent.manager.connection:pluginPath() -> string | nil | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets the plugin path. | | Parameters |

  • None
| | Returns |
  • The plugin path as a string.
|

Signature plugins.core.tangent.manager.connection:setupTangentConnection() -> hs.tangent
Type Method
Description Sets up a new Tangent Connection.
Parameters
  • None
Returns
  • A hs.tangent object.

| Signature | plugins.core.tangent.manager.connection:systemPath() -> string | nil | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets the system path. | | Parameters |

  • None
| | Returns |
  • The system path as a string.
|

| Signature | plugins.core.tangent.manager.connection:task() -> string | nil | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets the task. | | Parameters |

  • None
| | Returns |
  • The task as a string.
|

Signature plugins.core.tangent.manager.connection:update() -> none
Type Method
Description Updates the Tangent GUIs.
Parameters
  • None
Returns
  • None
Signature plugins.core.tangent.manager.connection:updateControls() -> none
Type Method
Description Update Controls.
Parameters
  • None
Returns
  • None
Signature plugins.core.tangent.manager.connection:updateFavourites() -> boolean, string
Type Method
Description Updates the Favourites.
Parameters
  • None
Returns
  • None

| Signature | plugins.core.tangent.manager.connection:userPath() -> string | nil | | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Method | | Description | Gets the user path. | | Parameters |

  • None
| | Returns |
  • The user path as a string.
|

Signature plugins.core.tangent.manager.connection:writeControlsXML() -> boolean, string
Type Method
Description Writes the Tangent controls.xml File to the User's Application Support folder.
Parameters
  • None
Returns
  • true if successfully created otherwise false if an error occurred.
  • If an error occurs an error message will also be returned as a string.