RocNet UDP output some differences

Post Reply
SmileyVie
Posts: 92
Joined: 13.10.2011, 21:48
Location: Vienna, Austria

RocNet UDP output some differences

Post by SmileyVie » 10.01.2012, 19:08

Hello,

I'm evaluating right now what software I will use for my Model Railway...
There I wan to have an UDP connection to the program....

Rocrail seems to catch in all my requests.... So I looked deeper into it.

But in the UDP communication I saw that the output is different to the Documentation in the Wiki....
In the Description is in Group 2 and Action 2 declared 3 data bytes, but I get only 2 bytes back...

Also I saw that if F0 is on that the direction of a loco is in the UDP output every time the same....
i.e. UDP Output in HEX for LocoAdr. 255 V=0 Dir=REV
00 00 FF 00 00 02 02 02 00 02
Here the UDP output in HEX for LocoAdr. 255 V=0 Dir=FWD
00 00 FF 00 00 02 02 02 00 03

And if F0 = on then the UDP output is every time the same like in Example for Dir=FWD.

Is this a Bug or did I something wrong?
I searced in the RocRail Wiki and did not found a hint...
Also I saw that

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

Post by rjversluis » 10.01.2012, 21:44

Hi,

the Wiki and the implementation are not in sync.
As you can see the data length in the packet is set to 2, one byte for the velocity and one byte for direction and lights(F0).

Code: Select all


    rn[RN_PACKET_GROUP] |= RN_GROUP_MOBILE;
    rnReceipientAddresToPacket( addr, rn, data->seven );
    rn[RN_PACKET_ACTION] = RN_MOBILE_VELOCITY;
    rn[RN_PACKET_LEN] = 2;
    rn[RN_PACKET_DATA + 0] = V;
    rn[RN_PACKET_DATA + 1] = dir | fn | prot;

SmileyVie
Posts: 92
Joined: 13.10.2011, 21:48
Location: Vienna, Austria

Post by SmileyVie » 11.01.2012, 00:16

Many thank's for the quick answer.
If F0is on then the byte for direction and lights is always hex 03.
So it's not possible to see the direction if the lights are on.

How can I decode the udp communication - from rocrail out and in to it?
Maybe do you have a hint for me.

Many thank's and nice Greetings.

By the way... I surfed in the forum here and saw that this cumunuty have mutch respect to each other... On facebook I would click on like. :)

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

Post by rjversluis » 11.01.2012, 11:02

Hi,

I changed the Wiki and the implementation in 3183.
I'm open to any suggestions for the rocnet protocol.

Post Reply

Return to “RocNet”