public abstract class DataItemBaseChained extends DataItemBase
Modifier and Type | Field and Description |
---|---|
protected Set<ChainProcessEntry> |
chain
The chain if items used for calculation
|
protected Executor |
executor |
protected Map<String,Variant> |
primaryAttributes |
protected AttributeManager |
secondaryAttributes |
listener
Constructor and Description |
---|
DataItemBaseChained(DataItemInformation dataItemInformation,
Executor executor) |
Modifier and Type | Method and Description |
---|---|
void |
addChainElement(EnumSet<IODirection> when,
ChainItem item) |
void |
addChainElement(IODirection when,
ChainItem item) |
Map<String,Variant> |
getAttributes() |
protected Collection<ChainProcessEntry> |
getChainCopy() |
protected WriteAttributeResults |
handleUnhandledAttributes(WriteAttributeResults writeAttributeResults,
Map<String,Variant> attributes)
Handle all unhandled set attribute requests
|
protected abstract void |
process() |
protected WriteAttributeResults |
processSetAttributes(Map<String,Variant> attributes,
OperationParameters operationParameters) |
void |
removeChainElement(EnumSet<IODirection> when,
ChainItem item) |
void |
setChain(Collection<ChainProcessEntry> chain)
Replace the current chain with the new one
|
NotifyFuture<WriteAttributeResults> |
startSetAttributes(Map<String,Variant> attributes,
OperationParameters operationParameters)
This method sets the attributes.
|
getCacheAttributes, getCacheValue, getInformation, handleListenerChange, notifyData, notifyData, setListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readValue, startWriteValue
protected AttributeManager secondaryAttributes
protected volatile Set<ChainProcessEntry> chain
protected final Executor executor
public DataItemBaseChained(DataItemInformation dataItemInformation, Executor executor)
public NotifyFuture<WriteAttributeResults> startSetAttributes(Map<String,Variant> attributes, OperationParameters operationParameters)
It is intended to be overridden by subclasses that wish to handle attribute writes differently. The method needs to remove attributes from the parameter map that were handled and return a result for all attributes that were requested.
attributes
- Attributes to setprotected WriteAttributeResults processSetAttributes(Map<String,Variant> attributes, OperationParameters operationParameters)
protected WriteAttributeResults handleUnhandledAttributes(WriteAttributeResults writeAttributeResults, Map<String,Variant> attributes)
writeAttributeResults
- the result setattributes
- the attributes to setprotected abstract void process()
public void setChain(Collection<ChainProcessEntry> chain)
chain
- the new chainpublic void addChainElement(EnumSet<IODirection> when, ChainItem item)
public void addChainElement(IODirection when, ChainItem item)
public void removeChainElement(EnumSet<IODirection> when, ChainItem item)
protected Collection<ChainProcessEntry> getChainCopy()
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.