diff options
author | Ben Connors <benconnors@outlook.com> | 2019-01-24 16:35:21 -0500 |
---|---|---|
committer | Ben Connors <benconnors@outlook.com> | 2019-01-24 19:52:33 -0500 |
commit | fff5e34c9864532b5e38e70b658eccb0ff35d1d3 (patch) | |
tree | 42913e78d056cda7d4a77d9d276ace9c649c0b5f /output.py | |
parent | bb9e61aaf7c86d27ef24cfc1c3d4b7f0baadbf89 (diff) |
A bunch of changes
- Begin work on simple rendering backend
- Define lighting output interface
- Cache hash() value on functions
- Add unique identifier for each audio cue
Diffstat (limited to 'output.py')
-rw-r--r-- | output.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/output.py b/output.py new file mode 100644 index 0000000..b1e88e1 --- /dev/null +++ b/output.py @@ -0,0 +1,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 |