dustinfast / ptc-sim Goto Github PK
View Code? Open in Web Editor NEWA PTC Back Office Server with web interface, track/locomotive simulators, and EMP messaging subsystem.
License: MIT License
A PTC Back Office Server with web interface, track/locomotive simulators, and EMP messaging subsystem.
License: MIT License
Note that this is currently a non-issue, because they're never changed server side. However plans exist to change them based on milepost status in the future - this needs fixed before then.
Also note that changing track lines client-side may be expensive, because there are potentially a large number of them.
Port binding fails with ADDRESS ALREADY IN USE and after a minute or two of runtime, memory usage exceeds 500mb limit (presumably as a result of multiple threads failing/restarting due to port bind issue).
Heroku web log output -
2018-11-23T18:28:09.088733+00:00 app[web.1]: Exception in thread Thread-15:
2018-11-23T18:28:09.088737+00:00 app[web.1]: Traceback (most recent call last):
2018-11-23T18:28:09.088739+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/threading.py", line 801, in __bootstrap_inner
2018-11-23T18:28:09.088741+00:00 app[web.1]: self.run()
2018-11-23T18:28:09.088743+00:00 app[web.1]: File "/app/lib_messaging.py", line 353, in run
2018-11-23T18:28:09.088745+00:00 app[web.1]: sock.bind((BROKER, SEND_PORT))
2018-11-23T18:28:09.088747+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/socket.py", line 228, in meth
2018-11-23T18:28:09.088749+00:00 app[web.1]: return getattr(self._sock,name)(*args)
2018-11-23T18:28:09.088751+00:00 app[web.1]: error: [Errno 98] Address already in use
Heroku main log -
2018-11-23T18:29:16.367777+00:00 heroku[web.1]: Process running mem=533M(104.3%)
2018-11-23T18:29:16.367829+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
On asynch refresh, the status map's currently open infobox goes away.
Correct behavior:
If (!curr selected loco) {
// persist currently open infobox
} else {
// persist currently open infobox if non-loco OR if curr_selected_loco
}
lib_msging.Connection._timeoutwatcher does not allow graceful exit when the sim_track, sim_bos, and sim_broker modules are run individually. It likely needs a stop function. The line to start the thread in Connection.init() is commented out in the meantime.
Fix: Each web session needs its own track instance, so the devices are simulated according to that sessions settings.
Need to fix this in home.js
Need to set the status col to a fixed width or set overflow-x:hidden.
Convert the existing PTC-Sim code base to Python 3. Most of it is done, but the struct.pack and decode functions are causing problems.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.