Class AMADIRPEIConfigReader
java.lang.Object
com.nt.udc.ei.node.amadirpei.configReader.AMADIRPEIConfigReader
This class reads the file containing the description of all AMA structures and modules
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 Summary
ConstructorsConstructorDescriptionAMADIRPEIConfigReader(File configFileName) Constructor of AMAEIConfigReader. -
Method Summary
Modifier and TypeMethodDescriptionGet all structures and modules namesGet all the structures and modules codes contained in the configuration filegetFieldsTypes(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 versionsgetStructOrModFieldsLength(String structOrModCode) Get the length of each fields for a given structure or modulegetStructOrModFieldsNames(String structOrModCode) Get the list of fields names contained in a given structure or modulegetStructOrModName(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)intgetStructOrModTotalLength(String structOrModCode) Add up the length of each field to get the total length of a structure or a moduletoString()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
-
Constructor Details
-
AMADIRPEIConfigReader
Constructor of AMAEIConfigReader. It parses the AMA config file and store the information into a table- Parameters:
configFileName- file name of the AMA config file- Throws:
Exception- if cannot find the AMA reference file or if syntax error in the reference file
-
-
Method Details
-
getStructOrModName
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)- Parameters:
structOrModCode- structure or module code- Returns:
- structure or a module name or null is the structure/module code doesn't exist
-
getStructOrModFieldsNames
Get the list of fields names contained in a given structure or module- Parameters:
structOrModCode- structure or module code- Returns:
- list of fields names or null is the structure/module code doesn't exist
-
getStructOrModFieldsLength
Get the length of each fields for a given structure or module- Parameters:
structOrModCode- structure or module code- Returns:
- list of lengths or null is the structure/module code doesn't exist
-
getStructOrModTotalLength
Add up the length of each field to get the total length of a structure or a module- Parameters:
structOrModCode- structure or module code- Returns:
- structure or module total length or 0 if the structure/module code doesn't exist
-
getFieldsTypes
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- Parameters:
structOrModCode- structure or module code- Returns:
- list of types or null if the structure/module code doesn't exist
-
getAllStructOrModCodes
Get all the structures and modules codes contained in the configuration file- Returns:
- all codes
-
getAllStructAndModNames
Get all structures and modules names- Returns:
- all names
-
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
-