Search in sources :

Example 11 with ValueSet

use of org.eclipse.smarthome.binding.dmx.internal.ValueSet in project smarthome by eclipse.

the class ValueSetTest method fromString.

public void fromString() {
    ValueSet valueSet = ValueSet.fromString("1000:100,200:-1");
    // times
    assertThat(valueSet.getFadeTime(), is(1000));
    assertThat(valueSet.getHoldTime(), is(-1));
    // values
    assertThat(valueSet.getValue(0), is(100));
    assertThat(valueSet.getValue(1), is(200));
}
Also used : ValueSet(org.eclipse.smarthome.binding.dmx.internal.ValueSet)

Aggregations

ValueSet (org.eclipse.smarthome.binding.dmx.internal.ValueSet)11 BaseDmxChannel (org.eclipse.smarthome.binding.dmx.internal.multiverse.BaseDmxChannel)5 FadeAction (org.eclipse.smarthome.binding.dmx.internal.action.FadeAction)4 OnOffType (org.eclipse.smarthome.core.library.types.OnOffType)4 RefreshType (org.eclipse.smarthome.core.types.RefreshType)4 DmxBridgeHandler (org.eclipse.smarthome.binding.dmx.internal.DmxBridgeHandler)3 Configuration (org.eclipse.smarthome.config.core.Configuration)3 DecimalType (org.eclipse.smarthome.core.library.types.DecimalType)3 IncreaseDecreaseType (org.eclipse.smarthome.core.library.types.IncreaseDecreaseType)3 PercentType (org.eclipse.smarthome.core.library.types.PercentType)3 Bridge (org.eclipse.smarthome.core.thing.Bridge)3 ChannelUID (org.eclipse.smarthome.core.thing.ChannelUID)3 DmxChannel (org.eclipse.smarthome.binding.dmx.internal.multiverse.DmxChannel)2 Test (org.junit.Test)2 Vector (java.util.Vector)1 ResumeAction (org.eclipse.smarthome.binding.dmx.internal.action.ResumeAction)1 HSBType (org.eclipse.smarthome.core.library.types.HSBType)1 StringType (org.eclipse.smarthome.core.library.types.StringType)1