#plugins.core.tangent.manager.connection

Represents a Tangent Connection.


#API Overview

Variables - Configurable values

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

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


#API Documentation

#Variables

Signatureplugins.core.tangent.manager.connections -> table
TypeVariable
DescriptionA table containing all the Tangent connections.
NotesNone
Sourcesrc/plugins/core/tangent/manager/init.lua line 66

#Constructors

Signatureplugins.core.tangent.manager.connection(applicationName, displayName, systemPath, userPath, task, pluginPath, addDefaultModes, setupFn, transportFn, manager) -> Connection object
TypeConstructor
DescriptionCreates 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.
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 490

#Methods

Signatureplugins.core.tangent.manager.connection:addMode(id, name) -> plugins.core.tangent.manager.mode
TypeMethod
DescriptionAdds 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
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 431

Signatureplugins.core.tangent.manager.connection:applicationName() -> string | nil
TypeMethod
DescriptionGets the application name.
Parameters
  • None
Returns
  • The application name as a string.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 379

Signatureplugins.core.tangent.manager.connection:device() -> hs.tangent
TypeMethod
DescriptionGets the hs.tangent object for the connnection.
Parameters
  • None
Returns
  • A hs.tangent object
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 710

Signatureplugins.core.tangent.manager.connection:displayName() -> string
TypeMethod
DescriptionGets the display name for the connnection.
Parameters
  • None
Returns
  • A string
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 723

Signatureplugins.core.tangent.manager.connection:getControlsXML() -> string
TypeMethod
DescriptionGets the controls XML.
Parameters
  • None
Returns
  • The XML controls
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 314

Signatureplugins.core.tangent.manager.connection:getMode(id) -> plugins.core.tangent.manager.mode
TypeMethod
DescriptionReturns the mode with the specified ID, or nil.
Parameters
  • id - The ID to find.
Returns
  • The mode, or nil.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 448

Signatureplugins.core.tangent.manager.connection:pluginPath() -> string | nil
TypeMethod
DescriptionGets the plugin path.
Parameters
  • None
Returns
  • The plugin path as a string.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 418

Signatureplugins.core.tangent.manager.connection:setupTangentConnection() -> hs.tangent
TypeMethod
DescriptionSets up a new Tangent Connection.
Parameters
  • None
Returns
  • A hs.tangent object.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 47

Signatureplugins.core.tangent.manager.connection:systemPath() -> string | nil
TypeMethod
DescriptionGets the system path.
Parameters
  • None
Returns
  • The system path as a string.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 366

Signatureplugins.core.tangent.manager.connection:task() -> string | nil
TypeMethod
DescriptionGets the task.
Parameters
  • None
Returns
  • The task as a string.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 405

Signatureplugins.core.tangent.manager.connection:update() -> none
TypeMethod
DescriptionUpdates the Tangent GUIs.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 692

Signatureplugins.core.tangent.manager.connection:updateControls() -> none
TypeMethod
DescriptionUpdate Controls.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 466

Signatureplugins.core.tangent.manager.connection:updateFavourites() -> boolean, string
TypeMethod
DescriptionUpdates the Favourites.
Parameters
  • None
Returns
  • None
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 221

Signatureplugins.core.tangent.manager.connection:userPath() -> string | nil
TypeMethod
DescriptionGets the user path.
Parameters
  • None
Returns
  • The user path as a string.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 392

Signatureplugins.core.tangent.manager.connection:writeControlsXML() -> boolean, string
TypeMethod
DescriptionWrites 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.
NotesNone
ExamplesNone
Sourcesrc/plugins/core/tangent/manager/connection.lua line 266