Test: Send/Receive Data between openBVE and external application
4 posters
Page 1 of 1
Test: Send/Receive Data between openBVE and external application
As everyone knows, the BVE/openBVE provide only 16 ATS buttons for train plugin.
With train having some systems, or even computers (or TIMS, TIS, etc.), there are far away more buttons for driver to press.
In this case, those 16 "internal" buttons can/should only used for very essential work on train driving.
How about when I want the driver to do lot more with for example the Train Information (or something else) System, like playing a PA?
And finally I did this (prototype).
Player would start the external application, whenever the openBVE has completed loading the route and train.
When Train Plugin has completed Load(LoadProperties properties) call, the Named Pipe Server should start and the external application should be able to connect to it.
Named Pipe can be just in In or Out mode, but duplex should be used in this scenario.
Currently I'm just testing the possibilities of this trick, so only ElapseData would be sent (by serialising as JSON).
This idea might be used in another future projects, possibly a tube, and a "display card-burning" stuff.
(Edit@20140219: If you'd like to see how it actually works, check out this HKHR-ATP source at my GitHub, starting from commit 7e2de35d4a5a87eed9f3854ab537bd4eec824eb4.)
With train having some systems, or even computers (or TIMS, TIS, etc.), there are far away more buttons for driver to press.
In this case, those 16 "internal" buttons can/should only used for very essential work on train driving.
How about when I want the driver to do lot more with for example the Train Information (or something else) System, like playing a PA?
And finally I did this (prototype).
Player would start the external application, whenever the openBVE has completed loading the route and train.
When Train Plugin has completed Load(LoadProperties properties) call, the Named Pipe Server should start and the external application should be able to connect to it.
Named Pipe can be just in In or Out mode, but duplex should be used in this scenario.
Currently I'm just testing the possibilities of this trick, so only ElapseData would be sent (by serialising as JSON).
This idea might be used in another future projects, possibly a tube, and a "display card-burning" stuff.
(Edit@20140219: If you'd like to see how it actually works, check out this HKHR-ATP source at my GitHub, starting from commit 7e2de35d4a5a87eed9f3854ab537bd4eec824eb4.)
Last edited by hkmtrhah on Tue Feb 18, 2014 11:22 pm; edited 1 time in total
Re: Test: Send/Receive Data between openBVE and external application
Very interesting! And really promising. Would maybe even allow for real multiplayer; plugins may be unable to control signals, but they are able to simulate and thus control an in-cab signalisation like LZB, TVM or ETCS...
Quork- Posts : 1437
Join date : 2012-05-05
Age : 32
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: Test: Send/Receive Data between openBVE and external application
If me then I'll probably fork the openBVE's code instead...Quork wrote:Very interesting! And really promising. Would maybe even allow for real multiplayer; plugins may be unable to control signals, but they are able to simulate and thus control an in-cab signalisation like LZB, TVM or ETCS...
It'd be even better if I can be a co-developer of openBVE, but I don't see any ways to contribute (new codes) to the openBVE
Post-Scriptum @20140209 UTC0 1917:
The Named Pipe is a kind of Inter-Process Communication which does only provide communications locally. Socket, or TCP which BVEStation tried, can do IPC remotely.
Re: Test: Send/Receive Data between openBVE and external application
I have a better idea. How about someone just opens up the ability of a plugin being able to influence and affect the main bve code.
Plugins can do a lot for a train but so long as the core bve code won't allow itself to be configured by a plugin, you are limited to cab only.
Plugins can do a lot for a train but so long as the core bve code won't allow itself to be configured by a plugin, you are limited to cab only.
Re: Test: Send/Receive Data between openBVE and external application
Wow. This sounds very interesting. So basically, with this external program, it would increase the features on trains and this could make openBVE more realistic by simulating more in-cab systems?
buckysam- Posts : 150
Join date : 2012-05-28
Age : 28
Location : Kentucky USA
Re: Test: Send/Receive Data between openBVE and external application
Exactly. It allows for far more sophisticated simulation of modern, busbased (I'm speaking of IT-busses, not of omnibusses ;-) ) vehicles, which is really, really great news.
Quork- Posts : 1437
Join date : 2012-05-05
Age : 32
Location : Hofheim a.T., Hessen (Hesse), European Union
Similar topics
» openBVE data output possible?
» Network Rail Test Train External?
» openBVE on external disc
» TrainEditor not saving and reading loco brake data
» Class 59/2 external WIP
» Network Rail Test Train External?
» openBVE on external disc
» TrainEditor not saving and reading loco brake data
» Class 59/2 external WIP
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|