Package jmri.jmrix.can.cbus
Class CbusPredefinedMeters
- java.lang.Object
-
- jmri.jmrix.can.cbus.CbusPredefinedMeters
-
- All Implemented Interfaces:
java.util.EventListener
,Disposable
,AbstractMRListener
,CanListener
public class CbusPredefinedMeters extends java.lang.Object implements CanListener, Disposable
Provide access to current meter from a MERG CBUS Command Station
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Meter
currentMeter
(package private) Meter
currentMeterExtra
(package private) MeterUpdateTask
updateTask
(package private) Meter
voltageMeter
-
Constructor Summary
Constructors Constructor Description CbusPredefinedMeters(CanSystemConnectionMemo memo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Called when disposing of a disposable.void
message(CanMessage m)
Outgoing CAN Frames ignored Called when an outgoing message is sent to the CAN Network.void
reply(CanReply r)
Listen for CAN Frames sent by Command Station 0 Typically sent every 4-5 seconds.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.jmrix.can.CanListener
addTc, addTc, removeTc, removeTc
-
-
-
-
Field Detail
-
updateTask
final MeterUpdateTask updateTask
-
currentMeter
final Meter currentMeter
-
currentMeterExtra
final Meter currentMeterExtra
-
voltageMeter
final Meter voltageMeter
-
-
Constructor Detail
-
CbusPredefinedMeters
public CbusPredefinedMeters(CanSystemConnectionMemo memo)
-
-
Method Detail
-
reply
public void reply(CanReply r)
Listen for CAN Frames sent by Command Station 0 Typically sent every 4-5 seconds. Called when an incoming CanFrame is received from the CAN Network.- Specified by:
reply
in interfaceCanListener
- Parameters:
r
- the CanReply being received.
-
message
public void message(CanMessage m)
Outgoing CAN Frames ignored Called when an outgoing message is sent to the CAN Network.- Specified by:
message
in interfaceCanListener
- Parameters:
m
- the CanMessage being sent.
-
dispose
public void dispose()
Description copied from interface:Disposable
Called when disposing of a disposable.Note there are no assurances this method will not be called multiple times against a single instance of this Disposable. It is the responsibility of this Disposable to protect itself and the application from ensuring that calling this method multiple times has no unwanted side effects.
- Specified by:
dispose
in interfaceDisposable
-
-