Elvas Tower: Web Server - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

Web Server Some more ideas Rate Topic: -----

#21 User is offline   Aldarion 

  • Engineer
  • PipPipPipPipPip
  • Group: ET Owner
  • Posts: 629
  • Joined: 11-February 13
  • Gender:Male
  • Location:Lisbon, Portugal
  • Simulator:Open Rails
  • Country:

Posted 31 October 2022 - 07:59 AM

Both are interesting for my project in the national railway museum in Portugal in wich I have a full cab sim working. But if I had to choose I'd go with the capacity to control the sim through a smartphone or any other device so I could alter rain, fog, and even simulate faults by altering readings on brake pipes ( or any other OR variable loaded into memory)...

#22 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,920
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 31 October 2022 - 08:07 AM

Yes. A student uses drive-stand with its controls and gauges, while an instructor have full control on whole program, including options and debugging functionality via, say tablet.

#23 User is offline   cesarbl 

  • Conductor
  • Group: Status: Active Member
  • Posts: 395
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 31 October 2022 - 09:01 AM

Well, that's beyond what I had in mind.

The idea is to control cabview controls with external hardware, not just limiting to RailDriver (say potentiometers, buttons, etc.)

#24 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 6,920
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 31 October 2022 - 09:15 AM

so, only train controls, analog - looking (e.g. Levers with continues range)
Custom-built, or factory-serial?

#25 User is offline   Laci1959 

  • Foreman Of Engines
  • Group: Status: Contributing Member
  • Posts: 943
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Alföld
  • Country:

Posted 31 October 2022 - 09:41 AM

Helló.

https://kephost.net/p/2022/44/4337_f4dccf21987d.jpg

Version for raildriver. Made from disassembled V43 parts. It was originally created for the EU 07 Maszyna program, but can now also be used for OR.
Since then, the owner has also used 3D printing for the TAURUS locomotive.

Sincerely, Laci 1959

#26 User is offline   Aldarion 

  • Engineer
  • PipPipPipPipPip
  • Group: ET Owner
  • Posts: 629
  • Joined: 11-February 13
  • Gender:Male
  • Location:Lisbon, Portugal
  • Simulator:Open Rails
  • Country:

Posted 01 November 2022 - 02:45 AM

View PostWeter, on 31 October 2022 - 08:07 AM, said:

Yes. A student uses drive-stand with its controls and gauges, while an instructor have full control on whole program, including options and debugging functionality via, say tablet.


Yes something like that only in my case, visitors would use the drive-stand and me, with a side control on my smartphone, to play some tricks on them :rotfl:

#27 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,866
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 07 November 2022 - 12:15 PM

Hi Cesar,


View Postcesarbl, on 31 October 2022 - 05:17 AM, said:

Technical details: I'm re-using HandleUserInput() function of CabViewDiscreteRenderer, substituting ChangedValue() by the value given by the API. Therefore, minimal code changes are needed to support all existing cab controls.

Any ideas or suggestions?

This is going to be a significant extra functionality for Open Rails. Very happy to see it going ahead.

I am hoping that we can re-factor the code just a bit and pull some common code out of CabViewDiscreteRenderer.HandleUserInput() which can then be called by both the new API and HandleUserInput().

I'm hoping to take a look and see what's possible. Send me a PR if you want to discuss this in detail.

#28 User is offline   cesarbl 

  • Conductor
  • Group: Status: Active Member
  • Posts: 395
  • Joined: 30-March 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 07 November 2022 - 12:44 PM

Hi Chris,
I'm waiting before uploading the changes because I'm basing them on the cruise control branch, as CC creates a variety of new controls that would otherwise conflict with my changes.

Quote

I am hoping that we can re-factor the code just a bit and pull some common code out of CabViewDiscreteRenderer.HandleUserInput() which can then be called by both the new API and HandleUserInput().

Yes, my idea was to reuse it as much as possible to avoid duplications. Almost all the controls work with the HandleUserInput(), except precisely some of the cruise control levers. I also reused parts of the RailDriver code.

Another thing that might need discussion is the protocol. I'm currently using HTTP POST requests, and sending data in JSON format, which is not really fast. From my tests speed seems OK, but somewhere in the forum it was suggested to use WebSockets instead. Maybe both protocols can be implemented in the future, but I think that if speed is an issue then serializing and deserializing JSON every 50ms is not the best idea, so for WebSockets another protocol would be needed. I think we can stick to HTTP POST at the moment, which can be easily implemented using Python scripts.

#29 User is offline   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,866
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 19 November 2022 - 09:29 AM

View Postcesarbl, on 07 November 2022 - 12:44 PM, said:

I think we can stick to HTTP POST at the moment, which can be easily implemented using Python scripts.


I'm starting to look at this now. I've no objection to using WebSockets if speed becomes an issue, but I'm using HTTP POST and JSON for now, as you are.

#30 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,348
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 19 November 2022 - 10:23 AM

I've always thought this was a great idea with huge potential. I don't now recall if the output will just be text or whether there will be some structure (f4 and f9 come to mind)? Is .css plausible?

  • 4 Pages +
  • 1
  • 2
  • 3
  • 4
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users