Building Controls Virtual Test Bed
adInterfaceMCC.util.ADInterfaceMCCDeviceManager Class Reference

This is the driver class in ADInterfaceMCC. More...

Classes

enum  ADInterfaceMCCApplicationTag
 enumeration object, contains all the BACnet application tags specified in ADInterfaceMCC More...
 

Public Member Functions

String getReadPropertyBinaryPath ()
 Returns the ADReader.jar binary file path. More...
 
String getWritePropertyBinaryPath ()
 Returns the ADWriter.jar binary file path. More...
 
ArrayList
< ADInterfaceMCCObjectType
parseADInterfaceMCCObjectType (final String s) throws ParserConfigurationException, SAXException, IOException
 Parse the configuration file and generate an ArrayList that contains the xml content as specified in the configuration file, it is called in readXMLConfigurationFile (see adInterfaceMCC.util.ADInterfaceMCC). More...
 
ArrayList< ProcessBuilder > getProcesses (ArrayList< ADInterfaceMCCObjectType > prop_arr)
 Prepare the process to be executed. More...
 
void validateApplicationTag (final String s) throws IllegalArgumentException
 Application tag validation. More...
 
void validateXMLFile (final String xmlfile, final Schema schema) throws SAXException, FileNotFoundException,IOException
 XMLfile validation. More...
 
Schema loadSchema (final String name) throws SAXException
 Load schema. More...
 

Static Public Member Functions

static ArrayList< Integer > saveDuplicates (ArrayList< Integer > arlList)
 Removes duplicates from an array list of integers. More...
 

Static Protected Member Functions

static String toString (String arg) throws IllegalArgumentException
 Gets a string representation of the enumeration. More...
 

Static Private Attributes

static final String bcvtbhome = System.getenv("BCVTB_HOME")
 String that points to root directory of the BCVTB. More...
 
static final String LS = System.getProperty("line.separator")
 System-dependent line separator. More...
 
static final String FS = System.getProperty("file.separator")
 System-dependent file separator. More...
 
static final String osName = System.getProperty("os.name")
 Name of the operating system. More...
 
static final String cmd = "java"
 Name of the command to run the process. More...
 
static final String cmdOptions = "-jar"
 Options of the command to run the process. More...
 

Detailed Description

This is the driver class in ADInterfaceMCC.

It is used mainly by ADInterfaceMCC.java. It is used to process ADInterfaceMCCObjectType read from configuration file, and to translate them to processes, to be executed by ADInterfaceMCC-stack command.

This class is called by ADInterfaceMCC(seeadInterfaceMCC.util.ADInterfaceMCC ) to get reading and writing processes, ADInterfaceMCCReader(see adInterfaceMCC.actor.ADInterfaceMCCReader) to get processes to read property from ADInterfaceMCC device, and by ADInterfaceMCCWrtier (see adInterfaceMCC.actor.ADInterfaceMCCWriter) to get processes to write property to ADInterfaceMCC device.

Author
Thierry Nouidui based on Bacnet Implementation

Definition at line 110 of file ADInterfaceMCCDeviceManager.java.

Member Function Documentation

ArrayList<ProcessBuilder> adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getProcesses ( ArrayList< ADInterfaceMCCObjectType prop_arr)
inline

Prepare the process to be executed.

Parameters
prop_arrarraylist with elements of ADInterfaceMCCObjectType.
Returns
arraylist with elements of ProcessBuilder for writing property to device.

Definition at line 236 of file ADInterfaceMCCDeviceManager.java.

References adInterfaceMCC.util.ADInterfaceMCCDeviceManager.cmd, adInterfaceMCC.util.ADInterfaceMCCDeviceManager.cmdOptions, adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getReadPropertyBinaryPath(), adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getWritePropertyBinaryPath(), and i.

String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getReadPropertyBinaryPath ( )
inline

Returns the ADReader.jar binary file path.

This function is called in prepareProcesses, (see adInterfaceMCC.util.ADInterfaceMCCDeviceManager).

Returns
file path of read property binary in ADInterfaceMCC-stack.

Definition at line 146 of file ADInterfaceMCCDeviceManager.java.

References adInterfaceMCC.util.ADInterfaceMCCDeviceManager.bcvtbhome, and adInterfaceMCC.util.ADInterfaceMCCDeviceManager.FS.

Referenced by adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getProcesses().

String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getWritePropertyBinaryPath ( )
inline

Returns the ADWriter.jar binary file path.

This function is called in prepareProcesses, (see adInterfaceMCC.util.ADInterfaceMCCDeviceManager).

Returns
file path of write property in ADInterfaceMCC-stack.

Definition at line 162 of file ADInterfaceMCCDeviceManager.java.

References adInterfaceMCC.util.ADInterfaceMCCDeviceManager.bcvtbhome, and adInterfaceMCC.util.ADInterfaceMCCDeviceManager.FS.

Referenced by adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getProcesses().

Schema adInterfaceMCC.util.ADInterfaceMCCDeviceManager.loadSchema ( final String  name) throws SAXException
inline

Load schema.

It is called in validateSyntax(), (see adInterfaceMCC.actor.ADInterfaceMCCReader and adInterfaceMCC.actor.ADInterfaceMCCWriter).

Parameters
namefile name of the schema file.
Returns
schema the Schema object.
Exceptions
SAXExceptionif error occurs in schema loading process.

Definition at line 383 of file ADInterfaceMCCDeviceManager.java.

References adInterfaceMCC.util.ADInterfaceMCCDeviceManager.LS.

ArrayList<ADInterfaceMCCObjectType> adInterfaceMCC.util.ADInterfaceMCCDeviceManager.parseADInterfaceMCCObjectType ( final String  s) throws ParserConfigurationException, SAXException, IOException
inline

Parse the configuration file and generate an ArrayList that contains the xml content as specified in the configuration file, it is called in readXMLConfigurationFile (see adInterfaceMCC.util.ADInterfaceMCC).

Parameters
spath of configuration file.
Returns
ArrayList containing ADInterfaceMCCObjectTypes.
Exceptions
ParserConfigurationExceptionif errors occur in configuring parser.
SAXExceptionif errors occur in parsing configuration file.
IOExceptionif I/O exception occurs in parsing configuration file.

Definition at line 179 of file ADInterfaceMCCDeviceManager.java.

References adInterfaceMCC.util.ADInterfaceMCCDeviceManager.LS.

static ArrayList<Integer> adInterfaceMCC.util.ADInterfaceMCCDeviceManager.saveDuplicates ( ArrayList< Integer >  arlList)
inlinestatic

Removes duplicates from an array list of integers.

Parameters
arlListarray list with duplicated entries.
Returns
new array list with found duplicates.

Definition at line 212 of file ADInterfaceMCCDeviceManager.java.

static String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.toString ( String  arg) throws IllegalArgumentException
inlinestaticprotected

Gets a string representation of the enumeration.

Parameters
argenumeration to be converted to string.
Returns
the string representation of the enumeration.
Exceptions
IllegalArgumentExceptionif the argument is not ADInterfaceMCCApplicationTag.

Definition at line 280 of file ADInterfaceMCCDeviceManager.java.

References i, adInterfaceMCC.util.ADInterfaceMCCDeviceManager.LS, r, and strLen.

Referenced by adInterfaceMCC.util.ADInterfaceMCCDeviceManager.validateApplicationTag().

void adInterfaceMCC.util.ADInterfaceMCCDeviceManager.validateApplicationTag ( final String  s) throws IllegalArgumentException
inline

Application tag validation.

It is called in validateAttributes(), (see adInterfaceMCC.util.ADInterfaceMCC).

Parameters
sstring read from configuration file.
Exceptions
IllegalArgumentExceptionif s is not part of ADInterfaceMCCApplicationTag enum type.

Definition at line 323 of file ADInterfaceMCCDeviceManager.java.

References adInterfaceMCC.util.ADInterfaceMCCDeviceManager.LS, and adInterfaceMCC.util.ADInterfaceMCCDeviceManager.toString().

void adInterfaceMCC.util.ADInterfaceMCCDeviceManager.validateXMLFile ( final String  xmlfile,
final Schema  schema 
) throws SAXException, FileNotFoundException,IOException
inline

XMLfile validation.

It is called in validateSyntax(), (see adInterfaceMCC.actor.ADInterfaceMCCReader and adInterfaceMCC.actor.ADInterfaceMCCWriter).

Parameters
xmlfilefile name of the xmlfile.
schemaschema used to validate the xmlfile.
Exceptions
FileNotFoundExceptionif either xmlfile or schema couldn't be found.
SAXExceptionif xmlfile is not properly written.
IOExceptionif error occurs when reading xmlfile or schema.

Definition at line 348 of file ADInterfaceMCCDeviceManager.java.

References adInterfaceMCC.util.ADInterfaceMCCDeviceManager.LS, and source.

Member Data Documentation

final String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.bcvtbhome = System.getenv("BCVTB_HOME")
staticprivate
final String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.cmd = "java"
staticprivate

Name of the command to run the process.

Definition at line 126 of file ADInterfaceMCCDeviceManager.java.

Referenced by adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getProcesses().

final String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.cmdOptions = "-jar"
staticprivate

Options of the command to run the process.

Definition at line 129 of file ADInterfaceMCCDeviceManager.java.

Referenced by adInterfaceMCC.util.ADInterfaceMCCDeviceManager.getProcesses().

final String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.FS = System.getProperty("file.separator")
staticprivate
final String adInterfaceMCC.util.ADInterfaceMCCDeviceManager.osName = System.getProperty("os.name")
staticprivate

Name of the operating system.

Definition at line 123 of file ADInterfaceMCCDeviceManager.java.


The documentation for this class was generated from the following file: