Package jmri.jmrix.can.cbus.simulator
Class CbusSimulatedModuleProvider
- java.lang.Object
-
- jmri.jmrix.can.cbus.simulator.CbusSimulatedModuleProvider
-
- All Implemented Interfaces:
JmriServiceProviderInterface
- Direct Known Subclasses:
CbusMax,MergCanmiosvo,MergCanpan,SprogPiSprog3,SprogPiSprog3Plus
public abstract class CbusSimulatedModuleProvider extends java.lang.Object implements JmriServiceProviderInterface
Pane for configuring events in a CBUS module Definition of objects to handle configuring a CBUS module. Implementing classes must be registered as service providers of this type to be recognized and usable.General design documentation is available on the Structure of External System Connections page.
- See Also:
ServiceLoader
-
-
Constructor Summary
Constructors Constructor Description CbusSimulatedModuleProvider()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidconfigureDummyNode(CbusNode node)For a given CbusDummyNode, configure it to the Simulation.protected CbusDummyNodecreateNewDummyNode(CanSystemConnectionMemo memo, int nodeNumber)static java.util.Collection<CbusSimulatedModuleProvider>getInstancesCollection()Get all available instances as anCollections.unmodifiableCollection(java.util.Collection<? extends T>).abstract intgetManufacturerId()Get the Manufacturer ID.abstract intgetModuleId()Get the Manufacturer Module ID.java.lang.StringgetModuleType()Descriptive String of Module Type.CbusDummyNodegetNewDummyNode(CanSystemConnectionMemo memo, int nodeNumber)Create a new CbusDummyNode of the implementing class type.static CbusSimulatedModuleProvidergetProviderByName(java.lang.String name)Get a module provider from a module name.java.lang.StringgetToolTipText()Descriptive Tooltip for Module Simulation.booleanmatchesManuAndModuleId(CbusDummyNode nd)Checks if a Node Manufacturer and Module ID matches this module.
-
-
-
Constructor Detail
-
CbusSimulatedModuleProvider
public CbusSimulatedModuleProvider()
-
-
Method Detail
-
getManufacturerId
public abstract int getManufacturerId()
Get the Manufacturer ID.- Returns:
- manufacturer ID code.
-
getModuleId
public abstract int getModuleId()
Get the Manufacturer Module ID.- Returns:
- manufacturer Module ID code.
-
configureDummyNode
public abstract void configureDummyNode(@Nonnull CbusNode node)
For a given CbusDummyNode, configure it to the Simulation. This may include Node Parameters, Node Variables, events and event variables.- Parameters:
node- the Node to set to.
-
getModuleType
@Nonnull public java.lang.String getModuleType()
Descriptive String of Module Type. For use in selection menus etc.- Returns:
- descriptive string of simulated module.
-
getToolTipText
@Nonnull public java.lang.String getToolTipText()
Descriptive Tooltip for Module Simulation. For use in selection menus etc.- Returns:
- tooltip for the module.
-
getNewDummyNode
@Nonnull public CbusDummyNode getNewDummyNode(CanSystemConnectionMemo memo, int nodeNumber)
Create a new CbusDummyNode of the implementing class type.- Parameters:
nodeNumber- Initial Node Number.memo- System Connection to use.- Returns:
- new Dummy Node of implementing class type.
-
createNewDummyNode
protected CbusDummyNode createNewDummyNode(CanSystemConnectionMemo memo, int nodeNumber)
-
matchesManuAndModuleId
public boolean matchesManuAndModuleId(@CheckForNull CbusDummyNode nd)
Checks if a Node Manufacturer and Module ID matches this module.- Parameters:
nd- the Node to test against, can be null.- Returns:
- true if they match, else false.
-
getProviderByName
@CheckForNull public static final CbusSimulatedModuleProvider getProviderByName(java.lang.String name)
Get a module provider from a module name.- Parameters:
name- of the module- Returns:
- the module provider, null if not known
-
getInstancesCollection
@Nonnull public static final java.util.Collection<CbusSimulatedModuleProvider> getInstancesCollection()
Get all available instances as anCollections.unmodifiableCollection(java.util.Collection<? extends T>).- Returns:
- unmodifiable collection.
-
-