Class VelbusNetwork
java.lang.Object
org.openremote.agent.protocol.velbus.VelbusNetwork
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IOClient<VelbusPacket>protected static intprotected VelbusDevice[]protected ScheduledExecutorServiceprotected final Queue<VelbusPacket>protected ScheduledFuture<?>protected List<ScheduledFuture<?>>protected VelbusDevice[]protected final Integerprotected ScheduledFuture<?> -
Constructor Summary
ConstructorsConstructorDescriptionVelbusNetwork(IOClient<VelbusPacket> client, ScheduledExecutorService executorService, Integer timeInjectionIntervalSeconds) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConnectionStatusConsumer(Consumer<org.openremote.model.asset.agent.ConnectionStatus> connectionStatusConsumer) voidaddPropertyValueConsumer(int deviceAddress, String property, Consumer<Object> propertyValueConsumer) voidclose()voidconnect()voidprotected voidprotected voidorg.openremote.model.asset.agent.ConnectionStatusprotected VelbusDevicegetDevice(int address) protected voidonConnectionStatusChanged(org.openremote.model.asset.agent.ConnectionStatus status) protected voidonPacketReceived(VelbusPacket packet) voidregisterSubAddress(VelbusDevice velbusDevice, int subAddress) Used by devices that have sub addresses so they can be associated with another address as well as their base addressprotected voidprotected voidremoveConnectionStatusConsumer(Consumer<org.openremote.model.asset.agent.ConnectionStatus> connectionStatusConsumer) voidremovePropertyValueConsumer(int deviceAddress, String property, Consumer<Object> propertyValueConsumer) scheduleTask(Runnable runnable, int delayMillis) voidsendPackets(VelbusPacket... packets) protected voidvoidwriteProperty(int deviceAddress, String property, Object value)
-
Field Details
-
DELAY_BETWEEN_PACKET_WRITES_MILLISECONDS
protected static int DELAY_BETWEEN_PACKET_WRITES_MILLISECONDS -
timeInjectionIntervalSeconds
-
client
-
messageQueue
-
scheduledTasks
-
timeInjector
-
devices
-
subAddressDevices
-
queueProcessingTask
-
executorService
-
connectionStatusConsumers
-
-
Constructor Details
-
VelbusNetwork
public VelbusNetwork(IOClient<VelbusPacket> client, ScheduledExecutorService executorService, Integer timeInjectionIntervalSeconds)
-
-
Method Details
-
addConnectionStatusConsumer
protected void addConnectionStatusConsumer(Consumer<org.openremote.model.asset.agent.ConnectionStatus> connectionStatusConsumer) -
removeConnectionStatusConsumer
protected void removeConnectionStatusConsumer(Consumer<org.openremote.model.asset.agent.ConnectionStatus> connectionStatusConsumer) -
getExecutorService
-
sendPackets
-
connect
public void connect() -
disconnect
public void disconnect() -
close
public void close() -
getConnectionStatus
public org.openremote.model.asset.agent.ConnectionStatus getConnectionStatus() -
onConnectionStatusChanged
protected void onConnectionStatusChanged(org.openremote.model.asset.agent.ConnectionStatus status) -
onPacketReceived
-
addPropertyValueConsumer
-
removePropertyValueConsumer
-
removeAllDevices
protected void removeAllDevices() -
writeProperty
-
registerSubAddress
Used by devices that have sub addresses so they can be associated with another address as well as their base address -
getDevice
-
startSendingPackets
protected void startSendingPackets() -
doSendPacket
protected void doSendPacket() -
scheduleTask
-
doTimeInjection
protected void doTimeInjection()
-