Peek and Poke

There are no Peek and Poke equivalents which could be used to access hardware - the approach you take rather depends on how you want to control the railway…

If it is not DCC control, but you want to use ADCs, relays etc
or
If it is DCC but you want to do all the hard work yourself…
then you probably would be best using an intelligent control board, such as an Arduino to control the hardware
( Google Arduino DCC for some hints ) and you could interface your XOJO app to that device via Serial coms for the UI /control side.

If it is DCC and you want to use a commercial controller, the simplest / cheapest one I know is the SPROG…
SPROG DCC controller
which also conects to the host computer via Serial ( the USB version simply has a USB to Serial converter built in )

Many other commercial controllers connect via Serial ( or USB->Serial )

I did some tests, a year or so ago, connecting to a SPROG, from XOJO and it works just fine - and I have built and run the program on all 3 platforms.