summaryrefslogtreecommitdiff
path: root/output.py
blob: b1e88e146638c820b5eb26a637a8a3cc648eac41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""DMX module.

Defines a generic interface for a DMX interface.
"""

from abc import ABC, abstractmethod

class LightingOutput(ABC):
    """Generic lighting interface."""

    ## Set this to how long it takes to transmit one set of values. May be ignored by client 
    ## code
    trans_time = 1 
    

    @abstractmethod
    def set_values(self, values):
        """Set the current DMX values.

        values must be an iterable of the form:

            (channel, value), ...

        channel entries may not be repeated and each channel will be an instance of 
        workspace.Channel. value must be between 0 and 255, inclusive.
        """
        return