Skip to content

Keep missing Type G dates empty - #242

Merged
lategoodbye merged 1 commit into
rscada:masterfrom
radixun:fix/type-g-missing-date
Oct 17, 2026
Merged

lategoodbye merged 1 commit into
rscada:masterfrom
radixun:fix/type-g-missing-date

Conversation

@radixun

@radixun radixun commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Return an empty value for a missing Type G date in both XML modes. Add the frame from #123 and its expected XML files.

Validation on Linux with GCC and UBSan:

  • The base reproduces both incorrect XML values and 15 failed API checks.
  • All 19 external C test cases pass.
  • The existing generate-xml.sh checks all 78 frames.
  • All 210 parser cases complete. The 154 existing XML comparisons pass. The output and exit status for all 208 existing parser cases remain unchanged.

Fixes #123.

Comment thread test/Makefile.am Outdated

EXTRA_DIST = test-frames/issue-123.hex \
test-frames/issue-123.xml \
test-frames/issue-123.norm.xml

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please drop the test program and just keep the hex, xml and norm.xml?

Changes to this file are not necessary, the xml files are done by generate-xml.sh

Comment thread Makefile.am Outdated
ACLOCAL_AMFLAGS = -Werror -I m4

check-local:
$(MAKE) -C test check

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this, too

@lategoodbye

Copy link
Copy Markdown
Collaborator

Thanks for fixing this old issue. Could please move the first paragraph of the pull request into the commit message of the first commit?

@lategoodbye lategoodbye added bug and removed bug labels Oct 16, 2026
The frame in rscada#123 contains `FF FF` for a missing Type G date. Both XML modes currently show `2127-15-31`. Return an empty value in both date conversion paths and keep the record metadata.
@radixun
radixun force-pushed the fix/type-g-missing-date branch from 84cc9a1 to e686cd6 Compare October 17, 2026 10:27
@radixun

radixun commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Removed the C test program and both Makefile.am changes. The patch keeps the hex, XML, and normalized XML files. Moved the problem description into the first commit message.

Please review the updated PR when you have time.

@lategoodbye
lategoodbye merged commit fd7e800 into rscada:master Oct 17, 2026
2 checks passed
@lategoodbye

Copy link
Copy Markdown
Collaborator

Thanks

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.

DataRecord date issue

2 participants