demos.powerwindow.models
Class WindowController
java.lang.Object
modhelxs.abstractsemantics.NamedEntity
modhelxs.abstractsemantics.ObservableEntity
modhelxs.abstractsemantics.Model<java.lang.Double>
demos.powerwindow.models.WindowController
- All Implemented Interfaces:
- Model, NamedEntity, ObservableEntity
public class WindowController
- extends Model<java.lang.Double>
The controller of the power window.
This is a TFSM model, whose inputs and outputs are:
- win_openend: the window reached the low end stop (it is fully opened)
- win_closed: the window reached the high end stop (it is fully closed)
- win_obstacle: the window detected an obstacle
- cmd_up: the user pressed the up button
- cmd_down: the user pressed the down button
- cmd_stop: the user released the button
- motor_up: start the motor to raise the window
- motor_down: start the motor to lower the window
- motor_stop: stop the motor
This controller has automatic impulse mode: if the user presses the up or down
button and releases it before one unit of time in TFSM, the window will
automatically close or open until it reaches an end stop.
When in automatic closing mode, if an obstacle is detected, the window is
lowered during 4 TFSM unit of time and then stopped.
- Author:
- boulange
|
Constructor Summary |
WindowController(java.lang.String name,
java.lang.Object... properties)
|
| Methods inherited from class modhelxs.abstractsemantics.Model |
add, connect, connectFromInterfaceBlock, connectFromModel, connectFromRegularBlock, createRelation, emitObservationRequests, endOfSnapshot, endOfUpdate, getEngine, getInputPins, getMoC, getOutputPins, getParent, getStructure, prep, reset, sanityCheck, setEngine, setParent, setup, startOfSnapshot, startOfUpdate, update, validate, wrapup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
win_opened
private final Pin win_opened
win_closed
private final Pin win_closed
win_obstacle
private final Pin win_obstacle
cmd_up
private final Pin cmd_up
cmd_stop
private final Pin cmd_stop
cmd_down
private final Pin cmd_down
motor_up
private final Pin motor_up
motor_stop
private final Pin motor_stop
motor_down
private final Pin motor_down
WindowController
public WindowController(java.lang.String name,
java.lang.Object... properties)
win_opened
public Pin win_opened()
win_closed
public Pin win_closed()
win_obstacle
public Pin win_obstacle()
cmd_up
public Pin cmd_up()
cmd_stop
public Pin cmd_stop()
cmd_down
public Pin cmd_down()
motor_up
public Pin motor_up()
motor_stop
public Pin motor_stop()
motor_down
public Pin motor_down()