New SRCP Service

Post Reply
rjversluis
Site Admin
Posts: 39848
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

New SRCP Service

Post by rjversluis » 02.10.2010, 09:33

Rocrail provides a SRCP Service to be used by SRCP Clients like spdrs60:

http://wiki.rocrail.net/doku.php?id=roc ... cp_service

The implementation is not completely finished, but controlling switches and running trains should be possible.

tuxlover
Posts: 60
Joined: 04.11.2008, 12:38

Post by tuxlover » 03.10.2010, 00:00

Very very nice feature. Now I can control the layout with spdrs60, which I like very much, because of its prototype like function.
And I have with rocrail a great backend for dispatching the Fredis, DDX and the possible to use andRoc and other wireless phone clients.

thx
Michael

rjversluis
Site Admin
Posts: 39848
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 03.10.2010, 17:49

Hi Michael,

not all of SRCP is implemented; Just report here if additional functionality is needed.

tuxlover
Posts: 60
Joined: 04.11.2008, 12:38

Post by tuxlover » 03.10.2010, 19:01

I will do so, but unfortunately I have at the moment no layout.

I will come back when I find some missing parts.

King regards
Michael

LDG
Site Admin
Posts: 2644
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Post by LDG » 04.01.2011, 22:14

Hi Rob,
rjversluis wrote:Hi Michael,

not all of SRCP is implemented; Just report here if additional functionality is needed.
While testing Rocrail I discovered a problem with the feedback/sensor bus(es) in the srcpd implementation.
I currently test with a Tams MC with two S88-feedback modules (Ports 1-32) and one RC-LINK (Sensors 1-24).

In Rocview everything is fine :wink:

When I connect spdrs60 to Rocrail the S88-feedback sensors and the sensors of the RC-Link are all reported on the same bus (bus-Id 1 in spdrs60). So Ports 1-24 are mixed (logical OR).

In Rocrail I tried the offset parameter in the sensor-tab in the controller-properties but neither of the RC-LINK sensors nor S88-feedback modules changed the beginning of the numbering.
What is the meaning of this "offset" parameter? According to documentation for xpressnet, lenz and nce it should do exacltly this, but is it also used with TamsMC or RC-LINK ?

Is it possible to use/report/configure separate (srcpd-)bus-IDs for s88 and RC-LINK sensors?

Is it possible to add/append S88-sensors after RC-LINK-sensors?

Any idea how to solve my problem?

Thanks,
Lothar
Last edited by LDG on 04.01.2011, 22:19, edited 1 time in total.

rjversluis
Site Admin
Posts: 39848
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 04.01.2011, 22:18

Hi Lothar,

if Rocview shows all your sensors in the correct way, it is obvious that the SRCP client connections misses some implementation. ;)

[EDIT]
The best way to have some change I will take care of this issue to put it as bug at LaunchPad.net.

LDG
Site Admin
Posts: 2644
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Post by LDG » 05.01.2011, 01:31

Hi Rob,
rjversluis wrote:Hi Lothar,

if Rocview shows all your sensors in the correct way, it is obvious that the SRCP client connections misses some implementation. ;)
No, spdrs60 is reporting what is seen on the INFO-session :!: In the srcpd-implementation of Rocrail always Bus# 1 is used on the INFO channel, even if there are 2 command stations (TamsMC and RC-LINK) with feedback sensors. :(
rjversluis wrote:[EDIT]
The best way to have some change I will take care of this issue to put it as bug at LaunchPad.net.
Done. With more detailed description an logs :wink: Hope it is easy to verify and to fix.

Regards,
Lothar

LDG
Site Admin
Posts: 2644
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Post by LDG » 05.01.2011, 18:34

Hi Rob,

thanks for the fast fix in revision 2241.
My feedback buses are now reported separate with ID 1 and 5 , so spdrs60 can handle the events correct :D

Best Regards,
Lothar

LDG
Site Admin
Posts: 2644
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Post by LDG » 03.02.2011, 21:15

Hi Michael and others,
rjversluis wrote:Hi Michael,

not all of SRCP is implemented; Just report here if additional functionality is needed.
Some missing functionality was added in revision 2275 by Rob and me. Most of spdrs60 should communicate with rocrail now in both directions (switches and signals).
Please report is something for spdrs60 is still missing.

Regards,
Lothar

LDG
Site Admin
Posts: 2644
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Post by LDG » 02.05.2011, 18:18

Rocrail 2.0 revision 2582 adds the following features:
- support locos with light and any number of functions between 0 and 28 :!:
- bugfixes in session handling
- support some more commands (especially requests) by clients
- support for pyControl clients (part of srcpd)

To use pyControl download the developer sources of srcpd (complete SVN tree!) or only the files for pyControl from here :
srcp.readme
srcpd.py
and the examples
Lok.py
Keyboard.py
Keyboardflex.py

In srcp.py (the "library") change line 120 (or wherever an exception/error is reported when you start the keyboad client) from

Code: Select all

if int(w[1])>399:
to

Code: Select all

if int(w[1])>399 and not (int(w[1])==412 or int(w[1])==416):
and the keyboard examples will work.
You may also change the DBG macro at the beginning of the file to reduce output :wink:

Please report any problems you have with this or other clients connecting to Rocrail through the SRCP interface.

Regards,
Lothar

EDIT:
- corrected an error in code substitution
- further information is in the RR-Wiki

LDG
Site Admin
Posts: 2644
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Post by LDG » 24.02.2012, 12:13

Hi,

with Rocrail revision 3294 (and some fixes in 3300 :roll: ) a complete review of the SRCP service is available. I implemented some missing functionality according to the 0.8.[34] spec of SRCP. .

There is also a change in the rocrail.ini (only of interest if you use more than one controller). In the srcpcon-section
srcpconnoffset and offset
are replaced by
srcpbus and bus

Default values will be written automatically after activation/usage of the SRCP service.

Regards,
Lothar

LDG
Site Admin
Posts: 2644
Joined: 18.10.2010, 00:03
Location: near Karlsruhe/Germany

Post by LDG » 24.04.2012, 23:10

Hello,

starting with Rocrail Rev 3503 and srcp.py 0.9.1/0.9.2 it is possible to use feedback in python scripting.

See http://wiki.rocrail.net/doku.php?id=srcp-scripting-en for details.

Lothar

Post Reply

Return to “srcp”