Class DemoFlowratePluginController
- java.lang.Object
-
- com.velasolaris.plugin.controller.spi.AbstractPluginController
-
- com.velasolaris.plugin.controller.demo.DemoFlowratePluginController
-
- All Implemented Interfaces:
IPluginController
public class DemoFlowratePluginController extends AbstractPluginController
Demo plugin controller. Demonstrating the possibilities of Polysun plugin controllers. This class is a copy of the FlowratePluginController. The FlowratePluginController implementation is written in name based approach. The DemoFlowratePluginController implementation is written in an array access style. Controls the status (on/off) of one or two different components and the flowrate of a given pump based on one or two flowrate sensors. The DemoFlowratePluginController provides the same functionality as the FlowrateController. The names of properties, sensors or control signals in this class are internal Polysun translation keys. Normal text can also be used. See also ch.spf.PS4Controller.FlowrateController.- Since:
- Polysun 9.1
- See Also:
com.velasolaris.plugin.controller.flowrate.FlowratePluginController
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
sLog
Static instance of the Logger for this class-
Fields inherited from class com.velasolaris.plugin.controller.spi.AbstractPluginController
controlSignalsName, controlSignalsUsed, nRemoteFunctionCalls, pluginDataPath, properties, propertiesFloat, propertiesInt, propertiesName, propertiesString, sensorsName, sensorsUsed, startMeasureFunctionCall, sumRemoteFunction
-
Fields inherited from interface com.velasolaris.plugin.controller.spi.IPluginController
INVALID_INDEX
-
-
Constructor Summary
Constructors Constructor Description DemoFlowratePluginController()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
control(int simulationTime, boolean status, float[] sensors, float[] controlSignals, float[] logValues, boolean preRun, Map<String,Object> parameters)
PluginControllerConfiguration
getConfiguration(Map<String,Object> parameters)
List<String>
getControlSignalsToHide(PolysunSettings propertyValues, Map<String,Object> parameters)
String
getDescription()
String
getName()
List<String>
getPropertiesToHide(PolysunSettings polysunSettings, Map<String,Object> parameters)
List<String>
getSensorsToHide(PolysunSettings polysunSettings, Map<String,Object> parameters)
void
initialiseSimulation(Map<String,Object> parameters)
void
terminateSimulation(Map<String,Object> parameters)
-
Methods inherited from class com.velasolaris.plugin.controller.spi.AbstractPluginController
addOverridableController, addPreSimulatableComponent, build, cleanupOnSimulationAbort, cleanupOnSimulationException, closeResources, exportResource, getControlSignal, getControlSignalIndex, getControlSignals, getControlSignalsUsed, getCreator, getCSIdx, getDocumentation, getFixedTimestep, getId, getLogs, getOverridableController, getPreSimulatableComponent, getProp, getProperty, getPropertyIndex, getPropertyValue, getPropertyValue, getSensor, getSensor, getSensorIndex, getSensors, getSnIdx, getVersion, isEnabled, isOverridableControllerAvailable, isPreSimulatableComponentAvailable, listPreSimulatableComponents, logPerfMeasure, replacePathPlaceholders, setConfiguration, setControlSignal, setPolysunSettings, startMeasureFunctionCall, stopMeasureFunctionCall
-
-
-
-
Field Detail
-
sLog
protected static Logger sLog
Static instance of the Logger for this class
-
-
Method Detail
-
getName
public String getName()
-
getConfiguration
public PluginControllerConfiguration getConfiguration(Map<String,Object> parameters)
-
control
public int[] control(int simulationTime, boolean status, float[] sensors, float[] controlSignals, float[] logValues, boolean preRun, Map<String,Object> parameters)
-
getPropertiesToHide
public List<String> getPropertiesToHide(PolysunSettings polysunSettings, Map<String,Object> parameters)
- Specified by:
getPropertiesToHide
in interfaceIPluginController
- Overrides:
getPropertiesToHide
in classAbstractPluginController
-
terminateSimulation
public void terminateSimulation(Map<String,Object> parameters)
- Specified by:
terminateSimulation
in interfaceIPluginController
- Overrides:
terminateSimulation
in classAbstractPluginController
-
initialiseSimulation
public void initialiseSimulation(Map<String,Object> parameters) throws PluginControllerException
- Specified by:
initialiseSimulation
in interfaceIPluginController
- Overrides:
initialiseSimulation
in classAbstractPluginController
- Throws:
PluginControllerException
-
getSensorsToHide
public List<String> getSensorsToHide(PolysunSettings polysunSettings, Map<String,Object> parameters)
- Specified by:
getSensorsToHide
in interfaceIPluginController
- Overrides:
getSensorsToHide
in classAbstractPluginController
-
getControlSignalsToHide
public List<String> getControlSignalsToHide(PolysunSettings propertyValues, Map<String,Object> parameters)
- Specified by:
getControlSignalsToHide
in interfaceIPluginController
- Overrides:
getControlSignalsToHide
in classAbstractPluginController
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceIPluginController
- Overrides:
getDescription
in classAbstractPluginController
-
-