Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLEX: flex_groupmessage moved into for, as it seems that it needs to be determined per page #223

Conversation

ramonsmits
Copy link
Contributor

@ramonsmits ramonsmits commented Sep 11, 2024

The FLEX_NEXT decoder was showing more messages than the FLEX decoder. This change in the FLEX decoder makes them visible.

FLEX|2024-09-11 22:24:44|1600/2/K/A|03.011|002029575 000120111 000120999|ALN|A2 13111 Tweede Oosterparkstraat 1092 Amsterdam 82536
FLEX|2024-09-11 22:24:44|1600/2/K/A|03.011|001130999|ALN|Ongeval wegvervoer letsel A50 Re 136,7 Herpen
FLEX_NEXT|1600/2|03.011.A|0002029575|SG|5|ALN|3.0.K|A2 13111 Tweede Oosterparkstraat 1092 Amsterdam 82536r0
FLEX_NEXT|1600/2|03.011.A|0001130999|SS|5|ALN|3.0.K|Ongeval wegvervoer letsel A50 Re 136,7 Herpen

Previously the field flex_groupmessage was was used for all pages. If the first page set the flag, subsequent pages would falsely process the data as a a group message.

I'm not sure if this change is correct but for all cases.

This might partially fix the following issues:

Full output with verbose 3 with this change:

FLEX:

FLEX: Locked
FLEX: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.038316 envelope=0.195944 symrate=1600.012216
FLEX: State: FIW
FLEX: FrameInfoWord: cycleno=02 frameno=121 fix3=0x04 time=11:46 offset=0.00:00:00
FLEX: State: SYNC2
FLEX: State: DATA
FLEX: Phase A Fixed 1 errors @ 0x04000000  (0x0398b5ac -> 0x0798b5ac)
FLEX: BlockInfoWord: (Phase A) BIW:00000E01 AW:03-03 (0 pages)
FLEX: State: SYNC1
FLEX: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.045365 envelope=0.195910 symrate=1600.000000
FLEX: State: FIW
FLEX: FrameInfoWord: cycleno=02 frameno=122 fix3=0x04 time=11:48 offset=0.00:00:02
FLEX: State: SYNC2
FLEX: State: DATA
FLEX: Phase A Fixed 1 errors @ 0x00000004  (0x23400e05 -> 0x23400e01)
FLEX: Phase A Fixed 1 errors @ 0x00200000  (0x7fdfffff -> 0x7fffffff)
FLEX: BlockInfoWord: (Phase A) BIW:00000E01 AW:03-03 (0 pages)
FLEX: State: SYNC1
FLEX: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.046900 envelope=0.195845 symrate=1600.010396
FLEX: State: FIW
FLEX: FrameInfoWord: cycleno=02 frameno=123 fix3=0x04 time=11:50 offset=0.00:00:04
FLEX: State: SYNC2
FLEX: State: DATA
FLEX: BlockInfoWord: (Phase A) BIW:00000E01 AW:03-03 (0 pages)
FLEX: State: SYNC1
FLEX: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.041813 envelope=0.196833 symrate=1599.189308
FLEX: State: FIW
FLEX: FrameInfoWord: cycleno=03 frameno=009 fix3=0x04 time=12:16 offset=0.00:00:30
FLEX: State: SYNC2
FLEX: State: DATA
FLEX: BlockInfoWord: (Phase A) BIW:0000040B AW:01-01 (0 pages)
FLEX: State: SYNC1
FLEX: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.042365 envelope=0.196562 symrate=1599.354896
FLEX: State: FIW
FLEX: FrameInfoWord: cycleno=03 frameno=010 fix3=0x04 time=12:18 offset=0.00:00:32
FLEX: State: SYNC2
FLEX: State: DATA
FLEX: BlockInfoWord: (Phase A) BIW:00000C03 AW:01-03 (2 pages)
FLEX: CAPCODE:000000000001d52f
FLEX: Found Short Instruction, Group bit: 7 capcodes in group so far 1, adding Capcode: [000120111]
FLEX: CAPCODE:000000000001d8a7
FLEX: Found Short Instruction, Group bit: 7 capcodes in group so far 2, adding Capcode: [000120999]
FLEX: State: SYNC1
FLEX: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.022436 envelope=0.196388 symrate=1599.465934
FLEX: State: FIW
FLEX: FrameInfoWord: cycleno=03 frameno=011 fix3=0x04 time=12:20 offset=0.00:00:34
FLEX: State: SYNC2
FLEX: State: DATA
FLEX: Phase A Fixed 1 errors @ 0x00008000  (0x4c8041ee -> 0x4c80c1ee)
FLEX: Phase A Fixed 1 errors @ 0x00008000  (0x7fff7fff -> 0x7fffffff)
FLEX: Phase A Fixed 2 errors @ 0x00006000  (0x7fff9fff -> 0x7fffffff)
FLEX: BlockInfoWord: (Phase A) BIW:00000C03 AW:01-03 (2 pages)
FLEX: CAPCODE:00000000001ef807
FLEX: Parse Alpha Numeric
FLEX Group message output: Groupbit: 7 Total Capcodes; 2; index 1; Capcode: [000120111]
FLEX Group message output: Groupbit: 7 Total Capcodes; 2; index 2; Capcode: [000120999]
FLEX|2024-09-11 22:28:58|1600/2/K/A|03.011|002029575 000120111 000120999|ALN|A2 13111 Tweede Oosterparkstraat 1092 Amsterdam 82536
FLEX: CAPCODE:00000000001141f7
FLEX: Parse Alpha Numeric
FLEX|2024-09-11 22:28:58|1600/2/K/A|03.011|001130999|ALN|Ongeval wegvervoer letsel A50 Re 136,7 Herpen
FLEX: State: SYNC1

FLEX_NEXT:

FLEX_NEXT: Locked
FLEX_NEXT: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.038316 envelope=0.195944 symrate=1600.012216
FLEX_NEXT: State: FIW
FLEX_NEXT: FrameInfoWord: cycleno=02 frameno=121 fix3=0x04 time=11:46
FLEX_NEXT: State: SYNC2
FLEX_NEXT: State: DATA
FLEX_NEXT: Decoding phase A
FLEX_NEXT: Phase A Fixed 1 errors @ 0x04000000  (0x0398b5ac -> 0x0798b5ac)
FLEX_NEXT: BlockInfoWord: (Phase A) BIW:00000E01 AW 03 VW 03 (up to 0 pages)
FLEX_NEXT: State: SYNC1
FLEX_NEXT: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.045365 envelope=0.195910 symrate=1600.000000
FLEX_NEXT: State: FIW
FLEX_NEXT: FrameInfoWord: cycleno=02 frameno=122 fix3=0x04 time=11:48
FLEX_NEXT: State: SYNC2
FLEX_NEXT: State: DATA
FLEX_NEXT: Decoding phase A
FLEX_NEXT: Phase A Fixed 1 errors @ 0x00000004  (0x23400e05 -> 0x23400e01)
FLEX_NEXT: Phase A Fixed 1 errors @ 0x00200000  (0x7fdfffff -> 0x7fffffff)
FLEX_NEXT: BlockInfoWord: (Phase A) BIW:00000E01 AW 03 VW 03 (up to 0 pages)
FLEX_NEXT: State: SYNC1
FLEX_NEXT: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.046900 envelope=0.195845 symrate=1600.010396
FLEX_NEXT: State: FIW
FLEX_NEXT: FrameInfoWord: cycleno=02 frameno=123 fix3=0x04 time=11:50
FLEX_NEXT: State: SYNC2
FLEX_NEXT: State: DATA
FLEX_NEXT: Decoding phase A
FLEX_NEXT: BlockInfoWord: (Phase A) BIW:00000E01 AW 03 VW 03 (up to 0 pages)
FLEX_NEXT: State: SYNC1
FLEX_NEXT: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.041813 envelope=0.196833 symrate=1599.189308
FLEX_NEXT: State: FIW
FLEX_NEXT: FrameInfoWord: cycleno=03 frameno=009 fix3=0x04 time=12:16
FLEX_NEXT: State: SYNC2
FLEX_NEXT: State: DATA
FLEX_NEXT: Decoding phase A
FLEX_NEXT: BlockInfoWord: (Phase A) BIW:0000040B AW 01 VW 01 (up to 0 pages)
FLEX_NEXT: State: SYNC1
FLEX_NEXT: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.042365 envelope=0.196562 symrate=1599.354896
FLEX_NEXT: State: FIW
FLEX_NEXT: FrameInfoWord: cycleno=03 frameno=010 fix3=0x04 time=12:18
FLEX_NEXT: State: SYNC2
FLEX_NEXT: State: DATA
FLEX_NEXT: Decoding phase A
FLEX_NEXT: BlockInfoWord: (Phase A) BIW:00000C03 AW 01 VW 03 (up to 2 pages)
FLEX_NEXT: Processing page offset #1 AW:0002552F VW:000E2C12
FLEX_NEXT: CAPCODE:000000000001d52f 120111
FLEX_NEXT: AIW 1: capcode:120111 long:0 group:0 groupbit:0
FLEX_NEXT: Invalid VIW
FLEX_NEXT: Processing page offset #2 AW:000258A7 VW:000E2C12
FLEX_NEXT: CAPCODE:000000000001d8a7 120999
FLEX_NEXT: AIW 2: capcode:120999 long:0 group:0 groupbit:0
FLEX_NEXT: Invalid VIW
FLEX_NEXT: State: SYNC1
FLEX_NEXT: SyncInfoWord: sync_code=0x870c baud=1600 levels=2 polarity=POS zero=-0.022436 envelope=0.196388 symrate=1599.465934
FLEX_NEXT: State: FIW
FLEX_NEXT: FrameInfoWord: cycleno=03 frameno=011 fix3=0x04 time=12:20
FLEX_NEXT: State: SYNC2
FLEX_NEXT: State: DATA
FLEX_NEXT: Decoding phase A
FLEX_NEXT: Phase A Fixed 1 errors @ 0x00008000  (0x4c8041ee -> 0x4c80c1ee)
FLEX_NEXT: Phase A Fixed 1 errors @ 0x00008000  (0x7fff7fff -> 0x7fffffff)
FLEX_NEXT: Phase A Fixed 2 errors @ 0x00006000  (0x7fff9fff -> 0x7fffffff)
FLEX_NEXT: BlockInfoWord: (Phase A) BIW:00000C03 AW 01 VW 03 (up to 2 pages)
FLEX_NEXT: Processing page offset #1 AW:001F7807 VW:0004C2D0
FLEX_NEXT: CAPCODE:00000000001ef807 2029575
FLEX_NEXT: AIW 1: capcode:2029575 long:0 group:1 groupbit:7
FLEX_NEXT: VIW 3: type:5 mw1:6 len:19 frag:3
FLEX_NEXT|1600/2|03.011.A|0002029575|SG|5|ALN|3.0.K|A2 13111 Tweede Oosterparkstraat 1092 Amsterdam 82536r0
FLEX_NEXT: Processing page offset #2 AW:0011C1F7 VW:00044C56
FLEX_NEXT: CAPCODE:00000000001141f7 1130999
FLEX_NEXT: AIW 2: capcode:1130999 long:0 group:0 groupbit:0
FLEX_NEXT: VIW 4: type:5 mw1:25 len:16 frag:3
FLEX_NEXT|1600/2|03.011.A|0001130999|SS|5|ALN|3.0.K|Ongeval wegvervoer letsel A50 Re 136,7 Herpen
FLEX_NEXT: State: SYNC1

@ramonsmits
Copy link
Contributor Author

ramonsmits commented Sep 11, 2024

@Zanoroy Is this change correct based on your understanding of the protocol?

@Zanoroy
Copy link
Contributor

Zanoroy commented Sep 11, 2024

@ramonsmits Nice catch, yes that would appear correct.

@ramonsmits ramonsmits force-pushed the flex-reset-group-message-flag-per-page branch from 5c8399e to 4dc14b5 Compare September 15, 2024 20:20
@ramonsmits ramonsmits marked this pull request as ready for review September 15, 2024 20:25
@ramonsmits
Copy link
Contributor Author

@EliasOenal I've rebased this and its ready for merging

@EliasOenal EliasOenal merged commit c8feac4 into EliasOenal:master Sep 20, 2024
@filibuster007
Copy link

Thank you Ramon for finding this, this is the solution for the messages FLEX was missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants