]> git.basschouten.com Git - openhab-addons.git/blob
7b600ca4064a687fffc37a46067954bb9b6d8ab6
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.dmx.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.thing.ThingTypeUID;
17 import org.openhab.core.thing.type.ChannelTypeUID;
18
19 /**
20  * The {@link DmxBindingConstants} class defines common constants, which are
21  * used across the whole binding.
22  *
23  * @author Jan N. Klug - Initial contribution
24  */
25 @NonNullByDefault
26 public class DmxBindingConstants {
27     public static final String BINDING_ID = "dmx";
28
29     // List of all Thing Type UIDs
30     public static final ThingTypeUID THING_TYPE_CHASER = new ThingTypeUID(BINDING_ID, "chaser");
31     public static final ThingTypeUID THING_TYPE_DIMMER = new ThingTypeUID(BINDING_ID, "dimmer");
32     public static final ThingTypeUID THING_TYPE_COLOR = new ThingTypeUID(BINDING_ID, "color");
33     public static final ThingTypeUID THING_TYPE_TUNABLEWHITE = new ThingTypeUID(BINDING_ID, "tunablewhite");
34     public static final ThingTypeUID THING_TYPE_ARTNET_BRIDGE = new ThingTypeUID(BINDING_ID, "artnet-bridge");
35     public static final ThingTypeUID THING_TYPE_LIB485_BRIDGE = new ThingTypeUID(BINDING_ID, "lib485-bridge");
36     public static final ThingTypeUID THING_TYPE_SACN_BRIDGE = new ThingTypeUID(BINDING_ID, "sacn-bridge");
37
38     // List of all config options
39     public static final String CONFIG_UNIVERSE = "universe";
40     public static final String CONFIG_DMX_ID = "dmxid";
41     public static final String CONFIG_APPLY_CURVE = "applycurve";
42     public static final String CONFIG_REFRESH_RATE = "refreshrate";
43
44     public static final String CONFIG_SACN_MODE = "mode";
45     public static final String CONFIG_ADDRESS = "address";
46     public static final String CONFIG_LOCAL_ADDRESS = "localaddress";
47     public static final String CONFIG_REFRESH_MODE = "refreshmode";
48
49     public static final String CONFIG_DIMMER_TYPE = "dimmertype";
50     public static final String CONFIG_DIMMER_FADE_TIME = "fadetime";
51     public static final String CONFIG_DIMMER_DIM_TIME = "dimtime";
52     public static final String CONFIG_DIMMER_TURNONVALUE = "turnonvalue";
53     public static final String CONFIG_DIMMER_TURNOFFVALUE = "turnoffvalue";
54     public static final String CONFIG_DIMMER_DYNAMICTURNONVALUE = "dynamicturnonvalue";
55     public static final String CONFIG_CHASER_STEPS = "steps";
56     public static final String CONFIG_CHASER_RESUME_AFTER = "resumeafter";
57
58     // List of all channels
59     public static final String CHANNEL_BRIGHTNESS = "brightness";
60     public static final String CHANNEL_BRIGHTNESS_R = "brightness_r";
61     public static final String CHANNEL_BRIGHTNESS_G = "brightness_g";
62     public static final String CHANNEL_BRIGHTNESS_B = "brightness_b";
63     public static final String CHANNEL_BRIGHTNESS_CW = "brightness_cw";
64     public static final String CHANNEL_BRIGHTNESS_WW = "brightness_ww";
65
66     public static final String CHANNEL_COLOR = "color";
67     public static final String CHANNEL_COLOR_TEMPERATURE = "color_temperature";
68     public static final String CHANNEL_SWITCH = "switch";
69     public static final String CHANNEL_CONTROL = "control";
70     public static final String CHANNEL_MUTE = "mute";
71
72     public static final ChannelTypeUID BRIGHTNESS_CHANNEL_TYPEUID = new ChannelTypeUID(BINDING_ID, CHANNEL_BRIGHTNESS);
73
74     public static final ChannelTypeUID COLOR_CHANNEL_TYPEUID = new ChannelTypeUID(BINDING_ID, CHANNEL_COLOR);
75     public static final ChannelTypeUID COLOR_TEMPERATURE_CHANNEL_TYPEUID = new ChannelTypeUID(BINDING_ID,
76             CHANNEL_COLOR_TEMPERATURE);
77     public static final ChannelTypeUID SWITCH_CHANNEL_TYPEUID = new ChannelTypeUID(BINDING_ID, CHANNEL_SWITCH);
78     public static final ChannelTypeUID CONTROL_CHANNEL_TYPEUID = new ChannelTypeUID(BINDING_ID, CHANNEL_CONTROL);
79     public static final ChannelTypeUID MUTE_CHANNEL_TYPEUID = new ChannelTypeUID(BINDING_ID, CHANNEL_MUTE);
80
81     // Listener Type for channel updates
82     public static enum ListenerType {
83         VALUE,
84         ACTION
85     }
86 }