It also turns out that every sample machine that claims to be F0V3 in its
property file contains only F0V2 data, so there appears to be nothing
additional to test, but now there are more warnings in case we ever do
actually encounter F0V3 data.
Also warn if we ever encounter oximetry.
The only difference so far is the lack of doubled duration for PB/LL, slightly rearranged
events 0-3, and the absence of events 0x14 and 0x15 in F0V2 (so far).
The only change in import functionality is that apneas/hypopneas now have a (correct)
duration of 0.
Next step is to test against more samples and particularly F0V3 samples.
It turns out each familyVersion has records of different sizes, including
the first one containing the settings. It may make more sense to split
summary and/or settings parsing into multiple familyVersion-specific functions.
Also it looks like the F0V4 humidifier settings are actually 60 Series
settings, and the "V2" settings are original System One settings, not
all fileVersion 2 machines.
"Support" in this instance means that it will quietly ignore the events, since there's really
nothing to import. But this means that parsing will correctly continue past the events, even
though so far they're the only events in a session. There are diagnostics to log if that
assumption turns out not to be correct.
Still trying to figure out timestamp event.
Other summary parsers will need review, since there was an initial
filter that was dropping sessions that began with event 5 or 6,
now commented out.
Based on the F0V23 loop and F0V6 switch statement, along with manual review of
several sample files to determine record length.
Split ParseHumidifierSettingF0V4 out from ParseSettingsF0V4.
These are events that are in the PRS1 files but which OSCAR doesn't know how to present:
- An F0V6 event with duration that looks like PB or LL but doesn't appear on any official reports
- The Auto-CPAP pressure to use at the beginning of a session
- A report of the snores detected at each pressure/EPAP/IPAP
- Apnea alarms on F3V6
Rather than bury the understanding in commented-out sections of the parser, these events
will now be parsed and added to the internal event stream, which allows them to be dumped
to YAML. Whenever OSCAR eventually supports these data, the importer will have ready
access to them.
Again, no change to external behavior.
This only affects the parser at this point, and the importer has been updated so that
there is no externally visible change to the imported data.
Eventually we'll need to figure out how to display the two differing kinds of
pressures, at which point we'll need to fix the importer to use the right channels,
instead of the inconsistent treatment now.
The next step will be to split parsing from mode interpretation, so that
we can at least accurately identify all of PRS1's modes. Then we can
work on mapping that to OSCAR's notion of modes, which probably then needs
to be augmented.
Also fix an issue with initializing the model names, since QObject::tr
won't work at global initialization time. And series detection needs
the untranslated names anyway.
Also clean up brick detection.
The official names don't yet appear anywhere, since there's a question
of how to juggle manufacturer, series, and model name in the various
places they're (inconsistently) displayed.
Series is also used to pick the machine icon.
This fixes the mask pressure graph as well as many of the events.
There are still some issues with presentation: some of the events are
being drawn at the wrong time, and certain events and statistics
don't really behave the way they're displayed.
Also several events have yet to be encountered in sample data.
Pressure settings are now properly being found and decoded, but there are lots
of unknown fields to figure out.
It turns out it uses the same humidifier setting encoding as F0V6, and the first
several slices seem to be the same. But pressure encodings are different, with
a gain of 0.125 instead of 0.1, presumably to allow for a maximum pressure of
30 cmH2O.
This one's slice 8 is shorter than anything else we've seen before!
Also add support for a new slice type and noted possible values
for other data, including a possible lead on the CPAP mode.
Interestingly, it looks like settings and other slices can be of
varying length, even on the same machine. Stranger still, sometimes
the list of possible slices can change on the same machine.
Mostly this is commenting out warnings about values that are different
for every session. They can be sorted out later.
Humidifier status and tube temperature are cleaned up as well.
Fixed a bug in the ramp pressure setting, identified the mask resistance
setting, and found the summary equivalent of the humidifier setting change
slice.
This is mostly a cut-and-paste of the ParseComplianceF0V6,
but the some of the slice codes and sizes are different.
Also start adding machine names for tested models.
The new slice type appears when humidifier settings have changed during
the session, and includes a timestamp. The session time now matches
reports.
Otherwise just comments to indicate other values seen in the sample data,
including a lead on humidifier encoding.
Lots of debug messages and unknown values, but the structure seems right.
This is largely based on a combination of the mainblock parsing for fileVersion 3
as found in ParseSummary() and the switch statements of ParseSummaryF0V6,
based on our understanding of slices from F0V23. The slice types here
come from sample 200X files.
Also add some debug messages to FV3 parsing. It's clear the current
approach is wrong. This looks a lot like the slices seen earlier,
since hbdata values appear more than once in a given file.
Also turn off summary YAML since the next bit of work will focus on
parsing.
It turns out the session end time was intentionally not being set in ParseSummary,
probably due to its unreliability. This may be revisited once things are more
stable, but for now the old behavior is retained.