Multiple buses (ECoS 3.0.0 RailCom accessory feedbacks)

Post Reply
Lichtleiter

Multiple buses (ECoS 3.0.0 RailCom accessory feedbacks)

Post by Lichtleiter » 08.05.2009, 14:18

Hi all,

currently I'm going on to implement the new ECoS 3.0.0 RailCom accessory feedbacks which have been adopted to the ECoS TCP interface protocol.

Architectural, RailCom accessory decoder feebacks (for switches or so) are similar as external feedbacks (e.g. S88) for switches.

Therefore in rocrail I'll represent the "new" feedbacks beside the S88 feedbacks as a second feedback bus, the: "RailCom accessory feedback bus"

As rocrail can handle multiple feedback busses, I like to do it in the "narural rocrail way". The most known "multiple feedback bus" is slx and I have had a look to the slx source, bus unfortunately it ist not clear, how the slx rocdig provides the busnumber to the higher layers.

I found the following code:

Code: Select all

static __evaluateFB( iOSLX slx, byte in, int addr, int bus ) {
  iOSLXData data = Data(slx);

  if( in != data->fbstate[bus][addr] ) {
    int n = 0;
    int pin = 0;
    int state = 0;

    for( n = 0; n < 8; n++ ) {
      if( (in & (0x01 << n)) != (data->fbstate[bus][addr] & (0x01 << n)) ) {
        pin = n;
        state = (in & (0x01 << n)) ? 1:0;
        TraceOp.dump ( name, TRCLEVEL_BYTE, (char*)&in, 1 );
        TraceOp.trc( name, TRCLEVEL_DEBUG, __LINE__, 9999, "fb %d = %d", addr*8+pin+1, state );
        {
          /* inform listener: Node3 */
          iONode nodeC = NodeOp.inst( wFeedback.name(), NULL, ELEMENT_NODE );
          wFeedback.setaddr( nodeC, addr*8+pin+1 );
          wFeedback.setstate( nodeC, state?True:False );
          if( data->iid != NULL )
            wFeedback.setiid( nodeC, data->iid );
          data->listenerFun( data->listenerObj, nodeC, TRCLEVEL_INFO );
        }
      }
    }
    data->fbstate[bus][addr] = in;
  }
}
And now my question: How is the "nodeC" filled with the busnumber?

Greets, Joern

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

Post by rjversluis » 08.05.2009, 19:47

Hi Joern,

forget about the bus idea; just add 16000 to the RailCom address as I did for transponding:

http://wiki.rocrail.net/doku.php?id=loc ... addressing

Did ESU published the ECoS protocol concerning RailCom?
Links? Documents?...

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

Post by rjversluis » 08.05.2009, 20:27

Hi Joern,

I added the missing bus attribute in revision 398:

Code: Select all

        {
          /* inform listener: Node3 */
          iONode nodeC = NodeOp.inst( wFeedback.name(), NULL, ELEMENT_NODE );
          wFeedback.setaddr( nodeC, addr*8+pin+1 );
          wFeedback.setbus( nodeC, bus );
          wFeedback.setstate( nodeC, state?True:False );
          if( data->iid != NULL )
            wFeedback.setiid( nodeC, data->iid );

          data->listenerFun( data->listenerObj, nodeC, TRCLEVEL_INFO );
        }


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

Post by rjversluis » 08.05.2009, 20:38

It never crossed my mind to use another bus for BiDi.
At second thought it is not bad idea.
Maybe I will change that for transponding too.

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

Post by rjversluis » 08.05.2009, 20:58

Hi Joern,

I have 5 busses defined now:

0 = sensors
1 = transponding
2 = Lissy
3 = Barcode
4 = RailCom

http://wiki.rocrail.net/doku.php?id=trunk:sensor-int-en
Last edited by rjversluis on 08.05.2009, 21:16, edited 1 time in total.

cwichmann
Posts: 888
Joined: 24.02.2008, 18:02
Location: Herne / Germany

Post by cwichmann » 08.05.2009, 21:06

Hi,

Joern must be a very common name, there are lots of posts from the Joern guys ;-)

Lichtleiter

Post by Lichtleiter » 08.05.2009, 22:10

...well, in the north of germany "Joern" is really a little bit more common, than in the middle or the south...

...in separation to the first "Joern" in this team, call me "JoernFritz" for the forum postings, because I'm the Joern who develops the fritz (box) firmware at a company of berlin ;-)

greets JoernFritz

Lichtleiter

Post by Lichtleiter » 08.05.2009, 22:12

rjversluis wrote:Hi Joern,

I have 5 busses defined now:

0 = sensors
1 = transponding
2 = Lissy
3 = Barcode
4 = RailCom

http://wiki.rocrail.net/doku.php?id=trunk:sensor-int-en
Hi rob,

that sounds great and I'll use your codepoint "4" for the respondings.

Thanks, JoernFritz
Last edited by Lichtleiter on 08.05.2009, 23:25, edited 1 time in total.

Lichtleiter

Post by Lichtleiter » 08.05.2009, 22:34

rjversluis wrote:Did ESU published the ECoS protocol concerning RailCom?
Links? Documents?...
Hi Rob,

there is only a short passage in the erata list of the 3.0.0 release note:

http://www.esu.eu/uploads/tx_esudownloa ... eitung.pdf

greets, JoernFritz

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

Post by rjversluis » 10.01.2011, 10:24

Hi Joern,

did you implement the RailCOM in your Rocrail branch?
Will you publish it so that it can be merged in the main branch?

[EDIT] RailCom information from locos.

Post Reply

Return to “ECoS - Marklin CS1”