HelmControl

From ETC Public Wiki
Jump to: navigation, search

Overview

HelmControl.py is a Python library encapsulating the entire OSC command set understood by the Viewport application. Using simple "class.method" notation, the entire feature set of any or all running instances of the Viewport application can be controlled.

Example Usage

import HelmControl3

# Create control interface
helm = HelmControl3.Interface()

# Instructs all viewports to open a file from the absolute 
# path specified using the background video player.
helm.background.open("all", "C:\foo\stars_1.avi")

# Instructs bridge1's viewport to open a file from the default 
# media directory using the background video player.
helm.background.open("bridge1", "stars_1.avi")

# Place bridge1, bridge2, bridge3 into a new message group
# called "leftside".
helm..network.join("bridge1", "leftside")
helm.network.join("bridge2", "leftside")
helm.network.join("bridge3", "leftside")

# Make bridge3 the master of the "leftside" group.
helm.network.master("bridge3", "leftside")

# Instructs members of the "leftside" group to open a file 
# from the default media directory,  Each station will replace
# the hash mark with it's own name.
helm.background.open("leftside", "stars_#.avi")

# Close the file
helm.background.close()

HelmControl Class

The root class of the HelmControl library. Upon instantiation, it initializes a set of child class objects which are able to control various aspects of the Viewport's operation. Each child class is exposed as a property.

Properties

Name Description
diagnostics Gets an instance of the Diagnostics class.
background Gets an instance of the Background class.
foreground Gets an instance of the Foreground class.
network Gets an instance of the Network class.
window Gets an instance of the Window class.

Diagnostics Class

Controls the on-screen diagnostic display.

Methods

Name Description
hide(string scope) Hides the diagnostic display on the station or group of stations specified by scope.
show(string scope) Shows the diagnostic display on the station or group of stations specified by scope.


Background Class

Controls the background (layer 0) video player.

Methods

Name Description
close(string scope) Stops playback and closes the video on the station or group of stations specified by scope.
hide(string scope) Hides the player on the station or group of stations specified by scope.
loop(string scope, int enable) Enables (1) or disables (0) looping on the station or group of stations specified by scope.
open(string scope, string filename) Opens the specified file and begins playing it on the station or group of stations specified by scope.
pause(string scope) Pauses playback on the station or group of stations specified by scope.
play(string scope) Resumes playback on the station or group of stations specified by scope.
show(string scope) Shows the player on the station or group of stations specified by scope.
stop(string scope) Stops playback on the station or group of stations specified by scope.
sync(string scope, int enable) Enables (1) or disables (0) synchronization on the station or group of stations specified by scope.


Foreground Class

Controls the foreground (layer 1) video player.

Methods

Name Description
close(string scope) Stops playback and closes the video on the station or group of stations specified by scope.
hide(string scope) Hides the player on the station or group of stations specified by scope.
loop(string scope, int enable) Enables (1) or disables (0) looping on the station or group of stations specified by scope.
open(string scope, string filename) Opens the specified file and begins playing it on the station or group of stations specified by scope.
pause(string scope) Pauses playback on the station or group of stations specified by scope.
play(string scope) Resumes playback on the station or group of stations specified by scope.
show(string scope) Shows the player on the station or group of stations specified by scope.
stop(string scope) Stops playback on the station or group of stations specified by scope.
sync(string scope, int enable) Enables (1) or disables (0) synchronization on the station or group of stations specified by scope.


Network Class

Controls networking aspects of the Viewport such as grouping and group master.

Methods

Name Description
join(string station_id, string group_id) Instructs the specified station to subscribe to the specified message group.
unjoin(string station_id, string group_id) Instructs the specified station to unsubscribe the specified message group.
master(string group_id, string station_id) Instructs the specified group which station will be the group master.


Window Class

Controls general window behavior.

Methods

Name Description
maximize(string scope) Maximizes the Viewport(s) on the station or group of stations specified by scope.
minimize(string scope) Minimizes the Viewport(s) on the station or group of stations specified by scope.
normalize(string scope) Normalizes the Viewport(s) on the station or group of stations specified by scope.
quit(string scope) Closes the Viewport(s) on the station or group of stations specified by scope.