82 import ptolemy.actor.TypedIOPort;
83 import ptolemy.data.ArrayToken;
84 import ptolemy.data.Token;
85 import ptolemy.data.IntToken;
86 import ptolemy.data.StringToken;
87 import ptolemy.data.BooleanToken;
88 import ptolemy.data.type.ArrayType;
89 import ptolemy.data.type.BaseType;
90 import ptolemy.kernel.CompositeEntity;
91 import ptolemy.kernel.util.IllegalActionException;
92 import ptolemy.kernel.util.InternalErrorException;
93 import ptolemy.kernel.util.NameDuplicationException;
94 import ptolemy.kernel.util.Workspace;
95 import ptolemy.kernel.util.StringAttribute;
96 import java.lang.Exception;
97 import java.util.ArrayList;
98 import java.io.IOException;
100 import java.io.StringWriter;
101 import java.io.PrintWriter;
102 import org.xml.sax.SAXParseException;
103 import org.xml.sax.SAXException;
104 import javax.xml.XMLConstants;
105 import javax.xml.validation.SchemaFactory;
106 import javax.xml.parsers.ParserConfigurationException;
107 import javax.naming.OperationNotSupportedException;
130 throws IllegalActionException, NameDuplicationException {
131 super(container, name);
132 proValArr =
new TypedIOPort(
this,
"propertyValueArray",
false,
true);
133 proValArr.setTypeEquals(
new ArrayType(BaseType.STRING));
137 trigger =
new TypedIOPort(
this,
"trigger",
true,
false);
138 trigger.setMultiport(
true);
156 public Object
clone(Workspace workspace)
throws CloneNotSupportedException {
159 newObject.proValArr.setTypeEquals(
new ArrayType(BaseType.STRING));
196 proValArr.send(0,
new ArrayToken(BaseType.STRING,
propval_tok));
207 public void fire() throws IllegalActionException {
240 if(
trigger.numberOfSources()>0)
String schemaFileName
Schema file path.
TypedIOPort trigger
The port that fires BACnetReader.
void sendToken()
Sends the error signal to the errorSignal port, the error message to the errorMessage port...
Object clone(Workspace workspace)
Override base class defined in BACnet.java.
boolean fireReader
Boolean state to trigger BACnetReader.
This class reads the XML configuration file and stores the data in the BACnetObjectType data type...
void fire()
Read BACnet property based on the configuration file If globalwi binary cannot be found or If I/O err...
void removeToken()
Remove tokens in previous time step.
void initialize()
Initialize section, initialize variables, check possible errors.
This is an abstract base class for actors that generates an output stream.
static final String FS
File seperator.
This class is used to create objects that have the information from the xml configuration file...
This actor reads from BACnet devices.
ArrayList< BACnetCompleteProperty > prop_arr
Arraylist containing BACnetCompleteProperty read from configuration file.
TypedIOPort proValArr
The port that sends the array of property value.
void setTriggerState()
Set trigger state.
void prepareTokensToSend()
Get tokens to send for the next timestep.
ArrayList< ProcessBuilder > proc_arr
Arraylist containing processes to be executed in console.
static final String bcvtbhome
String that points to root directory of the BCVTB.
Token[] propval_tok
Token array of property values.
BACnetReader(CompositeEntity container, String name)
Construct an actor with the given container and name.
void setSchemaFileName()
Sets the schema file name.