module PowerWindowModel

fmu Environment environment
at "./path/to/Environment.fmu"
output ports passenger_up, passenger_down, driver_up, driver_down

fmu Controller controller
at "./path/to/Controller.fmu"
input ports obj_detected, passenger_up, passenger_down, driver_up, driver_down
output ports up, down, stop

fmu Power power
at "./path/to/Power.fmu"
input ports up, down, reaction_torque (N.m)
output ports armature_current (mA), motor_speed (m/s)

fmu Window window
at "./path/to/Window.fmu"
input ports motor_speed (m/s), reaction_force (N)
output ports height (cm), reaction_torque (N.m)

fmu Obstacle obstacle
at "./path/to/Obstacle.fmu"
input ports height (m)
output ports reaction_force (N)

power.armature_current -> controller.obj_detected
