Skip to content

Conversation

@FreddieAkeroyd
Copy link
Member

@FreddieAkeroyd FreddieAkeroyd commented Sep 19, 2025

Proposal for an NXtextlog base class, this is similar to NXlog but specifically for text based data as NXlog only supports numeric data. It could be used for example to record status/error/log messages from hardware or software and meant to handle cases where a large number of NXnote entries is undesirable. See #1432 and #1591

The implementation below currently has the option of a separator attribute to tell the reader how to split an indiidual value, but i'm not sure how useful that may or may not be. It may just be better to write multiple values in one log with the same timestamp, or as separate NXtextlog entries, for these cases.

Other questions might be:

  • should there be a text encoding attribute or just mandate UTF-8
  • is it useful to allow an optional end-of-line character to be specified, or just leave that interpretation for the reader

@FreddieAkeroyd FreddieAkeroyd force-pushed the add-nxtextlog-base-class branch 2 times, most recently from 7e236e9 to 7d588bd Compare September 19, 2025 23:55
@FreddieAkeroyd FreddieAkeroyd force-pushed the add-nxtextlog-base-class branch from 7d588bd to 78f0cd6 Compare September 20, 2025 00:03
@rayosborn
Copy link
Contributor

Is it really necessary to create a new base class? Can't we just add a text array as an option to the NXlog class? We have just added dozens of new base classes, so perhaps I shouldn't complain about an extra one, but I think we need to be clear if it's really necessary.

@FreddieAkeroyd
Copy link
Member Author

FreddieAkeroyd commented Sep 21, 2025

Hi Ray, this PR is in relation to #1432 which I forgot to reference in the PR description (have added now). In a previous discussion on this in #687 the consensus seemed to favor not changing NXlog to allow non-numeric data, but as that was a few years ago it would be worth revisiting this discussion.

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.

2 participants