[Solved} srcp service and FB configuration

Moderator: Moderators

[Solved} srcp service and FB configuration

Postby Richard-TX » 05.07.2013, 14:15

When the srcp service is enabled in rocrail, is there a IID that should be configured in the sensor setup? Maybe the IID should be NULL?

Maybe I am venturing into uncharted waters?

The reason I ask is that I will have a couple of srcp controllers defined in Rocrail. I will also have a third remote computer talk to Rocrail directly over srcp.
Last edited by Richard-TX on 07.08.2013, 10:51, edited 1 time in total.

Postby rjversluis » 05.07.2013, 14:33

There is no IID set for the SRCP Service in Rocrail.
There is no way to identify a SRCP Client.
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 - CAN-GCA ] - [ 0: RocNetNode - GCA-Pi ]
Site Admin

Postby Richard-TX » 05.07.2013, 15:19

Thanks Rob.

The srcp service is just a logical extension of Rocrail which enables control of Rocrail defined devices. All the same rules apply such as first controller defined, etc.

That srcp service make a DIY block detector/sensor system a piece of cake to add. Take a small networked computer with some appropriate hardware, add a python script or two, and it is done. It just couldn't be simpler.

Postby LDG » 05.07.2013, 15:54

Hi Richard,

if you are using multiple command stations in your layout (with different interface ids) and you want to change a device not on the first (default) command station, then you will have to identify the command station by its interface id.
Because SRCP doesn't know anything about interface ids but it has buses there is a "manual mapping mechanism" to identify the corresponding central station.

Here is an example how to set this up in a rocrail.ini (excerpt of my testing environment):
Code: Select all
  <digint iid="vcs-1" lib="virtual" stress="false" libpath="/opt/rocrail"/>
  <digint iid="vcs-2" lib="virtual" stress="false" libpath="/opt/rocrail"/>
  <digint iid="tamsMC" lib="virtual" stress="false" libpath="/opt/rocrail"/>
  <digint iid="BiDiB" lib="virtual" stress="false" libpath="/opt/rocrail"/>
  <srcpcon port="4303" active="true">
    <srcpbus bus="1"/>
    <srcpbus bus="1" iid="vcs-1"/>
    <srcpbus bus="2" iid="vcs-2"/>
    <srcpbus bus="3" iid="tamsMC"/>
    <srcpbus bus="42" iid="BiDiB"/>
You will have to add one "srcpbus"-entry for every command station (iid) and take care to use unique bus ids.

So a
SET 1 FB 1 1 will set Feedback 1 to ON on vcs-1 (this is also the default CS -> entry without iid)
SET 2 FB 1 0 will set Feedback 1 to OFF on vcs-2
SET 3 GA 8 1 1 1 will set switch(accessory) 14 to position 1 on tamsMC
SET 42 GA 8 1 1 1 will set switch(accessory) 14 to position 1 on BiDiB
SET 42 GA 8 0 1 1 will set switch(accessory) 14 to position 0 on BiDiB

Hope that was helpful for your further testing :wink:

Site Admin

Postby Richard-TX » 05.07.2013, 19:19


I think I have it all sorted out.

In my test setup I have Rocrail talking to two srcpd servers and also have the srcp service enabled. I was doing this testing to see how Rocrail behaves under these circumstances. All in all it behaves as expected and very well.

The only possible issue I see is having an address collision but that isn't a big deal. I doubt anyone would really attempt to have FB device addresses shared.

As far as I am concerned, Rocrail with srcp has made the addition of block detection so painless it is almost ridiculous.

Return to srcp