public class AMADIRPEIConfigReader
extends java.lang.Object
Example of a config file : STRUCTURE NAME="x0510" CODE=(x0510) { hexadecimal_identifier 2, structure_code 6, call_type_code 4, sensor_type 4 } MODULE NAME="025" CODE=(025) { circuit_release_module_code_025 4, circuit_release_date 6, circuit_release_time 8 }
Constructor and Description |
---|
AMADIRPEIConfigReader(java.io.File configFileName)
Constructor of AMAEIConfigReader.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector |
getAllStructAndModNames()
Get all structures and modules names
|
java.util.Vector |
getAllStructOrModCodes()
Get all the structures and modules codes contained in the configuration file
|
java.util.Vector |
getFieldsTypes(java.lang.String structOrModCode)
Get the list of the fields types for a given structure or module
Note : this method shouldn't be used and is kept for future versions
|
java.util.Vector |
getStructOrModFieldsLength(java.lang.String structOrModCode)
Get the length of each fields for a given structure or module
|
java.util.Vector |
getStructOrModFieldsNames(java.lang.String structOrModCode)
Get the list of fields names contained in a given structure or module
|
java.lang.String |
getStructOrModName(java.lang.String structOrModCode)
Get a structure or a module name (this name is used to create a counter variable giving the number
of occurrences of a structure or a module in one AMA record)
|
int |
getStructOrModTotalLength(java.lang.String structOrModCode)
Add up the length of each field to get the total length of a structure or a module
|
java.lang.String |
toString()
Returns a String representation of the object for debug purposes :
returns all the informations concerning the structures, modules and
the fields read from the config file
|
public AMADIRPEIConfigReader(java.io.File configFileName) throws java.lang.Exception
configFileName
- file name of the AMA config filejava.lang.Exception
- if cannot find the AMA reference file or if syntax error in the reference filepublic java.lang.String getStructOrModName(java.lang.String structOrModCode)
structOrModCode
- structure or module codepublic java.util.Vector getStructOrModFieldsNames(java.lang.String structOrModCode)
structOrModCode
- structure or module codepublic java.util.Vector getStructOrModFieldsLength(java.lang.String structOrModCode)
structOrModCode
- structure or module codepublic int getStructOrModTotalLength(java.lang.String structOrModCode)
structOrModCode
- structure or module codepublic java.util.Vector getFieldsTypes(java.lang.String structOrModCode)
structOrModCode
- structure or module codepublic java.util.Vector getAllStructOrModCodes()
public java.util.Vector getAllStructAndModNames()
public java.lang.String toString()
toString
in class java.lang.Object