-
Notifications
You must be signed in to change notification settings - Fork 0
DeviceSimulator
#Device Simulator Project
This project is a step forward to enable local testing of roomtrol-daemon. In short, the project is to write a program in Ruby that simulates the behavior of a projector communicating with roomtrol-daemon on a serial device terminal such as /dev/ttys1.
This project will run as a separate process external from roomtrol-daemon. It will set up a pseudo terminal whose slave roomtrol-daemon will connect to (for example, /dev/pts/5 ). Thus it will "pretend" to be the projector to which roomtrol-daemon normally connects.
Understand Linux devices. Understand Linux terminals and pseudo terminals and the difference between the two. Play with minicom to see how roomtrol-daemon interacts with devices.
http://linux.die.net/man/4/ptmx
$ ./simulator --device_class EpsonProjector
Slave is on: /dev/pts/5 Master is on: /dev/ptmx/7 Slave: PWR=ON Master: OK Slave: PWR? Master PWR=01
*Note: this may not be what an actual conversation looks like
April 15, 2012 at noon