54 lines
994 B
Java
54 lines
994 B
Java
package de.ctdo.bunti.dmx;
|
|
|
|
public class DMXChannel {
|
|
private int offset;
|
|
private String name;
|
|
private int value;
|
|
private long lastChangedTimestamp = 0;
|
|
|
|
public DMXChannel(int offset, String name) {
|
|
this.name = name;
|
|
this.offset = offset;
|
|
this.value = 0;
|
|
}
|
|
|
|
public final int getValue() {
|
|
return value;
|
|
}
|
|
|
|
public final void setValue(int value) {
|
|
this.value = value;
|
|
lastChangedTimestamp = System.currentTimeMillis();
|
|
}
|
|
|
|
public final long getLastChangedTimestamp() {
|
|
return lastChangedTimestamp;
|
|
}
|
|
|
|
public final int getOffset() {
|
|
return offset;
|
|
}
|
|
|
|
public final void setOffset(int offset) {
|
|
this.offset = offset;
|
|
}
|
|
|
|
public final String getName() {
|
|
return name;
|
|
}
|
|
|
|
public final void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public final void hasbeenSendOut() {
|
|
this.lastChangedTimestamp = System.currentTimeMillis();
|
|
}
|
|
|
|
@Override
|
|
public final String toString() {
|
|
return "DMXChannel " + getName() + "," + getOffset() + "," + getValue();
|
|
}
|
|
|
|
}
|