2018-04-27 04:29:03 +00:00
|
|
|
|
/* Intellipap Loader Header
|
2014-04-09 21:01:57 +00:00
|
|
|
|
*
|
2024-01-13 20:27:48 +00:00
|
|
|
|
* Copyright (c) 2019-2024 The OSCAR Team
|
2024-02-01 00:14:19 +00:00
|
|
|
|
* Copyright (C) 2011-2018 Mark Watkins
|
2014-04-09 21:01:57 +00:00
|
|
|
|
*
|
|
|
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
2018-06-04 20:48:38 +00:00
|
|
|
|
* License. See the file COPYING in the main directory of the source code
|
|
|
|
|
* for more details. */
|
2011-11-26 04:00:31 +00:00
|
|
|
|
|
2011-11-20 02:59:00 +00:00
|
|
|
|
#ifndef INTELLIPAP_LOADER_H
|
|
|
|
|
#define INTELLIPAP_LOADER_H
|
|
|
|
|
|
|
|
|
|
#include "SleepLib/machine.h" // Base class: MachineLoader
|
|
|
|
|
#include "SleepLib/machine_loader.h"
|
|
|
|
|
#include "SleepLib/profiles.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//********************************************************************************************
|
|
|
|
|
/// IMPORTANT!!!
|
|
|
|
|
//********************************************************************************************
|
|
|
|
|
// Please INCREMENT the following value when making changes to this loaders implementation.
|
|
|
|
|
//
|
2014-06-22 15:40:52 +00:00
|
|
|
|
const int intellipap_data_version = 3;
|
2011-11-20 02:59:00 +00:00
|
|
|
|
//
|
|
|
|
|
//********************************************************************************************
|
|
|
|
|
|
2011-12-19 05:35:05 +00:00
|
|
|
|
/*! \class Intellipap
|
2022-02-27 16:50:10 +00:00
|
|
|
|
\brief Intellipap customized device object
|
2011-12-19 05:35:05 +00:00
|
|
|
|
*/
|
2014-04-17 05:58:57 +00:00
|
|
|
|
class Intellipap: public CPAP
|
2011-11-20 02:59:00 +00:00
|
|
|
|
{
|
2014-04-17 05:58:57 +00:00
|
|
|
|
public:
|
2018-06-04 23:26:46 +00:00
|
|
|
|
Intellipap(Profile *, MachineID id = 0);
|
2011-11-20 02:59:00 +00:00
|
|
|
|
virtual ~Intellipap();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2014-04-17 05:58:57 +00:00
|
|
|
|
const int intellipap_load_buffer_size = 1024 * 1024;
|
2011-11-20 02:59:00 +00:00
|
|
|
|
|
2014-08-03 13:00:13 +00:00
|
|
|
|
extern ChannelID INTP_SmartFlexMode;
|
|
|
|
|
extern ChannelID INTP_SmartFlexLevel;
|
2011-11-20 02:59:00 +00:00
|
|
|
|
|
2014-04-17 05:58:57 +00:00
|
|
|
|
const QString intellipap_class_name = STR_MACH_Intellipap;
|
2011-11-20 02:59:00 +00:00
|
|
|
|
|
2011-12-19 05:35:05 +00:00
|
|
|
|
/*! \class IntellipapLoader
|
|
|
|
|
\brief Loader for DeVilbiss Intellipap Auto data
|
|
|
|
|
This is only relatively recent addition and still needs more work
|
|
|
|
|
*/
|
2014-08-03 13:00:13 +00:00
|
|
|
|
class IntellipapLoader : public CPAPLoader
|
2011-11-20 02:59:00 +00:00
|
|
|
|
{
|
2014-04-17 05:58:57 +00:00
|
|
|
|
public:
|
2011-11-20 02:59:00 +00:00
|
|
|
|
IntellipapLoader();
|
|
|
|
|
virtual ~IntellipapLoader();
|
2014-04-26 09:54:08 +00:00
|
|
|
|
|
|
|
|
|
//! \brief Detect if the given path contains a valid Folder structure
|
|
|
|
|
virtual bool Detect(const QString & path);
|
|
|
|
|
|
2011-12-19 05:35:05 +00:00
|
|
|
|
//! \brief Scans path for Intellipap data signature, and Loads any new data
|
2018-04-27 04:29:03 +00:00
|
|
|
|
virtual int Open(const QString & path);
|
2018-03-25 19:23:05 +00:00
|
|
|
|
//! \brief Scans path for Intellipap DV5 data signature, and Loads any new data
|
2018-04-27 04:29:03 +00:00
|
|
|
|
virtual int OpenDV5(const QString & path);
|
2018-03-25 19:23:05 +00:00
|
|
|
|
//! \brief Scans path for Intellipap DV6 data signature, and Loads any new data
|
2018-04-27 04:29:03 +00:00
|
|
|
|
virtual int OpenDV6(const QString & path);
|
2011-12-19 05:35:05 +00:00
|
|
|
|
|
|
|
|
|
//! \brief Returns SleepLib database version of this IntelliPap loader
|
2011-11-20 02:59:00 +00:00
|
|
|
|
virtual int Version() { return intellipap_data_version; }
|
2011-12-19 05:35:05 +00:00
|
|
|
|
|
2022-02-27 16:50:10 +00:00
|
|
|
|
//! \brief Returns the device class name of this IntelliPap, "Intellipap"
|
2014-07-28 13:56:29 +00:00
|
|
|
|
virtual const QString &loaderName() { return intellipap_class_name; }
|
2011-12-19 05:35:05 +00:00
|
|
|
|
|
2022-02-27 16:50:10 +00:00
|
|
|
|
//! \brief Creates a device object, indexed by serial number
|
2014-07-28 13:56:29 +00:00
|
|
|
|
// Machine *CreateMachine(QString serial);
|
2011-12-19 05:35:05 +00:00
|
|
|
|
|
|
|
|
|
//! \brief Registers this MachineLoader with the master list, so Intellipap data can load
|
2011-11-20 02:59:00 +00:00
|
|
|
|
static void Register();
|
2014-07-28 13:56:29 +00:00
|
|
|
|
|
|
|
|
|
virtual MachineInfo newInfo() {
|
2014-08-03 13:00:13 +00:00
|
|
|
|
return MachineInfo(MT_CPAP, 0, intellipap_class_name, QObject::tr("DeVilbiss"), QString(), QString(), QString(), QObject::tr("Intellipap"), QDateTime::currentDateTime(), intellipap_data_version);
|
2014-07-28 13:56:29 +00:00
|
|
|
|
}
|
2014-08-06 14:06:44 +00:00
|
|
|
|
virtual void initChannels();
|
|
|
|
|
|
2014-08-03 13:00:13 +00:00
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// Now for some CPAPLoader overrides
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
virtual QString presRelLabel() { return QObject::tr("SmartFlex Settings"); } // might not need this one
|
|
|
|
|
|
|
|
|
|
virtual ChannelID presReliefMode() { return INTP_SmartFlexMode; }
|
|
|
|
|
virtual ChannelID presRelLevel() { return INTP_SmartFlexLevel; }
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2014-04-17 05:58:57 +00:00
|
|
|
|
protected:
|
2011-11-20 02:59:00 +00:00
|
|
|
|
QString last;
|
|
|
|
|
|
2014-04-17 05:58:57 +00:00
|
|
|
|
unsigned char *m_buffer;
|
2011-11-20 02:59:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // INTELLIPAP_LOADER_H
|