plugins.core.tangent.manager.connection

Represents a Tangent Connection.


API Overview

Variables - Configurable values

  • connections

Constructors - API calls which return an object, typically one that offers API methods

  • connection

Methods - API calls which can only be made on an object returned by a constructor

  • addMode
  • applicationName
  • device
  • displayName
  • getControlsXML
  • getMode
  • pluginPath
  • setupTangentConnection
  • systemPath
  • task
  • update
  • updateControls
  • updateFavourites
  • userPath
  • writeControlsXML

API Documentation

Variables

connections

   
Signature plugins.core.tangent.manager.connections -> table
Type Variable
Description A table containing all the Tangent connections.
Notes None
Source src/plugins/core/tangent/manager/init.lua line 66

Constructors

connection

   
Signature plugins.core.tangent.manager.connection(applicationName, displayName, systemPath, userPath, task, pluginPath, addDefaultModes, setupFn, transportFn, 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.
  • 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.
Notes
  • Notes for the task parameter:
  • ** 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.
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 490

Methods

addMode

   
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
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 431

applicationName

   
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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 379

device

   
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
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 710

displayName

   
Signature plugins.core.tangent.manager.connection:displayName() -> string
Type Method
Description Gets the display name for the connnection.
Parameters
  • None
Returns
  • A string
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 723

getControlsXML

   
Signature plugins.core.tangent.manager.connection:getControlsXML() -> string
Type Method
Description Gets the controls XML.
Parameters
  • None
Returns
  • The XML controls
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 314

getMode

   
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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 448

pluginPath

   
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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 418

setupTangentConnection

   
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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 47

systemPath

   
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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 366

task

   
Signature plugins.core.tangent.manager.connection:task() -> string | nil
Type Method
Description Gets the task.
Parameters
  • None
Returns
  • The task as a string.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 405

update

   
Signature plugins.core.tangent.manager.connection:update() -> none
Type Method
Description Updates the Tangent GUIs.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 692

updateControls

   
Signature plugins.core.tangent.manager.connection:updateControls() -> none
Type Method
Description Update Controls.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 466

updateFavourites

   
Signature plugins.core.tangent.manager.connection:updateFavourites() -> boolean, string
Type Method
Description Updates the Favourites.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 221

userPath

   
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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 392

writeControlsXML

   
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.
Notes None
Examples None
Source src/plugins/core/tangent/manager/connection.lua line 266