Class ConsumerDouble
java.lang.Object
at.ac.ait.lablink.clients.dpbridge.ConsumerDouble
public class ConsumerDouble extends Object
Class ConsumerDouble.
-
Field Summary
Fields Modifier and Type Field Description private at.ac.ait.lablink.core.service.datapoint.consumer.impl.DoubleDataPointConsumerconsumerThe consumer.private static org.apache.logging.log4j.LoggerLOGThe logger.private StringnameThe name.private Map<String,ConsumerDouble>notifiersThe notifiers. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanaddNotifier(String id, ConsumerDouble notifier)Adds the notifier.private voidcreateConsumer(String group, String client, String dpname, String identifier)Creates the consumer.at.ac.ait.lablink.core.service.datapoint.consumer.impl.DoubleDataPointConsumergetConsumer()Gets the consumer.StringgetName()Gets the name.private voidnotifyUpdate(double newvalue)Notify update.voidregister(at.ac.ait.lablink.core.service.datapoint.consumer.IDataPointConsumerService service)Register.voidupdateValue(double newVal)Update value.
-
Field Details
-
Constructor Details
-
ConsumerDouble
Instantiates a new consumer string.- Parameters:
name- the namegroup- the groupclient- the clientdpname- the data point nameidentifier- the identifier
-
-
Method Details
-
notifyUpdate
private void notifyUpdate(double newvalue)Notify update.- Parameters:
newvalue- the newvalue
-
createConsumer
Creates the consumer.- Parameters:
group- the groupclient- the clientdpname- the dpnameidentifier- the identifier
-
getConsumer
public at.ac.ait.lablink.core.service.datapoint.consumer.impl.DoubleDataPointConsumer getConsumer()Gets the consumer.- Returns:
- the consumer
-
addNotifier
Adds the notifier.- Parameters:
id- the idnotifier- the notifier- Returns:
- true, if successful
-
register
public void register(at.ac.ait.lablink.core.service.datapoint.consumer.IDataPointConsumerService service)Register.- Parameters:
service- the service
-
updateValue
public void updateValue(double newVal)Update value.- Parameters:
newVal- the new value
-
getName
Gets the name.- Returns:
- the name
-