MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / fire

Method fire

SRC/java/kepler/opensees/OpenSeesParameter.java:136–159  ·  view source on GitHub ↗

Send the token in the value parameter to the output. @exception IllegalActionException If it is thrown by the send() method sending out the token.

()

Source from the content-addressed store, hash-verified

134 */
135
136 public void fire() throws IllegalActionException {
137 super.fire();
138
139 // If the parameterValue input port is connected and has data, then
140 // get the parameter value from there
141 if (parameterValuePort.getWidth() > 0) {
142 if (parameterValuePort.hasToken(0)) {
143 String name = ((StringToken) parameterValuePort.get(0))
144 .stringValue();
145
146 // Using setExpression() rather than setToken() allows
147 // the string to refer to variables defined in the
148 // scope of this actor.
149 parameterValue.setExpression(name);
150 }
151 }
152
153 String parameterNameStr = parameterName.getToken().toString();
154 parameterNameStr = parameterNameStr.substring(1, parameterNameStr.length() - 1);
155 String parameterValueStr = parameterValue.getToken().toString();
156 parameterValueStr = parameterValueStr.substring(1, parameterValueStr.length() - 1);
157
158 output.send(0, new StringToken(parameterNameStr + " " + parameterValueStr));
159 }
160}

Callers

nothing calls this directly

Calls 4

lengthMethod · 0.95
getMethod · 0.45
setExpressionMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected