Node not being ignored for short messages

http://www.merg.org.uk/merg_resources/cbus.php

Node not being ignored for short messages

Postby MikeBr » 05.10.2016, 15:32

rocrail.unreg_evnts.zip
rocrail.unreg_evnts.zip
I am trying to trace why Rocrail is ignoring cbus sensor events and on viewing the trace log I saw that the events where considered unregistered, because the Node ID was being processed. The cbus document, attached, states that the Node ID should be ignore for short events, which Rocrail seems not to be doing.
extract from merg doc
<OPC><NNhi><NNlo><DNhi><DNlo>
The node number of the sending node is still included for traceability and diagnostics but is ignored by
the receiving nodes or any attached PC software. In this case it is the DN that is unique to the layout
device which either produces or consumes the event.

Example failed event
20161004.204145.450 r9999c cbreader OCBUS 0704 short event 1040:1042 OFF ;**** this is bus 0 addr 1042
20161004.204145.450 r9999B 00000AB0 OModel 4578 unregistered event: co [cbus-1]0:1042:0 uidname=[]
20161004.204145.566 r9999B main OApp 1119 memory allocations old=260053 new=260091
20161004.204158.778 r9999B cbreader OCBUS 0065 HEXA=[90]
20161004.204158.778 r0000B cbreader OCBUS *trace dump( 0x0473FE94: length=9 )
offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |ASCII...........|
--------------------------------------------------------- |----------------|
00000000: 3A 53 42 30 41 30 4E 39 30 |:SB0A0N90 |
20161004.204158.778 r0000B cbreader OCBUS *trace dump( 0x0473FE94: length=18 )
offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |ASCII...........|
--------------------------------------------------------- |----------------|
00000000: 3A 53 42 30 41 30 4E 39 30 30 34 30 30 30 30 30 |:SB0A0N900400000|

By amending the cbus firmware to filter out the Node ID I get
20161005.125705.358 r9999c cbreader OCBUS 0704 short event 0:1042 OFF
20161005.125724.132 r9999B cbreader OCBUS 0065 HEXA=[98]
20161005.125724.132 r0000B cbreader OCBUS *trace dump( 0x0473FE94: length=9 )
offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |ASCII...........|
--------------------------------------------------------- |----------------|
00000000: 3A 53 42 30 41 30 4E 39 38 |:SB0A0N98 |
20161005.125724.132 r0000B cbreader OCBUS *trace dump( 0x0473FE94: length=18 )
offset: 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |ASCII...........|
--------------------------------------------------------- |----------------|
00000000: 3A 53 42 30 41 30 4E 39 38 30 30 30 30 30 34 30 |:SB0A0N980000040|
00000010: 31 3B |1; |

My workaround is not ideal as it is violates the cbus spec. Please will you amend the cbus DLL to filter out the Node ID if the events are the short type.

Regards
Mike :)
You do not have the required permissions to view the files attached to this post.
MikeBr
 

Re: Node not being ignored for short messages

Postby rjversluis » 07.10.2016, 13:38

Hi Mike,

the NodeNr is set to zero incase of incoming events if the shorevents flag is set.
I do not see any issue.
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
 


Return to mergCBUS