@Override public void process(final Exchange exchange) throws Exception { final Object value = exchange.getIn().getBody(); this.item.updateData(Variant.valueOf(value), null, null); }
@Override public WriteAttributeResults processSetAttributes ( final Map<String, Variant> attributes, final OperationParameters operationParameters ) { return super.processSetAttributes ( attributes, operationParameters ); }
@Override protected WriteAttributeResults handleUnhandledAttributes ( final WriteAttributeResults initialResults, final Map<String, Variant> attributes ) { // check for null WriteAttributeResults writeAttributeResults = initialResults; if ( writeAttributeResults == null ) { writeAttributeResults = new WriteAttributeResults (); } // gather the list of open requests final Map<String, Variant> requests = new HashMap<String, Variant> ( 0 ); for ( final Map.Entry<String, Variant> entry : attributes.entrySet () ) { if ( !writeAttributeResults.containsKey ( entry.getKey () ) ) { requests.put ( entry.getKey (), entry.getValue () ); } } writeAttributeResults.putAll ( this.variable.handleAttributes ( requests ) ); // default for the rest return super.handleUnhandledAttributes ( writeAttributeResults, attributes ); }
@Override public NotifyFuture<WriteResult> startWriteValue ( Variant value, final OperationParameters operationParameters ) { synchronized ( this ) { final Collection<ChainProcessEntry> chain = getChainCopy (); final Map<String, Variant> primaryAttributes = new HashMap<String, Variant> ( this.primaryAttributes ); for ( final ChainProcessEntry entry : chain ) { if ( entry.getWhen ().contains ( IODirection.OUTPUT ) ) { final Variant newValue = entry.getWhat ().process ( value, primaryAttributes ); if ( newValue != null ) { value = newValue; } } } } // FIXME: for the moment output chain item don't show up in the attribute list // secondaryAttributes.set ( primaryAttributes ); return startWriteCalculatedValue ( value, operationParameters ); }
@Override protected WriteAttributeResults handleUnhandledAttributes ( final WriteAttributeResults writeAttributeResults, final Map<String, Variant> attributes ) { final Map<String, Variant> addAttributes = new HashMap<String, Variant> (); testFlag ( attributes, addAttributes, "test.error", "test.error" ); testFlag ( attributes, addAttributes, "test.alarm", "test.alarm" ); testFlag ( attributes, addAttributes, "test.warning", "warning" ); testFlag ( attributes, addAttributes, "test.manual", "manual" ); updateData ( null, addAttributes, AttributeMode.UPDATE ); return super.handleUnhandledAttributes ( writeAttributeResults, attributes ); }
this.loopDelayDataItem.updateData ( Variant.valueOf ( this.controller.getModel ().getLoopDelay () ), null, null );
this.loopDelayDataItem.updateData ( Variant.valueOf ( this.controller.getModel ().getLoopDelay () ), null, null );