A class to represent a DMX fixture. A fixture is e.g. an LED par or a moving light. It has a number of channels, a DMX address, and a description. It can be set to a color, or to a raw value.
create a new non-descript fixture.
dmxAddr |
the starting address of the fixture (0-based). |
numChannels |
number of channels the fixture uses. |
universeId |
the id of the universe the fixture is in. This is useful for SimpleDMX devices that support multiple universes. If you are using a single universe, you should keep it at its default value (0). |
desc |
a
|
device |
a |
create a new fixture for a given model.
model |
the model of the fixture. This is a |
mode |
the mode the fixture is configured to. This is a |
dmxAddr |
the starting address of the fixture (0-based). |
universeId |
the id of the universe the fixture is in. This is useful for SimpleDMX devices that support multiple universes. If you are using a single universe, you should keep it at its default value (0). |
device |
a |
a dictionary containing all known models. The keys are the model names, the values are dictionaries of modes. See newFor
for more details.
print all known models to the console. See newFor
for more a usage example.
set the value(s) of a channel (normalised).
key |
the key of the channel to set. Either an index (Int), or one of the keys in |
val |
either a numeric normalised value or an array of normalised values. The values will be assigned to the channels subsequent to the channel specified by |
send |
if |
A convenience method that sets the values of the channels r
, g
, b
and dim
.
channelTypes
description that contains r
, g
, b
, and dim
. The values for r
, g
, and b
need to be next to each other and in this order.color |
A Color object. |
send |
if |
set the value of a channel as raw Integers.
key |
the key of the channel to set. Either an index (Int), or one of the keys in |
rawVal |
an integer or an array of integers. The values will be assigned to the channels subsequent to the channel specified by |
send |
if |
commits the fixture's state to its device.
flushDevice |
if |
flush (clear) the current state of the fixture to the DMX device.
the DMX address of the fixture. This is a 0-based value.
the universe Id of the fixture. This is a 0-based value. This is useful for SimpleDMX devices that support multiple universes. If you are using a single universe, you should keep it at its default value (0).
the number of channels the fixture uses.
a Dictionary
containing the description of this fixture. See new
for more details.
the current state of the fixture. This is an array of integer values. The values are ordered according to the channelTypes
description of the fixture. The size of the array is restricted to numChannels
.