cp Core CommandPost functionality. cp.18n CommandPost's Internationalisation & Localisation Manger. cp.adobe.aftereffects Adobe After Effects Extension cp.adobe.aftereffects.app The cp.app
for Adobe After Effects. cp.adobe.aftereffects.shortcuts Translations between After Effects shortcuts and Hammerspoon-friendly shortcuts. cp.app This class assists with working with macOS apps. It provides functions for cp.app.menu Represents an app's menu bar, providing multi-lingual access to find and cp.app.prefs Provides access to application preferences, typically stored via NSUserDefaults
or CFProperties
. cp.apple.commandeditor Functions to control and manage Apple's Command Editor - used in Final Cut Pro, cp.apple.compressor Represents the Compressor application, providing functions that allow different tasks to be accomplished. cp.apple.compressor.app The cp.app
for Apple's Compressor. cp.apple.fcpxml A collection of tools for handling FCPXML Documents. cp.apple.fcpxml.time Allows you to convert time string values found in a FCPXML document into Lua objects, cp.apple.fcpxml.timecode Functions for working with timecode in Final Cut Pro XML. Note that cp.apple.finalcutpro Represents the Final Cut Pro application, providing functions that allow different tasks to be accomplished. cp.apple.finalcutpro.app The cp.app for Final Cut Pro. Will automatically determine cp.apple.finalcutpro.browser.AppearanceAndFiltering Clip Appearance & Filtering Menu Popover cp.apple.finalcutpro.browser.Columns Final Cut Pro Browser List View Columns cp.apple.finalcutpro.cmd.CommandDetail This class provides a UI for displaying the details of a command when it is selected on the CommandList
. cp.apple.finalcutpro.cmd.CommandEditor Command Editor Module. cp.apple.finalcutpro.cmd.CommandGroups Represents the list of Command Groups in the CommandList . cp.apple.finalcutpro.cmd.CommandList A list of commands available in the CommandEditor . cp.apple.finalcutpro.cmd.Commands The list of available commands (depending on search and/or CommandGroup cp.apple.finalcutpro.cmd.Commands.Header The header of the Commands. cp.apple.finalcutpro.cmd.Commands.Row Commands Row. cp.apple.finalcutpro.cmd.KeyDetail This class provides a UI for displaying the details of a key when it is selected on the keyboard layout. cp.apple.finalcutpro.content.Clip Represents a clip of media inside FCP. cp.apple.finalcutpro.export.destinations Provides access to the list of Share Destinations configured for the user. cp.apple.finalcutpro.export.ExportDialog Export Dialog Module. cp.apple.finalcutpro.export.GoToPrompt Go To Prompt. cp.apple.finalcutpro.export.ReplaceAlert Replace Alert cp.apple.finalcutpro.export.SaveSheet Save Sheet cp.apple.finalcutpro.import.MediaImport Media Import cp.apple.finalcutpro.inspector.audio.AudioComponent The Audio Configuration section of the Audio Inspector. cp.apple.finalcutpro.inspector.audio.AudioConfiguration The Audio Configuration section of the Audio Inspector. cp.apple.finalcutpro.inspector.audio.AudioInspector Audio Inspector Module. cp.apple.finalcutpro.inspector.audio.MainProperties The MainProperties UI for the AudioInspector . cp.apple.finalcutpro.inspector.audio.TopProperties The TopProperties
class is used to represent the top properties group of the Audio Inspector. cp.apple.finalcutpro.inspector.BaseMotionPanel A base class for Inspector panels cp.apple.finalcutpro.inspector.BasePanel A base class for the different panels in the Inspector . cp.apple.finalcutpro.inspector.color.ColorAdjustments Color Adjustments Module. cp.apple.finalcutpro.inspector.color.ColorBoard Color Board Module. cp.apple.finalcutpro.inspector.color.ColorBoardAspect Represents a particular aspect of the color board (Color/Saturation/Exposure). cp.apple.finalcutpro.inspector.color.ColorCurve A ColorCurve Element . cp.apple.finalcutpro.inspector.color.ColorCurves Color Curves Module. cp.apple.finalcutpro.inspector.color.ColorInspector Color Inspector Module. cp.apple.finalcutpro.inspector.color.ColorPuck Color ColorPuck Module. cp.apple.finalcutpro.inspector.color.ColorWell Represents a single Color Well in the Color Wheels Inspector. cp.apple.finalcutpro.inspector.color.ColorWheel Represents a single Color Well in the Color Wheels Inspector. cp.apple.finalcutpro.inspector.color.ColorWheels Color Wheels Module. cp.apple.finalcutpro.inspector.color.CorrectionsBar The Correction selection/management bar at the top of the ColorInspector. cp.apple.finalcutpro.inspector.color.HueSaturationCurve A HueSaturationCurve Element . cp.apple.finalcutpro.inspector.color.HueSaturationCurves Color Curves Module. cp.apple.finalcutpro.inspector.color.ValueIndicator ValueIndicator Module. cp.apple.finalcutpro.inspector.generator.GeneratorInspector Generator Inspector Module. This appears for both Generators and Titles. cp.apple.finalcutpro.inspector.info.InfoInspector Video Inspector Module. cp.apple.finalcutpro.inspector.info.InfoProjectInspector Info Inspector Module when a Project is selected. cp.apple.finalcutpro.inspector.Inspector Inspector cp.apple.finalcutpro.inspector.InspectorProperty InspectorProperty
contains helper functions for handling common propertycp.apple.finalcutpro.inspector.share.ShareInspector Share Inspector Module. cp.apple.finalcutpro.inspector.text.TextInspector Text Inspector Module. cp.apple.finalcutpro.inspector.title.TitleInspector Title Inspector Module. cp.apple.finalcutpro.inspector.transition.TransitionInspector Transition Inspector Module. cp.apple.finalcutpro.inspector.video.VideoInspector Video Inspector Module. cp.apple.finalcutpro.main.BackgroundTasksDialog Represents the Background Tasks warning dialog. cp.apple.finalcutpro.main.Browser Browser Module. cp.apple.finalcutpro.main.Browser.BrowserMarkerPopover Browser Marker Popup. cp.apple.finalcutpro.main.EffectsBrowser Effects Browser Module. cp.apple.finalcutpro.main.FindAndReplaceTitleText Represents a "Find and Replace Title Text" dialogue box. cp.apple.finalcutpro.main.FullScreenPlayer Full Screen Window Player. cp.apple.finalcutpro.main.GeneratorsBrowser Generators Browser Module. cp.apple.finalcutpro.main.KeywordEditor Keyword Editor Module. cp.apple.finalcutpro.main.KeywordField Keyword Text Field Module. cp.apple.finalcutpro.main.LibrariesBrowser Libraries Browser Module. cp.apple.finalcutpro.main.LibrariesFilmstrip Libraries Filmstrip Module. cp.apple.finalcutpro.main.LibrariesList Libraries List Module. cp.apple.finalcutpro.main.LibrariesSidebar Libraries Sidebar Browser Module. cp.apple.finalcutpro.main.MediaBrowser Media Browser Module. cp.apple.finalcutpro.main.Playhead Playhead Module. cp.apple.finalcutpro.main.PrimaryToolbar Timeline Toolbar. cp.apple.finalcutpro.main.PrimaryWindow Primary Window Module. cp.apple.finalcutpro.main.SecondaryWindow Secondary Window Module. cp.apple.finalcutpro.main.TranscodeMedia Represents the Transcode Media sheet. cp.apple.finalcutpro.menu Final Cut Pro Menu Helper Functions. cp.apple.finalcutpro.plugins Scans an entire system for Final Cut Pro Effects, Generators, Titles & Transitions. cp.apple.finalcutpro.plugins.guiscan Final Cut Pro GUI Plugin Scanner. cp.apple.finalcutpro.prefs.EditingPanel Editing Panel Module. cp.apple.finalcutpro.prefs.GeneralPanel General Panel Module. cp.apple.finalcutpro.prefs.ImportPanel Import Panel Module. cp.apple.finalcutpro.prefs.Panel Preferences Panel. cp.apple.finalcutpro.prefs.PlaybackPanel Playback Panel Module. cp.apple.finalcutpro.prefs.PreferencesWindow Preferences Window Module. cp.apple.finalcutpro.strings The cp.strings
for I18N lookups related to Final Cut Pro. cp.apple.finalcutpro.timeline.Appearance Timeline Appearance Popup module. cp.apple.finalcutpro.timeline.AudioRole Extends Role cp.apple.finalcutpro.timeline.AudioSubrole Extends Role cp.apple.finalcutpro.timeline.CaptionsRole Extends Role cp.apple.finalcutpro.timeline.CaptionsSubrole Extends Role cp.apple.finalcutpro.timeline.Contents Timeline Contents Module. cp.apple.finalcutpro.timeline.Index Timeline Index Module. cp.apple.finalcutpro.timeline.IndexCaptions Provides access to the 'Captions' section of the Timeline Index cp.apple.finalcutpro.timeline.IndexClips Extends IndexSection cp.apple.finalcutpro.timeline.IndexClips.Type The collection of RadioButtons that allow filtering by Video/Audio/Title. cp.apple.finalcutpro.timeline.IndexMode Timeline Index Mode Radio Group Module. cp.apple.finalcutpro.timeline.IndexRoles Provides access to the 'Roles' section of the Timeline Index cp.apple.finalcutpro.timeline.IndexRolesArea Represents the list of Roles in the IndexRoles . cp.apple.finalcutpro.timeline.IndexRolesList Timeline Index Roles List. cp.apple.finalcutpro.timeline.IndexSection An abstract base class for sections inside the Index . cp.apple.finalcutpro.timeline.IndexTags Provides access to the 'Tags' section of the Timeline Index cp.apple.finalcutpro.timeline.IndexTags.Type The collection of RadioButtons that allow filtering by Video/Audio/Title. cp.apple.finalcutpro.timeline.Role Extends Row cp.apple.finalcutpro.timeline.SpeedPopover Extends Timeline cp.apple.finalcutpro.timeline.Timeline Timeline Module. cp.apple.finalcutpro.timeline.Toolbar Timeline Toolbar cp.apple.finalcutpro.timeline.Toolbar.Browser A RadioGroup that contains buttons to show or hide the Effects and Transitions Browsers. cp.apple.finalcutpro.timeline.Toolbar.Clip Provides access to clip options such as skimming, audio skimming, soloing and snap. cp.apple.finalcutpro.timeline.ToolPalette Represents the Tool Palette Menu Button in the Timeline. cp.apple.finalcutpro.timeline.VideoRole Extends Role cp.apple.finalcutpro.timeline.VideoSubrole Extends Role cp.apple.finalcutpro.viewer.ControlBar Represents the bottom "control" bar on a Viewer cp.apple.finalcutpro.viewer.InfoBar Represents the bar of information about the Viewer (format, title, viewing options). cp.apple.finalcutpro.viewer.Viewer Viewer Module. cp.apple.finalcutpro.workflowextensions.CommandPostWindow The CommandPost Workflow Extension Window. cp.apple.motion Represents the Motion application, providing functions that allow different tasks to be accomplished. cp.apple.motion.app The cp.app
for Apple's Motion. cp.battery Provides access to various properties of the battery. Each of these properties cp.bench Benchmarking Tool. cp.blackmagic.resolve The Blackmagic DaVinci Resolve Extension. cp.blackmagic.resolve.app The cp.app
for Blackmagic DaVinci Resolve. cp.blackmagic.resolve.color.Color Color Module. cp.blackmagic.resolve.color.Tracker Tracker cp.blackmagic.resolve.main.PrimaryWindow Primary Window Module. cp.buffer Internal byte buffer type. Allows additional chunks of bytes cp.choices Choices Module. cp.choices.builder Choices Builder Module. cp.collect.LazyList A LazyList is a list that is lazily evaluated. It will dynamically create items on demand, cp.collect.List Lists are similar tables
which can contain nil
items without shortening the length. cp.collect.Queue A "double-ended queue" implementation. This allows pushing and popping cp.collect.Set An implementation of a logical set
, which contains a single unique cp.commands Commands Module. cp.commands.command Commands Module. cp.commands.englishKeyCodes Returns a table of all the English Key Codes. cp.commands.shortcut Shortcut Commands cp.commands.shortcut.builder Shortcut Commands Builder Module. cp.config Manage CommandPost's constants and settings. cp.config.dockIconClickCallback Callback which triggers when the CommandPost Dock Icon is clicked cp.config.fileDroppedToDockIconCallback File Dropped to Dock Icon Callback cp.config.shutdownCallback Shutdown Callback Module. cp.config.textDroppedToDockIconCallback Text Dropped to Dock Icon Callback cp.console.history Console History Manager. cp.deferred This extension makes it simple to defer multiple actions after a delay from the initial execution. cp.delegator cp.delegator
is a middleclass "mix-in" that allows forcp.dev A set of handy developer tools for CommandPost. cp.dialog A collection of handy Dialog tools for CommandPost. cp.disk Provides provides details about disk devices attached to the system. cp.docs Documentation Tools. cp.feedback Feedback Form. cp.fn A collection of functions that are useful for working with functions. cp.fn.args Functions for working with function arguments. cp.fn.ax A collection of useful functions for working with AX. cp.fn.prop A module of free-standing functions for working with cp.prop values. cp.fn.string String-related functional programming helpers. cp.fn.table Table-related functions. cp.fn.value A collection of functions for working with values. cp.highland2 Highland 2 support. cp.highland2.app The cp.app for Highland 2. cp.highland2.Document Highland 2 Document Window extension. cp.highland2.Sidebar Represents the sidebar for a document opened in Highland. cp.i18n.language Provides the set of ISO 693-1/2/3 language codes and names. cp.i18n.languageID As per Apple's documentation , cp.i18n.localeID As per Apple's documentation , cp.i18n.region Provides the set of ISO 3166-1 region codes and names. cp.i18n.script Provides the set of ISO 15924 language scripts. cp.idle This library allows tasks to be queue for execution when the computer has cp.ids Allows managing values/IDs which can vary between versions. cp.interpolate Provides a function that will interpolate values into a string. cp.is A simple class that lets you test if a value is
a particular type. cp.json A collection of handy JSON tools. cp.just This module provides functions to help with performing tasks which may be cp.lazy cp.lazy
is a middleclass "mix-in" that allows forcp.localized Helps look up localized names for folders. cp.nib Provides support for NIB files. cp.nib.archiver Provides support for loading NIB files stored in the NIBArchive
format. cp.nib.type.NSString A metatype for unarchived NSString
objects. cp.nib.types A registry of supported object types for unarchived values. cp.pattern Contains pattern matching utility functions. cp.plist Reads & Writes plist data. cp.plist.archiver Supports 'defrosting' a table which is made up from an 'NSKeyArchiver' record. cp.plist.plistParser plistParser (https://codea.io/talk/discussion/1269/code-plist-parser ) cp.plugins This is a simple plugin manager. cp.plugins.env Provides access to resources in the plugin environment. In generally, this will be files stored in a Complex Plugin's folder. cp.plugins.plugin CommandPost Plugin. cp.prop This is a utility library for helping keep track of single-value property states. Each property provides access to a single value. Must be readable, but may be read-only. It works by creating a table which has a get
and (optionally) a set
function which are called when changing the state. cp.protect Utility function for protecting a table from being modified. cp.result Represents the result of an operation which may end in success
or failure
. cp.rx Reactive Extensions for Lua. cp.rx.AsyncSubject AsyncSubjects
are subjects that produce either no values or a single value. Ifcp.rx.BehaviorSubject A Subject that tracks its current value. Provides an accessor to retrieve the most cp.rx.CooperativeScheduler Manages Observables using coroutines
and a virtual clock that must be updated cp.rx.go Defines Statements to make processing of cp.rx.go.Do A Statement that will execute the provided resolvable
values. cp.rx.go.Do.Then A Statement.Modifier of Do cp.rx.go.Done A Statement that will complete without sending any values. cp.rx.go.First Extends: Statement cp.rx.go.Given A Statement that will execute the provided resolvable
values. cp.rx.go.Given.Then A Statement.Modifier of Given cp.rx.go.If A Statement
that will check if a resolvable
matches a predicate, then executes other resolvables
. cp.rx.go.If.Are A [Statement.Modifier] of If that sets the values to match. cp.rx.go.If.AreNot A Statement.Modifier for If that sets the values to not match. cp.rx.go.If.Is A Statement.Modifier for If that sets a specific value to match. cp.rx.go.If.IsNot A Statement.Modifier for If that sets a specific value to not match. cp.rx.go.If.Matches A Statement.Modifier for If that sets a predicate check values against. cp.rx.go.If.Then A Statement.Modifier
that defines what happens when an If
matches. cp.rx.go.If.Then.Otherwise A Statement.Modifier of If , which should be created via If:Then(...):Otherwise(...)
. cp.rx.go.If.Then.Otherwise.Then Each Otherwise can have a subsequent Then
which will be executed after the previous one resolves. cp.rx.go.Last A Statement
that will complete after the only the last result resolves. cp.rx.go.List Extends: Statement cp.rx.go.List.Sorted A Statement.Modifier
that specifies the list should be sorted by its 'natural' order - that is a < b
. cp.rx.go.List.SortedBy A Statement.Modifier
that specifies the list should be sorted by the specified function
. cp.rx.go.Require A Statement
that will require that the resolvable
value matches a predicate, cp.rx.go.Require.Are Specifies that the Require
d values Are
a specific value. cp.rx.go.Require.AreNot Specifies that the Require
d values AreNot
a specific value. cp.rx.go.Require.Is Specifies that the Require
d value Is
a specific value. cp.rx.go.Require.IsNot Specifies that the Require
d value IsNot
a specific value. cp.rx.go.Require.Matches Specifies that the Require
d value Matches
a function predicate. cp.rx.go.Retry Extends: Statement cp.rx.go.SetProp A Statement
that will update a cp.prop
value, then optionally execute other resolvables
, and optionally reset the cp.prop
to its previous value. cp.rx.go.SetProp.To A Statement.Modifier
that defines what value to set a cp.prop
to. cp.rx.go.SetProp.To.Then A Statement.Modifier
that defines what happens when after SetProp.To
is executed. cp.rx.go.SetProp.To.Then.ThenReset A Statement.Modifier
that specifies that the cp.prop
is reset to its original value once execution completes. cp.rx.go.Statement A Statement
is defined to enable processing of asynchronous resolvable
values such cp.rx.go.Statement.Definition A Statement is defined before being executable. cp.rx.go.Statement.Modifier A Statement.Modifier
is an extension to a Statement that provides additional configuration details. cp.rx.go.Statement.Modifier.Definition A Statement.Modifier is defined before being executable. cp.rx.go.Throw A Statement that will throw the provided message. cp.rx.go.WaitUntil A Statement that will wait for the first value from a resolveable
that matches the predicate. cp.rx.ImmediateScheduler Schedules Observables
by running all operations immediately. cp.rx.Observable Observables push values to Observers . cp.rx.Observer Observers are simple objects that receive values from Observables . cp.rx.Reference A handle representing the link between an Observer and an Observable , as well as any cp.rx.RelaySubject A Subject that provides new Observers with some or all of the most recently cp.rx.Subject Subjects
function both as an Observer and as an Observable . Subjects inherit allcp.rx.TimeoutScheduler A scheduler that uses the hs.timer
library to schedule events on an event loop. cp.sourcewatcher Watches folders for specific file extensions and reloads the app if they change. cp.spec An synchronous/asynchronous test library for Lua. cp.spec.DefaultHandler Default implementation of Handler , which cp.spec.Definition A Definition is a superclass for a "runnable" specification. cp.spec.Error Provides an Error message, which can be thrown via the error
function. cp.spec.expect Provides a way of checking values match expected results. At it's core, it uses assert
to make the check. cp.spec.Handled An synchronous/asynchronous test library for Lua. cp.spec.Handler Subclasses of this can customise how reports are handled. cp.spec.Message Provides an Message message, which can be thrown via the error
function. cp.spec.Report The results of a test run . cp.spec.Run An individual run of a test Definition or Specification . cp.spec.Run.This A token passed to test functions to allow them to indicate if a test run cp.spec.Scenario A Definition which describes a specific scenario. cp.spec.Specification A Specification is a list of definitions which cp.spec.TestCase Wraps cp.test into a subclass of Scenario . cp.spec.TestSuite Test Suite. cp.spec.Where Created via Scenario:where(...) . cp.strings Provides strings from (potentially) multiple sources, with support for loading from multiple languages. cp.strings.source.plist Loads strings from a plist
with allowing for a given language variation. Eg: cp.strings.source.table Loads strings from provided tables, allowing for a given language variation. Eg: cp.test CommandPost Test Scripts. cp.text This module provides support for loading, manipulating, and comparing unicode text data. cp.text.matcher Adapted from 'utf8.lua' (https://github.com/Stepets/utf8.lua ) cp.time.flicks Provides support for measuring time in flicks
, a base unit of time useful for cp.tools A collection of handy miscellaneous tools for Lua development. cp.ui.Alert Alert UI Module. cp.ui.axutils Utility functions to support hs.axuielement
. cp.ui.axutils.compare Contains functions for comparing axuielement
s. cp.ui.axutils.match Contains common hs.axuielement
matching functions. cp.ui.Builder A utility class, which provides support for allowing creation of Element instances in a "builder" style. cp.ui.Button The Button
type extends Element and includes all its cp.ui.Cell Represents an AXCell
axuielement
. This can be used directly, or can be subclassed to provide more specific access to the cell contents. cp.ui.CheckBox Check Box UI Module. cp.ui.ColorWell UI ColorWell. cp.ui.Column Represents a Column in a Table. cp.ui.ComboBox Combo Box Module. cp.ui.Dialog Represents a Window which has a AXSubrole
of AXDialog
. cp.ui.DisclosureTriangle Disclosure Triangle UI Module. cp.ui.Element A support class for hs.axuielement
management. cp.ui.ElementCache Provides caching for Element subclasses that want to cache children. cp.ui.GridElement Abstract base class for AX
elements which form a grid, such as GridElement and Outline . cp.ui.GridElement.Builder A Builder
for GridElement
s. cp.ui.GridElement.OfRows Processes the contents of the GridElement as a list of rows. cp.ui.Group UI Group. cp.ui.Group.Builder Defines a Group
builder. cp.ui.Image Represents an AXImage
axuielement
value. cp.ui.List Represents an AXList
axuielement
value. cp.ui.Menu UI for AXMenus. cp.ui.MenuButton Menu Button Module. cp.ui.notifier Supports long-lived 'AX' notifiers. Configure the application to watch, the cp.ui.OldOutline Represents an AXOutline
axuielement
. cp.ui.OldRow Represents an AXRow
axuielement
. cp.ui.OldTable Represents an AXTable in the Apple Accessibility UX API. cp.ui.Outline A Outline UI element. It extends GridElement , so will inherit all of its properties and methods. cp.ui.Popover UI Group. cp.ui.PopUpButton Pop Up Button Module. cp.ui.PropertyRow Represents a single property row, typically in a Property Inspector. cp.ui.RadioButton Radio Button Module. cp.ui.RadioGroup Represents an AXRadioGroup
, providing utility methods. cp.ui.Row Represents an AXRow
axuielement
. cp.ui.Row.Builder Defines a Row
builder. cp.ui.ScrollArea A ScrollArea
represents an AXScrollArea
. They primarily function as a "portal" cp.ui.ScrollArea.Builder Builder class for ScrollArea .cp.ui.ScrollBar Provides access to AXScrollBar
axuielement
values. cp.ui.SearchField A TextField with a subrole of AXSearchField
. cp.ui.Sheet Sheet UI Module. cp.ui.Slider Slider Module. cp.ui.SplitGroup Split Group UI. A SplitGroup is a container that can be split into multiple sections. cp.ui.Splitter Represents an AXSplitter
. cp.ui.StaticText Static Text Module. cp.ui.Table A Table UI element. It extends GridElement , so will inherit all of its properties and methods. cp.ui.TextArea UI Text Area. cp.ui.TextField Text Field Module. cp.ui.TextField.Builder Defines a TextField
Builder . cp.ui.Toolbar Toolbar Module. cp.ui.Window A Window UI element. cp.utf16 A pure-LUA implementation of UTF-16 decoding cp.utf16.be A pure-LUA implementation of UTF-16 decoding with big-endian ordering. cp.utf16.le A pure-LUA implementation of UTF-16 decoding with little-endian ordering. cp.watcher This extension provides support for setting up 'event watchers'. cp.web.block Block. cp.web.generate Functions for Generating HTML UI Items cp.web.html Functions for Generating HTML markup. cp.web.text Functions for managing text on the web. cp.web.ui This extension contains functions which simplify the creation of standard UI events cp.web.xml Functions for Generating XML markup. cp.websocket.event The set of event types received from websocket connections. cp.websocket.frame Implementation of RFC-6455 , Section 5 cp.websocket.http Provides a full HTTP-based websocket implementation. cp.websocket.serial A partial implementation of the websocket API communicating cp.websocket.status A table
of statuses used by both cp.websocket.serial
and cp.websocket.http
to describe the connection status.