Class VelbusNetwork
java.lang.Object
org.openremote.agent.protocol.velbus.VelbusNetwork
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IOClient<VelbusPacket>
protected static int
protected VelbusDevice[]
protected ScheduledExecutorService
protected final Queue<VelbusPacket>
protected ScheduledFuture<?>
protected List<ScheduledFuture<?>>
protected VelbusDevice[]
protected final Integer
protected ScheduledFuture<?>
-
Constructor Summary
ConstructorsConstructorDescriptionVelbusNetwork
(IOClient<VelbusPacket> client, ScheduledExecutorService executorService, Integer timeInjectionIntervalSeconds) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addConnectionStatusConsumer
(Consumer<org.openremote.model.asset.agent.ConnectionStatus> connectionStatusConsumer) void
addPropertyValueConsumer
(int deviceAddress, String property, Consumer<Object> propertyValueConsumer) void
close()
void
connect()
void
protected void
protected void
org.openremote.model.asset.agent.ConnectionStatus
protected VelbusDevice
getDevice
(int address) protected void
onConnectionStatusChanged
(org.openremote.model.asset.agent.ConnectionStatus status) protected void
onPacketReceived
(VelbusPacket packet) void
registerSubAddress
(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 void
protected void
removeConnectionStatusConsumer
(Consumer<org.openremote.model.asset.agent.ConnectionStatus> connectionStatusConsumer) void
removePropertyValueConsumer
(int deviceAddress, String property, Consumer<Object> propertyValueConsumer) scheduleTask
(Runnable runnable, int delayMillis) void
sendPackets
(VelbusPacket... packets) protected void
void
writeProperty
(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()
-