public class MsgConfig extends java.lang.Object implements MsgText_ifc
Modifier and Type | Class and Description |
---|---|
static class |
MsgConfig.FileOutput |
static class |
MsgConfig.MsgConfigZbnf
From Zbnf: This class is used as setting class for Zbnf2Java, therefore all is public.
|
MsgText_ifc.MsgConfigItem
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Integer,MsgText_ifc.MsgConfigItem> |
indexIdentNr
Index over all ident numbers.
|
(package private) java.util.List<MsgConfig.FileOutput> |
listFileOutput |
static int |
version
version, history and license:
2014-12-20 Hartmut new: Reads information for file outputs, see
MsgConfig.FileOutput , in preparing, not used yet. |
Constructor and Description |
---|
MsgConfig() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<MsgText_ifc.MsgConfigItem> |
getListItems() |
java.lang.String |
getMsgText(int ident)
Returns the text to a message ident.
|
int |
getNrofItems() |
java.lang.String |
readConfig(java.io.File fileConfig)
Reads the configuration from a file with given syntax.
|
int |
setMsgDispaching(MsgDispatcher msgDispatcher,
java.lang.String chnChars)
Sets the dispatching of all captured messages.
|
private void |
setRange(MsgDispatcher msgDispatcher,
java.lang.String dstMsg,
int firstIdent,
int lastIdent,
java.lang.String chnChars) |
public static final int version
MsgConfig.FileOutput
, in preparing, not used yet.
readConfig(File)
now regards 1000..1099 (range), $$ for ident strings,
re-read of the config is possible (experience).
getListItems()
, move MsgConfigItem
to MsgText_ifc
.
java.util.List<MsgConfig.FileOutput> listFileOutput
protected final java.util.Map<java.lang.Integer,MsgText_ifc.MsgConfigItem> indexIdentNr
public java.lang.String readConfig(java.io.File fileConfig)
MsgConfig::= {The- } \e. item::= <#?identNr>[..<#?identNrLast>] <*|\t|\ \ ?dst> [$$<*|\r|\n|\t|\ \ |$$|:|;?identText>[??]] <*|\r|\n|\t|\ \ ?text>.
dst
is a String with one or more characters which are associated to output channels of the message dispatcher.
The association between the characters and the outputs are made be the routine setMsgDispaching(MsgDispatcher, String)
.
Examples:
1303 i x $$Ident text is equal to - the output text; some more %d values; val=%d; 1400 i d $$Ident text from - internal$$Other output text; val=%d; val2=%d; 1500 i d $$Ident text from - internal$$Any line is designated with the semantic 'line'. A line is build by the shown syntax elements. The semantic have to be used like shown. The semantic identifier are given by the element names of the classes
MsgConfig.MsgConfigZbnf
and MsgConfigItem
. The syntax can be another one.fileConfig
- public int getNrofItems()
public int setMsgDispaching(MsgDispatcher msgDispatcher, java.lang.String chnChars)
msgDispatcher
- chnChars
- The characters which are associated to dstBits 0x0001, 0x0002 etc in
MsgDispatcher.setOutputRange(int, int, int, int, int)
in respect to the characters
stored in the message config dst field. For example "df" if the dstBit 0x0001 is associated to the display
and the dstBit 0x0002 is associated to an output file and "d" means "Display" and "f" means "File" in the config text.private void setRange(MsgDispatcher msgDispatcher, java.lang.String dstMsg, int firstIdent, int lastIdent, java.lang.String chnChars)
public java.util.Collection<MsgText_ifc.MsgConfigItem> getListItems()
getListItems
in interface MsgText_ifc
public java.lang.String getMsgText(int ident)
getMsgText
in interface MsgText_ifc
ident
- the absolute value is used to find the text.MsgText_ifc.getMsgText(int)