[solved]Getting Text from Rocrail via SRCP?

Moderator: Moderators

[solved]Getting Text from Rocrail via SRCP?

Postby andiatbaden » 31.03.2015, 00:14

Hello,

i set up Rocrail :thumb_up: and rocview :thumb_up: in standard configuration and with a text and two actions, one for replacing variables the other for sending the output to espeak. Works fine, no problems.

Now i did a little bit programming on Windows vista with srcp and i am able to connect to rocrail in info mode and i get all events, but not the replaced text.
In the rocrail console i see the replaced text, but nothing is send to my program.

Is there any possibility to get the replaced text?

Thanks for any solutions

Best regards

Andreas
Last edited by andiatbaden on 25.04.2015, 20:33, edited 1 time in total.
andiatbaden
 

Re: Getting Text from Rocrail via SRCP?

Postby rjversluis » 31.03.2015, 06:54

Hi Andreas,

the replaced text comes only by the client port 8051 and in the RCP format.
http://wiki.rocrail.net/doku.php?id=roc ... ripting-en
Best Regards, Rob.
:!: PS: Do not forget to attach the usual files.
:!: PS: Nicht vergessen die übliche Dateien an zu hängen.
[ macOS - Linux] - [ N: CBUS - CANGCx ] - [ G: CBUS - CANGCx ]
rjversluis
Site Admin
 

Re: Getting Text from Rocrail via SRCP?

Postby andiatbaden » 31.03.2015, 21:18

Hello Rob,

thank you, works fine.

Best Regards

Andreas
andiatbaden
 

Re: Getting Text from Rocrail via SRCP?

Postby andiatbaden » 04.04.2015, 09:39

Hello,

now i am getting all messages from rocrail server via rcp and i am able to parse them.

Unfortunately some questions are not solved:

Question 1:
i get the message for the incomming train with an action, but i do not find any information on which platform he will arrive.

Before i get the text message i get an message like this:

<xmlh>
<xml size="403"/>
</xmlh><lc V_hint="cruise" V_maxkmh="0" dir="true" id="E03" addr="3" secaddr="0" V="144" placing="true" blockenterside="false" mode="auto" modereason="" resumeauto="true" manual="false" destblockid="Andreshaim Gleis 1" blockid="01" fn="true" runtime="1172" mtime="0" mint="0" throttleid="" active="true" scidx="-1" scheduleid="" tourid="" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false"/>
id="01" fn="true" runtime="1172" mtime="0" mint="0" throttleid="" active="true" scidx="-1" scheduleid="" tourid="" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false"/>
V="50" placing="true" blockenterside="true" mode="auto" modereason="" resumeauto="true" manual="false" destblockid="Andreshaim Gleis 1" blockid="01" fn="true" runtime="1172" mtime="0" mint="0" throttleid="" active="true" scidx="-1" scheduleid="" tourid="" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false"/>
="369"/>


A few steps later i get my text message:

<xmlh>
<xml size="246"/>
</xmlh><tx id="parameterAusgabe" block="01" location="Aschenberg" text="&quot;startUZZA|In Gleis 01 fährt ein Lok E03 Elektrolokomotive BR 103 der DB aus Aschenberg -&gt; |RB 312|Aschenberg-Andreshaim| Donnersbergen -&gt; lcscnxtbk=|endUZZA&quot;"/>


I don't see any possibility to get a link between these two messages.

These parameters are used to generate the text message:

"startUZZA|In Gleis %bkid% fährt ein Lok %lcid% %lcdesc% aus %frombkloc% ->%lcscnextbkloc% %lcnr% %frombkdesc% ->%lcscid% lcscnxtbk=%lcscnxtbk%|endUZZA"

Question 2:
I have no information for the next Town or rail station. Is it possible to get any information, via rcp or srcp, for the routing of the train before he enter and leave the platform?

Thanks for your help

Best regards

Andreas
andiatbaden
 


Return to srcp

cron