public abstract class AbstractMessageBuilder<T,M> extends Object implements MessageBuilder<T,M>
Modifier and Type | Field and Description |
---|---|
protected ASDUAddress |
asduAddress |
protected CauseOfTransmission |
causeOfTransmission |
protected List<InformationEntry<T>> |
entries |
Constructor and Description |
---|
AbstractMessageBuilder(Class<T> clazz,
int maxContinuousSize,
int maxNotContinuousSize,
int maxTimestampSize) |
Modifier and Type | Method and Description |
---|---|
boolean |
accepts(Value<?> value) |
boolean |
addEntry(InformationObjectAddress address,
Value<T> value) |
protected InformationObjectAddress |
getStartAddress() |
protected List<Value<T>> |
getValues() |
boolean |
isContinuous() |
boolean |
isWithTimestamps() |
void |
start(CauseOfTransmission causeOfTransmission,
ASDUAddress asduAddress) |
protected void |
validateStart() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build
protected ASDUAddress asduAddress
protected CauseOfTransmission causeOfTransmission
protected final List<InformationEntry<T>> entries
public AbstractMessageBuilder(Class<T> clazz, int maxContinuousSize, int maxNotContinuousSize, int maxTimestampSize)
maxContinuousSize
- the number of possible entries when the data set is continuousmaxNotContinuousSize
- the number of possible entries when the data set is not
continuous. If is required that this value is not greater than
"maxContinuousSize".maxTimestampSize
- the number of possible entries when the cause permits
timestamp transmissions. Timestamp messages will only be used
when the value is greater than zeropublic boolean accepts(Value<?> value)
accepts
in interface MessageBuilder<T,M>
public boolean isContinuous()
public boolean isWithTimestamps()
public void start(CauseOfTransmission causeOfTransmission, ASDUAddress asduAddress)
start
in interface MessageBuilder<T,M>
public boolean addEntry(InformationObjectAddress address, Value<T> value)
addEntry
in interface MessageBuilder<T,M>
protected void validateStart()
protected InformationObjectAddress getStartAddress()