elsim

image0

elsim - Ulno's Ultimative Elevator Simulator

  I developed this for my Systems Modeling course in spring 2009 at the University of Tartu, Estonia. It shows a single elevator in a window, which can be controlled via a socket (mainly you can try out commands in telnet). You can control the up/down motor and the door motor separately. Buttons can be pressed by mouse and polled via socket commands. For developing I used python and pygame. I release the source of elsim.py hereby under the MIT license. The in the archive included font freesansbold.ttf is under GPL license. To install:

  • In windows: download and unpack elsim-win32.zip. To start run elsim.exe. You might need to download and install the .net framework.

  • In linux: install python and pygame, download elsim.py and run python elsim.py

You can give parameter to elsim.exe or elsim.py. These are level and port. If none are specified, level defaults to 10 an port to 23300. After starting you can access the control locally with telnet localhost <chosenport>, this means in the default case telnet localhost 23300. If you type help and return, you get a list of commands, you can specify. A sample session would look like this:

telnet localhost 23300

Trying 127.0.0.1...

Connected by ('127.0.0.1', 54188)

Connected to localhost.

Escape character is '^]'.

# help

Possible commands: buttons?, close door, defect?, door closed?,

door defect?, door motor?, door open?, down, exit, help,

lamp down 10 off, lamp down 10 on, lamp down 10?, lamp down 2 off,

lamp down 2 on, lamp down 2?, lamp down 3 off, lamp down 3 on,

lamp down 3?, lamp down 4 off, lamp down 4 on, lamp down 4?,

lamp down 5 off, lamp down 5 on, lamp down 5?, lamp down 6 off,

lamp down 6 on, lamp down 6?, lamp down 7 off, lamp down 7 on,

lamp down 7?, lamp down 8 off, lamp down 8 on, lamp down 8?,

lamp down 9 off, lamp down 9 on, lamp down 9?, lamp level 1 off,

lamp level 1 on, lamp level 10 off, lamp level 10 on,

lamp level 10?, lamp level 1?, lamp level 2 off, lamp level 2 on,

lamp level 2?, lamp level 3 off, lamp level 3 on, lamp level 3?,

lamp level 4 off, lamp level 4 on, lamp level 4?, lamp level 5 off,

lamp level 5 on, lamp level 5?, lamp level 6 off, lamp level 6 on,

lamp level 6?, lamp level 7 off, lamp level 7 on, lamp level 7?,

lamp level 8 off, lamp level 8 on, lamp level 8?, lamp level 9 off,

lamp level 9 on, lamp level 9?, lamp up 1 off, lamp up 1 on,

lamp up 1?, lamp up 2 off, lamp up 2 on, lamp up 2?, lamp up 3 off,

lamp up 3 on, lamp up 3?, lamp up 4 off, lamp up 4 on, lamp up 4?,

lamp up 5 off, lamp up 5 on, lamp up 5?, lamp up 6 off,

lamp up 6 on, lamp up 6?, lamp up 7 off, lamp up 7 on, lamp up 7?,

lamp up 8 off, lamp up 8 on, lamp up 8?, lamp up 9 off,

lamp up 9 on, lamp up 9?, level?, motor status?, open door,

repair, repair door, save to open?, speed?, stop, stop door,

terminate, up

# up

OK

# down

OK

# stop

OK

# terminate

OK