Mercurial > code > home > repos > light9
view light9/newtypes.py @ 1939:6f49dc917aa3
start vidref web version. v4l camera frames to web page is working
Ignore-this: 34bcc3b6149a1a3bed31aa5f32a4ddc6
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Mon, 03 Jun 2019 09:50:29 +0000 |
parents | ddc9a5ef213a |
children | b2909ecf1fb3 |
line wrap: on
line source
from typing import Tuple, NewType from rdflib import URIRef ClientType = NewType('ClientType', str) ClientSessionType = NewType('ClientSessionType', str) Curve = NewType('Curve', URIRef) OutputUri = NewType('OutputUri', URIRef) # e.g. dmxA DeviceUri = NewType('DeviceUri', URIRef) # e.g. :aura2 DeviceClass = NewType('DeviceClass', URIRef) # e.g. :Aura DmxIndex = NewType('DmxIndex', int) # 1..512 DmxMessageIndex = NewType('DmxMessageIndex', int) # 0..511 DeviceAttr = NewType('DeviceAttr', URIRef) # e.g. :rx NoteUri = NewType('NoteUri', URIRef) OutputAttr = NewType('OutputAttr', URIRef) # e.g. :xFine OutputValue = NewType('OutputValue', int) # byte in dmx message Song = NewType('Song', URIRef) UnixTime = NewType('UnixTime', float) # Alternate output range for a device. Instead of outputting 0.0 to # 1.0, you can map that range into, say, 0.2 to 0.7 OutputRange = NewType('OutputRange', Tuple[float, float])