Building Controls Virtual Test Bed
adInterfaceMCC.actor.ADInterfaceMCCReader Class Reference

This actor reads from ADInterfaceMCC devices. More...

Inheritance diagram for adInterfaceMCC.actor.ADInterfaceMCCReader:
Collaboration diagram for adInterfaceMCC.actor.ADInterfaceMCCReader:

Public Member Functions

 ADInterfaceMCCReader (CompositeEntity container, String name) throws IllegalActionException, NameDuplicationException
 Construct an actor with the given container and name. More...
 
Object clone (Workspace workspace) throws CloneNotSupportedException
 Override base class defined in ADInterfaceMCC.java. More...
 
ArrayList
< ADInterfaceMCCObjectType
propertyValueReader (ArrayList< ADInterfaceMCCObjectType > propValArray) throws IllegalActionException
 Create a new array with only the elements of the configuration that are for the reader. More...
 
void initialize () throws IllegalActionException
 Initialize section, initialize variables, check possible errors. More...
 
void sendToken () throws IllegalActionException
 Sends the error signal to the errorSignal port, the error message to the errorMessage port, the console output to the consoleArr, and the values read from ADInterfaceMCC to the proValArr port. More...
 
void fire () throws IllegalActionException
 Read ADInterfaceMCC property based on the configuration file

Exceptions
IllegalActionExceptionor If Plattform is Mac or Linux or If I/O errors occur while reading properties from device or if reading property process is interrupted.
More...
 
- Public Member Functions inherited from adInterfaceMCC.util.ADInterfaceMCC
 ADInterfaceMCC (CompositeEntity container, String name) throws NameDuplicationException, IllegalActionException
 Construct an actor with the given container and name. More...
 
Object clone (Workspace workspace) throws CloneNotSupportedException
 Clone the actor into the specified workspace. More...
 
void attributeChanged (Attribute attribute) throws IllegalActionException
 Override the base class to determine which argument is being used. More...
 
void initialize () throws IllegalActionException
 Initialization section, initialize variables and check possible errors. More...
 
void checkConfFileExists () throws IllegalActionException
 Check if configuration file exists. More...
 
void setConfigurationFilePath () throws IllegalActionException
 Set configuration file path. More...
 
void checkSchemaFileExists () throws IllegalActionException
 Check if schema file exists. More...
 
ArrayList
< ADInterfaceMCCObjectType
readXMLConfigurationFile () throws IllegalActionException
 Read the xml configuration file, store the elements to ADInterfaceMCCObjectType ArrayList. More...
 
void storeDataInLastTimeStep ()
 Store response from last time step. More...
 
void executeProcess (ArrayList< ProcessBuilder > process_arr) throws IllegalActionException
 Execute Processes, store results to consoleoutput_arr and exitvalue-arr. More...
 
Token[] transformArrayListString (ArrayList< String > data_str)
 Transform String Arraylist to Token Arrays. More...
 
Token[] transformArrayListDouble (ArrayList< String > data_str)
 
void prepareTokensToSend () throws IllegalActionException
 Get tokens to send for the next timestep. More...
 
void sendToken () throws IllegalActionException
 Sends the error signal to the errorSignal port, the error message to the errorMessage port, and the console output to the consoleArr. More...
 
void validateAttributes () throws IllegalActionException
 Validate application tag. More...
 
void validateSyntax () throws IllegalActionException
 Validate xml configuration file syntax. More...
 
void removeToken () throws IllegalActionException
 Remove tokens in previous time step. More...
 

Public Attributes

TypedIOPort proVal
 The port that sends the array of property value. More...
 
TypedIOPort trigger
 The port that fires ADInterfaceMCCReader. More...
 
- Public Attributes inherited from adInterfaceMCC.util.ADInterfaceMCC
TypedIOPort errorMessage
 The errorMessage port. More...
 
TypedIOPort errorSignal
 The port that outputs the error signal. More...
 
Parameter continueWhenError
 Parameter to control whether to continue if there was an error message. More...
 
FileParameter configurationFile
 Parameter to specify the path for configuraton file. More...
 

Static Public Attributes

static ArrayList
< ADInterfaceMCCObjectType
prop_arr_reader
 ADInterfaceMCCObjectType after considering just the reader objects from Ptolemy. More...
 
- Static Public Attributes inherited from adInterfaceMCC.util.ADInterfaceMCC
static final String FS = System.getProperty("file.separator")
 File seperator. More...
 
static final String LS = System.getProperty("line.separator")
 Line Seperator. More...
 
static final String bcvtbhome = System.getenv("BCVTB_HOME")
 String that points to root directory of the BCVTB. More...
 
static final String osName = System.getProperty("os.name")
 Name of the operating system. More...
 

Protected Member Functions

void setSchemaFileName ()
 Sets the schema file name. More...
 
void setTriggerState () throws IllegalActionException
 Set trigger state. More...
 
- Protected Member Functions inherited from adInterfaceMCC.util.ADInterfaceMCC
abstract void setSchemaFileName ()
 Abstract class that sets the schema file name. More...
 

Protected Attributes

boolean fireReader
 Boolean state to trigger ADInterfaceMCCReader. More...
 
- Protected Attributes inherited from adInterfaceMCC.util.ADInterfaceMCC
TypedIOPort consoleArr
 The port that send response from console. More...
 
Parameter errorMessage_tokenProductionRate
 The rate parameter for the errorMessage port. More...
 
Parameter errorMessage_tokenInitProduction
 The rate parameter for the errorMessage port that declares the initial production. More...
 
boolean _continueWhenError
 Parameter to control whether to continue if there was an error message. More...
 
String configurationFilePath
 String of configuration file path. More...
 
String schemaFileName
 Schema file path. More...
 
ArrayList
< ADInterfaceMCCObjectType
prop_arr
 Arraylist containing ADInterfaceMCCObjectType read from configuration file. More...
 
ArrayList< ProcessBuilder > proc_arr
 Arraylist containing processes to be executed in console. More...
 
Token[] propval_tok
 Token array of property values. More...
 
ArrayList< String > consout_arr
 ArrayList containing strings of response from device for ad reading and writing process. More...
 
Token[] consout_tok
 Token array of console outputs. More...
 
ArrayList< Integer > exitval_arr
 ArrayList containing strings process exit values for each process. More...
 
ADInterfaceMCCDeviceManager adDevMan
 The ADInterfaceMCC device manager. More...
 

Detailed Description

This actor reads from ADInterfaceMCC devices.

During initialization, it validates the input. At each time step, it outputs the values read from ADInterfaceMCC devices. There is also an error port that can be used to check for error messages.

Author
Thierry Nouidui based on Bacnet Implementation

Definition at line 104 of file ADInterfaceMCCReader.java.

Constructor & Destructor Documentation

adInterfaceMCC.actor.ADInterfaceMCCReader.ADInterfaceMCCReader ( CompositeEntity  container,
String  name 
) throws IllegalActionException, NameDuplicationException
inline

Construct an actor with the given container and name.

Parameters
containerThe container.
nameThe name of this actor.
Exceptions
IllegalActionExceptionIf the actor cannot be contained by the proposed container.
NameDuplicationExceptionIf the container already has an actor with this name.

Definition at line 114 of file ADInterfaceMCCReader.java.

References adInterfaceMCC.actor.ADInterfaceMCCReader.proVal, and adInterfaceMCC.actor.ADInterfaceMCCReader.trigger.

Referenced by adInterfaceMCC.actor.ADInterfaceMCCReader.clone().

Member Function Documentation

Object adInterfaceMCC.actor.ADInterfaceMCCReader.clone ( Workspace  workspace) throws CloneNotSupportedException
inline

Override base class defined in ADInterfaceMCC.java.

Parameters
workspaceThe workspace for the new object.
Returns
A new actor.
Exceptions
CloneNotSupportedExceptionIf a derived class contains an attribute that cannot be cloned.

Definition at line 143 of file ADInterfaceMCCReader.java.

References adInterfaceMCC.actor.ADInterfaceMCCReader.ADInterfaceMCCReader().

void adInterfaceMCC.actor.ADInterfaceMCCReader.fire ( ) throws IllegalActionException
inline
void adInterfaceMCC.actor.ADInterfaceMCCReader.initialize ( ) throws IllegalActionException
inline

Initialize section, initialize variables, check possible errors.

Exceptions
IllegalActionExceptionif configuration file syntax is not correct or if object type in configuration file is not part of standard or if property name in configuration file is not part of standard or if device specified in configuration file cannot be connected.

Definition at line 181 of file ADInterfaceMCCReader.java.

References adInterfaceMCC.actor.ADInterfaceMCCReader.fireReader, and adInterfaceMCC.util.ADInterfaceMCC.validateAttributes().

ArrayList<ADInterfaceMCCObjectType> adInterfaceMCC.actor.ADInterfaceMCCReader.propertyValueReader ( ArrayList< ADInterfaceMCCObjectType propValArray) throws IllegalActionException
inline

Create a new array with only the elements of the configuration that are for the reader.

This function is called by fire().

Exceptions
IllegalActionExceptionif input token is missing.

Definition at line 159 of file ADInterfaceMCCReader.java.

References i.

Referenced by adInterfaceMCC.actor.ADInterfaceMCCReader.fire().

void adInterfaceMCC.actor.ADInterfaceMCCReader.sendToken ( ) throws IllegalActionException
inline

Sends the error signal to the errorSignal port, the error message to the errorMessage port, the console output to the consoleArr, and the values read from ADInterfaceMCC to the proValArr port.

This function is called by fire()

Definition at line 202 of file ADInterfaceMCCReader.java.

References adInterfaceMCC.util.ADInterfaceMCC.propval_tok.

Referenced by adInterfaceMCC.actor.ADInterfaceMCCReader.fire().

void adInterfaceMCC.actor.ADInterfaceMCCReader.setSchemaFileName ( )
inlineprotected

Sets the schema file name.

This class assigns the variable schemaFileName.

Definition at line 248 of file ADInterfaceMCCReader.java.

References adInterfaceMCC.util.ADInterfaceMCC.bcvtbhome, adInterfaceMCC.util.ADInterfaceMCC.FS, and adInterfaceMCC.util.ADInterfaceMCC.schemaFileName.

void adInterfaceMCC.actor.ADInterfaceMCCReader.setTriggerState ( ) throws IllegalActionException
inlineprotected

Set trigger state.

This class set trigger state according to trigger port

Definition at line 257 of file ADInterfaceMCCReader.java.

References adInterfaceMCC.actor.ADInterfaceMCCReader.fireReader, and adInterfaceMCC.actor.ADInterfaceMCCReader.trigger.

Referenced by adInterfaceMCC.actor.ADInterfaceMCCReader.fire().

Member Data Documentation

boolean adInterfaceMCC.actor.ADInterfaceMCCReader.fireReader
protected
ArrayList<ADInterfaceMCCObjectType> adInterfaceMCC.actor.ADInterfaceMCCReader.prop_arr_reader
static

ADInterfaceMCCObjectType after considering just the reader objects from Ptolemy.

Definition at line 278 of file ADInterfaceMCCReader.java.

Referenced by adInterfaceMCC.actor.ADInterfaceMCCReader.fire().

TypedIOPort adInterfaceMCC.actor.ADInterfaceMCCReader.proVal

The port that sends the array of property value.

Definition at line 131 of file ADInterfaceMCCReader.java.

Referenced by adInterfaceMCC.actor.ADInterfaceMCCReader.ADInterfaceMCCReader().

TypedIOPort adInterfaceMCC.actor.ADInterfaceMCCReader.trigger

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