Solved! srcpd and loco functions

Moderator: Moderators

Solved! srcpd and loco functions

Postby Richard-TX » 28.04.2013, 18:21

Is this correct?

Default state - all functions off

F0 = on - "sent: SET 2 GL 10 1 50 100 1 0 0 0 0 0 0 0 0 0 0 0 0"

F1 = on - "sent: SET 2 GL 10 1 50 100 1 1 0 0 0 0 0 0 0 0 0 0 0"

F0 = off - "sent: SET 2 GL 10 1 50 100 0 0 0 0 0 0 0 0 0 0 0 0 0"

Is the sending of the <F0 = off in the last command supposed to clear all of the functions? Seems a bit odd.
Last edited by Richard-TX on 01.05.2013, 15:49, edited 2 times in total.
Richard-TX
 

Postby Richard-TX » 28.04.2013, 22:46

Seems that the function issue is a moving target. I am starting to think that this is is a bug within srcpd.

Rob, Can you verify if this is a srcpd bug?
You do not have the required permissions to view the files attached to this post.
Richard-TX
 

Postby LDG » 29.04.2013, 02:11

Hello Richard,

this is a bug in Rocrail's srcp digint controller (Rocrail in srcp client mode).

@Rob: I am already testing a patch that will fix it and also some other issues that were reported in another thread (fix handling #functions[0..28], srcp_speed_steps( curr_speed, decoder_steps, V_Mode, V_Max), send power on/off for all configured/addressed srcp buses,...)

@Richard: It will take some time because there are still some problems to solve when using concurrent access with other srcp loco clients also changing functions for the same loco...

Regards,
Lothar
LDG
Site Admin
 

Postby Richard-TX » 29.04.2013, 04:48

Thanks Lothar.

Take your time.
There is no rush on this.

Richard
Richard-TX
 

Postby rjversluis » 29.04.2013, 06:17

Hi Lothar,

LDG wrote:using concurrent access with other srcp loco clients also changing functions for the same loco...

Is that not the task of the srcpd which is dealing with multiple clients?
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 ]
rjversluis
Site Admin
 

Postby LDG » 29.04.2013, 08:02

Hi Rob,
rjversluis wrote:Hi Lothar,

LDG wrote:using concurrent access with other srcp loco clients also changing functions for the same loco...
Is that not the task of the srcpd which is dealing with multiple clients?
You are right. Srcpd is sending all changes through the info channel to Rocrail correct.
But there is some thing to fix in "__feedbackReader" and/or "__translate" for loco and loco function commands (light and f1..f28). Sometimes ( :? ) Rocrail loco throttles are showing changed functions (by other srcp throttles) correct, but when sending the next loco/function command it is using/sending other ("outdated") function values. That is the issue I want to solve next.
I'll send my patches when I'm almost sure this will also be handled correct by Rocrail :)

Regards,
Lothar
LDG
Site Admin
 

Postby Richard-TX » 29.04.2013, 13:39

LDG wrote: there are still some problems to solve when using concurrent access with other srcp loco clients also changing functions for the same loco...

Regards,
Lothar


I never considered srcpd communicating to multiple clients. I always envisioned it as a end point.

Here is how I view srcp's role in my case.

Image

Ideally, I would love to get rid of RS-232 as a communications transport and have everything talk TCP/IP but that is not going to happen anytime soon. Srcpd is at least a step in the right direction. I am trying to avoid yet another RS-232/USB connection.

How do you see srcpd's role in layout control?

Maybe there is a different topology or protocol that I should consider?

I am in the proof-of-concept stage right now so I am willing to try almost anything.

Richard
Richard-TX
 

Postby rjversluis » 29.04.2013, 13:58

Hi Richard,

you can avoid another serial connection for Loconet:
http://wiki.rocrail.net/doku.php?id=mgv101-en

SRCP seems to be developed for manually writing commands in a terminal...

BTW: Why using 3 command stations? You can cover it all with one Digitrax CS.
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 ]
rjversluis
Site Admin
 

Postby Richard-TX » 29.04.2013, 15:14

Rob,

Funny you should mention that. I have been thinking of getting a MGV101 and use it instead of a Locobuffer/USB. The locobuffer works OK but I certainly don't get any warm fuzzies from it. It would not replace the EasyDcc CS but it would eliminate a USB connection. The level of support for the MGV101 would be infinitely better that any support from EasyDcc or Digitrax or any other vendor as far as that goes. The possibility of my customizing or modifying it is possible too. While outside of the scope of this thread, there are some unknowns such as impact to my existing network devices due to multicasting, etc.

Getting to a single CS or controller is likely not possible. I can find no CS that does everything of what I need. I might be able to get down to two, but certainly not one. To be honest I see a minimum of 3.

I have been thinking about replacing the EasyDcc system but I will need to do some investigation. There many things to consider such as programming track, JMRI supported, etc. I occasionally use JMRI as a debugging tool and for DCC decoder programming. I do have to admit that the desire for JMRI support is quickly fading away. Personally, I have a huge problem with the JMRI user interface from a layout operation perspective as I find the user interface intolerable.

That brings up another topic:
Some place in all this is sound generation. My feeling is that if sound is wanted, why stuff it in the loco with a tiny speaker when some strategically placed speakers, amp, and controller could be used to generate some very high quality sound. With the open ended modification that I did to srcpd, a small script could be used to control sounds, music, mixers etc. Rocrail is the only software that can provide that level of functionality that I can see. The trick will be to link loco function buttons (kids love to toot the horn) to that interface and to link various events within Rocrail to it. What events? Bell and horn when entering the station block is one example. I have not even started to figure out what is needed to provide my idea of sound system integration with Rocrail. Sound support is very low in priority right now.


As far as srcpd being a user interface, I don't see it like that at all. It is just yet another protocol just like SMTP, POP3, etc. that is written in plain english so that debugging is easier, is platform independent, etc. So for those reasons I see srcp as a machine<->machine interface that the general user never sees.


Richard
Richard-TX
 

Postby Richard-TX » 29.04.2013, 15:58

Here is an alternative diagram which includes a simpler sound solution.

Image
Richard-TX
 

Postby LDG » 29.04.2013, 17:10

Hi Richard,

with revision 5101+ some of the problems you reported (decoder speed steps, functions) should be fixed (for srcp 0.8.x) :)

Regards,
Lothar
LDG
Site Admin
 

Postby rjversluis » 29.04.2013, 17:17

Can we drop srcp 0.7?
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 ]
rjversluis
Site Admin
 

Postby LDG » 29.04.2013, 17:50

Hi Rob,
rjversluis wrote:Can we drop srcp 0.7?

On the official page it is marked
srcpd.sf.net/srcp wrote:0.7.3 (outdated, but still in use)

On "the other side of Rocrail" (srcp service) the supported version is 0.8.4 (almost identical/compatible to 0.8.3).
When starting with srcp several years ago version 0.7 was already outdated, so I never read the 0.7 specs :)
Clients using 0.7 are also outdated and not maintained any more.

:arrow: my answer: Yes

Regards,
Lothar
LDG
Site Admin
 

Postby rjversluis » 29.04.2013, 18:00

OK, we will only support the latest version from 2010...
I will kick out 0.7 and will remove the srcp07 and srcp08 and merge the 08 into the srcp.c
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 ]
rjversluis
Site Admin
 

Postby Richard-TX » 29.04.2013, 19:04

I agree. Support 0.7 should be dropped altogether.
Richard-TX
 

Next

Return to srcp