Index: denali.pro =================================================================== diff -u -r00d9bb06ec2bad14f6dc2db678b750c244f694ef -r84c5373209a1a488c00917995f5553d442d159a4 --- denali.pro (.../denali.pro) (revision 00d9bb06ec2bad14f6dc2db678b750c244f694ef) +++ denali.pro (.../denali.pro) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -268,7 +268,8 @@ VER_MINOR_DEV=\\\"0\\\" \ VER_MICRO_DEV=\\\"0\\\" \ VER_REVIS_DEV=\\\"$$system( date "+%m%d%H%M" )\\\" \ - VER_APPLY=\\\"$$system( touch -m main.cpp)\\\" + VER_APPLY=\\\"$$system( touch -m main.cpp )\\\" \ + VER_BRANCH=\\\"$$system( git rev-parse --abbrev-ref HEAD )\\\" CodeCoverage { message(Building with Squish Coco) @@ -399,4 +400,5 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target -DISTFILES += +DISTFILES += \ + README.md Index: denali.pro.user =================================================================== diff -u -r72fe36cdaa95eb8b68ba8a3714f8a92df65b4486 -r84c5373209a1a488c00917995f5553d442d159a4 --- denali.pro.user (.../denali.pro.user) (revision 72fe36cdaa95eb8b68ba8a3714f8a92df65b4486) +++ denali.pro.user (.../denali.pro.user) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -89,7 +89,7 @@ Desktop Qt 5.12.5 GCC 64bit Desktop Qt 5.12.5 GCC 64bit qt.qt5.5125.gcc_64_kit - 0 + 1 0 0 @@ -1176,7 +1176,7 @@ false true - /home/denali/Projects/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug + /home/denali/Projects/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release 1 Index: main.cpp =================================================================== diff -u -r12e7b6dda53cf8db7707c7fa55dcf6137e7d6997 -r84c5373209a1a488c00917995f5553d442d159a4 --- main.cpp (.../main.cpp) (revision 12e7b6dda53cf8db7707c7fa55dcf6137e7d6997) +++ main.cpp (.../main.cpp) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -24,6 +24,7 @@ * - \subpage CommandLineSwitches * - \subpage DenaliMessageStructure * - \subpage MessageFlow + * - \subpage GeneralModelsDescription * - \subpage MessageView */ @@ -194,32 +195,40 @@ } /*! * \brief setApplicationVersion - * \details sets up the application version regarding the environment valiables + * \details sets up the application version regarding the environment variables * which are set by bamboo and if those are not set value of 0 will be used * and revision(build) version will be set to current date/time. */ void setApplicationVersion() { - QString ver_major = QString("%1").arg(VER_MAJOR); - if (ver_major.isEmpty()) { - ver_major = VER_MAJOR_DEV; + QString ver_major = QString("%1").arg(VER_MAJOR ); + QString ver_minor = QString("%1").arg(VER_MINOR ); + QString ver_micro = QString("%1").arg(VER_MICRO ); + QString ver_revis = QString("%1").arg(VER_REVIS ); + QString ver_branch = QString("%1").arg(VER_BRANCH ); + + bool isOnMaster = !ver_branch.compare("master"); + if (isOnMaster) { + ver_branch = ""; + ver_major += '.'; + ver_minor += '.'; + ver_micro += '.'; + ver_revis += '.'; } - QString ver_minor = QString("%1").arg(VER_MINOR); - if (ver_minor.isEmpty()) { - ver_minor = VER_MINOR_DEV; + else { + ver_branch = VER_BRANCH ; + ver_branch += '.'; + ver_major = VER_MAJOR_DEV ; + ver_minor = VER_MINOR_DEV ; + ver_micro = VER_MICRO_DEV ; + ver_revis = VER_REVIS_DEV ; } - QString ver_micro = QString("%1").arg(VER_MICRO); - if (ver_micro.isEmpty()) { - ver_micro = VER_MICRO_DEV; - } - QString ver_revis = QString("%1").arg(VER_REVIS); - if (ver_revis.isEmpty()) { - ver_revis = VER_REVIS_DEV; - } - QCoreApplication::setApplicationVersion(QString("%1.%2.%3.%4") - .arg(ver_major) - .arg(ver_minor) - .arg(ver_micro) - .arg(ver_revis)); + QCoreApplication::setApplicationVersion( + QString("%1%2.%3.%4.%5") + .arg(ver_branch) + .arg(ver_major) + .arg(ver_minor) + .arg(ver_micro) + .arg(ver_revis)); } #ifdef UNIT_TEST Index: sources/gui/qml/main.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -r84c5373209a1a488c00917995f5553d442d159a4 --- sources/gui/qml/main.qml (.../main.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/main.qml (.../main.qml) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -216,7 +216,7 @@ color: Colors.textMain anchors { right: parent.right - margins: 10 + margins: 5 bottom: parent.bottom } horizontalAlignment: Text.AlignRight Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -r56e378f7504701b9e9a9dccaf205aef2fd52c58e -r84c5373209a1a488c00917995f5553d442d159a4 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 56e378f7504701b9e9a9dccaf205aef2fd52c58e) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -32,8 +32,7 @@ property int progressValue : vTreatmentTime.time_Elapsed property int timeTextValue : vTreatmentTime.time_Remaining - property bool isPaused : vHDTreatmentStates.txPaused || - vTreatmentAdjustmentSaline.isStarted + property bool isPaused : vHDTreatmentStates.txPaused signal clicked() Index: sources/model/MAbstract.h =================================================================== diff -u -r12e7b6dda53cf8db7707c7fa55dcf6137e7d6997 -r84c5373209a1a488c00917995f5553d442d159a4 --- sources/model/MAbstract.h (.../MAbstract.h) (revision 12e7b6dda53cf8db7707c7fa55dcf6137e7d6997) +++ sources/model/MAbstract.h (.../MAbstract.h) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -24,10 +24,34 @@ namespace Model { /*! + * \page GeneralModelsDescription General Models Description + * The Models are the entities which keep the data and methods to manipulate the data. + * The UI Application is using different types of models in different situations. + * One use case, as the Denali Device is using the Denali Message Protocol over the CANBus for all the messaging transactions + * and almost all the Messages carrying data payloads of a model object for each message, + * is keeping the data for that specific message. + * So for each message there is a model to keep the structured data. + * Each model has been described in its class. + * + * The Models using for Denali Messaging depending on the Unit on the CANBus and the type of the messages categorized into : + * + * **Units on the CANBus :** + * | | | | + * |:-----:|:-----:|:---:| + * | UI | HD | DG | + * + * **Type of messages known at the moment :** + * | | | | | + * |:------:|:----:|:-----------:|:------:| + * | Events | Data | Adjustments | Alarms | + * + */ + +/*! * \brief The MAbstract class - * \details All the Message Models has to be inherited from MAbstract + * \details All the Message Models has to be inherited from MAbstract. * As this class is abstract it dictates children to implement required methods. - * And also implements some some share methods to ease implementing Models. + * And also implements some share methods to ease implementing Models. */ class MAbstract { Index: sources/model/MModel.h =================================================================== diff -u -r12e7b6dda53cf8db7707c7fa55dcf6137e7d6997 -r84c5373209a1a488c00917995f5553d442d159a4 --- sources/model/MModel.h (.../MModel.h) (revision 12e7b6dda53cf8db7707c7fa55dcf6137e7d6997) +++ sources/model/MModel.h (.../MModel.h) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -75,16 +75,14 @@ * MessageInterpreter -> MessageBuilder [dir="both" ]; * } * user -> QML [dir="both" ]; - * QML -> { GuiView, } [dir="both" ]; + * QML -> { GuiView } [dir="both" ]; * { GuiView, } -> GuiController [dir="both" ]; * GuiController -> ApplicationController [dir="both" ]; * ApplicationController -> MessageDispatcher [dir="both" ]; * MessageDispatcher -> FrameInterface [dir="both" ]; * FrameInterface -> CanInterface [dir="both" ]; * CanInterface -> CANBus [dir="both" ]; * } - * - * * \enddot * * \note @@ -216,6 +214,14 @@ REGISTER_METATYPE( AdjustSalineResponseData ) \ //===============================================================================// +/*! + \def ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS + \details This macro connects the source object vSource to the models defined in the list for received messages. + It connects source didActionReceive() signal to the this pointer of the class object + onActionReceive(). + This macro should be used in the header file of the class. + This macro should be used with its counterpart macro \ref ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS + */ #define ACTION_RECEIVE_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, BloodFlowData ) \ @@ -263,6 +269,14 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustSalineRequestData ) \ //===============================================================================// +/*! + \def ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS + \details This macro connects the source object vSource to the models defined in the list for received messages. + It connects source didActionReceive() signal to the this pointer of the class object + onActionReceive(). + This macro should be used in the header file of the class. + This macro should be used with its counterpart macro \ref ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS + */ #define ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS \ \ ACTION_RECEIVE_BRIDGE_DEFINITION( BloodFlowData ) \ Index: sources/storage/DriveWatcher.h =================================================================== diff -u -r12e7b6dda53cf8db7707c7fa55dcf6137e7d6997 -r84c5373209a1a488c00917995f5553d442d159a4 --- sources/storage/DriveWatcher.h (.../DriveWatcher.h) (revision 12e7b6dda53cf8db7707c7fa55dcf6137e7d6997) +++ sources/storage/DriveWatcher.h (.../DriveWatcher.h) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -31,9 +31,16 @@ /*! * \brief The DriveWatcher class - * \details This class is to watch the USB device to be mounted if plugged in - * or to be unmounted if user through UI requests it. - * and will notify UI (user) on mounted and removed(No USB drive exists). + * \details This class is watching for the USB and SD-Card drives in Linux file system. + * It has the interval of 1000 ms and will look if any device between /dev/sda1 to /dev/sdz1 exists then will mount it in /media/usb, + * and does check if the SD-Card has been mounted under /media/sdcard, + * but for SD-Card doesn't try to mount it and it has to be mounted prior to UI Application start + * and that's because from UI Application perspective it is not a removable/hot-plug device (although physically it is). + * This class works in its own thread and will send notification by emitting signals about the USB device status + * which are Mounted, Unmounted, Removed + * and SD-Card space conditions changes. + * \note : 'Removed' is when no USB device present. + * */ class DriveWatcher : public QObject { Index: sources/storage/FileHandler.h =================================================================== diff -u -r12e7b6dda53cf8db7707c7fa55dcf6137e7d6997 -r84c5373209a1a488c00917995f5553d442d159a4 --- sources/storage/FileHandler.h (.../FileHandler.h) (revision 12e7b6dda53cf8db7707c7fa55dcf6137e7d6997) +++ sources/storage/FileHandler.h (.../FileHandler.h) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -25,7 +25,7 @@ * This class is suppose to be the static class * which contains methods to manipulate files and folders * Since it is static it doesn't have thread so needs to be used with care - * and the class(es) which is using it needs to be taking care of the threading + * and the classes which are using it need to take care of the threading. */ class FileHandler { Index: sources/storage/Logger.h =================================================================== diff -u -r12e7b6dda53cf8db7707c7fa55dcf6137e7d6997 -r84c5373209a1a488c00917995f5553d442d159a4 --- sources/storage/Logger.h (.../Logger.h) (revision 12e7b6dda53cf8db7707c7fa55dcf6137e7d6997) +++ sources/storage/Logger.h (.../Logger.h) (revision 84c5373209a1a488c00917995f5553d442d159a4) @@ -43,15 +43,27 @@ /*! * \brief The Logger class * \details Main logger class that has all the required implementation for logging. - * The provided interface is the LOG_DATUM, LOG_EVENT, LOG_DEBUG, LOG_EXPORT defines - * and no other methods. - * This should have its own thread. + * The provided interface is the LOG_DATUM, LOG_EVENT, LOG_DEBUG, LOG_EXPORT defines + * and no other methods. + * + * This object is logging all the registered Denali Messages transactions over the CANBus in CSV format text file. + * Logger class currently has 3 types which are Event, Error, Datum. + * The Event and Data messages are logged in the csv file with "log" extension + * and the UI Application specific errors are logged in a csv file with the "err" extension. + * Logs file names format start with current system date by "" format and "_denali.". + * The content of the file is depending on each log type and has ",,,,". + * Currently, the file name and content formatting can be modified by changing the formatting values in Logger class. + * + * This class has its own thread for logging. + * Also for exporting the log files it uses asynchronous thread calling by QtConcurrent. + * It communicated with other classes only with Signal/Slots for thread safety and will notify other classes when the export is done by signals. + * * \note - * PLEASE BE CAREFUL THIS CLASS IS USING QtConcurrent::run FOR THE EXPORT LOG FILES. - * AND ONLY PRIVATE VOID LOG (,) IS CALLING IN POOLED THREAD - * PLEASE BE VERY CAREFUL. - * ALL THE OTHER CLASSES TO USE THIS CLASS SHOULD ONLY USE LOG_DATUM, LOG_EVENT, LOG_DEBUG - * TO DO THE LOGGING + * PLEASE BE CAREFUL THIS CLASS IS USING QtConcurrent::run FOR THE EXPORT LOG FILES. + * AND ONLY PRIVATE VOID LOG (,) IS CALLING IN POOLED THREAD + * PLEASE BE VERY CAREFUL. + * ALL THE OTHER CLASSES TO USE THIS CLASS SHOULD ONLY USE LOG_DATUM, LOG_EVENT, LOG_DEBUG + * TO DO THE LOGGING */ class Logger : public QObject {