demos.powerwindow.models
Class WindowModel
java.lang.Object
modhelxs.abstractsemantics.NamedEntity
modhelxs.abstractsemantics.ObservableEntity
modhelxs.abstractsemantics.Model<Unit>
demos.powerwindow.models.WindowModel
- All Implemented Interfaces:
- Model, NamedEntity, ObservableEntity
public class WindowModel
- extends Model<Unit>
The model of the mechanical part of the window.
This is an SDF model whose inputs and outputs are:
- motor_cmd: the command of the motor, with positive values
closing the window, negative value opening the value,
and 0 stopping the motor
- window_pos: the position of the window, 0.0 being fully opened, and 5.0 being fully closed
- window_end: the end stops, 0 means that no end stop is reached,
-1 means fully opened end stop
1 means fully closed end stop
The demultiplication of the motor and mechanical part of the window is set
by the "scale" property of the model. The value of motor_cmd is multiplied
by this scale to compute by how much the window moves at each update.
- Author:
- boulange
|
Constructor Summary |
WindowModel(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 |
motor_cmd
private final Pin motor_cmd
window_pos
private final Pin window_pos
window_end
private final Pin window_end
WindowModel
public WindowModel(java.lang.String name,
java.lang.Object... properties)
motor_cmd
public Pin motor_cmd()
window_pos
public Pin window_pos()
window_end
public Pin window_end()