|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cosylab.vdct.plugins.LinkTypeConfig
public class LinkTypeConfig
A default LinkTypeConfig plugin.
It reads link type configuration from an XML file. The file name is defined by VDCT_LINK_CONFIG_FILE filename located
in user home directory (or in VDCT_CONFIG_DIR dir). Use VDCT_LINK_CONFIG_FILE_ENV environment variable to override this default setting.
An example of XML file:
Field Summary | |
---|---|
static java.lang.String |
VDCT_LINK_CONFIG_FILE
|
static java.lang.String |
VDCT_LINK_CONFIG_FILE_ENV
|
Constructor Summary | |
---|---|
LinkTypeConfig()
|
Method Summary | |
---|---|
void |
destroy()
Insert the method's description here. |
java.lang.String |
getAuthor()
Insert the method's description here. |
java.lang.String |
getDescription()
Insert the method's description here. |
java.util.Hashtable |
getLinkTypeConfig()
This method should return a table of different link type configurations. |
java.lang.String |
getName()
Insert the method's description here. |
java.lang.String |
getVersion()
Insert the method's description here. |
void |
init(java.util.Properties properties,
PluginContext context)
Insert the method's description here. |
void |
start()
Insert the method's description here. |
void |
stop()
Insert the method's description here. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VDCT_LINK_CONFIG_FILE
public static final java.lang.String VDCT_LINK_CONFIG_FILE_ENV
Constructor Detail |
---|
public LinkTypeConfig()
Method Detail |
---|
public java.util.Hashtable getLinkTypeConfig()
LinkTypeConfigPlugin
Hashtable linkTypeConfigTable = new Hashtable(); linkTypeConfigTable.put("CONSTANT", new Object[] { Pattern.compile(".*"), "", "CONSTANT" }); linkTypeConfigTable.put("PV_LINK", new Object[] { Pattern.compile(".*"), "", "PV_LINK" } ); linkTypeConfigTable.put("VME_IO", new Object[] { Pattern.compile("#C\\d+ S\\d+ @.*"), "#C0 S0 @", "VME_IO - #Ccard Ssignal @parm" }); linkTypeConfigTable.put("CAMAC_IO", new Object[] { Pattern.compile("#B\\d+ C\\d+ N\\d+ A\\d+ F\\d+ @.*"), "CAMAC_IO - #B0 C0 N0 A0 F0 @", "#Bbranch Ccrate Nstation Asubaddress Ffunction @parm" }); linkTypeConfigTable.put("AB_IO", new Object[] { Pattern.compile("#L\\d+ A\\d+ C\\d+ S\\d+ @.*"), "#L0 A0 C0 S0 @", "AB_IO - #Llink Aadapter Ccard Ssignal @parm" }); linkTypeConfigTable.put("GPIB_IO", new Object[] { Pattern.compile("#L\\d+ A\\d+ @.*"), "#L0 A0 @", "GPIB_IO - #Llink Aaddr @parm" }); linkTypeConfigTable.put("BITBUS_IO", new Object[] { Pattern.compile("#L\\d+ N\\d+ P\\d+ S\\d+ @.*"), "BITBUS_IO - @L0 N0 P0 S0 @", "#Llink Nnode Pport Ssignal @parm" }); linkTypeConfigTable.put("INST_IO", new Object[] { Pattern.compile("@.*"), "@", "INST_IO - @" }); linkTypeConfigTable.put("RF_IO", new Object[] { Pattern.compile("#R\\d+ M\\d+ D\\d+ E\\d+ @.*"), "#R0 M0 D0 E0 @", "RF_IO - #Rcryo Mmicro Ddataset Eelement" }); linkTypeConfigTable.put("VXI_IO", new Object[] { Pattern.compile("#V\\d+ (C\\d+)?+ S\\d+ @.*"), "#V0 C0 S0 @", "VXI_IO - #Vframe Cslot Ssignal @parm" });If
null
is returned, VisualDCT interprets this as 'failed to load' / 'no configuration found'.
If all LinkTypeConfigPlugin
plugins return null
, VisualDCT loads default configuration.
Plugins are loaded as defined in VisualDCT plugin configuration. Configurations are additive, i.e. if there are two configurations for the same link type, the last overrides the first.
Creation date: (8.12.2001 12:45:31)
getLinkTypeConfig
in interface LinkTypeConfigPlugin
LinkTypeConfigPlugin.getLinkTypeConfig()
public void destroy()
Plugin
destroy
in interface Plugin
Plugin.destroy()
public java.lang.String getAuthor()
Plugin
getAuthor
in interface Plugin
Plugin.getAuthor()
public java.lang.String getDescription()
Plugin
getDescription
in interface Plugin
Plugin.getDescription()
public java.lang.String getName()
Plugin
getName
in interface Plugin
Plugin.getName()
public java.lang.String getVersion()
Plugin
getVersion
in interface Plugin
Plugin.getVersion()
public void init(java.util.Properties properties, PluginContext context)
Plugin
init
in interface Plugin
Plugin.init(Properties, PluginContext)
public void start()
Plugin
start
in interface Plugin
Plugin.start()
public void stop()
Plugin
stop
in interface Plugin
Plugin.stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |